You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes all direct `ToGodot`, `FromGodot`, `EngineToGodot` and `EngineFromGodot` impls
for raw pointers, and instead adds 1 generic impl for `RawPtr<P>`. Also enforces unsafe
construction, which wasn't the case so far -- you could e.g. return a `*const Glyph*` to a
local variable from `#[func]` without ever typing `unsafe` and causing UB on Godot side.
Raw pointers appear in three forms:
1. Native structures
2. Hardcoded basic types (`c_void`, `i32`, ...)
3. GDExtension sys pointers (e.g. `GDExtensionInitializationFunction` used in `GDExtensionManager::load_extension_from_function`)
This makes engine APIs dealing with pointers slightly less convenient to use, but probably
OK given their niche domain. For now, `RawPtr<P>` is blanket-implemented for all raw
pointers. It would be possible to only implement it for a dedicated list, but may not be
worth the effort to maintain it.
Adds `unsafe` to some previously safe APIs like `PhysicsServer2DExtensionShapeResult::set_collider()`.
0 commit comments