-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Extensive #[func]
testing (GDScript -> Rust calls)
#200
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bromeon
added
feature
Adds functionality to the library
c: register
Register classes, functions and other symbols to GDScript
labels
Mar 22, 2023
This comment was marked as outdated.
This comment was marked as outdated.
Bromeon
force-pushed
the
feature/func-tests
branch
from
March 22, 2023 22:41
9db7baf
to
64b764e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Bromeon
changed the title
More tests about
Extensive Mar 22, 2023
#[func]
GDScript <-> Rust calls#[func]
testing (GDScript -> Rust calls)
Bromeon
force-pushed
the
feature/func-tests
branch
2 times, most recently
from
March 22, 2023 22:49
d141a79
to
08e8086
Compare
This comment was marked as outdated.
This comment was marked as outdated.
bors try |
tryBuild failed: |
Bromeon
force-pushed
the
feature/func-tests
branch
2 times, most recently
from
March 22, 2023 23:43
92a3d82
to
7900641
Compare
seems some of these issues are also related to #195 |
Bromeon
force-pushed
the
feature/func-tests
branch
from
March 23, 2023 18:52
7900641
to
310eab7
Compare
Bromeon
force-pushed
the
feature/func-tests
branch
from
March 26, 2023 15:48
0ff64f8
to
f669b52
Compare
Bromeon
force-pushed
the
feature/func-tests
branch
from
March 26, 2023 15:52
f669b52
to
835ac5d
Compare
bors bot
added a commit
that referenced
this pull request
Apr 12, 2023
204: Fix various issues with pointer calls r=Bromeon a=sayaks Combines #165 and #200 with more complete fixes. # Overview Properly clones strings and shares arrays/dictionaries in pointer calls to ensure they're not prematurely freed. Frees the value currently in the `ret` pointer in pointer calls, to avoid memory leak. Moves `ret_val` into `ret`, to avoid premature destruction. Changes integer conversions in pointer calls to use `as`, since that seems like the right way of converting the values we get from godot. `try_from` lead to wrong conversions sometimes. Objects inheriting from `RefCounted` now use `ref_get_object` and `ref_set_object` in virtual method calls. # Details Add `from_arg_ptr` and `move_return_ptr` to `GodotFfi` that will be used when converting argument pointers in pointer calls, and moving things into a pointer. Add `CallType` so `from_arg_ptr` and `move_return_ptr` can have different behavior depending on whether it's a virtual method call or not. Remove `write_sys` in `GodotFfi`. Override `from_arg_ptr` in `GodotString`, `NodePath`, `StringName`, `Array`, `Dictionary`, `Gd`. Override `move_return_ptr` in `Gd`. Rename `try_write_sys` to `try_return`, and have it use `move_return_ptr` instead of `write_sys`. Rename `try_from_sys` to `try_from_arg`, and have it use `from_arg_ptr` instead of `from_sys`. Add `u8`, `u16`, `u32` to the ptrcall tests. Add a couple of test of virtual methods. Fix a test for virtual method with return values to actually call the virtual method as a virtual method. closes #195 closes #189 Co-authored-by: Jan Haller <[email protected]> Co-authored-by: thebigG <[email protected]> Co-authored-by: Lili Zoey <[email protected]>
Merged as part of #204. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: register
Register classes, functions and other symbols to GDScript
feature
Adds functionality to the library
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generates both ptrcall and varcall tests now.
Adds several values to the test input.
Currently fails in some ptrcall cases; possibly related to #138 and #195.