diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-07-09 15:24:27 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-07-09 15:24:27 +0200 |
| commit | 7cd82d16cef22481b92ed30c297c3304a4b4a9f9 (patch) | |
| tree | 951b386cf92422c1410e15256d54138636679f59 /src/tools/callback.c | |
| parent | dabbca767f9de4fc4cf68252037de3061592eae2 (diff) | |
| download | box64-7cd82d16cef22481b92ed30c297c3304a4b4a9f9.tar.gz box64-7cd82d16cef22481b92ed30c297c3304a4b4a9f9.zip | |
Removed useless box64context_t parameter to RunFunction and friend
Diffstat (limited to 'src/tools/callback.c')
| -rwxr-xr-x | src/tools/callback.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/tools/callback.c b/src/tools/callback.c index f954869f..435ffbc7 100755 --- a/src/tools/callback.c +++ b/src/tools/callback.c @@ -14,11 +14,10 @@ #include "dynarec.h" EXPORTDYN -uint64_t RunFunction(box64context_t *context, uintptr_t fnc, int nargs, ...) +uint64_t RunFunction(x64emu_t *emu, uintptr_t fnc, int nargs, ...) { - (void)context; - - x64emu_t *emu = thread_get_emu(); + if(!emu) + emu = thread_get_emu(); int align = (nargs>6)?(((nargs-6)&1)):0; int stackn = align + ((nargs>6)?(nargs-6):0); @@ -56,10 +55,8 @@ uint64_t RunFunction(box64context_t *context, uintptr_t fnc, int nargs, ...) } EXPORTDYN -uint64_t RunFunctionFmt(box64context_t *context, uintptr_t fnc, const char* fmt, ...) +uint64_t RunFunctionFmt(uintptr_t fnc, const char* fmt, ...) { - (void)context; - x64emu_t *emu = thread_get_emu(); int nargs = 0; int ni = 0; @@ -149,11 +146,10 @@ uint64_t RunFunctionFmt(box64context_t *context, uintptr_t fnc, const char* fmt, } EXPORTDYN -uint64_t RunSafeFunction(box64context_t *context, uintptr_t fnc, int nargs, ...) +uint64_t RunSafeFunction(uintptr_t fnc, int nargs, ...) { - (void)context; + x64emu_t * emu = thread_get_emu(); - x64emu_t *emu = thread_get_emu(); int align = (nargs>6)?(((nargs-6)&1)):0; int stackn = align + ((nargs>6)?(nargs-6):0); @@ -258,10 +254,8 @@ uint64_t RunFunctionWithEmu(x64emu_t *emu, int QuitOnLongJump, uintptr_t fnc, in } EXPORTDYN -uint64_t RunFunctionWindows(box64context_t *context, uintptr_t fnc, int nargs, ...) +uint64_t RunFunctionWindows(uintptr_t fnc, int nargs, ...) { - (void)context; - x64emu_t *emu = thread_get_emu(); int align = (nargs>4)?(((nargs-4)&1)):0; int stackn = align + ((nargs>4)?(nargs-4):0); |