luadebug.h' content now is included in lua.h'

This commit is contained in:
Roberto Ierusalimschy 2002-08-06 15:01:50 -03:00
parent d3dd337fca
commit 2e38c6ae5a
12 changed files with 63 additions and 80 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.80 2002/08/06 15:32:22 roberto Exp roberto $
** $Id: lauxlib.c,v 1.81 2002/08/06 17:26:45 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@ -23,7 +23,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
/*

View File

@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.93 2002/08/06 15:32:22 roberto Exp roberto $
** $Id: lbaselib.c,v 1.94 2002/08/06 17:06:56 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@ -14,7 +14,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
#include "lualib.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: ldblib.c,v 1.64 2002/07/17 16:25:13 roberto Exp roberto $
** $Id: ldblib.c,v 1.65 2002/08/05 17:36:24 roberto Exp roberto $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
@ -12,7 +12,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
#include "lualib.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 1.126 2002/08/05 14:51:21 roberto Exp roberto $
** $Id: ldebug.c,v 1.127 2002/08/06 15:32:22 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@ -21,7 +21,6 @@
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "luadebug.h"
#include "lvm.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: ldebug.h,v 1.26 2002/08/05 14:51:21 roberto Exp roberto $
** $Id: ldebug.h,v 1.27 2002/08/06 15:32:22 roberto Exp roberto $
** Auxiliary functions from Debug Interface module
** See Copyright Notice in lua.h
*/
@ -9,7 +9,6 @@
#include "lstate.h"
#include "luadebug.h"
#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)

View File

@ -1,5 +1,5 @@
/*
** $Id: liolib.c,v 2.13 2002/07/12 18:54:53 roberto Exp roberto $
** $Id: liolib.c,v 2.14 2002/07/17 16:25:13 roberto Exp roberto $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@ -15,7 +15,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
#include "lualib.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: lstate.h,v 1.90 2002/08/05 17:36:24 roberto Exp roberto $
** $Id: lstate.h,v 1.91 2002/08/06 15:32:22 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@ -11,7 +11,6 @@
#include "lobject.h"
#include "ltm.h"
#include "luadebug.h"
/*

View File

@ -1,5 +1,5 @@
/*
** $Id: ltablib.c,v 1.10 2002/07/08 16:51:20 roberto Exp roberto $
** $Id: ltablib.c,v 1.11 2002/08/06 17:06:56 roberto Exp roberto $
** Library for Table Manipulation
** See Copyright Notice in lua.h
*/
@ -10,7 +10,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
#include "lualib.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: ltests.c,v 1.131 2002/08/05 14:10:10 roberto Exp roberto $
** $Id: ltests.c,v 1.132 2002/08/06 15:32:22 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@ -25,7 +25,6 @@
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "luadebug.h"
#include "lualib.h"

3
lua.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lua.c,v 1.97 2002/07/10 20:49:01 roberto Exp roberto $
** $Id: lua.c,v 1.98 2002/08/06 15:32:22 roberto Exp roberto $
** Lua stand-alone interpreter
** See Copyright Notice in lua.h
*/
@ -13,7 +13,6 @@
#include "lua.h"
#include "lauxlib.h"
#include "luadebug.h"
#include "lualib.h"

56
lua.h
View File

@ -1,5 +1,5 @@
/*
** $Id: lua.h,v 1.150 2002/08/06 17:06:56 roberto Exp roberto $
** $Id: lua.h,v 1.151 2002/08/06 17:26:45 roberto Exp roberto $
** Lua - An Extensible Extension Language
** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
** http://www.lua.org mailto:info@lua.org
@ -282,8 +282,6 @@ LUA_API int lua_pushupvalues (lua_State *L);
#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref)
#endif
/*
@ -304,6 +302,56 @@ LUA_API int lua_pushupvalues (lua_State *L);
/* }====================================================================== */
/*
** {======================================================================
** Debug API
** =======================================================================
*/
typedef enum lua_Hookevent {
LUA_HOOKCALL, LUA_HOOKRET, LUA_HOOKLINE, LUA_HOOKCOUNT
} lua_Hookevent;
#define LUA_MASKCALL (2 << LUA_HOOKCALL)
#define LUA_MASKRET (2 << LUA_HOOKRET)
#define LUA_MASKLINE (2 << LUA_HOOKLINE)
#define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1))
#define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1))
typedef struct lua_Debug lua_Debug; /* activation record */
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar);
LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask);
LUA_API lua_Hook lua_gethook (lua_State *L);
LUA_API int lua_gethookmask (lua_State *L);
#define LUA_IDSIZE 60
struct lua_Debug {
lua_Hookevent event;
const char *name; /* (n) */
const char *namewhat; /* (n) `global', `local', `field', `method' */
const char *what; /* (S) `Lua' function, `C' function, Lua `main' */
const char *source; /* (S) */
int currentline; /* (l) */
int nups; /* (u) number of upvalues */
int linedefined; /* (S) */
char short_src[LUA_IDSIZE]; /* (S) */
/* private part */
int i_ci; /* active function */
};
/* }====================================================================== */
/******************************************************************************
* Copyright (C) 2002 Tecgraf, PUC-Rio. All rights reserved.
@ -328,3 +376,5 @@ LUA_API int lua_pushupvalues (lua_State *L);
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
#endif

View File

@ -1,57 +0,0 @@
/*
** $Id: luadebug.h,v 1.30 2002/07/08 20:22:08 roberto Exp $
** Debugging API
** See Copyright Notice in lua.h
*/
#ifndef luadebug_h
#define luadebug_h
#include "lua.h"
typedef enum lua_Hookevent {
LUA_HOOKCALL, LUA_HOOKRET, LUA_HOOKLINE, LUA_HOOKCOUNT
} lua_Hookevent;
#define LUA_MASKCALL (2 << LUA_HOOKCALL)
#define LUA_MASKRET (2 << LUA_HOOKRET)
#define LUA_MASKLINE (2 << LUA_HOOKLINE)
#define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1))
#define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1))
typedef struct lua_Debug lua_Debug; /* activation record */
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar);
LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask);
LUA_API lua_Hook lua_gethook (lua_State *L);
LUA_API int lua_gethookmask (lua_State *L);
#define LUA_IDSIZE 60
struct lua_Debug {
lua_Hookevent event;
const char *name; /* (n) */
const char *namewhat; /* (n) `global', `local', `field', `method' */
const char *what; /* (S) `Lua' function, `C' function, Lua `main' */
const char *source; /* (S) */
int currentline; /* (l) */
int nups; /* (u) number of upvalues */
int linedefined; /* (S) */
char short_src[LUA_IDSIZE]; /* (S) */
/* private part */
int i_ci; /* active function */
};
#endif