Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/jl_exported_funcs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
XX(jl_stderr_obj) \
XX(jl_stderr_stream) \
XX(jl_stdin_stream) \
XX(jl_stdout_obj) \
XX(jl_stdout_stream) \
XX(jl_stored_inline) \
XX(jl_string_ptr) \
Expand Down
1 change: 1 addition & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,7 @@ JL_DLLEXPORT int jl_termios_size(void);

// showing and std streams
JL_DLLEXPORT void jl_flush_cstdio(void) JL_NOTSAFEPOINT;
JL_DLLEXPORT jl_value_t *jl_stdout_obj(void) JL_NOTSAFEPOINT; // Is "used" in r-juliacall.
JL_DLLEXPORT jl_value_t *jl_stderr_obj(void) JL_NOTSAFEPOINT;
JL_DLLEXPORT size_t jl_static_show(JL_STREAM *out, jl_value_t *v) JL_NOTSAFEPOINT;
JL_DLLEXPORT size_t jl_static_show_func_sig(JL_STREAM *s, jl_value_t *type) JL_NOTSAFEPOINT;
Expand Down
9 changes: 9 additions & 0 deletions src/rtutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,15 @@ JL_DLLEXPORT void jl_flush_cstdio(void) JL_NOTSAFEPOINT
fflush(stderr);
}

// Please do not remove jl_stdout_obj (again breaking r-juliacall). Maybe after https://github.com/Non-Contradiction/JuliaCall/pull/237
JL_DLLEXPORT jl_value_t *jl_stdout_obj(void) JL_NOTSAFEPOINT
{
if (jl_base_module == NULL)
return NULL;
jl_binding_t *stdout_obj = jl_get_module_binding(jl_base_module, jl_symbol("stdout"), 0);
return stdout_obj ? jl_atomic_load_relaxed(&stdout_obj->value) : NULL;
}

JL_DLLEXPORT jl_value_t *jl_stderr_obj(void) JL_NOTSAFEPOINT
{
if (jl_base_module == NULL)
Expand Down
Loading