summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-05-30 23:20:15 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-11-21 20:58:21 +0200
commit0cf9597758f3af3afc951d0bf02dee1aeb9a6daf (patch)
tree2a5fe6f1ba36a79ccc0091d0235ec48e4d92012e /modules
parent7bbde636e802f85c4ed9ee95b9ef19abc1aa249d (diff)
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/gdnative/node_path.cpp4
-rw-r--r--modules/gdnative/gdnative_api.json2
-rw-r--r--modules/gdnative/include/gdnative/node_path.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdnative/gdnative/node_path.cpp b/modules/gdnative/gdnative/node_path.cpp
index 50fade5b94..0124efe4ba 100644
--- a/modules/gdnative/gdnative/node_path.cpp
+++ b/modules/gdnative/gdnative/node_path.cpp
@@ -93,10 +93,10 @@ godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, co
return dest;
}
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self) {
+godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self) {
godot_string dest;
const NodePath *self = (const NodePath *)p_self;
- memnew_placement(&dest, String(self->get_property()));
+ memnew_placement(&dest, String(self->get_concatenated_subnames()));
return dest;
}
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 770fb429c7..6555bc83b7 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -2898,7 +2898,7 @@
]
},
{
- "name": "godot_node_path_get_property",
+ "name": "godot_node_path_get_concatenated_subnames",
"return_type": "godot_string",
"arguments": [
["const godot_node_path *", "p_self"]
diff --git a/modules/gdnative/include/gdnative/node_path.h b/modules/gdnative/include/gdnative/node_path.h
index 42446175d8..b5a59fd325 100644
--- a/modules/gdnative/include/gdnative/node_path.h
+++ b/modules/gdnative/include/gdnative/node_path.h
@@ -73,7 +73,7 @@ godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self)
godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx);
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self);
+godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self);
godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);