[cpp] Do not generate toString in __scriptableFunctions#12375
Merged
Simn merged 5 commits intoHaxeFoundation:developmentfrom Sep 30, 2025
Merged
[cpp] Do not generate toString in __scriptableFunctions#12375Simn merged 5 commits intoHaxeFoundation:developmentfrom
Simn merged 5 commits intoHaxeFoundation:developmentfrom
Conversation
The toString method is filtered out in the vtable mapping on line 973 and is already present in the `__scriptableFunctions` of hx::Object. We need to filter it out here too to ensure a correct vtable can be constructed from merging all `__scriptableFunctions` arrays.
Remove unnecessary public modifier Fix order of expected vs actual equality values
Contributor
|
LGTM |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #12374.
Haxe classes do not need to put it in
__scriptableFunctionsbecause it is already added by::hx::Object's:https://github.com/HaxeFoundation/hxcpp/blob/1618253d7bb2dd8eea1bc7ffcd612452df76a7b7/src/hx/Object.cpp#L123
This allows the vtable mapping generated on lines 972-974 (which already filters out
toString) to be consistent with what is generated by cppia from iterating through__scriptableFunctions.See also #5502.
Test would make more sense in misc, however those are not set up for cppia.