diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-11-23 11:47:39 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-11-23 11:47:39 -0200 |
| commit | 22914afab31d98b2a2e8f03f8141f186879e80d0 (patch) | |
| tree | bfdaa361079aa95d73f7be7bcf31bfdbe0148ca8 /ldblib.c | |
| parent | 523c5d8e1c5c62f16586e93baceb6fcddd0a3ded (diff) | |
| download | lua-22914afab31d98b2a2e8f03f8141f186879e80d0.tar.gz lua-22914afab31d98b2a2e8f03f8141f186879e80d0.tar.bz2 lua-22914afab31d98b2a2e8f03f8141f186879e80d0.zip | |
avoid the use of (non const) static data
Diffstat (limited to 'ldblib.c')
| -rw-r--r-- | ldblib.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -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) */ |
| 114 | static char key1, key2; | 114 | static 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 | ||
| 119 | static void hookf (lua_State *L, void *key) { | 119 | static void hookf (lua_State *L, void *key) { |
