only dlopen() once
This commit is contained in:
2
bash.h
2
bash.h
@ -29,8 +29,8 @@ extern char **make_builtin_argv(WORD_LIST*, int*);
|
||||
|
||||
#define PY_FUNC(bash_name, modname, function) \
|
||||
int bash_name(int argc, char **argv) { \
|
||||
dlopen("libpython3.13.so", RTLD_NOW | RTLD_GLOBAL);\
|
||||
if (!Py_IsInitialized()) { \
|
||||
dlopen("libpython3.13.so", RTLD_NOW | RTLD_GLOBAL);\
|
||||
PyImport_AppendInittab(#modname, PyInit_##modname); \
|
||||
Py_Initialize(); \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user