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 44 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
55 */
66
7- use std:: { convert:: Infallible , fmt, str:: FromStr } ;
7+ use std:: { convert:: Infallible , ffi :: c_char , fmt, str:: FromStr } ;
88
99use godot_ffi as sys;
1010use sys:: types:: OpaqueString ;
@@ -169,7 +169,11 @@ where
169169 unsafe {
170170 Self :: from_string_sys_init ( |string_ptr| {
171171 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+ ) ;
173177 } )
174178 }
175179 }
@@ -186,7 +190,7 @@ impl From<&GodotString> for String {
186190
187191 interface_fn ! ( string_to_utf8_chars) (
188192 string. string_sys ( ) ,
189- buf. as_mut_ptr ( ) as * mut i8 ,
193+ buf. as_mut_ptr ( ) as * mut c_char ,
190194 len,
191195 ) ;
192196
You can’t perform that action at this time.
0 commit comments