about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-04 10:39:56 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-04 10:39:56 +0100
commit07be0c6ef48af3a00ed85fcd4399eb9af645bbe9 (patch)
tree7bb16aef292471ee64848a93a43b563cdfd72392 /src
parent78a336c092b9cf5ff48f970d670cb995f64c9e4f (diff)
downloadbox64-07be0c6ef48af3a00ed85fcd4399eb9af645bbe9.tar.gz
box64-07be0c6ef48af3a00ed85fcd4399eb9af645bbe9.zip
Added some more wrapped functions to glib2 and gobject2 (for #503)
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt13
-rw-r--r--src/wrapped/generated/wrappedglib2types.h9
-rw-r--r--src/wrapped/generated/wrappedgobject2types.h2
-rw-r--r--src/wrapped/generated/wrapper.c4
-rw-r--r--src/wrapped/generated/wrapper.h2
-rwxr-xr-xsrc/wrapped/wrappedglib2.c82
-rwxr-xr-xsrc/wrapped/wrappedglib2_private.h44
-rwxr-xr-xsrc/wrapped/wrappedgobject2.c5
-rwxr-xr-xsrc/wrapped/wrappedgobject2_private.h10
9 files changed, 142 insertions, 29 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index d5f5a5a3..3253641a 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -230,6 +230,7 @@
 #() LFpL
 #() LFpp
 #() pFEi
+#() pFEL
 #() pFEp
 #() pFii
 #() pFiI
@@ -1638,6 +1639,7 @@
 #() pFpppppu
 #() pFpppppp
 #() pFSpiiii
+#() vFEpiiipp
 #() vFEpipppp
 #() vFEpuipuV
 #() vFEpppppp
@@ -2546,6 +2548,7 @@ wrappedglib2:
   - g_main_context_set_poll_func
   - g_ptr_array_set_free_func
   - g_ptr_array_sort
+  - g_slist_free_full
   - g_source_set_funcs
   - g_thread_foreach
 - vFpV:
@@ -2585,6 +2588,7 @@ wrappedglib2:
 - vFppp:
   - g_array_sort_with_data
   - g_hash_table_foreach
+  - g_list_foreach
   - g_option_context_add_main_entries
   - g_ptr_array_foreach
   - g_ptr_array_sort_with_data
@@ -2614,7 +2618,9 @@ wrappedglib2:
 - pFppp:
   - g_hash_table_find
   - g_list_find_custom
+  - g_list_insert_sorted
   - g_list_sort_with_data
+  - g_node_copy_deep
   - g_queue_find_custom
   - g_slist_find_custom
   - g_slist_foreach
@@ -2640,6 +2646,8 @@ wrappedglib2:
 - uFpipp:
   - g_io_add_watch
   - g_log_set_handler
+- pFpipp:
+  - g_markup_parse_context_new
 - pFpipV:
   - g_error_new
 - pFpipA:
@@ -2651,6 +2659,7 @@ wrappedglib2:
 - pFpppp:
   - g_hash_table_new_full
   - g_slist_insert_sorted_with_data
+  - g_thread_try_new
 - vFpiLpp:
   - g_qsort_with_data
 - vFppipV:
@@ -2662,6 +2671,8 @@ wrappedglib2:
   - g_timeout_add_seconds_full
 - pFppppp:
   - g_option_group_new
+- vFpiiipp:
+  - g_node_traverse
 - iFpupppp:
   - g_datalist_id_replace_data
 - uFpiippp:
@@ -2686,6 +2697,8 @@ wrappedgnutls:
   - gnutls_transport_set_pull_timeout_function
   - gnutls_transport_set_push_function
 wrappedgobject2:
+- pFL:
+  - g_type_value_table_peek
 - pFp:
   - g_type_class_peek_parent
 - vFpp:
diff --git a/src/wrapped/generated/wrappedglib2types.h b/src/wrapped/generated/wrappedglib2types.h
index 3cb07ea9..e1495059 100644
--- a/src/wrapped/generated/wrappedglib2types.h
+++ b/src/wrapped/generated/wrappedglib2types.h
@@ -43,6 +43,7 @@ typedef int64_t (*iFpLpV_t)(void*, uintptr_t, void*, ...);
 typedef int64_t (*iFpLpA_t)(void*, uintptr_t, void*, va_list);
 typedef uint64_t (*uFippp_t)(int64_t, void*, void*, void*);
 typedef uint64_t (*uFpipp_t)(void*, int64_t, void*, void*);
+typedef void* (*pFpipp_t)(void*, int64_t, void*, void*);
 typedef void* (*pFpipV_t)(void*, int64_t, void*, ...);
 typedef void* (*pFpipA_t)(void*, int64_t, void*, va_list);
 typedef void* (*pFpupp_t)(void*, uint64_t, void*, void*);
@@ -53,6 +54,7 @@ typedef void (*vFppipV_t)(void*, void*, int64_t, void*, ...);
 typedef uint64_t (*uFiippp_t)(int64_t, int64_t, void*, void*, void*);
 typedef uint64_t (*uFiuppp_t)(int64_t, uint64_t, void*, void*, void*);
 typedef void* (*pFppppp_t)(void*, void*, void*, void*, void*);
+typedef void (*vFpiiipp_t)(void*, int64_t, int64_t, int64_t, void*, void*);
 typedef int64_t (*iFpupppp_t)(void*, uint64_t, void*, void*, void*, void*);
 typedef uint64_t (*uFpiippp_t)(void*, int64_t, int64_t, void*, void*, void*);
 typedef void* (*pFppuipp_t)(void*, void*, uint64_t, int64_t, void*, void*);
@@ -76,6 +78,7 @@ typedef int64_t (*iFpppippppppp_t)(void*, void*, void*, int64_t, void*, void*, v
 	GO(g_main_context_set_poll_func, vFpp_t) \
 	GO(g_ptr_array_set_free_func, vFpp_t) \
 	GO(g_ptr_array_sort, vFpp_t) \
+	GO(g_slist_free_full, vFpp_t) \
 	GO(g_source_set_funcs, vFpp_t) \
 	GO(g_thread_foreach, vFpp_t) \
 	GO(g_print, vFpV_t) \
@@ -103,6 +106,7 @@ typedef int64_t (*iFpppippppppp_t)(void*, void*, void*, int64_t, void*, void*, v
 	GO(g_strdup_vprintf, pFpA_t) \
 	GO(g_array_sort_with_data, vFppp_t) \
 	GO(g_hash_table_foreach, vFppp_t) \
+	GO(g_list_foreach, vFppp_t) \
 	GO(g_option_context_add_main_entries, vFppp_t) \
 	GO(g_ptr_array_foreach, vFppp_t) \
 	GO(g_ptr_array_sort_with_data, vFppp_t) \
@@ -124,7 +128,9 @@ typedef int64_t (*iFpppippppppp_t)(void*, void*, void*, int64_t, void*, void*, v
 	GO(g_hash_table_foreach_steal, uFppp_t) \
 	GO(g_hash_table_find, pFppp_t) \
 	GO(g_list_find_custom, pFppp_t) \
+	GO(g_list_insert_sorted, pFppp_t) \
 	GO(g_list_sort_with_data, pFppp_t) \
+	GO(g_node_copy_deep, pFppp_t) \
 	GO(g_queue_find_custom, pFppp_t) \
 	GO(g_slist_find_custom, pFppp_t) \
 	GO(g_slist_foreach, pFppp_t) \
@@ -141,18 +147,21 @@ typedef int64_t (*iFpppippppppp_t)(void*, void*, void*, int64_t, void*, void*, v
 	GO(g_idle_add_full, uFippp_t) \
 	GO(g_io_add_watch, uFpipp_t) \
 	GO(g_log_set_handler, uFpipp_t) \
+	GO(g_markup_parse_context_new, pFpipp_t) \
 	GO(g_error_new, pFpipV_t) \
 	GO(g_error_new_valist, pFpipA_t) \
 	GO(g_datalist_id_dup_data, pFpupp_t) \
 	GO(g_thread_create, pFppip_t) \
 	GO(g_hash_table_new_full, pFpppp_t) \
 	GO(g_slist_insert_sorted_with_data, pFpppp_t) \
+	GO(g_thread_try_new, pFpppp_t) \
 	GO(g_qsort_with_data, vFpiLpp_t) \
 	GO(g_set_error, vFppipV_t) \
 	GO(g_child_watch_add_full, uFiippp_t) \
 	GO(g_timeout_add_full, uFiuppp_t) \
 	GO(g_timeout_add_seconds_full, uFiuppp_t) \
 	GO(g_option_group_new, pFppppp_t) \
+	GO(g_node_traverse, vFpiiipp_t) \
 	GO(g_datalist_id_replace_data, iFpupppp_t) \
 	GO(g_io_add_watch_full, uFpiippp_t) \
 	GO(g_variant_new_from_data, pFppuipp_t) \
diff --git a/src/wrapped/generated/wrappedgobject2types.h b/src/wrapped/generated/wrappedgobject2types.h
index 3e16b41a..061892e8 100644
--- a/src/wrapped/generated/wrappedgobject2types.h
+++ b/src/wrapped/generated/wrappedgobject2types.h
@@ -11,6 +11,7 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef void* (*pFL_t)(uintptr_t);
 typedef void* (*pFp_t)(void*);
 typedef void (*vFpp_t)(void*, void*);
 typedef int64_t (*iFpp_t)(void*, void*);
@@ -43,6 +44,7 @@ typedef uint64_t (*uFpLippppLup_t)(void*, uintptr_t, int64_t, void*, void*, void
 typedef uint64_t (*uFpLippppLuA_t)(void*, uintptr_t, int64_t, void*, void*, void*, void*, uintptr_t, uint64_t, va_list);
 
 #define SUPER() ADDED_FUNCTIONS() \
+	GO(g_type_value_table_peek, pFL_t) \
 	GO(g_type_class_peek_parent, pFp_t) \
 	GO(g_closure_set_marshal, vFpp_t) \
 	GO(g_param_type_register_static, iFpp_t) \
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 3bc9d90c..9359a98f 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -264,6 +264,7 @@ typedef uintptr_t (*LFpi_t)(void*, int64_t);
 typedef uintptr_t (*LFpL_t)(void*, uintptr_t);
 typedef uintptr_t (*LFpp_t)(void*, void*);
 typedef void* (*pFEi_t)(x64emu_t*, int64_t);
+typedef void* (*pFEL_t)(x64emu_t*, uintptr_t);
 typedef void* (*pFEp_t)(x64emu_t*, void*);
 typedef void* (*pFii_t)(int64_t, int64_t);
 typedef void* (*pFiI_t)(int64_t, int64_t);
@@ -1672,6 +1673,7 @@ typedef void* (*pFpppppi_t)(void*, void*, void*, void*, void*, int64_t);
 typedef void* (*pFpppppu_t)(void*, void*, void*, void*, void*, uint64_t);
 typedef void* (*pFpppppp_t)(void*, void*, void*, void*, void*, void*);
 typedef void* (*pFSpiiii_t)(void*, void*, int64_t, int64_t, int64_t, int64_t);
+typedef void (*vFEpiiipp_t)(x64emu_t*, void*, int64_t, int64_t, int64_t, void*, void*);
 typedef void (*vFEpipppp_t)(x64emu_t*, void*, int64_t, void*, void*, void*, void*);
 typedef void (*vFEpuipuV_t)(x64emu_t*, void*, uint64_t, int64_t, void*, uint64_t, void*);
 typedef void (*vFEpppppp_t)(x64emu_t*, void*, void*, void*, void*, void*, void*);
@@ -2534,6 +2536,7 @@ void LFpi(x64emu_t *emu, uintptr_t fcn) { LFpi_t fn = (LFpi_t)fcn; R_RAX=(uintpt
 void LFpL(x64emu_t *emu, uintptr_t fcn) { LFpL_t fn = (LFpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI); }
 void LFpp(x64emu_t *emu, uintptr_t fcn) { LFpp_t fn = (LFpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI); }
 void pFEi(x64emu_t *emu, uintptr_t fcn) { pFEi_t fn = (pFEi_t)fcn; R_RAX=(uintptr_t)fn(emu, (int64_t)R_RDI); }
+void pFEL(x64emu_t *emu, uintptr_t fcn) { pFEL_t fn = (pFEL_t)fcn; R_RAX=(uintptr_t)fn(emu, (uintptr_t)R_RDI); }
 void pFEp(x64emu_t *emu, uintptr_t fcn) { pFEp_t fn = (pFEp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI); }
 void pFii(x64emu_t *emu, uintptr_t fcn) { pFii_t fn = (pFii_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI, (int64_t)R_RSI); }
 void pFiI(x64emu_t *emu, uintptr_t fcn) { pFiI_t fn = (pFiI_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI, (int64_t)R_RSI); }
@@ -3942,6 +3945,7 @@ void pFpppppi(x64emu_t *emu, uintptr_t fcn) { pFpppppi_t fn = (pFpppppi_t)fcn; R
 void pFpppppu(x64emu_t *emu, uintptr_t fcn) { pFpppppu_t fn = (pFpppppu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9); }
 void pFpppppp(x64emu_t *emu, uintptr_t fcn) { pFpppppp_t fn = (pFpppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFSpiiii(x64emu_t *emu, uintptr_t fcn) { pFSpiiii_t fn = (pFSpiiii_t)fcn; R_RAX=(uintptr_t)fn(io_convert((void*)R_RDI), (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); }
+void vFEpiiipp(x64emu_t *emu, uintptr_t fcn) { vFEpiiipp_t fn = (vFEpiiipp_t)fcn; fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFEpipppp(x64emu_t *emu, uintptr_t fcn) { vFEpipppp_t fn = (vFEpipppp_t)fcn; fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFEpuipuV(x64emu_t *emu, uintptr_t fcn) { vFEpuipuV_t fn = (vFEpuipuV_t)fcn; fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)(R_RSP + 8)); }
 void vFEpppppp(x64emu_t *emu, uintptr_t fcn) { vFEpppppp_t fn = (vFEpppppp_t)fcn; fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 2d7e15f1..06e8eea3 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -263,6 +263,7 @@ void LFpi(x64emu_t *emu, uintptr_t fnc);
 void LFpL(x64emu_t *emu, uintptr_t fnc);
 void LFpp(x64emu_t *emu, uintptr_t fnc);
 void pFEi(x64emu_t *emu, uintptr_t fnc);
+void pFEL(x64emu_t *emu, uintptr_t fnc);
 void pFEp(x64emu_t *emu, uintptr_t fnc);
 void pFii(x64emu_t *emu, uintptr_t fnc);
 void pFiI(x64emu_t *emu, uintptr_t fnc);
@@ -1671,6 +1672,7 @@ void pFpppppi(x64emu_t *emu, uintptr_t fnc);
 void pFpppppu(x64emu_t *emu, uintptr_t fnc);
 void pFpppppp(x64emu_t *emu, uintptr_t fnc);
 void pFSpiiii(x64emu_t *emu, uintptr_t fnc);
+void vFEpiiipp(x64emu_t *emu, uintptr_t fnc);
 void vFEpipppp(x64emu_t *emu, uintptr_t fnc);
 void vFEpuipuV(x64emu_t *emu, uintptr_t fnc);
 void vFEpppppp(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedglib2.c b/src/wrapped/wrappedglib2.c
index b481963d..7b3cccc2 100755
--- a/src/wrapped/wrappedglib2.c
+++ b/src/wrapped/wrappedglib2.c
@@ -87,7 +87,7 @@ GO(8)   \
 GO(9)   \
 
 // GCopyFct
-/*#define GO(A)   \
+#define GO(A)   \
 static uintptr_t my_copy_fct_##A = 0;   \
 static void* my_copy_##A(void* data)     \
 {                                       \
@@ -107,7 +107,7 @@ static void* findCopyFct(void* fct)
     #undef GO
     printf_log(LOG_NONE, "Warning, no more slot for glib2 Copy callback\n");
     return NULL;
-}*/
+}
 // GFreeFct
 #define GO(A)   \
 static uintptr_t my_free_fct_##A = 0;   \
@@ -663,6 +663,50 @@ static void* reverseGOptionArgFct(void* fct)
     #undef GO
     return NULL;
 }
+// GNodeTraverseFunc ...
+#define GO(A)   \
+static uintptr_t my_GNodeTraverseFunc_fct_##A = 0;                              \
+static int my_GNodeTraverseFunc_##A(void* a, void* b)                           \
+{                                                                               \
+    return (int)RunFunction(my_context, my_GNodeTraverseFunc_fct_##A, 2, a, b); \
+}
+SUPER()
+#undef GO
+static void* findGNodeTraverseFuncFct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_GNodeTraverseFunc_fct_##A == (uintptr_t)fct) return my_GNodeTraverseFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GNodeTraverseFunc_fct_##A == 0) {my_GNodeTraverseFunc_fct_##A = (uintptr_t)fct; return my_GNodeTraverseFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for glib2 GNodeTraverseFunc callback\n");
+    return NULL;
+}
+// GThreadFunc ...
+#define GO(A)   \
+static uintptr_t my_GThreadFunc_fct_##A = 0;                            \
+static void* my_GThreadFunc_##A(void* a)                                \
+{                                                                       \
+    return (void*)RunFunction(my_context, my_GThreadFunc_fct_##A, 1, a);\
+}
+SUPER()
+#undef GO
+static void* findGThreadFuncFct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_GThreadFunc_fct_##A == (uintptr_t)fct) return my_GThreadFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GThreadFunc_fct_##A == 0) {my_GThreadFunc_fct_##A = (uintptr_t)fct; return my_GThreadFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for glib2 GThreadFunc callback\n");
+    return NULL;
+}
 
 #undef SUPER
 
@@ -1300,6 +1344,40 @@ EXPORT void* my_g_strconcat(x64emu_t* emu, void* first, uintptr_t* data)
     return p;
 }
 
+EXPORT void* my_g_markup_parse_context_new(x64emu_t* emu, void* parser, int flags, void* data, void* destroy)
+{
+    return my->g_markup_parse_context_new(parser, flags, data, findDestroyFct(destroy));
+}
+
+EXPORT void my_g_list_foreach(x64emu_t* emu, void* list, void* func, void* data)
+{
+    my->g_list_foreach(list, findGFuncFct(func), data);
+}
+
+EXPORT void* my_g_list_insert_sorted(x64emu_t* emu, void* list, void* data, void* f)
+{
+    return my->g_list_insert_sorted(list, data, findGCompareFuncFct(f));
+}
+
+EXPORT void my_g_node_traverse(x64emu_t* emu, void* node, int order, int flags, int depth, void* f, void* data)
+{
+    my->g_node_traverse(node, order, flags, depth, findGNodeTraverseFuncFct(f), data);
+}
+
+EXPORT void* my_g_node_copy_deep(x64emu_t* emu, void* node, void* f, void* data)
+{
+    return my->g_node_copy_deep(node, findCopyFct(f), data);
+}
+
+EXPORT void* my_g_thread_try_new(x64emu_t* emu, void* name, void* f, void* data, void* err)
+{
+    return my->g_thread_try_new(name, findGThreadFuncFct(f), data, err);
+}
+
+EXPORT void my_g_slist_free_full(x64emu_t* emu, void* list, void* f)
+{
+    my->g_slist_free_full(list, findDestroyFct(f));
+}
 
 #define PRE_INIT    \
     if(box64_nogtk) \
diff --git a/src/wrapped/wrappedglib2_private.h b/src/wrapped/wrappedglib2_private.h
index a0fa8aaa..c11f8fe0 100755
--- a/src/wrapped/wrappedglib2_private.h
+++ b/src/wrapped/wrappedglib2_private.h
@@ -76,7 +76,7 @@ GO2(g_atexit, vFEp, my_atexit)
 //GO(g_atomic_int_and, 
 //GO(g_atomic_int_compare_and_exchange, 
 //GO(g_atomic_int_dec_and_test, 
-//GO(g_atomic_int_exchange_and_add, 
+GO(g_atomic_int_exchange_and_add, iFpi)
 //GO(g_atomic_int_get, 
 //GO(g_atomic_int_inc, 
 //GO(g_atomic_int_or, 
@@ -211,12 +211,12 @@ GOM(g_completion_set_compare, vFEpp)
 //GO(g_compute_checksum_for_string, 
 //GO(g_compute_hmac_for_data, 
 //GO(g_compute_hmac_for_string, 
-//GO(g_cond_broadcast, 
+GO(g_cond_broadcast, vFp)
 GO(g_cond_clear, vFp)
 GO(g_cond_free, vFp)
 GO(g_cond_init, vFp)
 GO(g_cond_new, pFv)
-//GO(g_cond_signal, 
+GO(g_cond_signal, vFp)
 //GO(g_cond_timed_wait, 
 GO(g_cond_wait, vFpp)
 //GO(g_cond_wait_until, 
@@ -584,14 +584,14 @@ GO(g_listenv, pFv)
 GO(g_list_find, pFpp)
 GOM(g_list_find_custom, pFEppp)
 GO(g_list_first, pFp)
-//GOM(g_list_foreach, vFEpBp)
+GOM(g_list_foreach, vFEppp)
 GO(g_list_free, vFp)
 GO(g_list_free_1, vFp)
 GOM(g_list_free_full, vFEpp)
 GO(g_list_index, iFpp)
 GO(g_list_insert, pFppi)
 GO(g_list_insert_before, pFppp)
-//GOM(g_list_insert_sorted, pFEppB)
+GOM(g_list_insert_sorted, pFEppp)
 //GO(g_list_insert_sorted_with_data, pFEppBp)
 GO(g_list_last, pFp)
 GO(g_list_length, uFp)
@@ -671,14 +671,14 @@ GO(g_mapped_file_unref, vFp)
 //GO(g_markup_collect_attributes, 
 //GO(g_markup_error_quark, 
 GO(g_markup_escape_text, pFpl)
-//GO(g_markup_parse_context_end_parse, 
-//GO(g_markup_parse_context_free, 
+GO(g_markup_parse_context_end_parse, iFpp)
+GO(g_markup_parse_context_free, vFp)
 //GO(g_markup_parse_context_get_element, 
 //GO(g_markup_parse_context_get_element_stack, 
 //GO(g_markup_parse_context_get_position, 
 //GO(g_markup_parse_context_get_user_data, 
-//GO(g_markup_parse_context_new, 
-//GO(g_markup_parse_context_parse, 
+GOM(g_markup_parse_context_new, pFEpipp)
+GO(g_markup_parse_context_parse, iFpplp)
 //GO(g_markup_parse_context_pop, 
 //GO(g_markup_parse_context_push, 
 //GO(g_markup_parse_context_ref, 
@@ -730,29 +730,29 @@ GO(g_mutex_unlock, vFp)
 //GO(g_node_child_position, 
 //GO(g_node_children_foreach, 
 //GO(g_node_copy, 
-//GO(g_node_copy_deep, 
+GOM(g_node_copy_deep, pFEppp)
 //GO(g_node_depth, 
-//GO(g_node_destroy, 
+GO(g_node_destroy, vFp)
 //GO(g_node_find, 
 //GO(g_node_find_child, 
 //GO(g_node_first_sibling, 
-//GO(g_node_get_root, 
+GO(g_node_get_root, pFp)
 //GO(g_node_insert, 
 //GO(g_node_insert_after, 
-//GO(g_node_insert_before, 
+GO(g_node_insert_before, pFppp)
 //GO(g_node_is_ancestor, 
 //GO(g_node_last_child, 
 //GO(g_node_last_sibling, 
 //GO(g_node_max_height, 
 //GO(g_node_n_children, 
-//GO(g_node_new, 
+GO(g_node_new, pFp)
 //GO(g_node_n_nodes, 
 //GO(g_node_nth_child, 
 //GO(g_node_pop_allocator, 
 //GO(g_node_prepend, 
 //GO(g_node_push_allocator, 
 //GO(g_node_reverse_children, 
-//GO(g_node_traverse, 
+GOM(g_node_traverse, vFEpiiipp)
 //GO(g_node_unlink, 
 GO(g_nullify_pointer, vFp)
 //GO(g_once_impl, 
@@ -904,11 +904,11 @@ GO(g_rand_set_seed, vFpu)
 GO(g_rand_set_seed_array, vFppu)
 GO(g_realloc, pFpL)
 GO(g_realloc_n, pFpLL)
-//GO(g_rec_mutex_clear, 
-//GO(g_rec_mutex_init, 
-//GO(g_rec_mutex_lock, 
-//GO(g_rec_mutex_trylock, 
-//GO(g_rec_mutex_unlock, 
+GO(g_rec_mutex_clear, vFp)
+GO(g_rec_mutex_init, vFp)
+GO(g_rec_mutex_lock, vFp)
+GO(g_rec_mutex_trylock, iFp)
+GO(g_rec_mutex_unlock, vFp)
 GO(g_regex_check_replacement, iFppp)
 //GO(g_regex_error_quark, 
 GO(g_regex_escape_nul, pFpi)
@@ -1045,7 +1045,7 @@ GOM(g_slist_find_custom, pFEppp)
 GOM(g_slist_foreach, pFEppp)
 GO(g_slist_free, vFp)
 GO(g_slist_free_1, vFp)
-//GOM(g_slist_free_full, vFEpp)
+GOM(g_slist_free_full, vFEpp)
 GO(g_slist_index, iFpp)
 GO(g_slist_insert, pFppi)
 GO(g_slist_insert_before, pFppp)
@@ -1291,7 +1291,7 @@ GO(g_thread_join, pFp)
 GO(g_thread_ref, pFp)
 GO(g_thread_self, pFv)
 GO(g_thread_set_priority, vFpi)
-//GO(g_thread_try_new, 
+GOM(g_thread_try_new, pFEpppp)
 GO(g_thread_unref, vFp)
 GO(g_thread_yield, vFv)
 GOM(g_timeout_add, uFEupp)
diff --git a/src/wrapped/wrappedgobject2.c b/src/wrapped/wrappedgobject2.c
index 18eee5a2..95ca5eaf 100755
--- a/src/wrapped/wrappedgobject2.c
+++ b/src/wrapped/wrappedgobject2.c
@@ -889,6 +889,11 @@ EXPORT void my_g_closure_add_finalize_notifier(x64emu_t* emu, void* closure, voi
     my->g_closure_add_finalize_notifier(closure, data, findGClosureNotify_Fct(f));
 }
 
+EXPORT void* my_g_type_value_table_peek(x64emu_t* emu, size_t type)
+{
+    return findFreeGTypeValueTable(my->g_type_value_table_peek(type));
+}
+
 #define PRE_INIT    \
     if(box64_nogtk) \
         return -1;
diff --git a/src/wrapped/wrappedgobject2_private.h b/src/wrapped/wrappedgobject2_private.h
index 720bb111..4d74c453 100755
--- a/src/wrapped/wrappedgobject2_private.h
+++ b/src/wrapped/wrappedgobject2_private.h
@@ -343,7 +343,7 @@ GOM(g_type_register_static_simple, LFELpLpLpi)
 //GOM(g_type_remove_interface_check, vFEpB)
 GO(g_type_set_qdata, vFLpp)
 GO(g_type_test_flags, iFLu)
-//GOM(g_type_value_table_peek, pFEi)    //need to bridge GTypeValueTable
+GOM(g_type_value_table_peek, pFEL)    //need to bridge GTypeValueTable
 GO(g_value_array_append, pFpp)  //TODO: does GValueArray needs alignement?
 GO(g_value_array_copy, pFp)
 GO(g_value_array_free, vFp)
@@ -430,10 +430,10 @@ GO(g_value_unset, vFp)
 //GO(g_variant_dict_get_type, 
 //GO(g_variant_get_gtype, 
 //GO(g_variant_type_get_gtype, 
-//GO(g_weak_ref_clear, 
-//GO(g_weak_ref_get, 
-//GO(g_weak_ref_init, 
-//GO(g_weak_ref_set, 
+GO(g_weak_ref_clear, vFp)
+GO(g_weak_ref_get, pFp)
+GO(g_weak_ref_init, vFpp)
+GO(g_weak_ref_set, vFpp)
 //GO(_init, 
 
 // to have some wrapper created for gtkclass.c