| 489 | |
| 490 | |
| 491 | LUA_API const char *lua_pushstring (lua_State *L, const char *s) { |
| 492 | lua_lock(L); |
| 493 | if (s == NULL) |
| 494 | setnilvalue(L->top); |
| 495 | else { |
| 496 | TString *ts; |
| 497 | ts = luaS_new(L, s); |
| 498 | setsvalue2s(L, L->top, ts); |
| 499 | s = getstr(ts); /* internal copy's address */ |
| 500 | } |
| 501 | api_incr_top(L); |
| 502 | luaC_checkGC(L); |
| 503 | lua_unlock(L); |
| 504 | return s; |
| 505 | } |
| 506 | |
| 507 | |
| 508 | LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, |
no test coverage detected