diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-05-07 22:13:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-07 16:13:56 +0200 |
| commit | 9f38e81735b10668d64974033b4bb5097219ee34 (patch) | |
| tree | 57827cc130a3e79a46c58f4e5ce8946c78f4131a /src/wrapped/wrappedlibsm.c | |
| parent | 47ecde75ec19a58f458c1131ec1968d11d58e7e1 (diff) | |
| download | box64-9f38e81735b10668d64974033b4bb5097219ee34.tar.gz box64-9f38e81735b10668d64974033b4bb5097219ee34.zip | |
[WRAPPER] Used RunFunctionFmt for better sign-extend handling (#768)
* [WRAPPER] Used RunFunctionFmt for better sign-extend handling * [WRAPPER] Fixed some typos * [WRAPPER] Use L for unsigned long for better portability * [WRAPPER] More replace from U to L
Diffstat (limited to 'src/wrapped/wrappedlibsm.c')
| -rwxr-xr-x | src/wrapped/wrappedlibsm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wrapped/wrappedlibsm.c b/src/wrapped/wrappedlibsm.c index daf095b7..8c46d241 100755 --- a/src/wrapped/wrappedlibsm.c +++ b/src/wrapped/wrappedlibsm.c @@ -54,25 +54,25 @@ typedef struct my_SmcCallbacks_s { static uintptr_t my_save_yourself_fct = 0; static void my_save_yourself(void* smcConn, void* clientData, int saveType, int shutdown, int interactStyle, int fast) { - RunFunction(my_context, my_save_yourself_fct, 6, smcConn, clientData, saveType, shutdown, interactStyle, fast); + RunFunctionFmt(my_context, my_save_yourself_fct, "ppiiii", smcConn, clientData, saveType, shutdown, interactStyle, fast); } static uintptr_t my_die_fct = 0; static void my_die(void* smcConn, void* clientData) { - RunFunction(my_context, my_die_fct, 2, smcConn, clientData); + RunFunctionFmt(my_context, my_die_fct, "pp", smcConn, clientData); } static uintptr_t my_shutdown_cancelled_fct = 0; static void my_shutdown_cancelled(void* smcConn, void* clientData) { - RunFunction(my_context, my_shutdown_cancelled_fct, 2, smcConn, clientData); + RunFunctionFmt(my_context, my_shutdown_cancelled_fct, "pp", smcConn, clientData); } static uintptr_t my_save_complete_fct = 0; static void my_save_complete(void* smcConn, void* clientData) { - RunFunction(my_context, my_save_complete_fct, 2, smcConn, clientData); + RunFunctionFmt(my_context, my_save_complete_fct, "pp", smcConn, clientData); } @@ -102,7 +102,7 @@ GO(4) static uintptr_t my_Request_fct_##A = 0; \ static void my_Request_##A(void* a, void* b) \ { \ - RunFunction(my_context, my_Request_fct_##A, 2, a, b);\ + RunFunctionFmt(my_context, my_Request_fct_##A, "pp", a, b);\ } SUPER() #undef GO |