浏览代码

[GDNative] removed godot_string_c_str

Karroffel 7 年之前
父节点
当前提交
33ffdba553

+ 0 - 5
modules/gdnative/gdnative/string.cpp

@@ -89,11 +89,6 @@ wchar_t GDAPI godot_string_operator_index_const(const godot_string *p_self, cons
 	return self->operator[](p_idx);
 }
 
-const char GDAPI *godot_string_c_str(const godot_string *p_self) {
-	const String *self = (const String *)p_self;
-	return self->utf8().get_data();
-}
-
 const wchar_t GDAPI *godot_string_unicode_str(const godot_string *p_self) {
 	const String *self = (const String *)p_self;
 	return self->c_str();

+ 0 - 7
modules/gdnative/gdnative_api.json

@@ -4361,13 +4361,6 @@
           ["const godot_int", "p_idx"]
         ]
       },
-      {
-        "name": "godot_string_c_str",
-        "return_type": "const char *",
-        "arguments": [
-          ["const godot_string *", "p_self"]
-        ]
-      },
       {
         "name": "godot_string_unicode_str",
         "return_type": "const wchar_t *",

+ 0 - 1
modules/gdnative/include/gdnative/string.h

@@ -68,7 +68,6 @@ void GDAPI godot_string_get_data(const godot_string *p_self, char *p_dest, int *
 
 wchar_t GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx);
 wchar_t GDAPI godot_string_operator_index_const(const godot_string *p_self, const godot_int p_idx);
-const char GDAPI *godot_string_c_str(const godot_string *p_self);
 const wchar_t GDAPI *godot_string_unicode_str(const godot_string *p_self);
 
 godot_bool GDAPI godot_string_operator_equal(const godot_string *p_self, const godot_string *p_b);