summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLua Team <team@lua.org>1999-07-08 12:00:00 +0000
committerrepogen <>1999-07-08 12:00:00 +0000
commitafb67002d94ef22c14741910ba83da262a6e9338 (patch)
treeb51ab3502813f590a4b115997f6fe41da43b6586 /include
parent377347776f1f3d820f92151f70bec667f96d5e6b (diff)
downloadlua-github-3.2.tar.gz
Lua 3.23.2
Diffstat (limited to 'include')
-rw-r--r--include/lauxlib.h8
-rw-r--r--include/lua.h29
-rw-r--r--include/luadebug.h11
-rw-r--r--include/lualib.h8
4 files changed, 31 insertions, 25 deletions
diff --git a/include/lauxlib.h b/include/lauxlib.h
index e4d46fb5..28a46647 100644
--- a/include/lauxlib.h
+++ b/include/lauxlib.h
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.h,v 1.9 1998/06/19 16:14:09 roberto Exp $
+** $Id: lauxlib.h,v 1.12 1999/03/10 14:19:41 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -28,7 +28,11 @@ char *luaL_check_lstr (int numArg, long *len);
#define luaL_opt_string(n, d) (luaL_opt_lstr((n), (d), NULL))
char *luaL_opt_lstr (int numArg, char *def, long *len);
double luaL_check_number (int numArg);
+#define luaL_check_int(n) ((int)luaL_check_number(n))
+#define luaL_check_long(n) ((long)luaL_check_number(n))
double luaL_opt_number (int numArg, double def);
+#define luaL_opt_int(n,d) ((int)luaL_opt_number(n,d))
+#define luaL_opt_long(n,d) ((long)luaL_opt_number(n,d))
lua_Object luaL_functionarg (int arg);
lua_Object luaL_tablearg (int arg);
lua_Object luaL_nonnullarg (int numArg);
@@ -42,6 +46,8 @@ int luaL_newbuffer (int size);
void luaL_oldbuffer (int old);
char *luaL_buffer (void);
int luaL_findstring (char *name, char *list[]);
+void luaL_chunkid (char *out, char *source, int len);
+void luaL_filesource (char *out, char *filename, int len);
#endif
diff --git a/include/lua.h b/include/lua.h
index bce5a2c7..f46b2e1d 100644
--- a/include/lua.h
+++ b/include/lua.h
@@ -1,5 +1,5 @@
/*
-** $Id: lua.h,v 1.23 1998/06/18 16:51:53 roberto Exp $
+** $Id: lua.h,v 1.32 1999/05/11 20:29:19 roberto Exp $
** Lua - An Extensible Extension Language
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
** e-mail: lua@tecgraf.puc-rio.br
@@ -11,8 +11,8 @@
#ifndef lua_h
#define lua_h
-#define LUA_VERSION "Lua 3.1"
-#define LUA_COPYRIGHT "Copyright (C) 1994-1998 TeCGraf, PUC-Rio"
+#define LUA_VERSION "Lua 3.2"
+#define LUA_COPYRIGHT "Copyright (C) 1994-1999 TeCGraf, PUC-Rio"
#define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo"
@@ -20,19 +20,18 @@
#define LUA_ANYTAG (-1)
-typedef void (*lua_CFunction) (void);
-typedef unsigned int lua_Object;
-
typedef struct lua_State lua_State;
extern lua_State *lua_state;
+typedef void (*lua_CFunction) (void);
+typedef unsigned int lua_Object;
+
void lua_open (void);
void lua_close (void);
lua_State *lua_setstate (lua_State *st);
lua_Object lua_settagmethod (int tag, char *event); /* In: new method */
lua_Object lua_gettagmethod (int tag, char *event);
-lua_Object lua_seterrormethod (void); /* In: new method */
int lua_newtag (void);
int lua_copytagmethods (int tagto, int tagfrom);
@@ -90,6 +89,9 @@ lua_Object lua_rawgettable (void); /* In: table, index */
int lua_tag (lua_Object object);
+char *lua_nextvar (char *varname); /* Out: value */
+int lua_next (lua_Object o, int i);
+ /* Out: ref, value */
int lua_ref (int lock); /* In: value */
lua_Object lua_getref (int ref);
@@ -101,29 +103,23 @@ long lua_collectgarbage (long limit);
/* =============================================================== */
-/* some useful macros/derived functions */
+/* some useful macros/functions */
-int (lua_call) (char *name);
#define lua_call(name) lua_callfunction(lua_getglobal(name))
-void (lua_pushref) (int ref);
#define lua_pushref(ref) lua_pushobject(lua_getref(ref))
-int (lua_refobject) (lua_Object o, int l);
#define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l))
-void (lua_register) (char *n, lua_CFunction f);
#define lua_register(n,f) (lua_pushcfunction(f), lua_setglobal(n))
-void (lua_pushuserdata) (void *u);
#define lua_pushuserdata(u) lua_pushusertag(u, 0)
-void (lua_pushcfunction) (lua_CFunction f);
#define lua_pushcfunction(f) lua_pushcclosure(f, 0)
-int (lua_clonetag) (int t);
#define lua_clonetag(t) lua_copytagmethods(lua_newtag(), (t))
+lua_Object lua_seterrormethod (void); /* In: new method */
/* ==========================================================================
** for compatibility with old versions. Avoid using these macros/functions
@@ -162,7 +158,7 @@ lua_Object lua_setfallback (char *event, lua_CFunction fallback);
/******************************************************************************
-* Copyright (c) 1994-1998 TeCGraf, PUC-Rio. All rights reserved.
+* Copyright (c) 1994-1999 TeCGraf, PUC-Rio. All rights reserved.
*
* Permission is hereby granted, without written agreement and without license
* or royalty fees, to use, copy, modify, and distribute this software and its
@@ -192,5 +188,6 @@ lua_Object lua_setfallback (char *event, lua_CFunction fallback);
* The Lua language and this implementation have been entirely designed and
* written by Waldemar Celes Filho, Roberto Ierusalimschy and
* Luiz Henrique de Figueiredo at TeCGraf, PUC-Rio.
+*
* This implementation contains no third-party code.
******************************************************************************/
diff --git a/include/luadebug.h b/include/luadebug.h
index 36726f7f..1dc9f206 100644
--- a/include/luadebug.h
+++ b/include/luadebug.h
@@ -1,5 +1,5 @@
/*
-** $Id: luadebug.h,v 1.2 1998/06/19 16:14:09 roberto Exp $
+** $Id: luadebug.h,v 1.6 1999/03/04 21:17:26 roberto Exp $
** Debugging API
** See Copyright Notice in lua.h
*/
@@ -17,17 +17,18 @@ typedef void (*lua_LHFunction) (int line);
typedef void (*lua_CHFunction) (lua_Function func, char *file, int line);
lua_Function lua_stackedfunction (int level);
-void lua_funcinfo (lua_Object func, char **filename, int *linedefined);
+void lua_funcinfo (lua_Object func, char **source, int *linedefined);
int lua_currentline (lua_Function func);
char *lua_getobjname (lua_Object o, char **name);
lua_Object lua_getlocal (lua_Function func, int local_number, char **name);
int lua_setlocal (lua_Function func, int local_number);
+int lua_nups (lua_Function func);
-extern lua_LHFunction lua_linehook;
-extern lua_CHFunction lua_callhook;
-extern int lua_debug;
+lua_LHFunction lua_setlinehook (lua_LHFunction func);
+lua_CHFunction lua_setcallhook (lua_CHFunction func);
+int lua_setdebug (int debug);
#endif
diff --git a/include/lualib.h b/include/lualib.h
index 583f1b54..c7187868 100644
--- a/include/lualib.h
+++ b/include/lualib.h
@@ -1,5 +1,5 @@
/*
-** $Id: lualib.h,v 1.4 1998/06/19 16:14:09 roberto Exp $
+** $Id: lualib.h,v 1.6 1999/05/05 19:23:11 roberto Exp $
** Lua standard libraries
** See Copyright Notice in lua.h
*/
@@ -10,12 +10,13 @@
#include "lua.h"
-
void lua_iolibopen (void);
void lua_strlibopen (void);
void lua_mathlibopen (void);
+void lua_dblibopen (void);
+void lua_userinit (void);
/* To keep compatibility with old versions */
@@ -28,7 +29,8 @@ void lua_mathlibopen (void);
/* Auxiliary functions (private) */
-int luaI_singlematch (int c, char *p, char **ep);
+char *luaI_classend (char *p);
+int luaI_singlematch (int c, char *p, char *ep);
#endif