MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_concat

Function lua_concat

Source/Misc/lua/src/lua.c:2839–2853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls 2

luaV_concatFunction · 0.85
luaS_newlstrFunction · 0.85

Tested by

no test coverage detected