Skip to content

Commit 3529708

Browse files
committed
Update comment in to_string.
1 parent 8d4cc75 commit 3529708

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

godot-core/src/registry/callbacks.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,15 @@ pub unsafe extern "C" fn to_string<T: cap::GodotToString>(
192192
out_string: sys::GDExtensionStringPtr,
193193
) {
194194
// 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.
196195

197196
let storage = as_storage::<T>(instance);
198197
let instance = storage.get();
199198
let string = T::__godot_to_string(&*instance);
200199

201200
// Transfer ownership to Godot
202201
string.move_into_string_ptr(out_string);
202+
203+
// Note: is_valid comes uninitialized and must be set.
203204
*is_valid = sys::conv::SYS_TRUE;
204205
}
205206

0 commit comments

Comments
 (0)