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