[GDNative] added API struct wrapper generator

Previously functions of the GDNative API were accessed by letting
the loader at load-time resolve the symbols. This causes troubles on
Windows (...sigh...), so now the GDNative API isn't exported anymore.

This means, that a library that wants to call a GDNative function
needs to access it via a struct of pointers that's passed to it at
right after the library was loaded. To make the usage easier, those
function pointers in the struct can be wrapped in actual function in
the global scope. This commit adds a generator for that wrapper code.
This commit is contained in:
Karroffel
2017-10-03 23:07:29 +02:00
parent a848fa6cde
commit 2a4e2b5378
4 changed files with 71 additions and 54 deletions
+4 -4
View File
@@ -3334,7 +3334,7 @@
"arguments": [
["godot_variant *", "p_self"],
["const godot_string *", "p_method"],
["const godot_variant *", "*p_args"],
["const godot_variant **", "p_args"],
["const godot_int", "p_argcount"],
["godot_variant_call_error *", "r_error"]
]
@@ -3889,7 +3889,7 @@
"return_type": "double",
"arguments": [
["const wchar_t *", "p_str"],
["const wchar_t *", "*r_end"]
["const wchar_t **", "r_end"]
]
},
"godot_string_get_slice_count": {
@@ -4390,7 +4390,7 @@
"arguments": [
["godot_method_bind *", "p_method_bind"],
["godot_object *", "p_instance"],
["const void *", "*p_args"],
["const void **", "p_args"],
["void *", "p_ret"]
]
},
@@ -4399,7 +4399,7 @@
"arguments": [
["godot_method_bind *", "p_method_bind"],
["godot_object *", "p_instance"],
["const godot_variant *", "*p_args"],
["const godot_variant **", "p_args"],
["const int", "p_arg_count"],
["godot_variant_call_error *", "p_call_error"]
]