aboutsummaryrefslogtreecommitdiff
path: root/matrix/generic/mmatrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/generic/mmatrix.c')
-rw-r--r--matrix/generic/mmatrix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/matrix/generic/mmatrix.c b/matrix/generic/mmatrix.c
index 4b722f3..75d1eb1 100644
--- a/matrix/generic/mmatrix.c
+++ b/matrix/generic/mmatrix.c
@@ -43,6 +43,9 @@ int nerv_matrix_(set_elem)(lua_State *L) {
static const luaL_Reg nerv_matrix_(extra_methods)[];
static void host_matrix_(init)(lua_State *L) {
luaN_append_methods(L, nerv_matrix_(extra_methods));
+#ifdef MMATRIX_INIT
+ MMATRIX_INIT(L);
+#endif
}
#include "matrix.c"
@@ -114,6 +117,7 @@ static int nerv_matrix_(copy_from)(lua_State *L) {
sizeof(MATRIX_ELEM) * b->ncol * (b_end - b_begin));
return 0;
}
+
static const luaL_Reg nerv_matrix_(extra_methods)[] = {
{"load", nerv_matrix_(load)},
{"save", nerv_matrix_(save)},