| 2837 | |
| 2838 | |
| 2839 | LUA_API void lua_concat (lua_State *L, int n) { |
| 2840 | lua_lock(L); |
| 2841 | api_checknelems(L, n); |
| 2842 | if (n >= 2) { |
| 2843 | luaC_checkGC(L); |
| 2844 | luaV_concat(L, n, cast_int(L->top - L->base) - 1); |
| 2845 | L->top -= (n-1); |
| 2846 | } |
| 2847 | else if (n == 0) { /* push empty string */ |
| 2848 | setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); |
| 2849 | api_incr_top(L); |
| 2850 | } |
| 2851 | /* else n == 1; nothing to do */ |
| 2852 | lua_unlock(L); |
| 2853 | } |
| 2854 | |
| 2855 | |
| 2856 | LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { |
no test coverage detected