MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / luaL_loadbufferx

Function luaL_loadbufferx

Libs/sol/sol.hpp:3495–3506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3493}
3494
3495COMPAT53_API int luaL_loadbufferx(lua_State* L, const char* buff, size_t sz, const char* name, const char* mode) {
3496 int status = LUA_OK;
3497 if (sz > 0 && buff[0] == LUA_SIGNATURE[0]) {
3498 status = compat53_checkmode(L, mode, "binary", LUA_ERRSYNTAX);
3499 }
3500 else {
3501 status = compat53_checkmode(L, mode, "text", LUA_ERRSYNTAX);
3502 }
3503 if (status != LUA_OK)
3504 return status;
3505 return luaL_loadbuffer(L, buff, sz, name);
3506}
3507
3508#if !defined(l_inspectstat) \
3509 && (defined(unix) || defined(__unix) || defined(__unix__) || defined(__TOS_AIX__) || defined(_SYSTYPE_BSD) || (defined(__APPLE__) && defined(__MACH__)))

Callers 4

scriptFunction · 0.85
do_stringMethod · 0.85
unsafe_scriptMethod · 0.85
loadMethod · 0.85

Calls 1

compat53_checkmodeFunction · 0.85

Tested by

no test coverage detected