| 2903 | } |
| 2904 | |
| 2905 | COMPAT53_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__) || \ |
no test coverage detected