mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Merge pull request #8352 from karroffel/gdnative-misc-fixes
[GDNative] misc fixes
This commit is contained in:
commit
09ed1113fa
@ -402,6 +402,7 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
|
||||
source.push_back("\t\t\t\t\t{\n");
|
||||
source.push_back("\t\t\t\t\t\t\"name\": \"" + e->get().argument_names[i] + "\",\n");
|
||||
source.push_back("\t\t\t\t\t\t\"type\": \"" + e->get().argument_types[i] + "\",\n");
|
||||
source.push_back(String("\t\t\t\t\t\t\"has_default_value\": ") + (e->get().default_arguments.has(i) ? "true" : "false") + ",\n");
|
||||
source.push_back("\t\t\t\t\t\t\"default_value\": \"" + (e->get().default_arguments.has(i) ? (String)e->get().default_arguments[i] : "") + "\"\n");
|
||||
source.push_back(String("\t\t\t\t\t}") + ((i < e->get().argument_names.size() - 1) ? "," : "") + "\n");
|
||||
}
|
||||
|
@ -77,11 +77,9 @@ Error NativeLibrary::initialize(NativeLibrary *&p_native_lib, const StringName p
|
||||
godot_native_init_options options;
|
||||
|
||||
options.in_editor = SceneTree::get_singleton()->is_editor_hint();
|
||||
/*
|
||||
options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
|
||||
options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
|
||||
options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE);
|
||||
*/
|
||||
|
||||
library_init_fpointer(&options); // Catch errors?
|
||||
|
||||
|
@ -317,7 +317,7 @@ typedef struct godot_instance_create_func {
|
||||
void *(*create_func)(godot_object *, void *);
|
||||
void *method_data;
|
||||
void (*free_func)(void *);
|
||||
} godot_script_instance_func;
|
||||
} godot_instance_create_func;
|
||||
|
||||
typedef struct godot_instance_destroy_func {
|
||||
// instance pointer, method data, user data
|
||||
|
Loading…
Reference in New Issue
Block a user