File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
godot-core/src/builtin/string Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 4
4
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
5
*/
6
6
7
- use std:: { convert:: Infallible , fmt, str:: FromStr } ;
7
+ use std:: { convert:: Infallible , ffi :: c_char , fmt, str:: FromStr } ;
8
8
9
9
use godot_ffi as sys;
10
10
use sys:: types:: OpaqueString ;
@@ -169,7 +169,11 @@ where
169
169
unsafe {
170
170
Self :: from_string_sys_init ( |string_ptr| {
171
171
let ctor = interface_fn ! ( string_new_with_utf8_chars_and_len) ;
172
- ctor ( string_ptr, bytes. as_ptr ( ) as * const i8 , bytes. len ( ) as i64 ) ;
172
+ ctor (
173
+ string_ptr,
174
+ bytes. as_ptr ( ) as * const c_char ,
175
+ bytes. len ( ) as i64 ,
176
+ ) ;
173
177
} )
174
178
}
175
179
}
@@ -186,7 +190,7 @@ impl From<&GodotString> for String {
186
190
187
191
interface_fn ! ( string_to_utf8_chars) (
188
192
string. string_sys ( ) ,
189
- buf. as_mut_ptr ( ) as * mut i8 ,
193
+ buf. as_mut_ptr ( ) as * mut c_char ,
190
194
len,
191
195
) ;
192
196
You can’t perform that action at this time.
0 commit comments