-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
glfw: support multiple types from glfw.Window.hint #32
Conversation
9529871
to
6eaba18
Compare
@@ -1368,12 +1375,51 @@ test "hint" { | |||
try defaultHints(); | |||
} | |||
|
|||
test "hintString" { | |||
test "hint int" { |
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.
Very cool PR! Thank you a ton for this!
Could you add a bool hint test? (unless I missed it?)
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.
Done!
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.
One fear I have is that zig is unable to type coerce strings to a zero terminated string using this meaning it is possibly UB, but it seems like this is not the case and zig is able to track the variable until it's called by the c function.
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.
Ah, interesting thought - I think it should be OK but if we find out it's not later on, we could always introduce a temporary buffer / allocation for purposes of passing it to C since this is an infrequent code path.
6eaba18
to
946ec4f
Compare
946ec4f
to
1a97fab
Compare
Sorry for the array of force pushes, will be using a draft next time. Didn't expect you to be that fast 😅 |
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.
Thanks so much for this!
Thank you for this awesome library :) |
This PR attempts to solve #29