Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Aug 26, 2024
1 parent ef1a0de commit bf87aa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
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 LoadKernelExtension("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

0 comments on commit bf87aa5

Please sign in to comment.