diff options
-rw-r--r-- | .editorconfig | 2 | ||||
-rw-r--r-- | src/compat.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/.editorconfig b/.editorconfig index 89cb381..05bcaee 100644 --- a/.editorconfig +++ b/.editorconfig | |||
@@ -6,7 +6,7 @@ insert_final_newline = true | |||
6 | trim_trailing_whitespace = true | 6 | trim_trailing_whitespace = true |
7 | charset = utf-8 | 7 | charset = utf-8 |
8 | 8 | ||
9 | [*.lua] | 9 | [*.c;*.h] |
10 | indent_style = space | 10 | indent_style = space |
11 | indent_size = 4 | 11 | indent_size = 4 |
12 | 12 | ||
diff --git a/src/compat.c b/src/compat.c index d763c56..6f98854 100644 --- a/src/compat.c +++ b/src/compat.c | |||
@@ -3,15 +3,15 @@ | |||
3 | 3 | ||
4 | #if LUA_VERSION_NUM == 501 | 4 | #if LUA_VERSION_NUM == 501 |
5 | void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) { | 5 | void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) { |
6 | luaL_checkstack(L, nup+1, "too many upvalues"); | 6 | luaL_checkstack(L, nup+1, "too many upvalues"); |
7 | for (; l->name != NULL; l++) { /* fill the table with given functions */ | 7 | for (; l->name != NULL; l++) { /* fill the table with given functions */ |
8 | int i; | 8 | int i; |
9 | lua_pushstring(L, l->name); | 9 | lua_pushstring(L, l->name); |
10 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ | 10 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ |
11 | lua_pushvalue(L, -(nup+1)); | 11 | lua_pushvalue(L, -(nup+1)); |
12 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ | 12 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ |
13 | lua_settable(L, -(nup + 3)); | 13 | lua_settable(L, -(nup + 3)); |
14 | } | 14 | } |
15 | lua_pop(L, nup); /* remove upvalues */ | 15 | lua_pop(L, nup); /* remove upvalues */ |
16 | } | 16 | } |
17 | #endif | 17 | #endif |