experimental optimize canvas:set_data using ffi
This commit is contained in:
@@ -25,7 +25,8 @@ namespace lua {
|
||||
if (n < 0) {
|
||||
abort();
|
||||
}
|
||||
if (lua_gettop(L) < n) {
|
||||
int top = lua_gettop(L);
|
||||
if (top < n) {
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
@@ -63,6 +64,9 @@ namespace lua {
|
||||
inline void rawseti(lua::State* L, int n, int idx = -2) {
|
||||
lua_rawseti(L, idx, n);
|
||||
}
|
||||
inline void rawset(lua::State* L, int idx = -3) {
|
||||
lua_rawset(L, idx);
|
||||
}
|
||||
|
||||
inline int createtable(lua::State* L, int narr, int nrec) {
|
||||
lua_createtable(L, narr, nrec);
|
||||
|
||||
Reference in New Issue
Block a user