summaryrefslogtreecommitdiff
path: root/modules/gdnative/godot/godot_string.cpp
diff options
context:
space:
mode:
authorThomas Herzog <karroffel@users.noreply.github.com>2017-05-19 22:12:14 +0000
committerGitHub <noreply@github.com>2017-05-19 22:12:14 +0000
commit6fd217d7c3afb1f7e4c68f9ab40883593f617a7e (patch)
treee1c16a806b9b5ec71730a5b09c2ff6a4b17bc93c /modules/gdnative/godot/godot_string.cpp
parenta75623f436c215e107ede321afa08a1897552deb (diff)
parentabcb044bf3f197ef68715f89abec77102bbe58ec (diff)
Merge pull request #8821 from touilleMan/gdnative_missing_functions
Finish implementing GDnative builtins bindings
Diffstat (limited to 'modules/gdnative/godot/godot_string.cpp')
-rw-r--r--modules/gdnative/godot/godot_string.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdnative/godot/godot_string.cpp b/modules/gdnative/godot/godot_string.cpp
index 92c0b04041..59d20c6d23 100644
--- a/modules/gdnative/godot/godot_string.cpp
+++ b/modules/gdnative/godot/godot_string.cpp
@@ -53,6 +53,12 @@ void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, co
*p = String::utf8(p_contents, p_size);
}
+void GDAPI godot_string_new_unicode_data(godot_string *p_str, const wchar_t *p_contents, const int p_size) {
+ String *p = (String *)p_str;
+ memnew_placement(p, String);
+ *p = String(p_contents, p_size);
+}
+
void GDAPI godot_string_get_data(const godot_string *p_str, char *p_dest, int *p_size) {
String *p = (String *)p_str;
if (p_size != NULL) {