diff options
author | chai <chaifix@163.com> | 2018-08-09 22:19:28 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-09 22:19:28 +0800 |
commit | 5fe41eca99adf4bf0fb5832033a96f98b530d4f1 (patch) | |
tree | f5144fce7ab194d122f84bf0de820b6b2c9525fa /src/lua/bit/luaopen_bit.cpp | |
parent | a03a35b6cfe6399ceaff86a1cc035f1131427955 (diff) |
*update
Diffstat (limited to 'src/lua/bit/luaopen_bit.cpp')
-rw-r--r-- | src/lua/bit/luaopen_bit.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/lua/bit/luaopen_bit.cpp b/src/lua/bit/luaopen_bit.cpp index fc3c188..e3a7bbb 100644 --- a/src/lua/bit/luaopen_bit.cpp +++ b/src/lua/bit/luaopen_bit.cpp @@ -1,5 +1,6 @@ #include "lua/luax.h" #include "libjin/jin.h" +#include <cstdlib> namespace jin { @@ -61,12 +62,6 @@ namespace lua return 1; } - // return buffer, size - static int l_write(lua_State* L) - { - - } - static const luaL_Reg f[] = { { "AND", l_and }, { "OR" , l_or }, @@ -76,7 +71,18 @@ namespace lua { "RS", l_rshift }, { "INC", l_include }, - { "write", l_write}, + //{ "Buffer", l_newBuffer }, // ײ + + { "buffer", l_buffer }, + { "write", l_write }, + { "shift", l_shift }, + + { "grabstring", l_grabstring }, + { "grabinteger", l_grabinteger }, + { "grabfloat", l_grabfloat }, + { "grabboolean", l_grabboolean }, + + // , offset { 0, 0 } }; @@ -84,6 +90,7 @@ namespace lua int luaopen_bit(lua_State* L) { luax_newlib(L, f); + return 1; } |