From 29e5dd06c7b3ccc5f07a805010df63a3cf90c039 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 6 Jan 2021 14:36:15 -0300 Subject: [PATCH] GDNative: Remove print functions Those are now utilities so the function pointer can be fetched when needed. --- modules/gdnative/gdnative/gdnative.cpp | 12 ----- modules/gdnative/gdnative_api.json | 54 -------------------- modules/gdnative/include/gdnative/gdnative.h | 7 --- 3 files changed, 73 deletions(-) diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp index ef64c994968..c3d25f81c74 100644 --- a/modules/gdnative/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative/gdnative.cpp @@ -127,18 +127,6 @@ void GDAPI godot_free(void *p_ptr) { memfree(p_ptr); } -void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line) { - _err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_ERROR); -} - -void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line) { - _err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_WARNING); -} - -void GDAPI godot_print(const godot_string *p_message) { - print_line(*(String *)p_message); -} - void _gdnative_report_version_mismatch(const godot_object *p_library, const char *p_ext, godot_gdnative_api_version p_want, godot_gdnative_api_version p_have) { String message = "Error loading GDNative file "; GDNativeLibrary *library = (GDNativeLibrary *)p_library; diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 7cdd644f81f..909e91393ea 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -152,60 +152,6 @@ ] ] }, - { - "name": "godot_print_error", - "return_type": "void", - "arguments": [ - [ - "const char *", - "p_description" - ], - [ - "const char *", - "p_function" - ], - [ - "const char *", - "p_file" - ], - [ - "int", - "p_line" - ] - ] - }, - { - "name": "godot_print_warning", - "return_type": "void", - "arguments": [ - [ - "const char *", - "p_description" - ], - [ - "const char *", - "p_function" - ], - [ - "const char *", - "p_file" - ], - [ - "int", - "p_line" - ] - ] - }, - { - "name": "godot_print", - "return_type": "void", - "arguments": [ - [ - "const godot_string *", - "p_message" - ] - ] - }, { "name": "godot_get_class_tag", "return_type": "void *", diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 0b8d684e13b..630966b035e 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -266,13 +266,6 @@ void GDAPI *godot_alloc(int p_bytes); void GDAPI *godot_realloc(void *p_ptr, int p_bytes); void GDAPI godot_free(void *p_ptr); -//print using Godot's error handler list -void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line); -void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line); -void GDAPI godot_print(const godot_string *p_message); - -// GDNATIVE CORE 1.0.2? - //tags used for safe dynamic casting void GDAPI *godot_get_class_tag(const godot_string_name *p_class); godot_object GDAPI *godot_object_cast_to(const godot_object *p_object, void *p_class_tag);