Remove GDExtension compatibility code for Godot 4.0
This commit is contained in:
parent
ea6a141fff
commit
ef9cb793d3
|
@ -37,7 +37,6 @@
|
|||
#include "core/version.h"
|
||||
|
||||
extern void gdextension_setup_interface();
|
||||
extern void *gdextension_get_legacy_interface();
|
||||
extern GDExtensionInterfaceFunctionPtr gdextension_get_proc_address(const char *p_name);
|
||||
|
||||
typedef GDExtensionBool (*GDExtensionLegacyInitializationFunction)(void *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization);
|
||||
|
@ -450,7 +449,7 @@ GDExtensionInterfaceFunctionPtr GDExtension::get_interface_function(StringName p
|
|||
return *function;
|
||||
}
|
||||
|
||||
Error GDExtension::open_library(const String &p_path, const String &p_entry_symbol, bool p_use_legacy_interface) {
|
||||
Error GDExtension::open_library(const String &p_path, const String &p_entry_symbol) {
|
||||
Error err = OS::get_singleton()->open_dynamic_library(p_path, library, true, &library_path);
|
||||
if (err != OK) {
|
||||
ERR_PRINT("GDExtension dynamic library not found: " + p_path);
|
||||
|
@ -467,15 +466,8 @@ Error GDExtension::open_library(const String &p_path, const String &p_entry_symb
|
|||
return err;
|
||||
}
|
||||
|
||||
GDExtensionBool ret = 0;
|
||||
if (p_use_legacy_interface) {
|
||||
GDExtensionLegacyInitializationFunction initialization_function = (GDExtensionLegacyInitializationFunction)entry_funcptr;
|
||||
ret = initialization_function(gdextension_get_legacy_interface(), this, &initialization);
|
||||
|
||||
} else {
|
||||
GDExtensionInitializationFunction initialization_function = (GDExtensionInitializationFunction)entry_funcptr;
|
||||
ret = initialization_function(&gdextension_get_proc_address, this, &initialization);
|
||||
}
|
||||
GDExtensionInitializationFunction initialization_function = (GDExtensionInitializationFunction)entry_funcptr;
|
||||
GDExtensionBool ret = initialization_function(&gdextension_get_proc_address, this, &initialization);
|
||||
|
||||
if (ret) {
|
||||
level_initialized = -1;
|
||||
|
@ -486,10 +478,6 @@ Error GDExtension::open_library(const String &p_path, const String &p_entry_symb
|
|||
}
|
||||
}
|
||||
|
||||
Error GDExtension::open_library_compat_76406(const String &p_path, const String &p_entry_symbol) {
|
||||
return open_library(p_path, p_entry_symbol, true);
|
||||
}
|
||||
|
||||
void GDExtension::close_library() {
|
||||
ERR_FAIL_COND(library == nullptr);
|
||||
OS::get_singleton()->close_dynamic_library(library);
|
||||
|
@ -525,8 +513,7 @@ void GDExtension::deinitialize_library(InitializationLevel p_level) {
|
|||
}
|
||||
|
||||
void GDExtension::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("open_library", "path", "entry_symbol", "use_legacy_interface"), &GDExtension::open_library, DEFVAL(false));
|
||||
ClassDB::bind_compatibility_method(D_METHOD("open_library", "path", "entry_symbol"), &GDExtension::open_library_compat_76406);
|
||||
ClassDB::bind_method(D_METHOD("open_library", "path", "entry_symbol"), &GDExtension::open_library);
|
||||
ClassDB::bind_method(D_METHOD("close_library"), &GDExtension::close_library);
|
||||
ClassDB::bind_method(D_METHOD("is_library_open"), &GDExtension::is_library_open);
|
||||
|
||||
|
@ -599,9 +586,20 @@ Ref<Resource> GDExtensionResourceLoader::load(const String &p_path, const String
|
|||
compatibility_minimum[i] = parts[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (r_error) {
|
||||
*r_error = ERR_INVALID_DATA;
|
||||
}
|
||||
ERR_PRINT("GDExtension configuration file must contain a \"configuration/compatibility_minimum\" key: " + p_path);
|
||||
return Ref<Resource>();
|
||||
}
|
||||
if (compatibility_minimum[0] < 4) {
|
||||
compatibility_minimum[0] = 4;
|
||||
|
||||
if (compatibility_minimum[0] < 4 || (compatibility_minimum[0] == 4 && compatibility_minimum[1] == 0)) {
|
||||
if (r_error) {
|
||||
*r_error = ERR_INVALID_DATA;
|
||||
}
|
||||
ERR_PRINT(vformat("GDExtension's compatibility_minimum (%d.%d.%d) must be at least 4.1.0: %s", compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path));
|
||||
return Ref<Resource>();
|
||||
}
|
||||
|
||||
bool compatible = true;
|
||||
|
@ -635,12 +633,10 @@ Ref<Resource> GDExtensionResourceLoader::load(const String &p_path, const String
|
|||
library_path = p_path.get_base_dir().path_join(library_path);
|
||||
}
|
||||
|
||||
bool use_legacy_interface = compatibility_minimum[0] == 4 && compatibility_minimum[1] == 0;
|
||||
|
||||
Ref<GDExtension> lib;
|
||||
lib.instantiate();
|
||||
String abs_path = ProjectSettings::get_singleton()->globalize_path(library_path);
|
||||
err = lib->open_library(abs_path, entry_symbol, use_legacy_interface);
|
||||
err = lib->open_library(abs_path, entry_symbol);
|
||||
|
||||
if (r_error) {
|
||||
*r_error = err;
|
||||
|
|
|
@ -72,8 +72,7 @@ public:
|
|||
static String get_extension_list_config_file();
|
||||
static String find_extension_library(const String &p_path, Ref<ConfigFile> p_config, std::function<bool(String)> p_has_feature, PackedStringArray *r_tags = nullptr);
|
||||
|
||||
Error open_library(const String &p_path, const String &p_entry_symbol, bool p_use_legacy_interface = false);
|
||||
Error open_library_compat_76406(const String &p_path, const String &p_entry_symbol);
|
||||
Error open_library(const String &p_path, const String &p_entry_symbol);
|
||||
void close_library();
|
||||
|
||||
enum InitializationLevel {
|
||||
|
|
|
@ -1218,322 +1218,3 @@ void gdextension_setup_interface() {
|
|||
}
|
||||
|
||||
#undef REGISTER_INTERFACE_FUNCTION
|
||||
|
||||
/*
|
||||
* Handle legacy GDExtension interface from Godot 4.0.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
uint32_t version_major;
|
||||
uint32_t version_minor;
|
||||
uint32_t version_patch;
|
||||
const char *version_string;
|
||||
|
||||
GDExtensionInterfaceMemAlloc mem_alloc;
|
||||
GDExtensionInterfaceMemRealloc mem_realloc;
|
||||
GDExtensionInterfaceMemFree mem_free;
|
||||
|
||||
GDExtensionInterfacePrintError print_error;
|
||||
GDExtensionInterfacePrintErrorWithMessage print_error_with_message;
|
||||
GDExtensionInterfacePrintWarning print_warning;
|
||||
GDExtensionInterfacePrintWarningWithMessage print_warning_with_message;
|
||||
GDExtensionInterfacePrintScriptError print_script_error;
|
||||
GDExtensionInterfacePrintScriptErrorWithMessage print_script_error_with_message;
|
||||
|
||||
GDExtensionInterfaceGetNativeStructSize get_native_struct_size;
|
||||
|
||||
GDExtensionInterfaceVariantNewCopy variant_new_copy;
|
||||
GDExtensionInterfaceVariantNewNil variant_new_nil;
|
||||
GDExtensionInterfaceVariantDestroy variant_destroy;
|
||||
|
||||
GDExtensionInterfaceVariantCall variant_call;
|
||||
GDExtensionInterfaceVariantCallStatic variant_call_static;
|
||||
GDExtensionInterfaceVariantEvaluate variant_evaluate;
|
||||
GDExtensionInterfaceVariantSet variant_set;
|
||||
GDExtensionInterfaceVariantSetNamed variant_set_named;
|
||||
GDExtensionInterfaceVariantSetKeyed variant_set_keyed;
|
||||
GDExtensionInterfaceVariantSetIndexed variant_set_indexed;
|
||||
GDExtensionInterfaceVariantGet variant_get;
|
||||
GDExtensionInterfaceVariantGetNamed variant_get_named;
|
||||
GDExtensionInterfaceVariantGetKeyed variant_get_keyed;
|
||||
GDExtensionInterfaceVariantGetIndexed variant_get_indexed;
|
||||
GDExtensionInterfaceVariantIterInit variant_iter_init;
|
||||
GDExtensionInterfaceVariantIterNext variant_iter_next;
|
||||
GDExtensionInterfaceVariantIterGet variant_iter_get;
|
||||
GDExtensionInterfaceVariantHash variant_hash;
|
||||
GDExtensionInterfaceVariantRecursiveHash variant_recursive_hash;
|
||||
GDExtensionInterfaceVariantHashCompare variant_hash_compare;
|
||||
GDExtensionInterfaceVariantBooleanize variant_booleanize;
|
||||
GDExtensionInterfaceVariantDuplicate variant_duplicate;
|
||||
GDExtensionInterfaceVariantStringify variant_stringify;
|
||||
|
||||
GDExtensionInterfaceVariantGetType variant_get_type;
|
||||
GDExtensionInterfaceVariantHasMethod variant_has_method;
|
||||
GDExtensionInterfaceVariantHasMember variant_has_member;
|
||||
GDExtensionInterfaceVariantHasKey variant_has_key;
|
||||
GDExtensionInterfaceVariantGetTypeName variant_get_type_name;
|
||||
GDExtensionInterfaceVariantCanConvert variant_can_convert;
|
||||
GDExtensionInterfaceVariantCanConvertStrict variant_can_convert_strict;
|
||||
|
||||
GDExtensionInterfaceGetVariantFromTypeConstructor get_variant_from_type_constructor;
|
||||
GDExtensionInterfaceGetVariantToTypeConstructor get_variant_to_type_constructor;
|
||||
GDExtensionInterfaceVariantGetPtrOperatorEvaluator variant_get_ptr_operator_evaluator;
|
||||
GDExtensionInterfaceVariantGetPtrBuiltinMethod variant_get_ptr_builtin_method;
|
||||
GDExtensionInterfaceVariantGetPtrConstructor variant_get_ptr_constructor;
|
||||
GDExtensionInterfaceVariantGetPtrDestructor variant_get_ptr_destructor;
|
||||
GDExtensionInterfaceVariantConstruct variant_construct;
|
||||
GDExtensionInterfaceVariantGetPtrSetter variant_get_ptr_setter;
|
||||
GDExtensionInterfaceVariantGetPtrGetter variant_get_ptr_getter;
|
||||
GDExtensionInterfaceVariantGetPtrIndexedSetter variant_get_ptr_indexed_setter;
|
||||
GDExtensionInterfaceVariantGetPtrIndexedGetter variant_get_ptr_indexed_getter;
|
||||
GDExtensionInterfaceVariantGetPtrKeyedSetter variant_get_ptr_keyed_setter;
|
||||
GDExtensionInterfaceVariantGetPtrKeyedGetter variant_get_ptr_keyed_getter;
|
||||
GDExtensionInterfaceVariantGetPtrKeyedChecker variant_get_ptr_keyed_checker;
|
||||
GDExtensionInterfaceVariantGetConstantValue variant_get_constant_value;
|
||||
GDExtensionInterfaceVariantGetPtrUtilityFunction variant_get_ptr_utility_function;
|
||||
|
||||
GDExtensionInterfaceStringNewWithLatin1Chars string_new_with_latin1_chars;
|
||||
GDExtensionInterfaceStringNewWithUtf8Chars string_new_with_utf8_chars;
|
||||
GDExtensionInterfaceStringNewWithUtf16Chars string_new_with_utf16_chars;
|
||||
GDExtensionInterfaceStringNewWithUtf32Chars string_new_with_utf32_chars;
|
||||
GDExtensionInterfaceStringNewWithWideChars string_new_with_wide_chars;
|
||||
GDExtensionInterfaceStringNewWithLatin1CharsAndLen string_new_with_latin1_chars_and_len;
|
||||
GDExtensionInterfaceStringNewWithUtf8CharsAndLen string_new_with_utf8_chars_and_len;
|
||||
GDExtensionInterfaceStringNewWithUtf16CharsAndLen string_new_with_utf16_chars_and_len;
|
||||
GDExtensionInterfaceStringNewWithUtf32CharsAndLen string_new_with_utf32_chars_and_len;
|
||||
GDExtensionInterfaceStringNewWithWideCharsAndLen string_new_with_wide_chars_and_len;
|
||||
GDExtensionInterfaceStringToLatin1Chars string_to_latin1_chars;
|
||||
GDExtensionInterfaceStringToUtf8Chars string_to_utf8_chars;
|
||||
GDExtensionInterfaceStringToUtf16Chars string_to_utf16_chars;
|
||||
GDExtensionInterfaceStringToUtf32Chars string_to_utf32_chars;
|
||||
GDExtensionInterfaceStringToWideChars string_to_wide_chars;
|
||||
GDExtensionInterfaceStringOperatorIndex string_operator_index;
|
||||
GDExtensionInterfaceStringOperatorIndexConst string_operator_index_const;
|
||||
|
||||
GDExtensionInterfaceStringOperatorPlusEqString string_operator_plus_eq_string;
|
||||
GDExtensionInterfaceStringOperatorPlusEqChar string_operator_plus_eq_char;
|
||||
GDExtensionInterfaceStringOperatorPlusEqCstr string_operator_plus_eq_cstr;
|
||||
GDExtensionInterfaceStringOperatorPlusEqWcstr string_operator_plus_eq_wcstr;
|
||||
GDExtensionInterfaceStringOperatorPlusEqC32str string_operator_plus_eq_c32str;
|
||||
|
||||
GDExtensionInterfaceXmlParserOpenBuffer xml_parser_open_buffer;
|
||||
|
||||
GDExtensionInterfaceFileAccessStoreBuffer file_access_store_buffer;
|
||||
GDExtensionInterfaceFileAccessGetBuffer file_access_get_buffer;
|
||||
|
||||
GDExtensionInterfaceWorkerThreadPoolAddNativeGroupTask worker_thread_pool_add_native_group_task;
|
||||
GDExtensionInterfaceWorkerThreadPoolAddNativeTask worker_thread_pool_add_native_task;
|
||||
|
||||
GDExtensionInterfacePackedByteArrayOperatorIndex packed_byte_array_operator_index;
|
||||
GDExtensionInterfacePackedByteArrayOperatorIndexConst packed_byte_array_operator_index_const;
|
||||
GDExtensionInterfacePackedColorArrayOperatorIndex packed_color_array_operator_index;
|
||||
GDExtensionInterfacePackedColorArrayOperatorIndexConst packed_color_array_operator_index_const;
|
||||
GDExtensionInterfacePackedFloat32ArrayOperatorIndex packed_float32_array_operator_index;
|
||||
GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst packed_float32_array_operator_index_const;
|
||||
GDExtensionInterfacePackedFloat64ArrayOperatorIndex packed_float64_array_operator_index;
|
||||
GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst packed_float64_array_operator_index_const;
|
||||
GDExtensionInterfacePackedInt32ArrayOperatorIndex packed_int32_array_operator_index;
|
||||
GDExtensionInterfacePackedInt32ArrayOperatorIndexConst packed_int32_array_operator_index_const;
|
||||
GDExtensionInterfacePackedInt64ArrayOperatorIndex packed_int64_array_operator_index;
|
||||
GDExtensionInterfacePackedInt64ArrayOperatorIndexConst packed_int64_array_operator_index_const;
|
||||
GDExtensionInterfacePackedStringArrayOperatorIndex packed_string_array_operator_index;
|
||||
GDExtensionInterfacePackedStringArrayOperatorIndexConst packed_string_array_operator_index_const;
|
||||
GDExtensionInterfacePackedVector2ArrayOperatorIndex packed_vector2_array_operator_index;
|
||||
GDExtensionInterfacePackedVector2ArrayOperatorIndexConst packed_vector2_array_operator_index_const;
|
||||
GDExtensionInterfacePackedVector3ArrayOperatorIndex packed_vector3_array_operator_index;
|
||||
GDExtensionInterfacePackedVector3ArrayOperatorIndexConst packed_vector3_array_operator_index_const;
|
||||
GDExtensionInterfaceArrayOperatorIndex array_operator_index;
|
||||
GDExtensionInterfaceArrayOperatorIndexConst array_operator_index_const;
|
||||
GDExtensionInterfaceArrayRef array_ref;
|
||||
GDExtensionInterfaceArraySetTyped array_set_typed;
|
||||
|
||||
GDExtensionInterfaceDictionaryOperatorIndex dictionary_operator_index;
|
||||
GDExtensionInterfaceDictionaryOperatorIndexConst dictionary_operator_index_const;
|
||||
|
||||
GDExtensionInterfaceObjectMethodBindCall object_method_bind_call;
|
||||
GDExtensionInterfaceObjectMethodBindPtrcall object_method_bind_ptrcall;
|
||||
GDExtensionInterfaceObjectDestroy object_destroy;
|
||||
GDExtensionInterfaceGlobalGetSingleton global_get_singleton;
|
||||
GDExtensionInterfaceObjectGetInstanceBinding object_get_instance_binding;
|
||||
GDExtensionInterfaceObjectSetInstanceBinding object_set_instance_binding;
|
||||
GDExtensionInterfaceObjectSetInstance object_set_instance;
|
||||
GDExtensionInterfaceObjectCastTo object_cast_to;
|
||||
GDExtensionInterfaceObjectGetInstanceFromId object_get_instance_from_id;
|
||||
GDExtensionInterfaceObjectGetInstanceId object_get_instance_id;
|
||||
|
||||
GDExtensionInterfaceRefGetObject ref_get_object;
|
||||
GDExtensionInterfaceRefSetObject ref_set_object;
|
||||
|
||||
GDExtensionInterfaceScriptInstanceCreate script_instance_create;
|
||||
|
||||
GDExtensionInterfaceClassdbConstructObject classdb_construct_object;
|
||||
GDExtensionInterfaceClassdbGetMethodBind classdb_get_method_bind;
|
||||
GDExtensionInterfaceClassdbGetClassTag classdb_get_class_tag;
|
||||
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClass classdb_register_extension_class;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassMethod classdb_register_extension_class_method;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant classdb_register_extension_class_integer_constant;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassProperty classdb_register_extension_class_property;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup classdb_register_extension_class_property_group;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup classdb_register_extension_class_property_subgroup;
|
||||
GDExtensionInterfaceClassdbRegisterExtensionClassSignal classdb_register_extension_class_signal;
|
||||
GDExtensionInterfaceClassdbUnregisterExtensionClass classdb_unregister_extension_class;
|
||||
|
||||
GDExtensionInterfaceGetLibraryPath get_library_path;
|
||||
|
||||
} LegacyGDExtensionInterface;
|
||||
|
||||
static LegacyGDExtensionInterface *legacy_gdextension_interface = nullptr;
|
||||
|
||||
#define SETUP_LEGACY_FUNC(m_name, m_type) legacy_gdextension_interface->m_name = (m_type)GDExtension::get_interface_function(#m_name)
|
||||
|
||||
void *gdextension_get_legacy_interface() {
|
||||
if (legacy_gdextension_interface != nullptr) {
|
||||
return legacy_gdextension_interface;
|
||||
}
|
||||
|
||||
legacy_gdextension_interface = memnew(LegacyGDExtensionInterface);
|
||||
|
||||
// Force to 4.0.999 to make it easier to detect this structure.
|
||||
legacy_gdextension_interface->version_major = 4;
|
||||
legacy_gdextension_interface->version_minor = 0;
|
||||
legacy_gdextension_interface->version_patch = 999;
|
||||
legacy_gdextension_interface->version_string = "Godot Engine v4.0.999.stable.official [000000000]";
|
||||
|
||||
SETUP_LEGACY_FUNC(mem_alloc, GDExtensionInterfaceMemAlloc);
|
||||
SETUP_LEGACY_FUNC(mem_realloc, GDExtensionInterfaceMemRealloc);
|
||||
SETUP_LEGACY_FUNC(mem_free, GDExtensionInterfaceMemFree);
|
||||
SETUP_LEGACY_FUNC(print_error, GDExtensionInterfacePrintError);
|
||||
SETUP_LEGACY_FUNC(print_error_with_message, GDExtensionInterfacePrintErrorWithMessage);
|
||||
SETUP_LEGACY_FUNC(print_warning, GDExtensionInterfacePrintWarning);
|
||||
SETUP_LEGACY_FUNC(print_warning_with_message, GDExtensionInterfacePrintWarningWithMessage);
|
||||
SETUP_LEGACY_FUNC(print_script_error, GDExtensionInterfacePrintScriptError);
|
||||
SETUP_LEGACY_FUNC(print_script_error_with_message, GDExtensionInterfacePrintScriptErrorWithMessage);
|
||||
SETUP_LEGACY_FUNC(get_native_struct_size, GDExtensionInterfaceGetNativeStructSize);
|
||||
SETUP_LEGACY_FUNC(variant_new_copy, GDExtensionInterfaceVariantNewCopy);
|
||||
SETUP_LEGACY_FUNC(variant_new_nil, GDExtensionInterfaceVariantNewNil);
|
||||
SETUP_LEGACY_FUNC(variant_destroy, GDExtensionInterfaceVariantDestroy);
|
||||
SETUP_LEGACY_FUNC(variant_call, GDExtensionInterfaceVariantCall);
|
||||
SETUP_LEGACY_FUNC(variant_call_static, GDExtensionInterfaceVariantCallStatic);
|
||||
SETUP_LEGACY_FUNC(variant_evaluate, GDExtensionInterfaceVariantEvaluate);
|
||||
SETUP_LEGACY_FUNC(variant_set, GDExtensionInterfaceVariantSet);
|
||||
SETUP_LEGACY_FUNC(variant_set_named, GDExtensionInterfaceVariantSetNamed);
|
||||
SETUP_LEGACY_FUNC(variant_set_keyed, GDExtensionInterfaceVariantSetKeyed);
|
||||
SETUP_LEGACY_FUNC(variant_set_indexed, GDExtensionInterfaceVariantSetIndexed);
|
||||
SETUP_LEGACY_FUNC(variant_get, GDExtensionInterfaceVariantGet);
|
||||
SETUP_LEGACY_FUNC(variant_get_named, GDExtensionInterfaceVariantGetNamed);
|
||||
SETUP_LEGACY_FUNC(variant_get_keyed, GDExtensionInterfaceVariantGetKeyed);
|
||||
SETUP_LEGACY_FUNC(variant_get_indexed, GDExtensionInterfaceVariantGetIndexed);
|
||||
SETUP_LEGACY_FUNC(variant_iter_init, GDExtensionInterfaceVariantIterInit);
|
||||
SETUP_LEGACY_FUNC(variant_iter_next, GDExtensionInterfaceVariantIterNext);
|
||||
SETUP_LEGACY_FUNC(variant_iter_get, GDExtensionInterfaceVariantIterGet);
|
||||
SETUP_LEGACY_FUNC(variant_hash, GDExtensionInterfaceVariantHash);
|
||||
SETUP_LEGACY_FUNC(variant_recursive_hash, GDExtensionInterfaceVariantRecursiveHash);
|
||||
SETUP_LEGACY_FUNC(variant_hash_compare, GDExtensionInterfaceVariantHashCompare);
|
||||
SETUP_LEGACY_FUNC(variant_booleanize, GDExtensionInterfaceVariantBooleanize);
|
||||
SETUP_LEGACY_FUNC(variant_duplicate, GDExtensionInterfaceVariantDuplicate);
|
||||
SETUP_LEGACY_FUNC(variant_stringify, GDExtensionInterfaceVariantStringify);
|
||||
SETUP_LEGACY_FUNC(variant_get_type, GDExtensionInterfaceVariantGetType);
|
||||
SETUP_LEGACY_FUNC(variant_has_method, GDExtensionInterfaceVariantHasMethod);
|
||||
SETUP_LEGACY_FUNC(variant_has_member, GDExtensionInterfaceVariantHasMember);
|
||||
SETUP_LEGACY_FUNC(variant_has_key, GDExtensionInterfaceVariantHasKey);
|
||||
SETUP_LEGACY_FUNC(variant_get_type_name, GDExtensionInterfaceVariantGetTypeName);
|
||||
SETUP_LEGACY_FUNC(variant_can_convert, GDExtensionInterfaceVariantCanConvert);
|
||||
SETUP_LEGACY_FUNC(variant_can_convert_strict, GDExtensionInterfaceVariantCanConvertStrict);
|
||||
SETUP_LEGACY_FUNC(get_variant_from_type_constructor, GDExtensionInterfaceGetVariantFromTypeConstructor);
|
||||
SETUP_LEGACY_FUNC(get_variant_to_type_constructor, GDExtensionInterfaceGetVariantToTypeConstructor);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_operator_evaluator, GDExtensionInterfaceVariantGetPtrOperatorEvaluator);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_builtin_method, GDExtensionInterfaceVariantGetPtrBuiltinMethod);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_constructor, GDExtensionInterfaceVariantGetPtrConstructor);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_destructor, GDExtensionInterfaceVariantGetPtrDestructor);
|
||||
SETUP_LEGACY_FUNC(variant_construct, GDExtensionInterfaceVariantConstruct);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_setter, GDExtensionInterfaceVariantGetPtrSetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_getter, GDExtensionInterfaceVariantGetPtrGetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_indexed_setter, GDExtensionInterfaceVariantGetPtrIndexedSetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_indexed_getter, GDExtensionInterfaceVariantGetPtrIndexedGetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_keyed_setter, GDExtensionInterfaceVariantGetPtrKeyedSetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_keyed_getter, GDExtensionInterfaceVariantGetPtrKeyedGetter);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_keyed_checker, GDExtensionInterfaceVariantGetPtrKeyedChecker);
|
||||
SETUP_LEGACY_FUNC(variant_get_constant_value, GDExtensionInterfaceVariantGetConstantValue);
|
||||
SETUP_LEGACY_FUNC(variant_get_ptr_utility_function, GDExtensionInterfaceVariantGetPtrUtilityFunction);
|
||||
SETUP_LEGACY_FUNC(string_new_with_latin1_chars, GDExtensionInterfaceStringNewWithLatin1Chars);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf8_chars, GDExtensionInterfaceStringNewWithUtf8Chars);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf16_chars, GDExtensionInterfaceStringNewWithUtf16Chars);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf32_chars, GDExtensionInterfaceStringNewWithUtf32Chars);
|
||||
SETUP_LEGACY_FUNC(string_new_with_wide_chars, GDExtensionInterfaceStringNewWithWideChars);
|
||||
SETUP_LEGACY_FUNC(string_new_with_latin1_chars_and_len, GDExtensionInterfaceStringNewWithLatin1CharsAndLen);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf8_chars_and_len, GDExtensionInterfaceStringNewWithUtf8CharsAndLen);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf16_chars_and_len, GDExtensionInterfaceStringNewWithUtf16CharsAndLen);
|
||||
SETUP_LEGACY_FUNC(string_new_with_utf32_chars_and_len, GDExtensionInterfaceStringNewWithUtf32CharsAndLen);
|
||||
SETUP_LEGACY_FUNC(string_new_with_wide_chars_and_len, GDExtensionInterfaceStringNewWithWideCharsAndLen);
|
||||
SETUP_LEGACY_FUNC(string_to_latin1_chars, GDExtensionInterfaceStringToLatin1Chars);
|
||||
SETUP_LEGACY_FUNC(string_to_utf8_chars, GDExtensionInterfaceStringToUtf8Chars);
|
||||
SETUP_LEGACY_FUNC(string_to_utf16_chars, GDExtensionInterfaceStringToUtf16Chars);
|
||||
SETUP_LEGACY_FUNC(string_to_utf32_chars, GDExtensionInterfaceStringToUtf32Chars);
|
||||
SETUP_LEGACY_FUNC(string_to_wide_chars, GDExtensionInterfaceStringToWideChars);
|
||||
SETUP_LEGACY_FUNC(string_operator_index, GDExtensionInterfaceStringOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(string_operator_index_const, GDExtensionInterfaceStringOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(string_operator_plus_eq_string, GDExtensionInterfaceStringOperatorPlusEqString);
|
||||
SETUP_LEGACY_FUNC(string_operator_plus_eq_char, GDExtensionInterfaceStringOperatorPlusEqChar);
|
||||
SETUP_LEGACY_FUNC(string_operator_plus_eq_cstr, GDExtensionInterfaceStringOperatorPlusEqCstr);
|
||||
SETUP_LEGACY_FUNC(string_operator_plus_eq_wcstr, GDExtensionInterfaceStringOperatorPlusEqWcstr);
|
||||
SETUP_LEGACY_FUNC(string_operator_plus_eq_c32str, GDExtensionInterfaceStringOperatorPlusEqC32str);
|
||||
SETUP_LEGACY_FUNC(xml_parser_open_buffer, GDExtensionInterfaceXmlParserOpenBuffer);
|
||||
SETUP_LEGACY_FUNC(file_access_store_buffer, GDExtensionInterfaceFileAccessStoreBuffer);
|
||||
SETUP_LEGACY_FUNC(file_access_get_buffer, GDExtensionInterfaceFileAccessGetBuffer);
|
||||
SETUP_LEGACY_FUNC(worker_thread_pool_add_native_group_task, GDExtensionInterfaceWorkerThreadPoolAddNativeGroupTask);
|
||||
SETUP_LEGACY_FUNC(worker_thread_pool_add_native_task, GDExtensionInterfaceWorkerThreadPoolAddNativeTask);
|
||||
SETUP_LEGACY_FUNC(packed_byte_array_operator_index, GDExtensionInterfacePackedByteArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_byte_array_operator_index_const, GDExtensionInterfacePackedByteArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_color_array_operator_index, GDExtensionInterfacePackedColorArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_color_array_operator_index_const, GDExtensionInterfacePackedColorArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_float32_array_operator_index, GDExtensionInterfacePackedFloat32ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_float32_array_operator_index_const, GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_float64_array_operator_index, GDExtensionInterfacePackedFloat64ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_float64_array_operator_index_const, GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_int32_array_operator_index, GDExtensionInterfacePackedInt32ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_int32_array_operator_index_const, GDExtensionInterfacePackedInt32ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_int64_array_operator_index, GDExtensionInterfacePackedInt64ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_int64_array_operator_index_const, GDExtensionInterfacePackedInt64ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_string_array_operator_index, GDExtensionInterfacePackedStringArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_string_array_operator_index_const, GDExtensionInterfacePackedStringArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_vector2_array_operator_index, GDExtensionInterfacePackedVector2ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_vector2_array_operator_index_const, GDExtensionInterfacePackedVector2ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(packed_vector3_array_operator_index, GDExtensionInterfacePackedVector3ArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(packed_vector3_array_operator_index_const, GDExtensionInterfacePackedVector3ArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(array_operator_index, GDExtensionInterfaceArrayOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(array_operator_index_const, GDExtensionInterfaceArrayOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(array_ref, GDExtensionInterfaceArrayRef);
|
||||
SETUP_LEGACY_FUNC(array_set_typed, GDExtensionInterfaceArraySetTyped);
|
||||
SETUP_LEGACY_FUNC(dictionary_operator_index, GDExtensionInterfaceDictionaryOperatorIndex);
|
||||
SETUP_LEGACY_FUNC(dictionary_operator_index_const, GDExtensionInterfaceDictionaryOperatorIndexConst);
|
||||
SETUP_LEGACY_FUNC(object_method_bind_call, GDExtensionInterfaceObjectMethodBindCall);
|
||||
SETUP_LEGACY_FUNC(object_method_bind_ptrcall, GDExtensionInterfaceObjectMethodBindPtrcall);
|
||||
SETUP_LEGACY_FUNC(object_destroy, GDExtensionInterfaceObjectDestroy);
|
||||
SETUP_LEGACY_FUNC(global_get_singleton, GDExtensionInterfaceGlobalGetSingleton);
|
||||
SETUP_LEGACY_FUNC(object_get_instance_binding, GDExtensionInterfaceObjectGetInstanceBinding);
|
||||
SETUP_LEGACY_FUNC(object_set_instance_binding, GDExtensionInterfaceObjectSetInstanceBinding);
|
||||
SETUP_LEGACY_FUNC(object_set_instance, GDExtensionInterfaceObjectSetInstance);
|
||||
SETUP_LEGACY_FUNC(object_cast_to, GDExtensionInterfaceObjectCastTo);
|
||||
SETUP_LEGACY_FUNC(object_get_instance_from_id, GDExtensionInterfaceObjectGetInstanceFromId);
|
||||
SETUP_LEGACY_FUNC(object_get_instance_id, GDExtensionInterfaceObjectGetInstanceId);
|
||||
SETUP_LEGACY_FUNC(ref_get_object, GDExtensionInterfaceRefGetObject);
|
||||
SETUP_LEGACY_FUNC(ref_set_object, GDExtensionInterfaceRefSetObject);
|
||||
SETUP_LEGACY_FUNC(script_instance_create, GDExtensionInterfaceScriptInstanceCreate);
|
||||
SETUP_LEGACY_FUNC(classdb_construct_object, GDExtensionInterfaceClassdbConstructObject);
|
||||
SETUP_LEGACY_FUNC(classdb_get_method_bind, GDExtensionInterfaceClassdbGetMethodBind);
|
||||
SETUP_LEGACY_FUNC(classdb_get_class_tag, GDExtensionInterfaceClassdbGetClassTag);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class, GDExtensionInterfaceClassdbRegisterExtensionClass);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_method, GDExtensionInterfaceClassdbRegisterExtensionClassMethod);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_integer_constant, GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_property, GDExtensionInterfaceClassdbRegisterExtensionClassProperty);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_property_group, GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_property_subgroup, GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup);
|
||||
SETUP_LEGACY_FUNC(classdb_register_extension_class_signal, GDExtensionInterfaceClassdbRegisterExtensionClassSignal);
|
||||
SETUP_LEGACY_FUNC(classdb_unregister_extension_class, GDExtensionInterfaceClassdbUnregisterExtensionClass);
|
||||
SETUP_LEGACY_FUNC(get_library_path, GDExtensionInterfaceGetLibraryPath);
|
||||
|
||||
return legacy_gdextension_interface;
|
||||
}
|
||||
|
||||
#undef SETUP_LEGACY_FUNC
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<return type="int" enum="Error" />
|
||||
<param index="0" name="path" type="String" />
|
||||
<param index="1" name="entry_symbol" type="String" />
|
||||
<param index="2" name="use_legacy_interface" type="bool" default="false" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
|
Loading…
Reference in New Issue