diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-03-21 15:19:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 15:19:34 +0100 |
commit | 8fe13074a7d9fdd88c5423d1e9c5fcc4ec43a57b (patch) | |
tree | 2a01a4b5199f21a8e7bb36f7bf583ac56ebef4b9 /src | |
parent | 5901a1372251e760c2451287ad7a351ae70afb14 (diff) | |
download | luasystem-8fe13074a7d9fdd88c5423d1e9c5fcc4ec43a57b.tar.gz luasystem-8fe13074a7d9fdd88c5423d1e9c5fcc4ec43a57b.tar.bz2 luasystem-8fe13074a7d9fdd88c5423d1e9c5fcc4ec43a57b.zip |
chore(config): update editorconfig (#20)
Lua was duplicated and C was missing. Updated the 1 C file that
deviated in whitespace as well.
Diffstat (limited to 'src')
-rw-r--r-- | src/compat.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 |