about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedvorbisfile.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-05-07 22:13:56 +0800
committerGitHub <noreply@github.com>2023-05-07 16:13:56 +0200
commit9f38e81735b10668d64974033b4bb5097219ee34 (patch)
tree57827cc130a3e79a46c58f4e5ce8946c78f4131a /src/wrapped/wrappedvorbisfile.c
parent47ecde75ec19a58f458c1131ec1968d11d58e7e1 (diff)
downloadbox64-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/wrappedvorbisfile.c')
-rwxr-xr-xsrc/wrapped/wrappedvorbisfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wrapped/wrappedvorbisfile.c b/src/wrapped/wrappedvorbisfile.c
index ad285fe7..6c2d98c9 100755
--- a/src/wrapped/wrappedvorbisfile.c
+++ b/src/wrapped/wrappedvorbisfile.c
@@ -49,9 +49,9 @@ GO(7)
 // read
 #define GO(A)   \
 static uintptr_t my_read_fct_##A = 0;   \
-static unsigned long my_read_##A(void* ptr, unsigned long size, unsigned long nmemb, void* datasource)     \
+static unsigned long my_read_##A(void* ptr, unsigned long size, unsigned long nmemb, void* datasource)  \
 {                                       \
-    return RunFunction(my_context, my_read_fct_##A, 4, ptr, size, nmemb, datasource);\
+    return RunFunctionFmt(my_context, my_read_fct_##A, "pLLp", ptr, size, nmemb, datasource);   \
 }
 SUPER()
 #undef GO
@@ -73,7 +73,7 @@ static void* findreadFct(void* fct)
 static uintptr_t my_seek_fct_##A = 0;   \
 static int my_seek_##A(void* ptr, int64_t offset, int whence)     \
 {                                       \
-    return (int)RunFunction(my_context, my_seek_fct_##A, 3, ptr, offset, whence);\
+    return (int)RunFunctionFmt(my_context, my_seek_fct_##A, "pIi", ptr, offset, whence);\
 }
 SUPER()
 #undef GO
@@ -95,7 +95,7 @@ static void* findseekFct(void* fct)
 static uintptr_t my_close_fct_##A = 0;   \
 static int my_close_##A(void* ptr)     \
 {                   \
-    return (int)RunFunction(my_context, my_close_fct_##A, 1, ptr);\
+    return (int)RunFunctionFmt(my_context, my_close_fct_##A, "p", ptr);\
 }
 SUPER()
 #undef GO
@@ -117,7 +117,7 @@ static void* findcloseFct(void* fct)
 static uintptr_t my_tell_fct_##A = 0;   \
 static long my_tell_##A(void* ptr)     \
 {                                       \
-    return (long)RunFunction(my_context, my_tell_fct_##A, 1, ptr);\
+    return (long)RunFunctionFmt(my_context, my_tell_fct_##A, "p", ptr);\
 }
 SUPER()
 #undef GO