We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2455d2f commit f71b2e6Copy full SHA for f71b2e6
src/luaharfbuzz/blob.c
@@ -13,6 +13,13 @@ static int blob_new(lua_State *L) {
13
return 1;
14
}
15
16
+static int blob_destroy(lua_State *L) {
17
+ Blob *b = (Blob *)luaL_checkudata(L, 1, "harfbuzz.Blob");
18
+
19
+ hb_blob_destroy(*b);
20
+ return 0;
21
+}
22
23
static int blob_new_from_file(lua_State *L) {
24
Blob *b;
25
const char *file_name = luaL_checkstring(L, 1);
@@ -44,6 +51,7 @@ static int blob_get_data(lua_State *L) {
44
51
45
52
46
53
static const struct luaL_Reg blob_methods[] = {
54
+ { "__gc", blob_destroy },
47
55
{ "get_length", blob_get_length },
48
56
{ "get_data", blob_get_data },
49
57
{ NULL, NULL }
0 commit comments