migueldeicaza / SwiftGodot

New Godot bindings for Swift
https://migueldeicaza.github.io/SwiftGodotDocs/tutorials/swiftgodot-tutorials/
MIT License
1.19k stars 77 forks source link

Even fancier marshaling #553

Closed elijah-semyonov closed 1 month ago

elijah-semyonov commented 1 month ago

Use nested withUnsafePointer so that Windows toolchain doesn't die. Utilize an ability of withUnsafePointer to create its own internal copies. Use withUnsafeTemporaryAllocation for variadics. Use on-stack strategy when possible (non-variadics and empty variadics). Unify BuiltInGen and MethodGen generation. Lots of minor refactorings. Remove redundant Variant copies in some cases.

migueldeicaza commented 1 month ago

Some quick observations:

final seems to have changed in the public API:

From:

public final func start (mode: AESContext.Mode, key: PackedByteArray, iv: PackedByteArray = PackedByteArray())-> GodotError {

to:

public func start(mode: AESContext.Mode, key: PackedByteArray, iv: PackedByteArray = PackedByteArray()) -> GodotError {
elijah-semyonov commented 1 month ago

It was a small nasty oversight! Already fixed in https://github.com/migueldeicaza/SwiftGodot/pull/553/commits/442045515711a053e31e860f8ba58e7eef61b6e1