We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
to_string
1 parent 8d4cc75 commit 3529708Copy full SHA for 3529708
godot-core/src/registry/callbacks.rs
@@ -192,14 +192,15 @@ pub unsafe extern "C" fn to_string<T: cap::GodotToString>(
192
out_string: sys::GDExtensionStringPtr,
193
) {
194
// Note: to_string currently always succeeds, as it is only provided for classes that have a working implementation.
195
- // is_valid output parameter thus not needed.
196
197
let storage = as_storage::<T>(instance);
198
let instance = storage.get();
199
let string = T::__godot_to_string(&*instance);
200
201
// Transfer ownership to Godot
202
string.move_into_string_ptr(out_string);
+
203
+ // Note: is_valid comes uninitialized and must be set.
204
*is_valid = sys::conv::SYS_TRUE;
205
}
206
0 commit comments