godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

Add support for getting argument count from `Callable`s

Open AThousandShips opened this issue 1 year ago • 5 comments

Copied over just the specific api changes from this PR and not a general update, if the latter is desired I'll just copy that over instead

Since GDExtension supports vararg methods and uses the number of specified arguments (I think, haven't tested extensively) and unsure how we should handle that on this side

  • Depends on: https://github.com/godotengine/godot/pull/87680

AThousandShips avatar Jan 28 '24 18:01 AThousandShips

Temporarily updated the artifact checkout to point to the other PR's branch to verify the changes, will revert once the main repo is updated

AThousandShips avatar Jan 29 '24 12:01 AThousandShips

Simply pushed the changes to the interface completely, the extension and header, covering the changes in the base PR and general changes

If there's a different procedure I'll change 🙂

AThousandShips avatar Jan 30 '24 17:01 AThousandShips

I usually copy over the specific gdextension_interface.h changes that a PR is related to and skip any others, since we end up with different PRs adding support for each feature. Not sure this is the best process, though, it's just what I've personally done in the past.

We usually only update extension_api.json when a Godot release happens. Are those changes necessary for the tests to pass? If not, I'd personally just leave that out. If so, I guess we'll come up with something. :-)

dsnopek avatar Jan 31 '24 15:01 dsnopek

At least the changes to Callable will confirm and restore 🙂

AThousandShips avatar Jan 31 '24 15:01 AThousandShips

Realized the Callable changes weren't required as they are only tested on the C++ side, so will revert the API side

AThousandShips avatar Jan 31 '24 17:01 AThousandShips

Dropped the ScriptInstance part and leaving it for dedicated updates of the API, as it's not utilized in any testing here, and also no not part of the relevant PR

AThousandShips avatar Mar 01 '24 16:03 AThousandShips

Thank you!

Was a good excersie in figuring out that they worked correctly

AThousandShips avatar Mar 14 '24 14:03 AThousandShips