diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-05-09 18:06:52 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-05-09 18:06:52 +0200 |
| commit | 6ef734960abfb83501cf2236ae41624c0375f570 (patch) | |
| tree | c4870f8113a7dd23fdd4c1fbd26d7796fb6b6317 /src/include/wrappedlibs.h | |
| parent | 244e3eafdf05ddef3b75c88c362ffc62ffbf2584 (diff) | |
| download | box64-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/include/wrappedlibs.h')
| -rwxr-xr-x | src/include/wrappedlibs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/wrappedlibs.h b/src/include/wrappedlibs.h index f78dcfb2..d593f3f4 100755 --- a/src/include/wrappedlibs.h +++ b/src/include/wrappedlibs.h @@ -4,11 +4,16 @@ typedef struct library_s library_t; typedef struct box64context_s box64context_t; +typedef struct wlib_s wlib_t; typedef int (*wrappedlib_init_t)(library_t * lib, box64context_t* box64); // 0 = success typedef void (*wrappedlib_fini_t)(library_t * lib); typedef int (*wrappedlib_get_t)(library_t* lib, const char* name, uintptr_t *offs, uintptr_t *sz, int version, const char* vername, int local); +void setNeededLibs(wlib_t* wlib, int n, ...); +#define SETALT(A) lib->altmy = strdup(#A) +#define SETALTPREFIX(A) lib->priv.w.altprefix = strdup(A) + typedef struct wrappedlib_s { const char* name; wrappedlib_init_t init; |