-
Notifications
You must be signed in to change notification settings - Fork 83
Expose vendor defined error code #300
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
Conversation
74a094b
to
14aa761
Compare
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.
Thank you!
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.
LGTM 👍 thanks!
14aa761
to
ad31c96
Compare
On second thought, I additionally added (in a separate commit) an additional enum value for unknown error codes. This way, when the error code is neither standardised nor from the vendor-reserved area, at least the error code gets bubbled up to the calling application. Mapping it to Let me know what you think, I can amend or drop this. |
ad31c96
to
7a78363
Compare
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.
Nice addition!
CK_ULONG is a type alias for std::os::raw::c_ulong. c_ulong is always either u32 or u64: - https://doc.rust-lang.org/std/os/raw/type.c_ulong.html - https://github.com/rust-lang/rust/blob/master/library/core/src/ffi/primitives.rs And in the end, it will do the same thing anyway: https://github.com/rust-lang/rust/blob/0162cc5/library/core/src/num/uint_macros.rs#L45 Signed-off-by: Thore Goebel <[email protected]>
Fixes parallaxsecond#299 Signed-off-by: Thore Goebel <[email protected]>
This makes debugging easier, since the error code is readily available. Signed-off-by: Thore Goebel <[email protected]>
7a78363
to
fabf938
Compare
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.
thank you! Looks good!
Fixes #299
Tested with:
This contribution is in personal capacity.