MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / lua_pushlstring

Function lua_pushlstring

Dependencies/lua/src/lapi.c:526–535  ·  view source on GitHub ↗

** Pushes on the stack a string with given length. Avoid using 's' when ** 'len' == 0 (as 's' can be NULL in that case), due to later use of ** 'memcmp' and 'memcpy'. */

Source from the content-addressed store, hash-verified

524** 'memcmp' and 'memcpy'.
525*/
526LUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) {
527 TString *ts;
528 lua_lock(L);
529 ts = (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len);
530 setsvalue2s(L, L->top.p, ts);
531 api_incr_top(L);
532 luaC_checkGC(L);
533 lua_unlock(L);
534 return getstr(ts);
535}
536
537
538LUA_API const char *lua_pushstring (lua_State *L, const char *s) {

Callers 15

set_undefined_methods_onFunction · 0.85
pushMethod · 0.85
push_sizedMethod · 0.85
pushMethod · 0.85
push_sizedMethod · 0.85
pushMethod · 0.85
pushMethod · 0.85
pushMethod · 0.85
associated_type_nameFunction · 0.85
setMethod · 0.85
luaL_pushresultFunction · 0.85

Calls 2

luaS_newFunction · 0.85
luaS_newlstrFunction · 0.85

Tested by 1

d2sFunction · 0.68