Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass-by-ref for non-Copy builtins (backend) #906

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Sep 24, 2024

Follow-up to #900. Adds GodotType::ToFfi<'f> to keep by-ref semantics also in the FFI layer.

Refactors some related parts:

  • GodotNullableFfi now has a null() associated function.
  • Correct usage of as_arg() and move_return_ptr().
  • into_ffi() helper needs marshal_args! macro, since it has transient borrowed state.

Closes #790.

Refactors some related parts:
* GodotNullableFfi now has a null() associated function.
* Correct usage of as_arg() and move_return_ptr().
* into_ffi() helper needs marshal_args! macro, since it has transient
  borrowed state.
Also clean up some formatting in conversion code.
@Bromeon Bromeon added feature Adds functionality to the library c: ffi Low-level components and interaction with GDExtension API c: engine Godot classes (nodes, resources, ...) performance Performance problems and optimizations labels Sep 24, 2024
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-906

@Bromeon Bromeon added this pull request to the merge queue Sep 25, 2024
Merged via the queue into master with commit 6e46fa4 Sep 25, 2024
15 checks passed
@Bromeon Bromeon deleted the feature/pass-by-ref-backend branch September 25, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: engine Godot classes (nodes, resources, ...) c: ffi Low-level components and interaction with GDExtension API feature Adds functionality to the library performance Performance problems and optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Performance Issue] Array methods duplicate Variant param or Callable take ownership when it could not.
2 participants