Merge pull request #12725 from karroffel/gdnative-api-fixes

[GDNative] even more API fixes
This commit is contained in:
Rémi Verschelde 2017-11-08 16:19:05 +01:00 committed by GitHub
commit 77345916c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 0 deletions

View File

@ -158,6 +158,11 @@ godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot
return (godot_variant *)&self->operator[](p_idx);
}
const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx) {
const Array *self = (const Array *)p_self;
return (const godot_variant *)&self->operator[](p_idx);
}
void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value) {
Array *self = (Array *)p_self;
Variant *val = (Variant *)p_value;

View File

@ -130,6 +130,12 @@ godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, c
return (godot_variant *)&self->operator[](*key);
}
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key) {
const Dictionary *self = (const Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;
return (const godot_variant *)&self->operator[](*key);
}
godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key) {
Dictionary *self = (Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;

View File

@ -2488,6 +2488,14 @@
["const godot_int", "p_idx"]
]
},
{
"name": "godot_array_operator_index_const",
"return_type": "const godot_variant *",
"arguments": [
["const godot_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
"name": "godot_array_append",
"return_type": "void",
@ -2786,6 +2794,14 @@
["const godot_variant *", "p_key"]
]
},
{
"name": "godot_dictionary_operator_index_const",
"return_type": "const godot_variant *",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
{
"name": "godot_dictionary_next",
"return_type": "godot_variant *",
@ -5644,6 +5660,13 @@
["godot_object *", "p_instance"]
]
},
{
"name": "godot_pluginscript_register_language",
"return_type": "void",
"arguments": [
["const godot_pluginscript_language_desc *", "language_desc"]
]
},
{
"name": "godot_arvr_register_interface",
"return_type": "void",

View File

@ -76,6 +76,8 @@ godot_variant GDAPI godot_array_get(const godot_array *p_self, const godot_int p
godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot_int p_idx);
const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx);
void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value);
void GDAPI godot_array_clear(godot_array *p_self);

View File

@ -85,6 +85,8 @@ void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key);
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key);
godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key);
godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b);