summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-10-28 19:20:56 +1100
committerBastiaan Olij <mux213@gmail.com>2021-10-28 19:44:20 +1100
commitef528d3a8624918eb98e02604bbbdb3e47e555e9 (patch)
treed37f69240a8cb26e07f74e4b803605174e15457b /src
parent5148aad3d4faf303a32cec4816bbd33cc6feabef (diff)
downloadredot-cpp-ef528d3a8624918eb98e02604bbbdb3e47e555e9.tar.gz
Rename interface to gdn_interface because it's a defined keyword under windows
Diffstat (limited to 'src')
-rw-r--r--src/core/class_db.cpp14
-rw-r--r--src/core/error_macros.cpp4
-rw-r--r--src/core/memory.cpp6
-rw-r--r--src/core/method_bind.cpp2
-rw-r--r--src/godot.cpp6
-rw-r--r--src/variant/char_string.cpp32
-rw-r--r--src/variant/packed_arrays.cpp36
-rw-r--r--src/variant/variant.cpp74
8 files changed, 87 insertions, 87 deletions
diff --git a/src/core/class_db.cpp b/src/core/class_db.cpp
index ec8a107..66ebb3a 100644
--- a/src/core/class_db.cpp
+++ b/src/core/class_db.cpp
@@ -55,13 +55,13 @@ MethodDefinition D_METHOD(const char *p_name, const char *p_arg1) {
void ClassDB::add_property_group(const char *p_class, const char *p_name, const char *p_prefix) {
ERR_FAIL_COND_MSG(classes.find(p_class) == classes.end(), "Trying to add property to non-existing class.");
- internal::interface->classdb_register_extension_class_property_group(internal::library, p_class, p_name, p_prefix);
+ internal::gdn_interface->classdb_register_extension_class_property_group(internal::library, p_class, p_name, p_prefix);
}
void ClassDB::add_property_subgroup(const char *p_class, const char *p_name, const char *p_prefix) {
ERR_FAIL_COND_MSG(classes.find(p_class) == classes.end(), "Trying to add property to non-existing class.");
- internal::interface->classdb_register_extension_class_property_subgroup(internal::library, p_class, p_name, p_prefix);
+ internal::gdn_interface->classdb_register_extension_class_property_subgroup(internal::library, p_class, p_name, p_prefix);
}
void ClassDB::add_property(const char *p_class, const PropertyInfo &p_pinfo, const char *p_setter, const char *p_getter, int p_index) {
@@ -111,7 +111,7 @@ void ClassDB::add_property(const char *p_class, const PropertyInfo &p_pinfo, con
setget.index = p_index;
setget.type = p_pinfo.type;
- internal::interface->classdb_register_extension_class_property(internal::library, info.name, &prop_info, setget.setter, setget.getter);
+ internal::gdn_interface->classdb_register_extension_class_property(internal::library, info.name, &prop_info, setget.setter, setget.getter);
}
MethodBind *ClassDB::get_method(const char *p_class, const char *p_method) {
@@ -193,7 +193,7 @@ void ClassDB::bind_method_godot(const char *p_class_name, MethodBind *p_method)
p_method->get_hint_flags(), //uint32_t default_argument_count;
nullptr, //GDNativeVariantPtr *default_arguments;
};
- internal::interface->classdb_register_extension_class_method(internal::library, p_class_name, &method_info);
+ internal::gdn_interface->classdb_register_extension_class_method(internal::library, p_class_name, &method_info);
}
void ClassDB::add_signal(const char *p_class, const MethodInfo &p_signal) {
@@ -228,7 +228,7 @@ void ClassDB::add_signal(const char *p_class, const MethodInfo &p_signal) {
});
}
- internal::interface->classdb_register_extension_class_signal(internal::library, cl.name, p_signal.name, parameters.data(), parameters.size());
+ internal::gdn_interface->classdb_register_extension_class_signal(internal::library, cl.name, p_signal.name, parameters.data(), parameters.size());
}
void ClassDB::bind_integer_constant(const char *p_class_name, const char *p_enum_name, const char *p_constant_name, GDNativeInt p_constant_value) {
@@ -245,7 +245,7 @@ void ClassDB::bind_integer_constant(const char *p_class_name, const char *p_enum
type.constant_names.insert(p_constant_name);
// Register it with Godot
- internal::interface->classdb_register_extension_class_integer_constant(internal::library, p_class_name, p_enum_name, p_constant_name, p_constant_value);
+ internal::gdn_interface->classdb_register_extension_class_integer_constant(internal::library, p_class_name, p_enum_name, p_constant_name, p_constant_value);
}
GDNativeExtensionClassCallVirtual ClassDB::get_virtual_func(void *p_userdata, const char *p_name) {
@@ -298,7 +298,7 @@ void ClassDB::deinitialize(GDNativeInitializationLevel p_level) {
continue;
}
- internal::interface->classdb_unregister_extension_class(internal::library, cl.name);
+ internal::gdn_interface->classdb_unregister_extension_class(internal::library, cl.name);
for (auto method : cl.method_map) {
memdelete(method.second);
diff --git a/src/core/error_macros.cpp b/src/core/error_macros.cpp
index 0b60a0d..d0c922e 100644
--- a/src/core/error_macros.cpp
+++ b/src/core/error_macros.cpp
@@ -38,9 +38,9 @@ namespace godot {
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const char *p_message, bool p_is_warning) {
if (p_is_warning) {
- internal::interface->print_warning(p_message, p_function, p_file, p_line);
+ internal::gdn_interface->print_warning(p_message, p_function, p_file, p_line);
} else {
- internal::interface->print_error(p_message, p_function, p_file, p_line);
+ internal::gdn_interface->print_error(p_message, p_function, p_file, p_line);
}
}
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index e498b34..122e647 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -35,15 +35,15 @@
namespace godot {
void *Memory::alloc_static(size_t p_bytes) {
- return internal::interface->mem_alloc(p_bytes);
+ return internal::gdn_interface->mem_alloc(p_bytes);
}
void *Memory::realloc_static(void *p_memory, size_t p_bytes) {
- return internal::interface->mem_realloc(p_memory, p_bytes);
+ return internal::gdn_interface->mem_realloc(p_memory, p_bytes);
}
void Memory::free_static(void *p_ptr) {
- internal::interface->mem_free(p_ptr);
+ internal::gdn_interface->mem_free(p_ptr);
}
} // namespace godot
diff --git a/src/core/method_bind.cpp b/src/core/method_bind.cpp
index 4d5f356..4f746a1 100644
--- a/src/core/method_bind.cpp
+++ b/src/core/method_bind.cpp
@@ -103,7 +103,7 @@ void MethodBind::bind_call(void *p_method_userdata, GDExtensionClassInstancePtr
Variant ret = bind->call(p_instance, p_args, p_argument_count, *r_error);
// This assumes the return value is an empty Variant, so it doesn't need to call the destructor first.
// Since only NativeExtensionMethodBind calls this from the Godot side, it should always be the case.
- internal::interface->variant_new_copy(r_return, ret.ptr());
+ internal::gdn_interface->variant_new_copy(r_return, ret.ptr());
}
void MethodBind::bind_ptrcall(void *p_method_userdata, GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_return) {
diff --git a/src/godot.cpp b/src/godot.cpp
index 15fdc6f..542fed4 100644
--- a/src/godot.cpp
+++ b/src/godot.cpp
@@ -41,7 +41,7 @@ namespace godot {
namespace internal {
-const GDNativeInterface *interface = nullptr;
+const GDNativeInterface *gdn_interface = nullptr;
GDNativeExtensionClassLibraryPtr library = nullptr;
void *token = nullptr;
@@ -51,7 +51,7 @@ GDExtensionBinding::Callback GDExtensionBinding::init_callbacks[GDNATIVE_MAX_INI
GDExtensionBinding::Callback GDExtensionBinding::terminate_callbacks[GDNATIVE_MAX_INITIALIZATION_LEVEL] = {};
GDNativeBool GDExtensionBinding::init(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization) {
- internal::interface = p_interface;
+ internal::gdn_interface = p_interface;
internal::library = p_library;
internal::token = p_library;
@@ -143,7 +143,7 @@ void GDExtensionBinding::InitObject::register_driver_terminator(Callback p_drive
}
GDNativeBool GDExtensionBinding::InitObject::init() const {
- return GDExtensionBinding::init(interface, library, initialization);
+ return GDExtensionBinding::init(gdn_interface, library, initialization);
}
} // namespace godot
diff --git a/src/variant/char_string.cpp b/src/variant/char_string.cpp
index 2ec37ca..5bb6dee 100644
--- a/src/variant/char_string.cpp
+++ b/src/variant/char_string.cpp
@@ -75,25 +75,25 @@ CharWideString::~CharWideString() {
// It's easier to have them written in C++ directly than in a Python script that generates them.
String::String(const char *from) {
- internal::interface->string_new_with_utf8_chars(ptr(), from);
+ internal::gdn_interface->string_new_with_utf8_chars(ptr(), from);
}
String::String(const wchar_t *from) {
- internal::interface->string_new_with_wide_chars(ptr(), from);
+ internal::gdn_interface->string_new_with_wide_chars(ptr(), from);
}
String::String(const char16_t *from) {
- internal::interface->string_new_with_utf16_chars(ptr(), from);
+ internal::gdn_interface->string_new_with_utf16_chars(ptr(), from);
}
String::String(const char32_t *from) {
- internal::interface->string_new_with_utf32_chars(ptr(), from);
+ internal::gdn_interface->string_new_with_utf32_chars(ptr(), from);
}
CharString String::utf8() const {
- int size = internal::interface->string_to_utf8_chars(ptr(), nullptr, 0);
+ int size = internal::gdn_interface->string_to_utf8_chars(ptr(), nullptr, 0);
char *cstr = memnew_arr(char, size + 1);
- internal::interface->string_to_utf8_chars(ptr(), cstr, size + 1);
+ internal::gdn_interface->string_to_utf8_chars(ptr(), cstr, size + 1);
cstr[size] = '\0';
@@ -101,9 +101,9 @@ CharString String::utf8() const {
}
CharString String::ascii() const {
- int size = internal::interface->string_to_latin1_chars(ptr(), nullptr, 0);
+ int size = internal::gdn_interface->string_to_latin1_chars(ptr(), nullptr, 0);
char *cstr = memnew_arr(char, size + 1);
- internal::interface->string_to_latin1_chars(ptr(), cstr, size + 1);
+ internal::gdn_interface->string_to_latin1_chars(ptr(), cstr, size + 1);
cstr[size] = '\0';
@@ -111,9 +111,9 @@ CharString String::ascii() const {
}
Char16String String::utf16() const {
- int size = internal::interface->string_to_utf16_chars(ptr(), nullptr, 0);
+ int size = internal::gdn_interface->string_to_utf16_chars(ptr(), nullptr, 0);
char16_t *cstr = memnew_arr(char16_t, size + 1);
- internal::interface->string_to_utf16_chars(ptr(), cstr, size + 1);
+ internal::gdn_interface->string_to_utf16_chars(ptr(), cstr, size + 1);
cstr[size] = '\0';
@@ -121,9 +121,9 @@ Char16String String::utf16() const {
}
Char32String String::utf32() const {
- int size = internal::interface->string_to_utf32_chars(ptr(), nullptr, 0);
+ int size = internal::gdn_interface->string_to_utf32_chars(ptr(), nullptr, 0);
char32_t *cstr = memnew_arr(char32_t, size + 1);
- internal::interface->string_to_utf32_chars(ptr(), cstr, size + 1);
+ internal::gdn_interface->string_to_utf32_chars(ptr(), cstr, size + 1);
cstr[size] = '\0';
@@ -131,9 +131,9 @@ Char32String String::utf32() const {
}
CharWideString String::wide_string() const {
- int size = internal::interface->string_to_wide_chars(ptr(), nullptr, 0);
+ int size = internal::gdn_interface->string_to_wide_chars(ptr(), nullptr, 0);
wchar_t *cstr = memnew_arr(wchar_t, size + 1);
- internal::interface->string_to_wide_chars(ptr(), cstr, size + 1);
+ internal::gdn_interface->string_to_wide_chars(ptr(), cstr, size + 1);
cstr[size] = '\0';
@@ -193,11 +193,11 @@ bool String::operator!=(const char32_t *p_str) const {
}
const char32_t &String::operator[](int p_index) const {
- return *internal::interface->string_operator_index_const((GDNativeStringPtr)this, p_index);
+ return *internal::gdn_interface->string_operator_index_const((GDNativeStringPtr)this, p_index);
}
char32_t &String::operator[](int p_index) {
- return *internal::interface->string_operator_index((GDNativeStringPtr)this, p_index);
+ return *internal::gdn_interface->string_operator_index((GDNativeStringPtr)this, p_index);
}
bool operator==(const char *p_chr, const String &p_str) {
diff --git a/src/variant/packed_arrays.cpp b/src/variant/packed_arrays.cpp
index 30a0016..10a7399 100644
--- a/src/variant/packed_arrays.cpp
+++ b/src/variant/packed_arrays.cpp
@@ -45,82 +45,82 @@
namespace godot {
const uint8_t &PackedByteArray::operator[](int p_index) const {
- return *internal::interface->packed_byte_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_byte_array_operator_index_const((GDNativeTypePtr *)this, p_index);
}
uint8_t &PackedByteArray::operator[](int p_index) {
- return *internal::interface->packed_byte_array_operator_index((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_byte_array_operator_index((GDNativeTypePtr *)this, p_index);
}
const Color &PackedColorArray::operator[](int p_index) const {
- const Color *color = (const Color *)internal::interface->packed_color_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ const Color *color = (const Color *)internal::gdn_interface->packed_color_array_operator_index_const((GDNativeTypePtr *)this, p_index);
return *color;
}
Color &PackedColorArray::operator[](int p_index) {
- Color *color = (Color *)internal::interface->packed_color_array_operator_index((GDNativeTypePtr *)this, p_index);
+ Color *color = (Color *)internal::gdn_interface->packed_color_array_operator_index((GDNativeTypePtr *)this, p_index);
return *color;
}
const float &PackedFloat32Array::operator[](int p_index) const {
- return *internal::interface->packed_float32_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_float32_array_operator_index_const((GDNativeTypePtr *)this, p_index);
}
float &PackedFloat32Array::operator[](int p_index) {
- return *internal::interface->packed_float32_array_operator_index((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_float32_array_operator_index((GDNativeTypePtr *)this, p_index);
}
const double &PackedFloat64Array::operator[](int p_index) const {
- return *internal::interface->packed_float64_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_float64_array_operator_index_const((GDNativeTypePtr *)this, p_index);
}
double &PackedFloat64Array::operator[](int p_index) {
- return *internal::interface->packed_float64_array_operator_index((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_float64_array_operator_index((GDNativeTypePtr *)this, p_index);
}
const int32_t &PackedInt32Array::operator[](int p_index) const {
- return *internal::interface->packed_int32_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_int32_array_operator_index_const((GDNativeTypePtr *)this, p_index);
}
int32_t &PackedInt32Array::operator[](int p_index) {
- return *internal::interface->packed_int32_array_operator_index((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_int32_array_operator_index((GDNativeTypePtr *)this, p_index);
}
const int64_t &PackedInt64Array::operator[](int p_index) const {
- return *internal::interface->packed_int64_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_int64_array_operator_index_const((GDNativeTypePtr *)this, p_index);
}
int64_t &PackedInt64Array::operator[](int p_index) {
- return *internal::interface->packed_int64_array_operator_index((GDNativeTypePtr *)this, p_index);
+ return *internal::gdn_interface->packed_int64_array_operator_index((GDNativeTypePtr *)this, p_index);
}
const String &PackedStringArray::operator[](int p_index) const {
- const String *string = (const String *)internal::interface->packed_string_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ const String *string = (const String *)internal::gdn_interface->packed_string_array_operator_index_const((GDNativeTypePtr *)this, p_index);
return *string;
}
String &PackedStringArray::operator[](int p_index) {
- String *string = (String *)internal::interface->packed_string_array_operator_index((GDNativeTypePtr *)this, p_index);
+ String *string = (String *)internal::gdn_interface->packed_string_array_operator_index((GDNativeTypePtr *)this, p_index);
return *string;
}
const Vector2 &PackedVector2Array::operator[](int p_index) const {
- const Vector2 *vec = (const Vector2 *)internal::interface->packed_vector2_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ const Vector2 *vec = (const Vector2 *)internal::gdn_interface->packed_vector2_array_operator_index_const((GDNativeTypePtr *)this, p_index);
return *vec;
}
Vector2 &PackedVector2Array::operator[](int p_index) {
- Vector2 *vec = (Vector2 *)internal::interface->packed_vector2_array_operator_index((GDNativeTypePtr *)this, p_index);
+ Vector2 *vec = (Vector2 *)internal::gdn_interface->packed_vector2_array_operator_index((GDNativeTypePtr *)this, p_index);
return *vec;
}
const Vector3 &PackedVector3Array::operator[](int p_index) const {
- const Vector3 *vec = (const Vector3 *)internal::interface->packed_vector3_array_operator_index_const((GDNativeTypePtr *)this, p_index);
+ const Vector3 *vec = (const Vector3 *)internal::gdn_interface->packed_vector3_array_operator_index_const((GDNativeTypePtr *)this, p_index);
return *vec;
}
Vector3 &PackedVector3Array::operator[](int p_index) {
- Vector3 *vec = (Vector3 *)internal::interface->packed_vector3_array_operator_index((GDNativeTypePtr *)this, p_index);
+ Vector3 *vec = (Vector3 *)internal::gdn_interface->packed_vector3_array_operator_index((GDNativeTypePtr *)this, p_index);
return *vec;
}
diff --git a/src/variant/variant.cpp b/src/variant/variant.cpp
index dc8ce6e..4535f73 100644
--- a/src/variant/variant.cpp
+++ b/src/variant/variant.cpp
@@ -45,8 +45,8 @@ GDNativeTypeFromVariantConstructorFunc Variant::to_type_constructor[Variant::VAR
void Variant::init_bindings() {
// Start from 1 to skip NIL.
for (int i = 1; i < VARIANT_MAX; i++) {
- from_type_constructor[i] = internal::interface->get_variant_from_type_constructor((GDNativeVariantType)i);
- to_type_constructor[i] = internal::interface->get_variant_to_type_constructor((GDNativeVariantType)i);
+ from_type_constructor[i] = internal::gdn_interface->get_variant_from_type_constructor((GDNativeVariantType)i);
+ to_type_constructor[i] = internal::gdn_interface->get_variant_to_type_constructor((GDNativeVariantType)i);
}
String::init_bindings();
@@ -69,15 +69,15 @@ void Variant::init_bindings() {
}
Variant::Variant() {
- internal::interface->variant_new_nil(ptr());
+ internal::gdn_interface->variant_new_nil(ptr());
}
Variant::Variant(const GDNativeVariantPtr native_ptr) {
- internal::interface->variant_new_copy(ptr(), native_ptr);
+ internal::gdn_interface->variant_new_copy(ptr(), native_ptr);
}
Variant::Variant(const Variant &other) {
- internal::interface->variant_new_copy(ptr(), other.ptr());
+ internal::gdn_interface->variant_new_copy(ptr(), other.ptr());
}
Variant::Variant(Variant &&other) {
@@ -227,7 +227,7 @@ Variant::Variant(const PackedColorArray &v) {
}
Variant::~Variant() {
- internal::interface->variant_destroy(ptr());
+ internal::gdn_interface->variant_destroy(ptr());
}
Variant::operator bool() const {
@@ -372,7 +372,7 @@ Variant::operator Object *() const {
if (obj == nullptr) {
return nullptr;
}
- return reinterpret_cast<Object *>(internal::interface->object_get_instance_binding(obj, internal::token, &Object::___binding_callbacks));
+ return reinterpret_cast<Object *>(internal::gdn_interface->object_get_instance_binding(obj, internal::token, &Object::___binding_callbacks));
}
Variant::operator Callable() const {
@@ -455,7 +455,7 @@ Variant::operator PackedColorArray() const {
Variant &Variant::operator=(const Variant &other) {
clear();
- internal::interface->variant_new_copy(ptr(), other.ptr());
+ internal::gdn_interface->variant_new_copy(ptr(), other.ptr());
return *this;
}
@@ -495,22 +495,22 @@ bool Variant::operator<(const Variant &other) const {
}
void Variant::call(const StringName &method, const Variant **args, int argcount, Variant &r_ret, GDNativeCallError &r_error) {
- internal::interface->variant_call(ptr(), method.ptr(), reinterpret_cast<const GDNativeVariantPtr *>(const_cast<Variant **>(args)), argcount, r_ret.ptr(), &r_error);
+ internal::gdn_interface->variant_call(ptr(), method.ptr(), reinterpret_cast<const GDNativeVariantPtr *>(const_cast<Variant **>(args)), argcount, r_ret.ptr(), &r_error);
}
void Variant::call_static(Variant::Type type, const StringName &method, const Variant **args, int argcount, Variant &r_ret, GDNativeCallError &r_error) {
- internal::interface->variant_call_static(static_cast<GDNativeVariantType>(type), method.ptr(), reinterpret_cast<const GDNativeVariantPtr *>(const_cast<Variant **>(args)), argcount, r_ret.ptr(), &r_error);
+ internal::gdn_interface->variant_call_static(static_cast<GDNativeVariantType>(type), method.ptr(), reinterpret_cast<const GDNativeVariantPtr *>(const_cast<Variant **>(args)), argcount, r_ret.ptr(), &r_error);
}
void Variant::evaluate(const Operator &op, const Variant &a, const Variant &b, Variant &r_ret, bool &r_valid) {
GDNativeBool valid;
- internal::interface->variant_evaluate(static_cast<GDNativeVariantOperator>(op), a.ptr(), b.ptr(), r_ret.ptr(), &valid);
+ internal::gdn_interface->variant_evaluate(static_cast<GDNativeVariantOperator>(op), a.ptr(), b.ptr(), r_ret.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
}
void Variant::set(const Variant &key, const Variant &value, bool *r_valid) {
GDNativeBool valid;
- internal::interface->variant_set(ptr(), key.ptr(), value.ptr(), &valid);
+ internal::gdn_interface->variant_set(ptr(), key.ptr(), value.ptr(), &valid);
if (r_valid) {
*r_valid = PtrToArg<bool>::convert(&valid);
}
@@ -518,27 +518,27 @@ void Variant::set(const Variant &key, const Variant &value, bool *r_valid) {
void Variant::set_named(const StringName &name, const Variant &value, bool &r_valid) {
GDNativeBool valid;
- internal::interface->variant_set_named(ptr(), name.ptr(), value.ptr(), &valid);
+ internal::gdn_interface->variant_set_named(ptr(), name.ptr(), value.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
}
void Variant::set_indexed(int64_t index, const Variant &value, bool &r_valid, bool &r_oob) {
GDNativeBool valid, oob;
- internal::interface->variant_set_indexed(ptr(), index, value.ptr(), &valid, &oob);
+ internal::gdn_interface->variant_set_indexed(ptr(), index, value.ptr(), &valid, &oob);
r_valid = PtrToArg<bool>::convert(&valid);
r_oob = PtrToArg<bool>::convert(&oob);
}
void Variant::set_keyed(const Variant &key, const Variant &value, bool &r_valid) {
GDNativeBool valid;
- internal::interface->variant_set_keyed(ptr(), key.ptr(), value.ptr(), &valid);
+ internal::gdn_interface->variant_set_keyed(ptr(), key.ptr(), value.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
}
Variant Variant::get(const Variant &key, bool *r_valid) const {
Variant result;
GDNativeBool valid;
- internal::interface->variant_get(ptr(), key.ptr(), result.ptr(), &valid);
+ internal::gdn_interface->variant_get(ptr(), key.ptr(), result.ptr(), &valid);
if (r_valid) {
*r_valid = PtrToArg<bool>::convert(&valid);
}
@@ -548,7 +548,7 @@ Variant Variant::get(const Variant &key, bool *r_valid) const {
Variant Variant::get_named(const StringName &name, bool &r_valid) const {
Variant result;
GDNativeBool valid;
- internal::interface->variant_get_named(ptr(), name.ptr(), result.ptr(), &valid);
+ internal::gdn_interface->variant_get_named(ptr(), name.ptr(), result.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
return result;
}
@@ -557,7 +557,7 @@ Variant Variant::get_indexed(int64_t index, bool &r_valid, bool &r_oob) const {
Variant result;
GDNativeBool valid;
GDNativeBool oob;
- internal::interface->variant_get_indexed(ptr(), index, result.ptr(), &valid, &oob);
+ internal::gdn_interface->variant_get_indexed(ptr(), index, result.ptr(), &valid, &oob);
r_valid = PtrToArg<bool>::convert(&valid);
r_oob = PtrToArg<bool>::convert(&oob);
return result;
@@ -566,7 +566,7 @@ Variant Variant::get_indexed(int64_t index, bool &r_valid, bool &r_oob) const {
Variant Variant::get_keyed(const Variant &key, bool &r_valid) const {
Variant result;
GDNativeBool valid;
- internal::interface->variant_get_keyed(ptr(), key.ptr(), result.ptr(), &valid);
+ internal::gdn_interface->variant_get_keyed(ptr(), key.ptr(), result.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
return result;
}
@@ -583,36 +583,36 @@ bool Variant::in(const Variant &index, bool *r_valid) const {
bool Variant::iter_init(Variant &r_iter, bool &r_valid) const {
GDNativeBool valid;
- internal::interface->variant_iter_init(ptr(), r_iter.ptr(), &valid);
+ internal::gdn_interface->variant_iter_init(ptr(), r_iter.ptr(), &valid);
return PtrToArg<bool>::convert(&valid);
}
bool Variant::iter_next(Variant &r_iter, bool &r_valid) const {
GDNativeBool valid;
- internal::interface->variant_iter_next(ptr(), r_iter.ptr(), &valid);
+ internal::gdn_interface->variant_iter_next(ptr(), r_iter.ptr(), &valid);
return PtrToArg<bool>::convert(&valid);
}
Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
Variant result;
GDNativeBool valid;
- internal::interface->variant_iter_get(ptr(), r_iter.ptr(), result.ptr(), &valid);
+ internal::gdn_interface->variant_iter_get(ptr(), r_iter.ptr(), result.ptr(), &valid);
r_valid = PtrToArg<bool>::convert(&valid);
return result;
}
Variant::Type Variant::get_type() const {
- return static_cast<Variant::Type>(internal::interface->variant_get_type(ptr()));
+ return static_cast<Variant::Type>(internal::gdn_interface->variant_get_type(ptr()));
}
bool Variant::has_method(const StringName &method) const {
- GDNativeBool has = internal::interface->variant_has_method(ptr(), method.ptr());
+ GDNativeBool has = internal::gdn_interface->variant_has_method(ptr(), method.ptr());
return PtrToArg<bool>::convert(&has);
}
bool Variant::has_key(const Variant &key, bool *r_valid) const {
GDNativeBool valid;
- GDNativeBool has = internal::interface->variant_has_key(ptr(), key.ptr(), &valid);
+ GDNativeBool has = internal::gdn_interface->variant_has_key(ptr(), key.ptr(), &valid);
if (r_valid) {
*r_valid = PtrToArg<bool>::convert(&valid);
}
@@ -620,23 +620,23 @@ bool Variant::has_key(const Variant &key, bool *r_valid) const {
}
bool Variant::has_member(Variant::Type type, const StringName &member) {
- GDNativeBool has = internal::interface->variant_has_member(static_cast<GDNativeVariantType>(type), member.ptr());
+ GDNativeBool has = internal::gdn_interface->variant_has_member(static_cast<GDNativeVariantType>(type), member.ptr());
return PtrToArg<bool>::convert(&has);
}
bool Variant::hash_compare(const Variant &variant) const {
- GDNativeBool compare = internal::interface->variant_hash_compare(ptr(), variant.ptr());
+ GDNativeBool compare = internal::gdn_interface->variant_hash_compare(ptr(), variant.ptr());
return PtrToArg<bool>::convert(&compare);
}
bool Variant::booleanize() const {
- GDNativeBool booleanized = internal::interface->variant_booleanize(ptr());
+ GDNativeBool booleanized = internal::gdn_interface->variant_booleanize(ptr());
return PtrToArg<bool>::convert(&booleanized);
}
String Variant::stringify() const {
String result;
- internal::interface->variant_stringify(ptr(), result.ptr());
+ internal::gdn_interface->variant_stringify(ptr(), result.ptr());
return result;
}
@@ -644,33 +644,33 @@ Variant Variant::duplicate(bool deep) const {
Variant result;
GDNativeBool _deep;
PtrToArg<bool>::encode(deep, &_deep);
- internal::interface->variant_duplicate(ptr(), result.ptr(), _deep);
+ internal::gdn_interface->variant_duplicate(ptr(), result.ptr(), _deep);
return result;
}
void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst) {
- internal::interface->variant_blend(a.ptr(), b.ptr(), c, r_dst.ptr());
+ internal::gdn_interface->variant_blend(a.ptr(), b.ptr(), c, r_dst.ptr());
}
void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &r_dst) {
- internal::interface->variant_interpolate(a.ptr(), b.ptr(), c, r_dst.ptr());
+ internal::gdn_interface->variant_interpolate(a.ptr(), b.ptr(), c, r_dst.ptr());
}
String Variant::get_type_name(Variant::Type type) {
String result;
- internal::interface->variant_get_type_name(static_cast<GDNativeVariantType>(type), result.ptr());
+ internal::gdn_interface->variant_get_type_name(static_cast<GDNativeVariantType>(type), result.ptr());
return result;
}
bool Variant::can_convert(Variant::Type from, Variant::Type to) {
GDNativeBool can;
- internal::interface->variant_can_convert(static_cast<GDNativeVariantType>(from), static_cast<GDNativeVariantType>(to));
+ internal::gdn_interface->variant_can_convert(static_cast<GDNativeVariantType>(from), static_cast<GDNativeVariantType>(to));
return PtrToArg<bool>::convert(&can);
}
bool Variant::can_convert_strict(Variant::Type from, Variant::Type to) {
GDNativeBool can;
- internal::interface->variant_can_convert_strict(static_cast<GDNativeVariantType>(from), static_cast<GDNativeVariantType>(to));
+ internal::gdn_interface->variant_can_convert_strict(static_cast<GDNativeVariantType>(from), static_cast<GDNativeVariantType>(to));
return PtrToArg<bool>::convert(&can);
}
@@ -718,9 +718,9 @@ void Variant::clear() {
};
if (unlikely(needs_deinit[get_type()])) { // Make it fast for types that don't need deinit.
- internal::interface->variant_destroy(ptr());
+ internal::gdn_interface->variant_destroy(ptr());
}
- internal::interface->variant_new_nil(ptr());
+ internal::gdn_interface->variant_new_nil(ptr());
}
} // namespace godot