about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-07-27 15:43:56 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-27 15:43:56 +0200
commitecc07a235cc4c106af81ed1f99f306351305c36c (patch)
treef818bd124d312c651cafaed92082e59ad5349afa /src/wrapped
parentfc4f0e3bae2ae8505e8eeaf3835e572311163ba0 (diff)
downloadbox64-ecc07a235cc4c106af81ed1f99f306351305c36c.tar.gz
box64-ecc07a235cc4c106af81ed1f99f306351305c36c.zip
Added wrapped dbus_message_get_args and a generic mothod to convert VAARG '...' to valist (helps wine64)
Diffstat (limited to 'src/wrapped')
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrappeddbustypes.h2
-rwxr-xr-xsrc/wrapped/wrappeddbus.c7
-rwxr-xr-xsrc/wrapped/wrappeddbus_private.h2
4 files changed, 9 insertions, 4 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index bb214580..1d0f75af 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -1482,6 +1482,8 @@ wrappeddbus:
   - dbus_connection_set_data
   - dbus_message_set_data
   - dbus_pending_call_set_data
+- iFppip:
+  - dbus_message_get_args
 - iFppiA:
   - dbus_message_get_args_valist
 - iFpppp:
diff --git a/src/wrapped/generated/wrappeddbustypes.h b/src/wrapped/generated/wrappeddbustypes.h
index b4a2c73b..a4e785b0 100644
--- a/src/wrapped/generated/wrappeddbustypes.h
+++ b/src/wrapped/generated/wrappeddbustypes.h
@@ -14,6 +14,7 @@
 typedef void (*vFppp_t)(void*, void*, void*);
 typedef void (*vFpppp_t)(void*, void*, void*, void*);
 typedef int64_t (*iFpipp_t)(void*, int64_t, void*, void*);
+typedef int64_t (*iFppip_t)(void*, void*, int64_t, void*);
 typedef int64_t (*iFppiA_t)(void*, void*, int64_t, va_list);
 typedef int64_t (*iFpppp_t)(void*, void*, void*, void*);
 typedef int64_t (*iFppppp_t)(void*, void*, void*, void*, void*);
@@ -28,6 +29,7 @@ typedef int64_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
 	GO(dbus_connection_set_data, iFpipp_t) \
 	GO(dbus_message_set_data, iFpipp_t) \
 	GO(dbus_pending_call_set_data, iFpipp_t) \
+	GO(dbus_message_get_args, iFppip_t) \
 	GO(dbus_message_get_args_valist, iFppiA_t) \
 	GO(dbus_connection_add_filter, iFpppp_t) \
 	GO(dbus_pending_call_set_notify, iFpppp_t) \
diff --git a/src/wrapped/wrappeddbus.c b/src/wrapped/wrappeddbus.c
index dacae925..9599894d 100755
--- a/src/wrapped/wrappeddbus.c
+++ b/src/wrapped/wrappeddbus.c
@@ -415,13 +415,14 @@ EXPORT int my_dbus_message_get_args_valist(x64emu_t* emu, void* message, void* e
     return my->dbus_message_get_args_valist(message, e, arg, VARARGS);
 }
 
-/*EXPORT int my_dbus_message_get_args(x64emu_t* emu, void* message, void* e, int arg, uint64_t* V)
+EXPORT int my_dbus_message_get_args(x64emu_t* emu, void* message, void* e, int arg, uint64_t* V)
 {
     (void)emu;
     dbus_my_t *my = (dbus_my_t*)my_lib->priv.w.p2;
 
-    return my->dbus_message_get_args_valist(message, e, arg, V);
-}*/
+    CREATE_VALIST_FROM_VAARG(V, emu->scratch, 3);
+    return my->dbus_message_get_args_valist(message, e, arg, VARARGS);
+}
 
 EXPORT int my_dbus_message_set_data(x64emu_t* emu, void* message, int32_t slot, void* data, void* free_func)
 {
diff --git a/src/wrapped/wrappeddbus_private.h b/src/wrapped/wrappeddbus_private.h
index bb3b5321..1b4fa60d 100755
--- a/src/wrapped/wrappeddbus_private.h
+++ b/src/wrapped/wrappeddbus_private.h
@@ -99,7 +99,7 @@ GO(dbus_message_copy, pFp)
 GO(dbus_message_demarshal, pFpip)
 GO(dbus_message_demarshal_bytes_needed, iFpi)
 GO(dbus_message_free_data_slot, vFp)
-//GOM(dbus_message_get_args, iFEppiV)
+GOM(dbus_message_get_args, iFEppip)
 GO(dbus_message_get_allow_interactive_authorization, iFp)
 GOM(dbus_message_get_args_valist, iFEppiA)
 GO(dbus_message_get_auto_start, iFp)