Skip to content

Commit 5082ef6

Browse files
author
Christopher Doris
committed
reset the context at init
i think some values were baked into the precompile image and breaking things, maybe, dunno...
1 parent b861036 commit 5082ef6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/C/context.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@ end
3131

3232
function init_context()
3333

34+
# reset the context
35+
CTX.is_embedded = false
36+
CTX.is_initialized = false
37+
CTX.is_preinitialized = false
38+
CTX.lib_ptr = C_NULL
39+
CTX.exe_path = missing
40+
CTX.lib_path = missing
41+
CTX.dlopen_flags = RTLD_LAZY | RTLD_DEEPBIND | RTLD_GLOBAL
42+
CTX.pyprogname = missing
43+
CTX.pyprogname_w = missing
44+
CTX.pyhome = missing
45+
CTX.pyhome_w = missing
46+
CTX.which = :unknown
47+
CTX.version = missing
48+
49+
# check if Julia is embedded into pyjuliacall
3450
CTX.is_embedded = hasproperty(Base.Main, :__PythonCall_libptr)
3551

3652
if CTX.is_embedded

0 commit comments

Comments
 (0)