From e401513086792e27e2c07c2b503adf5e08492781 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 22 Aug 2014 13:22:42 -0300 Subject: new option 'p' for 'debug.sizeof' (size of a pointer) --- ldblib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ldblib.c') diff --git a/ldblib.c b/ldblib.c index e95457aa..5047a9dd 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.139 2014/05/15 19:27:33 roberto Exp roberto $ +** $Id: ldblib.c,v 1.140 2014/08/21 19:12:40 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -33,7 +33,8 @@ static int db_Csize (lua_State *L) { {'l', sizeof(long)}, {'z', sizeof(size_t)}, {'f', sizeof(float)}, - {'d', sizeof(double)} + {'d', sizeof(double)}, + {'p', sizeof(void*)} }; const char *s = luaL_checkstring(L, 1); int i; -- cgit v1.2.3-55-g6feb