aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-08-22 13:22:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-08-22 13:22:42 -0300
commite401513086792e27e2c07c2b503adf5e08492781 (patch)
tree6d6a7694fe691c920470f595b99e6c2341c9294d /ldblib.c
parent7f1a2ad69976cc6891c104d2b669771820b8959a (diff)
downloadlua-e401513086792e27e2c07c2b503adf5e08492781.tar.gz
lua-e401513086792e27e2c07c2b503adf5e08492781.tar.bz2
lua-e401513086792e27e2c07c2b503adf5e08492781.zip
new option 'p' for 'debug.sizeof' (size of a pointer)
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldblib.c b/ldblib.c
index e95457aa..5047a9dd 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.139 2014/05/15 19:27:33 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.140 2014/08/21 19:12:40 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -33,7 +33,8 @@ static int db_Csize (lua_State *L) {
33 {'l', sizeof(long)}, 33 {'l', sizeof(long)},
34 {'z', sizeof(size_t)}, 34 {'z', sizeof(size_t)},
35 {'f', sizeof(float)}, 35 {'f', sizeof(float)},
36 {'d', sizeof(double)} 36 {'d', sizeof(double)},
37 {'p', sizeof(void*)}
37 }; 38 };
38 const char *s = luaL_checkstring(L, 1); 39 const char *s = luaL_checkstring(L, 1);
39 int i; 40 int i;