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

Function luaL_loadbufferx

3rd_party/lua_sol2/include/sol.hpp:2905–2916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2903}
2904
2905COMPAT53_API int luaL_loadbufferx(lua_State *L, const char *buff, size_t sz, const char *name, const char *mode) {
2906 int status = LUA_OK;
2907 if (sz > 0 && buff[0] == LUA_SIGNATURE[0]) {
2908 status = compat53_checkmode(L, mode, "binary", LUA_ERRSYNTAX);
2909 }
2910 else {
2911 status = compat53_checkmode(L, mode, "text", LUA_ERRSYNTAX);
2912 }
2913 if (status != LUA_OK)
2914 return status;
2915 return luaL_loadbuffer(L, buff, sz, name);
2916}
2917
2918#if !defined(l_inspectstat) && \
2919 (defined(unix) || defined(__unix) || defined(__unix__) || \

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