diff --git a/test/api/hb-test.h b/test/api/hb-test.h index 8e3cc1e88..840637aac 100644 --- a/test/api/hb-test.h +++ b/test/api/hb-test.h @@ -53,12 +53,16 @@ HB_BEGIN_DECLS ((const char *) s)[3])) #define HB_FACE_ADD_TABLE(face, tag, data) \ - hb_face_builder_add_table ((face), \ - HB_TAG_CHAR4(tag), \ - hb_blob_create_or_fail ((data), \ - sizeof (data), \ - HB_MEMORY_MODE_READONLY, \ - NULL, NULL)) + do { \ + hb_blob_t *blob = hb_blob_create_or_fail ((data), \ + sizeof (data), \ + HB_MEMORY_MODE_READONLY, \ + NULL, NULL); \ + hb_face_builder_add_table ((face), \ + HB_TAG_CHAR4(tag), \ + blob); \ + hb_blob_destroy (blob); \ + } while (0) static inline const char * srcdir (void)