about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedgmodule2.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-05-09 18:06:52 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-05-09 18:06:52 +0200
commit6ef734960abfb83501cf2236ae41624c0375f570 (patch)
treec4870f8113a7dd23fdd4c1fbd26d7796fb6b6317 /src/wrapped/wrappedgmodule2.c
parent244e3eafdf05ddef3b75c88c362ffc62ffbf2584 (diff)
downloadbox64-6ef734960abfb83501cf2236ae41624c0375f570.tar.gz
box64-6ef734960abfb83501cf2236ae41624c0375f570.zip
Some refactor on wrapped lib handling, to limit calloc/free used and get more straight forward usage of native wrapped functions (ported from box86)
Diffstat (limited to 'src/wrapped/wrappedgmodule2.c')
-rwxr-xr-xsrc/wrapped/wrappedgmodule2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wrapped/wrappedgmodule2.c b/src/wrapped/wrappedgmodule2.c
index fb68612e..5e6510ff 100755
--- a/src/wrapped/wrappedgmodule2.c
+++ b/src/wrapped/wrappedgmodule2.c
@@ -20,8 +20,6 @@ const char* gmodule2Name = "libgmodule-2.0.so.0";
         return -1;
 
 #define CUSTOM_INIT \
-    lib->priv.w.needed = 1; \
-    lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
-    lib->priv.w.neededlibs[0] = strdup("libglib-2.0.so.0");
+    setNeededLibs(&lib->priv.w, 1, "libglib-2.0.so.0");
 
 #include "wrappedlib_init.h"