-
Notifications
You must be signed in to change notification settings - Fork 41
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
Check all results of zpl_alloc() when using JSON parser/writer #106
Conversation
} | ||
|
||
void zpl__json_write_value(zpl_file *f, zpl_adt_node *o, zpl_adt_node *t, zpl_isize indent, zpl_b32 is_inline, zpl_b32 is_last) { | ||
zpl_b8 zpl__json_write_value(zpl_file *f, zpl_adt_node *o, zpl_adt_node *t, zpl_isize indent, zpl_b32 is_inline, zpl_b32 is_last) { |
Check warning
Code scanning / CodeQL
Poorly documented large function
Overall, it looks fantastic! One of the most essential additions here is the function call status handling which was not part of the library. We discussed with @zpl-zak that, and so far, it is the most straightforward approach to status handling. @rheatley-pervasid, what do you think about changing zpl_b8 signature to a custom bool type zpl_result {true/false}? Would that improve the notion of type of return value for the end users of the library? Thank you so much on all the efforts you've put it! |
@inlife it is definitely worth more thought. As @zpl-zak pointed out on #104 there are still a lot more functions that would get this attention. There are at least a few other functions using a bool return, e.g. ZPL_FILE_*_PROC so I am continuing that paradigm hopefully, rather than starting a new one. |
Ok, I think you are right in the sense that it should be a different task on its own and can be done separately. Overall I think we are good to merge @zpl-zak 👍 Thank you for the amazing addition @rheatley-pervasid! So far potentially might be one of the biggest additions ever made by a contributor! 🎉🎉 |
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 for your contribution!
Conversation in #104