aboutsummaryrefslogtreecommitdiff
path: root/lbuiltin.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-01 18:30:44 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-01 18:30:44 -0200
commit00c122cc291cfb24e01a5c00f2c3503a6dfa073e (patch)
treed0bb5d6abe27967640f87cca5db9dcaf62cde62d /lbuiltin.c
parent03160920cf51a06bbb4406ec5ddb4f5dd52f0d7c (diff)
downloadlua-00c122cc291cfb24e01a5c00f2c3503a6dfa073e.tar.gz
lua-00c122cc291cfb24e01a5c00f2c3503a6dfa073e.tar.bz2
lua-00c122cc291cfb24e01a5c00f2c3503a6dfa073e.zip
other distribution of memory debug information.
Diffstat (limited to 'lbuiltin.c')
-rw-r--r--lbuiltin.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lbuiltin.c b/lbuiltin.c
index 37457d0d..5d6274c3 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbuiltin.c,v 1.12 1997/11/27 18:25:14 roberto Exp roberto $ 2** $Id: lbuiltin.c,v 1.13 1997/11/28 12:39:45 roberto Exp roberto $
3** Built-in functions 3** Built-in functions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -373,6 +373,13 @@ static void luaI_collectgarbage (void)
373*/ 373*/
374#ifdef DEBUG 374#ifdef DEBUG
375 375
376static void mem_query (void)
377{
378 lua_pushnumber(totalmem);
379 lua_pushnumber(numblocks);
380}
381
382
376static void testC (void) 383static void testC (void)
377{ 384{
378#define getnum(s) ((*s++) - '0') 385#define getnum(s) ((*s++) - '0')
@@ -433,7 +440,7 @@ static struct luaL_reg int_funcs[] = {
433#endif 440#endif
434#ifdef DEBUG 441#ifdef DEBUG
435 {"testC", testC}, 442 {"testC", testC},
436 {"totalmem", luaM_query}, 443 {"totalmem", mem_query},
437#endif 444#endif
438 {"assert", luaI_assert}, 445 {"assert", luaI_assert},
439 {"call", luaI_call}, 446 {"call", luaI_call},