-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[GDNative] refactored API struct into core and extensions #12779
[GDNative] refactored API struct into core and extensions #12779
Conversation
modules/gdnative/SCsub
Outdated
@@ -33,14 +33,39 @@ def _build_gdnative_api_struct_header(api): | |||
'', | |||
'#ifdef __cplusplus', | |||
'extern "C" {', | |||
'#endif', | |||
'#endif' |
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.
The comma is still needed here, no?
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.
Oh yeah, for some reason it's not an error so I didn't notice. Will fix.
modules/gdnative/SCsub
Outdated
'typedef struct godot_gdnative_api_struct {', | ||
'\tvoid *next;', | ||
'\tconst char *version;', | ||
'\tunsigned int type;' |
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.
Missing comma?
d613125
to
2248420
Compare
2248420
to
983404e
Compare
Is there a point in having three-number version for APIs instead of just one number? How do you plan to version the APIs, i.e. what would semantically a change of each number mean? |
Also it probably makes sense to extract fields |
We also discussed that binding libraries should have a way to report an error about unknown version (or API type in this case). Could you please add that? |
Two numbers should be enough, yeah. It should be using semantic versioning. If we add more functions to the core or extensions then the patch minor version would be bumped. Major would be bumped if compatibility gets broken. So 3.0.1 might have a core version 1.1 while Godot 4.0 will probably have 2.0 again.
No, those fields should be the same since the struct are not annotated to be packed, so all compatible C compilers will align the fields all in the same places.
Yes, will add that, thanks for reminding me! |
No description provided.