MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaL_addvalue

Function luaL_addvalue

extlibs/sol3/include/sol/sol.hpp:3058–3067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3056}
3057
3058COMPAT53_API void luaL_addvalue(luaL_Buffer_53 *B) {
3059 size_t len = 0;
3060 const char *s = lua_tolstring(B->L2, -1, &len);
3061 if (!s)
3062 luaL_error(B->L2, "cannot convert value to string");
3063 if (B->ptr != B->b.buffer)
3064 lua_insert(B->L2, -2); /* userdata buffer must be at stack top */
3065 luaL_addlstring(B, s, len);
3066 lua_remove(B->L2, B->ptr != B->b.buffer ? -2 : -1);
3067}
3068
3069void luaL_pushresult(luaL_Buffer_53 *B) {
3070 lua_pushlstring(B->L2, B->ptr, B->nelems);

Callers

nothing calls this directly

Calls 3

lua_tolstringFunction · 0.85
luaL_errorFunction · 0.85
luaL_addlstringFunction · 0.70

Tested by

no test coverage detected