google / wuffs

Wrangling Untrusted File Formats Safely
Other
4.06k stars 129 forks source link

Improve hello-wuffs-c example #65

Closed magnus-ISU closed 2 years ago

magnus-ISU commented 2 years ago

Made it more readable by factoring the #ifdefs into separate files.

Additionally, removed the needless heap allocation in the wuffs-using implementation of parse, and added a comment on the seemingly "correct" way to do this if you did want that, which was not what was being used previously.

Added comments about why wuffs_base__status__is_ok() might return false.

magnus-ISU commented 2 years ago

I have since signed the CLA

nigeltao commented 2 years ago

Thanks!