diff --git a/PackageInfo.g b/PackageInfo.g index a291c37..0fe9e52 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -122,9 +122,9 @@ 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 + Error("failed to load the datastructures package kernel extension"); + return fail; fi; return true; end, diff --git a/init.g b/init.g index 3030159..30d0f7a 100644 --- a/init.g +++ b/init.g @@ -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