Allow DeviceInfo to use native Go types#63
Open
daniel-sullivan wants to merge 4 commits intogen2brain:masterfrom
Open
Allow DeviceInfo to use native Go types#63daniel-sullivan wants to merge 4 commits intogen2brain:masterfrom
daniel-sullivan wants to merge 4 commits intogen2brain:masterfrom
Conversation
Owner
|
Thanks. I don't like including C and header file just for a few constants, is it really needed? |
Author
|
Completely agree! Unfortunately, not including it results in: unless the header is included in the same file. I tried to maintain the existing format (with constants being in There's a couple of alternates if you prefer:
|
Owner
|
Is ma_bool32 really needed? These are just 1 and 0. |
Author
|
Not really. If you're happy hardcoding to those, that makes everything a lot simpler. I've just had upstream libraries I'm wrapping screw around with values you expect to be constant so I'm fairly defensive. |
Owner
|
Yes please, that will never change I guess, so hardcoding is fine. |
…into constants.go
Author
|
Just for cross-linking, this PR should also fix #28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired by #30
This originally come from the requirement to have a consistent device ID which can be stored as a string (for example in a UI select box) and then be used to select the same device later.