aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-20 16:22:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-20 16:22:16 -0300
commit363b525c23126c167e89c688e835c54ab7ef30d1 (patch)
tree907d48e2b98a8b047fbc269578bf7e3bbcbff628
parent469daa16eeb2b894781ab6d6364a6d1d31db558e (diff)
downloadlua-363b525c23126c167e89c688e835c54ab7ef30d1.tar.gz
lua-363b525c23126c167e89c688e835c54ab7ef30d1.tar.bz2
lua-363b525c23126c167e89c688e835c54ab7ef30d1.zip
does not create library when it is deprecated
-rw-r--r--lbitlib.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/lbitlib.c b/lbitlib.c
index d492a15e..9de1b1b7 100644
--- a/lbitlib.c
+++ b/lbitlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbitlib.c,v 1.23 2014/02/26 12:38:18 roberto Exp roberto $ 2** $Id: lbitlib.c,v 1.24 2014/03/18 18:27:08 roberto Exp roberto $
3** Standard library for bitwise operations 3** Standard library for bitwise operations
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -219,17 +219,9 @@ LUAMOD_API int luaopen_bit32 (lua_State *L) {
219 219
220#else /* }{ */ 220#else /* }{ */
221 221
222static int b_err (lua_State *L) {
223 return luaL_error(L, "library 'bit32' is deprecated");
224}
225
226 222
227LUAMOD_API int luaopen_bit32 (lua_State *L) { 223LUAMOD_API int luaopen_bit32 (lua_State *L) {
228 lua_createtable(L, 0, 1); /* new table to represent the module */ 224 lua_pushnil(L);
229 lua_pushvalue(L, -1);
230 lua_setmetatable(L, -2); /* set it as its own metatable */
231 lua_pushcfunction(L, b_err);
232 lua_setfield(L, -2, "__index"); /* metatable.__index = b_errret */
233 return 1; 225 return 1;
234} 226}
235 227