-
Notifications
You must be signed in to change notification settings - Fork 38
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
capi: Add a note about error code and returned value relation #784
Conversation
include/fizzy/fizzy.h
Outdated
@@ -250,6 +255,9 @@ typedef struct FizzyImportedGlobal | |||
/// @param error Pointer to store detailed error information at. Can be NULL if error | |||
/// information is not required. | |||
/// @return true if module is valid, false otherwise. | |||
/// | |||
/// @note FizzyError::code must be ::FizzySuccess if function returns `true` and must not be |
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.
Does this not sound like it's a requirement to a user's input?
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.
Yeah I think so. Would suggest something like "FizzyError::code will be ::FizzySuccess if functions...".
Codecov Report
@@ Coverage Diff @@
## master #784 +/- ##
==========================================
- Coverage 99.24% 99.24% -0.01%
==========================================
Files 79 79
Lines 11964 11962 -2
==========================================
- Hits 11874 11872 -2
Misses 90 90
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Still suggest to use "will be" instead of "must be".
include/fizzy/fizzy.h
Outdated
@@ -260,6 +268,9 @@ bool fizzy_validate( | |||
/// @param error Pointer to store detailed error information at. Can be NULL if error | |||
/// information is not required. | |||
/// @return non-NULL pointer to module in case of success, NULL otherwise. | |||
/// | |||
/// @note FizzyError::code will be ::FizzySuccess if function returns non-NULL | |||
/// will and must not be ::FizzySuccess otherwise. |
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.
Nit: the other places used will not be.
Addresses comment #769 (comment)