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
[blob] Add failing versions of create API #3026
Conversation
Fixes #2567 New API: +hb_blob_create_or_fail() +hb_blob_create_from_file_or_fail() Use these in util/ to distinguish empty file from not-found file. Only err on the latter.
This, specifically, doesn't change any semantics of the existing API. In particular, |
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.
This seems to have been merged into master (by accident?).
@@ -71,15 +71,49 @@ hb_blob_create (const char *data, | |||
hb_memory_mode_t mode, | |||
void *user_data, | |||
hb_destroy_func_t destroy) | |||
{ | |||
if (!length) | |||
return hb_blob_get_empty (); |
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.
Do we need to call destroy()
here like in the (old) code below?
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.
Riiiiight.
Ouch. |
Since this is merged already, should we close this PR? |
Fixes #2567
New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()
Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.