| 2971 | } |
| 2972 | |
| 2973 | COMPAT53_API int luaL_loadbufferx(lua_State *L, const char *buff, size_t sz, const char *name, const char *mode) { |
| 2974 | int status = LUA_OK; |
| 2975 | if (sz > 0 && buff[0] == LUA_SIGNATURE[0]) { |
| 2976 | status = compat53_checkmode(L, mode, "binary", LUA_ERRSYNTAX); |
| 2977 | } |
| 2978 | else { |
| 2979 | status = compat53_checkmode(L, mode, "text", LUA_ERRSYNTAX); |
| 2980 | } |
| 2981 | if (status != LUA_OK) |
| 2982 | return status; |
| 2983 | return luaL_loadbuffer(L, buff, sz, name); |
| 2984 | } |
| 2985 | |
| 2986 | #if !defined(l_inspectstat) && \ |
| 2987 | (defined(unix) || defined(__unix) || defined(__unix__) || \ |
no test coverage detected