-
Notifications
You must be signed in to change notification settings - Fork 617
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
Library version can now be extracted from header #33
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ | |
#define GLEW_ERROR_GLX_VERSION_11_ONLY 3 /* Need at least GLX 1.2 */ | ||
|
||
/* string codes */ | ||
#define GLEW_VERSION 1 | ||
#define GLEW_VERSION_MAJOR 2 | ||
#define GLEW_VERSION_MINOR 3 | ||
#define GLEW_VERSION_MICRO 4 | ||
#define GLEW_VERSION GLEW_VERSION_MAJOR_STRINGGLEW_VERSION_MINOR_STRING | ||
#define GLEW_VERSION_MAJOR GLEW_VERSION_MAJOR_STRING | ||
#define GLEW_VERSION_MINOR GLEW_VERSION_MINOR_STRING | ||
#define GLEW_VERSION_MICRO GLEW_VERSION_MICRO_STRING | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not in favour of these defines varying from one release to the next. It's too fragile in terms of matching the header to a precompiled library. I wonder if we could put the version information in a /* */ comment block in a manner that would be suitable for easy grepping, but would have no impact on the interface. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you are right. I just haven't thought about such weird case when someone could use library version different from header version. It's really not a way to go. It's the same as pkg-config returning not matching version. Whole point is to check version from header at configure time so you can make some decisions in build scripts. And many open-source libraries seem to be ok defining version info like header constants. In the end of the day defining version info in comments can be an option. Honestly I don't like it but it's probably a matter of taste. Maybe we can introduce another 4 defines like a compromise. Anyway you are boss here it's up to you to decide. Just give us that ability to grep version from header. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take another look at this myself eventually, unless a fresh merge request appears. :-) |
||
/* API */ | ||
#ifdef GLEW_MX | ||
|
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.
I think some compilers are prone to complaining about any switch statement without a default clause. If you don't mind shifting the NULL return into a default, I appreciate that.