-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Use namespaces instead of underscore prefix for core bind classes #26990
Conversation
Are there any problems from the c-api end? Aka gdnative? |
fe054ba
to
3ee87e1
Compare
@fire I don't think there is any, but I didn't check. Most if not all the code that works around these underscores is just to strip it (or add it in case of a lookup). |
619d448
to
fc783b9
Compare
I am surprised, never expected anything like this to work, if it really does feel free to go ahead and merge. |
It may be safer to leave this for 4.0. I don't think it breaks anything, but I don't know what some GDNative language bindings out there are doing, so just to be safe... |
The only annoyance I found is that we can't use |
062e3a8
to
cbaf746
Compare
cbaf746
to
5965d81
Compare
Does this change anything on the front end? |
Pull godotengine#26990 makes them obsolete
I created #30153 which only removes the checks. |
Any news in this regard? I'm now rewriting GDScript code and it would be nice to not have to deal with those pesky underscores. |
I'll be revisiting this soon, but right now I'm focusing on other tasks. |
Inspired by this PR, I've already done something similar while developing a custom module. But stumbled upon another bug while regenerating documentation and then generating the mono glue, see Xrayez/godot-geomtools#3. |
@Xrayez The issue is with your |
Oh ok, so it would be nice for these changes to be cherry-picked to 3.2, else I'd have to make similar changes and/or revert to how it's now. |
Just saying that I have some other module with having enums in namespaces which is an issue in and of itself (which is worth treating via separate PR perhaps which can be cherry-picked), for instance see: Xrayez/godot-anl@642b470#diff-142e17f094b421b5777b79be43c94633R336-R339. I've just had to duplicate enums eventually. |
@neikeq This was last rebased over a year ago, what's the status of this? |
It should be easy to re-do it for the master branch, but I haven't had time for that yet. Maybe next month. |
I've added this to my TODO list for July. |
Superseded by #51627. |
I propose this as a replacement for the underscore thing.
This PR doesn't remove the existing extra code that is needed to support classes with underscores (#26922 lists most of them).
The namespace names are just placeholders. I don't know what's our naming convention for namespaces.
There is a lot of
::ClassDB::bind_method
lines in core_bind.cpp, which could be avoided if we movecore_bind::ClassDB
to its own namespace so it doesn't bother the other classes. Edit: Moved to its own namespace.