summaryrefslogtreecommitdiff
path: root/src/glm_vec3_bindings.c
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-11-30 13:28:20 -0600
committersanine-a <sanine.not@pm.me>2020-11-30 13:28:20 -0600
commitbe49795636e5a9ede3742d077701f48e9316e121 (patch)
treeba82da725b991074af858e967c2a7adedfc2c544 /src/glm_vec3_bindings.c
parent352dc513efa7cb100acb03d0a991010234e04f12 (diff)
fix bug in glm binding memory allocators
Diffstat (limited to 'src/glm_vec3_bindings.c')
-rw-r--r--src/glm_vec3_bindings.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/glm_vec3_bindings.c b/src/glm_vec3_bindings.c
index 774bab0..a8157f2 100644
--- a/src/glm_vec3_bindings.c
+++ b/src/glm_vec3_bindings.c
@@ -88,7 +88,8 @@ static bool get_vec3_arrays(lua_State* L,
VEC3, (*dest)->type);
}
else {
- honey_glm_new_vec3(L);
+ lua_pushcfunction(L, honey_glm_new_vec3);
+ honey_lua_pcall(L, 0, 1);
*dest = lua_touserdata(L, -1);
}
@@ -114,7 +115,8 @@ static bool get_vec3_scalars(lua_State* L,
VEC3, (*dest)->type);
}
else {
- honey_glm_new_vec3(L);
+ lua_pushcfunction(L, honey_glm_new_vec3);
+ honey_lua_pcall(L, 0, 1);
*dest = lua_touserdata(L, -1);
}
@@ -378,7 +380,8 @@ int honey_glm_vec3_lerp(lua_State* L)
VEC3, dest->type);
}
else {
- honey_glm_new_vec3(L);
+ lua_pushcfunction(L, honey_glm_new_vec3);
+ honey_lua_pcall(L, 0, 1);
dest = lua_touserdata(L, -1);
}