aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-11-23 11:47:39 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-11-23 11:47:39 -0200
commit22914afab31d98b2a2e8f03f8141f186879e80d0 (patch)
treebfdaa361079aa95d73f7be7bcf31bfdbe0148ca8
parent523c5d8e1c5c62f16586e93baceb6fcddd0a3ded (diff)
downloadlua-22914afab31d98b2a2e8f03f8141f186879e80d0.tar.gz
lua-22914afab31d98b2a2e8f03f8141f186879e80d0.tar.bz2
lua-22914afab31d98b2a2e8f03f8141f186879e80d0.zip
avoid the use of (non const) static data
-rw-r--r--ldblib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldblib.c b/ldblib.c
index aa00701f..4704017c 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.28 2000/11/06 13:19:08 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.30 2000/11/14 18:46:20 roberto Exp $
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*/
@@ -111,9 +111,9 @@ static int setlocal (lua_State *L) {
111 111
112 112
113/* dummy variables (to define unique addresses) */ 113/* dummy variables (to define unique addresses) */
114static char key1, key2; 114static const char key1[] = "ab";
115#define KEY_CALLHOOK (&key1) 115#define KEY_CALLHOOK ((void *)key1)
116#define KEY_LINEHOOK (&key2) 116#define KEY_LINEHOOK ((void *)(key1+1))
117 117
118 118
119static void hookf (lua_State *L, void *key) { 119static void hookf (lua_State *L, void *key) {