Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed May 5, 2024
1 parent 1020318 commit bb7a385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nuitka/build/include/nuitka/importing.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ NUITKA_MAY_BE_UNUSED static PyObject *Nuitka_GetSysModules(void) {
#endif
}

// Check if a module is in "sys.modules"
NUITKA_MAY_BE_UNUSED static bool Nuitka_HasModule(PyThreadState *tstate, PyObject *module_name) {
return DICT_HAS_ITEM(tstate, Nuitka_GetSysModules(), module_name) == 1;
}

// Replacement for "PyImport_GetModule" working across all versions and less checks.
NUITKA_MAY_BE_UNUSED static PyObject *Nuitka_GetModule(PyThreadState *tstate, PyObject *module_name) {
return DICT_GET_ITEM1(tstate, Nuitka_GetSysModules(), module_name);
Expand Down
2 changes: 1 addition & 1 deletion nuitka/freezer/DllDependenciesMacOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _resolveBinaryPathDLLsMacOS(
resolved_path = os.path.normpath(os.path.join(rpath, path[7:]))
break
else:
# These have become virtual in later macOS.
# These have become virtual in later macOS, spell-checker: ignore libz
if library_name in ("libc++.1.dylib", "libz.1.dylib"):
continue

Expand Down

0 comments on commit bb7a385

Please sign in to comment.