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/wrappedlibz.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/wrappedlibz.c')
| -rwxr-xr-x | src/wrapped/wrappedlibz.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wrapped/wrappedlibz.c b/src/wrapped/wrappedlibz.c index 8d3ebb7a..a8184e11 100755 --- a/src/wrapped/wrappedlibz.c +++ b/src/wrapped/wrappedlibz.c @@ -34,7 +34,7 @@ GO(4) static uintptr_t my_alloc_fct_##A = 0; \ static void* my_alloc_##A(void* opaque, uint32_t items, uint32_t size) \ { \ - return (void*)RunFunction(my_context, my_alloc_fct_##A, 3, opaque, items, size); \ + return (void*)RunFunctionFmt(my_context, my_alloc_fct_##A, "puu", opaque, items, size); \ } SUPER() #undef GO @@ -56,7 +56,7 @@ static void* find_alloc_Fct(void* fct) static uintptr_t my_free_fct_##A = 0; \ static void my_free_##A(void* opaque, void* address) \ { \ - RunFunction(my_context, my_free_fct_##A, 2, opaque, address); \ + RunFunctionFmt(my_context, my_free_fct_##A, "pp", opaque, address); \ } SUPER() #undef GO @@ -76,7 +76,7 @@ static void* find_free_Fct(void* fct) #undef SUPER typedef struct z_stream_s { - void *next_in; + void *next_in; uint32_t avail_in; uintptr_t total_in; void *next_out; @@ -85,11 +85,11 @@ typedef struct z_stream_s { char *msg; void *state; void* zalloc; - void* zfree; + void* zfree; void* opaque; int32_t data_type; - uintptr_t adler; - uintptr_t reserved; + uintptr_t adler; + uintptr_t reserved; } z_stream; static void wrapper_stream_z(x64emu_t* emu, void* str) |