MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_pushstring

Function lua_pushstring

freebsd/contrib/openzfs/module/lua/lapi.c:510–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508
509
510LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
511 if (s == NULL) {
512 lua_pushnil(L);
513 return NULL;
514 }
515 else {
516 TString *ts;
517 lua_lock(L);
518 luaC_checkGC(L);
519 ts = luaS_new(L, s);
520 setsvalue2s(L, L->top, ts);
521 api_incr_top(L);
522 lua_unlock(L);
523 return getstr(ts);
524 }
525}
526
527
528LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

luaB_typeFunction · 0.70
luaL_getmetafieldFunction · 0.70
luaL_tolstringFunction · 0.70
luaL_requirefFunction · 0.70
get_prop_srcFunction · 0.50
zcp_get_user_propFunction · 0.50
get_special_propFunction · 0.50
get_zap_propFunction · 0.50
zcp_get_userquota_propFunction · 0.50
zcp_get_written_propFunction · 0.50
zcp_lua_to_nvlist_implFunction · 0.50
zcp_nvlist_to_luaFunction · 0.50

Calls 2

luaS_newFunction · 0.85
lua_pushnilFunction · 0.70

Tested by

no test coverage detected