summaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-17 08:07:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-17 08:07:26 -0300
commitea3155e380080095a6f8c63297f0505789cf08b7 (patch)
tree5042b7d258e89ccaa256b1cde1a61d5304108511 /ldblib.c
parentc172a4f7c2d452035f9cbb4285f2e6761ab7a68b (diff)
downloadlua-github-ea3155e380080095a6f8c63297f0505789cf08b7.tar.gz
'debug.sizeof' removed
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/ldblib.c b/ldblib.c
index 79da10c8..e82b9752 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldblib.c,v 1.141 2014/08/22 16:22:42 roberto Exp roberto $
+** $Id: ldblib.c,v 1.142 2014/10/01 11:54:56 roberto Exp roberto $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
@@ -21,33 +21,6 @@
#define HOOKKEY "_HKEY"
-static int db_Csize (lua_State *L) {
- static struct {
- char c;
- unsigned char sz;
- } sizes[] = {
- {'I', sizeof(lua_Integer)},
- {'F', sizeof(lua_Number)},
- {'h', sizeof(short)},
- {'i', sizeof(int)},
- {'l', sizeof(long)},
- {'z', sizeof(size_t)},
- {'f', sizeof(float)},
- {'d', sizeof(double)},
- {'p', sizeof(void*)}
- };
- const char *s = luaL_checkstring(L, 1);
- int i;
- for (i = 0; i < (int)(sizeof(sizes)/sizeof(sizes[0])); i++) {
- if (*s == sizes[i].c) {
- lua_pushinteger(L, sizes[i].sz);
- return 1;
- }
- }
- return luaL_argerror(L, 1, lua_pushfstring(L, "invalid option '%c'", *s));
-}
-
-
static int db_getregistry (lua_State *L) {
lua_pushvalue(L, LUA_REGISTRYINDEX);
return 1;
@@ -428,7 +401,6 @@ static int db_traceback (lua_State *L) {
static const luaL_Reg dblib[] = {
- {"sizeof", db_Csize},
{"debug", db_debug},
{"getuservalue", db_getuservalue},
{"gethook", db_gethook},