diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-15 12:02:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 12:02:26 +0200 |
commit | b5dfe45efc53e3733660d068ab2ac1e170f6bd34 (patch) | |
tree | 8fd0224d030aa535249a036751eaa1b1c5298ae0 /modules/gdnative/nativescript | |
parent | d3c10e8dd60b8e771f9e3d1e1df6780491d8effe (diff) | |
parent | c3e615e21b5f711757ac3fd8ea2c238bf6b1723b (diff) |
Merge pull request #39183 from bruvzg/gdnative_merge_structs
GDNative: merge API structs, bump version of merged structs.
Diffstat (limited to 'modules/gdnative/nativescript')
-rw-r--r-- | modules/gdnative/nativescript/godot_nativescript.cpp | 14 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.h | 18 |
3 files changed, 17 insertions, 17 deletions
diff --git a/modules/gdnative/nativescript/godot_nativescript.cpp b/modules/gdnative/nativescript/godot_nativescript.cpp index 1aea8ad160..e47548f3e9 100644 --- a/modules/gdnative/nativescript/godot_nativescript.cpp +++ b/modules/gdnative/nativescript/godot_nativescript.cpp @@ -51,7 +51,7 @@ extern "C" void _native_script_hook() { // Script API -void GDAPI godot_nativescript_register_class(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) { +void GDAPI godot_nativescript_register_class(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_nativescript_instance_create_func p_create_func, godot_nativescript_instance_destroy_func p_destroy_func) { String *s = (String *)p_gdnative_handle; Map<StringName, NativeScriptDesc> *classes = &NSL->library_classes[*s]; @@ -83,7 +83,7 @@ void GDAPI godot_nativescript_register_class(void *p_gdnative_handle, const char classes->insert(p_name, desc); } -void GDAPI godot_nativescript_register_tool_class(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) { +void GDAPI godot_nativescript_register_tool_class(void *p_gdnative_handle, const char *p_name, const char *p_base, godot_nativescript_instance_create_func p_create_func, godot_nativescript_instance_destroy_func p_destroy_func) { String *s = (String *)p_gdnative_handle; Map<StringName, NativeScriptDesc> *classes = &NSL->library_classes[*s]; @@ -116,7 +116,7 @@ void GDAPI godot_nativescript_register_tool_class(void *p_gdnative_handle, const classes->insert(p_name, desc); } -void GDAPI godot_nativescript_register_method(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method) { +void GDAPI godot_nativescript_register_method(void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_nativescript_method_attributes p_attr, godot_nativescript_instance_method p_method) { String *s = (String *)p_gdnative_handle; Map<StringName, NativeScriptDesc>::Element *E = NSL->library_classes[*s].find(p_name); @@ -135,7 +135,7 @@ void GDAPI godot_nativescript_register_method(void *p_gdnative_handle, const cha E->get().methods.insert(p_function_name, method); } -void GDAPI godot_nativescript_register_property(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func) { +void GDAPI godot_nativescript_register_property(void *p_gdnative_handle, const char *p_name, const char *p_path, godot_nativescript_property_attributes *p_attr, godot_nativescript_property_set_func p_set_func, godot_nativescript_property_get_func p_get_func) { String *s = (String *)p_gdnative_handle; Map<StringName, NativeScriptDesc>::Element *E = NSL->library_classes[*s].find(p_name); @@ -221,7 +221,7 @@ void GDAPI *godot_nativescript_get_userdata(godot_object *p_instance) { * */ -void GDAPI godot_nativescript_set_method_argument_information(void *p_gdnative_handle, const char *p_name, const char *p_function_name, int p_num_args, const godot_method_arg *p_args) { +void GDAPI godot_nativescript_set_method_argument_information(void *p_gdnative_handle, const char *p_name, const char *p_function_name, int p_num_args, const godot_nativescript_method_argument *p_args) { String *s = (String *)p_gdnative_handle; Map<StringName, NativeScriptDesc>::Element *E = NSL->library_classes[*s].find(p_name); @@ -235,7 +235,7 @@ void GDAPI godot_nativescript_set_method_argument_information(void *p_gdnative_h List<PropertyInfo> args; for (int i = 0; i < p_num_args; i++) { - godot_method_arg arg = p_args[i]; + godot_nativescript_method_argument arg = p_args[i]; String name = *(String *)&arg.name; String hint_string = *(String *)&arg.hint_string; @@ -329,7 +329,7 @@ const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object) return nullptr; } -int GDAPI godot_nativescript_register_instance_binding_data_functions(godot_instance_binding_functions p_binding_functions) { +int GDAPI godot_nativescript_register_instance_binding_data_functions(godot_nativescript_instance_binding_functions p_binding_functions) { return NativeScriptLanguage::get_singleton()->register_binding_functions(p_binding_functions); } diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index f3dfd0b68e..06b9534fce 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -1498,7 +1498,7 @@ void NativeScriptLanguage::profiling_add_data(StringName p_signature, uint64_t p #endif } -int NativeScriptLanguage::register_binding_functions(godot_instance_binding_functions p_binding_functions) { +int NativeScriptLanguage::register_binding_functions(godot_nativescript_instance_binding_functions p_binding_functions) { // find index int idx = -1; diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index 1aca142889..fabf4bb87e 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -48,7 +48,7 @@ struct NativeScriptDesc { struct Method { - godot_instance_method method; + godot_nativescript_instance_method method; MethodInfo info; int rpc_mode; uint16_t rpc_method_id; @@ -56,8 +56,8 @@ struct NativeScriptDesc { }; struct Property { - godot_property_set_func setter; - godot_property_get_func getter; + godot_nativescript_property_set_func setter; + godot_nativescript_property_get_func getter; PropertyInfo info; Variant default_value; int rset_mode; @@ -78,8 +78,8 @@ struct NativeScriptDesc { StringName base; StringName base_native_type; NativeScriptDesc *base_data; - godot_instance_create_func create_func; - godot_instance_destroy_func destroy_func; + godot_nativescript_instance_create_func create_func; + godot_nativescript_instance_destroy_func destroy_func; String documentation; @@ -88,8 +88,8 @@ struct NativeScriptDesc { bool is_tool; inline NativeScriptDesc() { - zeromem(&create_func, sizeof(godot_instance_create_func)); - zeromem(&destroy_func, sizeof(godot_instance_destroy_func)); + zeromem(&create_func, sizeof(godot_nativescript_instance_create_func)); + zeromem(&destroy_func, sizeof(godot_nativescript_instance_destroy_func)); } }; @@ -267,7 +267,7 @@ private: void call_libraries_cb(const StringName &name); - Vector<Pair<bool, godot_instance_binding_functions>> binding_functions; + Vector<Pair<bool, godot_nativescript_instance_binding_functions>> binding_functions; Set<Vector<void *> *> binding_instances; Map<int, HashMap<StringName, const void *>> global_type_tags; @@ -360,7 +360,7 @@ public: virtual int profiling_get_accumulated_data(ProfilingInfo *p_info_arr, int p_info_max); virtual int profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_info_max); - int register_binding_functions(godot_instance_binding_functions p_binding_functions); + int register_binding_functions(godot_nativescript_instance_binding_functions p_binding_functions); void unregister_binding_functions(int p_idx); void *get_instance_binding_data(int p_idx, Object *p_object); |