-
-
Notifications
You must be signed in to change notification settings - Fork 23.9k
Expose RID.is_null() to scripting
#107141
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
base: master
Are you sure you want to change the base?
Conversation
|
I'm not sure we need both. I suppose it comes down to if we ever expect there to emerge an actual implementation difference in the future. If not, we shouldn't expose both, and in my opinion, even consider removing one of the two functions altogether. |
|
@Ivorforce I'm fine with not having both if that's the consensus, but only if the internal one is removed too. The internal and external APIs should match for trivial things like this. |
|
I'm in favor of binding this, it's far clearer and the exposed API should match IMO |
e1af4be to
74f385a
Compare
Mickeon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If C++ normally supported not there would be no discussion, but alas. Doc is fine
RID.is_null() to scripting
|
Makes sense for the sake of GDExtension and C++ modules compatibility. |
Ivorforce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said above, I'm not at all convinced we should expose the same functionality twice.
If it's alright with everyone, I'd like to discuss this at the core meeting next Wednesday.
Yes, let's discuss. We definitely shouldn't be exposing an API "for consistency" with an internal API when we don't even have consensus on the internal API |
|
In C# Rid is a separate wrapper and
I agree |
|
If one is kept, I agree that |
|
For |
74f385a to
51a0dcc
Compare
51a0dcc to
79dc52a
Compare
79dc52a to
bcdbc86
Compare
bcdbc86 to
7205fbe
Compare
I was working on some C++ code and trying to make it compatible with both in-engine module code and GDExtension C++ godot-cpp, and I found that the code uses
.is_null()on an RID, which works in-engine (used 390 times), but not in GDExtension because the API is not exposed. This PR exposes it. Regardless of this PR, a workaround that is compatible with the currently released godot-cpp API is to use!with.is_valid()on an RID instead of.is_null().