diff options
author | Determinant <[email protected]> | 2015-05-17 23:40:25 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-17 23:40:25 +0800 |
commit | 83006367aeec856bf8e59231c78df5b1802e3138 (patch) | |
tree | d617de84bcc11067840582ebe276d29e3851e548 /common.c | |
parent | 902faa66e3da52a1a4cf7b1dc7da6e6bf0d47d34 (diff) |
add addition and multiplication for cumatrix
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -16,4 +16,12 @@ int nerv_error(lua_State *L, const char *err_mesg_fmt, ...) { int nerv_error_method_not_implemented(lua_State *L) { return nerv_error(L, "method not implemented"); } + +void luaN_append_methods(lua_State *L, const luaL_Reg *mlist) { + for (; mlist->func; mlist++) + { + lua_pushcfunction(L, mlist->func); + lua_setfield(L, -2, mlist->name); + } +} #endif |