glfw: support multiple types from glfw.Window.hint #32

Merged
Avokadoen merged 2 commits from single-hint into main 2021-10-18 20:19:25 +00:00
Avokadoen commented 2021-10-18 19:52:18 +00:00 (Migrated from github.com)
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

This PR attempts to solve #29

- [x] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right. This PR attempts to solve #29
emidoots (Migrated from github.com) reviewed 2021-10-18 19:59:45 +00:00
emidoots (Migrated from github.com) commented 2021-10-18 19:59:45 +00:00

Very cool PR! Thank you a ton for this!

Could you add a bool hint test? (unless I missed it?)

Very cool PR! Thank you a ton for this! Could you add a bool hint test? (unless I missed it?)
Avokadoen (Migrated from github.com) reviewed 2021-10-18 20:06:23 +00:00
Avokadoen (Migrated from github.com) commented 2021-10-18 20:06:23 +00:00

Done!

Done!
Avokadoen (Migrated from github.com) reviewed 2021-10-18 20:08:42 +00:00
Avokadoen (Migrated from github.com) commented 2021-10-18 20:08:41 +00:00

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.

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.
emidoots (Migrated from github.com) reviewed 2021-10-18 20:14:00 +00:00
emidoots (Migrated from github.com) commented 2021-10-18 20:14:00 +00:00

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.

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.
Avokadoen commented 2021-10-18 20:15:22 +00:00 (Migrated from github.com)

Sorry for the array of force pushes, will be using a draft next time. Didn't expect you to be that fast 😅

Sorry for the array of force pushes, will be using a draft next time. Didn't expect you to be that fast 😅
emidoots (Migrated from github.com) approved these changes 2021-10-18 20:16:11 +00:00
emidoots (Migrated from github.com) left a comment

Thanks so much for this!

Thanks so much for this!
Avokadoen commented 2021-10-18 20:16:48 +00:00 (Migrated from github.com)

Thanks so much for this!

Thank you for this awesome library :)

> Thanks so much for this! Thank you for this awesome library :)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!32
No description provided.