mirror of https://github.com/rusefi/lua.git
avoid the use of (non const) static data
This commit is contained in:
parent
523c5d8e1c
commit
22914afab3
8
ldblib.c
8
ldblib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ldblib.c,v 1.28 2000/11/06 13:19:08 roberto Exp roberto $
|
** $Id: ldblib.c,v 1.30 2000/11/14 18:46:20 roberto Exp $
|
||||||
** Interface from Lua to its debug API
|
** Interface from Lua to its debug API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -111,9 +111,9 @@ static int setlocal (lua_State *L) {
|
||||||
|
|
||||||
|
|
||||||
/* dummy variables (to define unique addresses) */
|
/* dummy variables (to define unique addresses) */
|
||||||
static char key1, key2;
|
static const char key1[] = "ab";
|
||||||
#define KEY_CALLHOOK (&key1)
|
#define KEY_CALLHOOK ((void *)key1)
|
||||||
#define KEY_LINEHOOK (&key2)
|
#define KEY_LINEHOOK ((void *)(key1+1))
|
||||||
|
|
||||||
|
|
||||||
static void hookf (lua_State *L, void *key) {
|
static void hookf (lua_State *L, void *key) {
|
||||||
|
|
Loading…
Reference in New Issue