deprecated library throws an error if called (instead of silently

not loading itself)
This commit is contained in:
Roberto Ierusalimschy
2014-05-15 16:28:34 -03:00
parent 6a5d87771f
commit a73da6112d
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbitlib.c,v 1.24 2014/03/18 18:27:08 roberto Exp roberto $
** $Id: lbitlib.c,v 1.25 2014/03/20 19:22:16 roberto Exp roberto $
** Standard library for bitwise operations
** See Copyright Notice in lua.h
*/
@@ -221,8 +221,7 @@ LUAMOD_API int luaopen_bit32 (lua_State *L) {
LUAMOD_API int luaopen_bit32 (lua_State *L) {
lua_pushnil(L);
return 1;
return luaL_error(L, "library 'bit32' has been deprecated");
}
#endif /* } */