mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
new constant LUA_NOOBJECT.
'lua_createtable' does not have parameters. 'lua_copystring' now is a macro
This commit is contained in:
parent
3365a35243
commit
068d1cd1ee
2 changed files with 18 additions and 25 deletions
9
lua.h
9
lua.h
|
|
@ -2,7 +2,7 @@
|
|||
** LUA - Linguagem para Usuarios de Aplicacao
|
||||
** Grupo de Tecnologia em Computacao Grafica
|
||||
** TeCGraf - PUC-Rio
|
||||
** $Id: lua.h,v 3.11 1994/11/18 19:46:21 roberto Stab roberto $
|
||||
** $Id: lua.h,v 3.12 1994/12/13 15:54:21 roberto Exp roberto $
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -25,6 +25,8 @@ typedef enum
|
|||
|
||||
/* Public Part */
|
||||
|
||||
#define LUA_NOOBJECT 0
|
||||
|
||||
typedef void (*lua_CFunction) (void);
|
||||
typedef unsigned int lua_Object;
|
||||
|
||||
|
|
@ -44,7 +46,6 @@ lua_Object lua_getparam (int number);
|
|||
|
||||
float lua_getnumber (lua_Object object);
|
||||
char *lua_getstring (lua_Object object);
|
||||
char *lua_copystring (lua_Object object);
|
||||
lua_CFunction lua_getcfunction (lua_Object object);
|
||||
void *lua_getuserdata (lua_Object object);
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ int lua_lock (void);
|
|||
lua_Object lua_getlocked (int ref);
|
||||
void lua_unlock (int ref);
|
||||
|
||||
lua_Object lua_createtable (int initSize);
|
||||
lua_Object lua_createtable (void);
|
||||
|
||||
|
||||
/* some useful macros */
|
||||
|
|
@ -93,4 +94,6 @@ lua_Object lua_createtable (int initSize);
|
|||
#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript())
|
||||
#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript())
|
||||
|
||||
#define lua_copystring(o) (strdup(lua_getstring(o)))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue