From 568794956025183fc9a9b79e0c818a885e3d0aeb Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 4 Feb 1999 15:47:59 -0200
Subject: "lua_debug", "lua_callhook" and "lua_linehook" must be inside
 "lua_state".

---
 lapi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'lapi.c')

diff --git a/lapi.c b/lapi.c
index 6a553422..60eefc80 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lapi.c,v 1.32 1999/01/26 15:31:17 roberto Exp roberto $
+** $Id: lapi.c,v 1.33 1999/02/03 16:42:42 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
@@ -439,20 +439,20 @@ lua_State *lua_setstate (lua_State *st) {
 }
 
 lua_LHFunction lua_setlinehook (lua_LHFunction func) {
-  lua_LHFunction old = lua_linehook;
-  lua_linehook = func;
+  lua_LHFunction old = L->linehook;
+  L->linehook = func;
   return old;
 }
 
 lua_CHFunction lua_setcallhook (lua_CHFunction func) {
-  lua_CHFunction old = lua_callhook;
-  lua_callhook = func;
+  lua_CHFunction old = L->callhook;
+  L->callhook = func;
   return old;
 }
 
 int lua_setdebug (int debug) {
-  int old = lua_debug;
-  lua_debug = debug;
+  int old = L->debug;
+  L->debug = debug;
   return old;
 }
 
-- 
cgit v1.2.3-55-g6feb