Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of __GAPINTERNAL_LOADED_FROM_GAP #368

Merged
Merged
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: 0 additions & 1 deletion pkg/GAPJulia/JuliaInterface/read.g
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ReadPackage( "JuliaInterface", "gap/JuliaInterface.gi");
ReadPackage( "JuliaInterface", "gap/BindCFunction.gi" );

if not IsBound( __JULIAINTERNAL_LOADED_FROM_JULIA ) then
JuliaEvalString( "__GAPINTERNAL_LOADED_FROM_GAP = true" );
JuliaEvalString( "Base.MainInclude.include(Base.find_package(\"GAP\"))" );
fi;

Expand Down
7 changes: 5 additions & 2 deletions src/GAP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ function __init__()
gap_module = @__MODULE__
Base.MainInclude.eval(:(__JULIAGAPMODULE = $gap_module))

# TODO: try to get rid of __GAPINTERNAL_LOADED_FROM_GAP, too
if ! isdefined(Main, :__GAPINTERNAL_LOADED_FROM_GAP) || Main.__GAPINTERNAL_LOADED_FROM_GAP != true
# check if GAP was already loaded
try
sym = cglobal("GAP_Initialize")
catch e
# GAP was not yet loaded, do so now
run_it(GAPROOT, error_handler_func)
end
register_GapObj()
Expand Down