GDExtension: Remove redundant method bind hash check #82191
Merged
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.
This fixes a bug in PR #81521, which is causing GDExtensions built for Godot 4.1 to fail to load.
That PR maps some old method hashes to new method hashes in order to get the correct method bind. Unfortunately, it runs afoul of a check towards the end of the function:
This will fail because the hash on the method bind we found doesn't match the hash that was originally requested (because we mapped it to a new hash).
However, this check is completely unnecessary, because
ClassDB::get_method_with_compatibility()
won't return the method bind unless the hash matched the one being searched for. I think this check may be left over from beforeClassDB::get_method_with_compatibility()
was added.So, this PR completely removes the redundant check.
Sorry for missing this when working on PR #81521! This was a failure to do sufficient testing on my part :-/