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

Resolve https://github.com/gap-system/gap/issues/5761 #153

Merged
merged 1 commit into from
Aug 26, 2024
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
8 changes: 5 additions & 3 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ Dependencies := rec(
),

AvailabilityTest := function()
if (not ("datastructures" in SHOW_STAT())) and
(Filename(DirectoriesPackagePrograms("datastructures"), "datastructures.so") = fail) then
return fail;
if not IsKernelExtensionAvailable("datastructures") then
LogPackageLoadingMessage(PACKAGE_WARNING,
["the kernel module is not compiled, ",
"the package cannot be loaded."]);
return fail;
fi;
return true;
end,
Expand Down
8 changes: 2 additions & 6 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
#R Read the declaration files.
##

if (not IsBound(__DATASTRUCTURES_C)) and ("datastructures" in SHOW_STAT()) then
LoadStaticModule("datastructures");
fi;
if (not IsBound(__DATASTRUCTURES_C)) and
(Filename(DirectoriesPackagePrograms("datastructures"), "datastructures.so") <> fail) then
LoadDynamicModule(Filename(DirectoriesPackagePrograms("datastructures"), "datastructures.so"));
if not LoadKernelExtension("datastructures") then
Error("failed to load the datastructures package kernel extension");
fi;

# interface definitions
Expand Down