Skip to content

Commit

Permalink
Clarify that jl_init_with_image can be called with abspath sysimage (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored May 27, 2022
1 parent a136279 commit 762561c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/jlapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,19 @@ JL_DLLEXPORT void jl_set_ARGS(int argc, char **argv)
}

// First argument is the usr/bin directory where the julia binary is, or NULL to guess.
// Second argument is the path of a system image file (*.ji) relative to the
// first argument path, or relative to the default julia home dir.
// The default is something like ../lib/julia/sys.ji
// Second argument is the path of a system image file (*.so).
// A non-absolute path is interpreted as relative to the first argument path, or
// relative to the default julia home dir.
// The default is something like ../lib/julia/sys.so
JL_DLLEXPORT void jl_init_with_image(const char *julia_bindir,
const char *image_relative_path)
const char *image_path)
{
if (jl_is_initialized())
return;
libsupport_init();
jl_options.julia_bindir = julia_bindir;
if (image_relative_path != NULL)
jl_options.image_file = image_relative_path;
if (image_path != NULL)
jl_options.image_file = image_path;
else
jl_options.image_file = jl_get_default_sysimg_path();
julia_init(JL_IMAGE_JULIA_HOME);
Expand Down
2 changes: 1 addition & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ JL_DLLEXPORT const char *jl_get_libdir(void);
JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel);
JL_DLLEXPORT void jl_init(void);
JL_DLLEXPORT void jl_init_with_image(const char *julia_bindir,
const char *image_relative_path);
const char *image_path);
JL_DLLEXPORT const char *jl_get_default_sysimg_path(void);
JL_DLLEXPORT int jl_is_initialized(void);
JL_DLLEXPORT void jl_atexit_hook(int status);
Expand Down

0 comments on commit 762561c

Please sign in to comment.