From be49795636e5a9ede3742d077701f48e9316e121 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Mon, 30 Nov 2020 13:28:20 -0600 Subject: fix bug in glm binding memory allocators --- src/glm_vec4_bindings.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/glm_vec4_bindings.c') diff --git a/src/glm_vec4_bindings.c b/src/glm_vec4_bindings.c index 878473f..0a18c5b 100644 --- a/src/glm_vec4_bindings.c +++ b/src/glm_vec4_bindings.c @@ -88,7 +88,8 @@ static bool get_vec4_arrays(lua_State* L, VEC4, (*dest)->type); } else { - honey_glm_new_vec4(L); + lua_pushcfunction(L, honey_glm_new_vec4); + honey_lua_pcall(L, 0, 1); *dest = lua_touserdata(L, -1); } @@ -114,7 +115,8 @@ static bool get_vec4_scalars(lua_State* L, VEC4, (*dest)->type); } else { - honey_glm_new_vec4(L); + lua_pushcfunction(L, honey_glm_new_vec4); + honey_lua_pcall(L, 0, 1); *dest = lua_touserdata(L, -1); } @@ -331,7 +333,8 @@ int honey_glm_vec4_lerp(lua_State* L) VEC4, dest->type); } else { - honey_glm_new_vec4(L); + lua_pushcfunction(L, honey_glm_new_vec4); + honey_lua_pcall(L, 0, 1); dest = lua_touserdata(L, -1); } -- cgit v1.2.1