MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / lua_pushlstring

Function lua_pushlstring

Plugins/slua_unreal/External/lua/lapi.cpp:477–486  ·  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

475** 'memcmp' and 'memcpy'.
476*/
477LUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) {
478 TString *ts;
479 lua_lock(L);
480 ts = (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len);
481 setsvalue2s(L, L->top, ts);
482 api_incr_top(L);
483 luaC_checkGC(L);
484 lua_unlock(L);
485 return getstr(ts);
486}
487
488
489LUA_API const char *lua_pushstring (lua_State *L, const char *s) {

Callers 15

udp_meth_receiveFunction · 0.85
udp_meth_receivefromFunction · 0.85
mime_global_b64Function · 0.85
mime_global_unb64Function · 0.85
mime_global_qpFunction · 0.85
mime_global_unqpFunction · 0.85
luaopen_utf8Function · 0.85
pushnexttemplateFunction · 0.85
loadfuncFunction · 0.85
searcher_CrootFunction · 0.85
modinitFunction · 0.85
str_subFunction · 0.85

Calls 2

luaS_newFunction · 0.85
luaS_newlstrFunction · 0.85

Tested by

no test coverage detected