From a73da6112d4c6f20abf634cb68f89fe31fb9037c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 15 May 2014 16:28:34 -0300 Subject: deprecated library throws an error if called (instead of silently not loading itself) --- lbitlib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lbitlib.c') diff --git a/lbitlib.c b/lbitlib.c index 9de1b1b7..05895b2e 100644 --- a/lbitlib.c +++ b/lbitlib.c @@ -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 /* } */ -- cgit v1.2.3-55-g6feb