| 995 | |
| 996 | |
| 997 | LUA_API void lua_concat (lua_State *L, int n) { |
| 998 | lua_lock(L); |
| 999 | api_checknelems(L, n); |
| 1000 | if (n >= 2) { |
| 1001 | luaC_checkGC(L); |
| 1002 | luaV_concat(L, n, cast_int(L->top - L->base) - 1); |
| 1003 | L->top -= (n-1); |
| 1004 | } |
| 1005 | else if (n == 0) { /* push empty string */ |
| 1006 | setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); |
| 1007 | api_incr_top(L); |
| 1008 | } |
| 1009 | /* else n == 1; nothing to do */ |
| 1010 | lua_unlock(L); |
| 1011 | } |
| 1012 | |
| 1013 | |
| 1014 | LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { |
no test coverage detected