File nut/include/lua/lua.h

* Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions:
* The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Included Files


Preprocessor definitions

#define lua_h

#define LUA_VERSION "Lua 5.1"

#define LUA_RELEASE "Lua 5.1.4"

#define LUA_VERSION_NUM 501

#define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio"

#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes"

#define LUA_SIGNATURE "\033Lua"

#define LUA_MULTRET -1

#define LUA_REGISTRYINDEX -10000

#define LUA_ENVIRONINDEX -10001

#define LUA_GLOBALSINDEX -10002

#define lua_upvalueindex( i )

#define LUA_YIELD 1

#define LUA_ERRRUN 2

#define LUA_ERRSYNTAX 3

#define LUA_ERRMEM 4

#define LUA_ERRERR 5

#define LUA_TNONE -1

#define LUA_TNIL 0

#define LUA_TBOOLEAN 1

#define LUA_TLIGHTUSERDATA 2

#define LUA_TNUMBER 3

#define LUA_TSTRING 4

#define LUA_TTABLE 5

#define LUA_TFUNCTION 6

#define LUA_TUSERDATA 7

#define LUA_TTHREAD 8

#define LUA_MINSTACK 20

#define LUA_GCSTOP 0

#define LUA_GCRESTART 1

#define LUA_GCCOLLECT 2

#define LUA_GCCOUNT 3

#define LUA_GCCOUNTB 4

#define LUA_GCSTEP 5

#define LUA_GCSETPAUSE 6

#define LUA_GCSETSTEPMUL 7

#define lua_pop( L, n )

#define lua_newtable( L )

#define lua_register( L, n, f )

#define lua_pushcfunction( L, f )

#define lua_strlen( L, i )

#define lua_isfunction( L, n )

#define lua_istable( L, n )

#define lua_islightuserdata( L, n )

#define lua_isnil( L, n )

#define lua_isboolean( L, n )

#define lua_isthread( L, n )

#define lua_isnone( L, n )

#define lua_isnoneornil( L, n )

#define lua_pushliteral( L, s )

#define lua_setglobal( L, s )

#define lua_getglobal( L, s )

#define lua_tostring( L, i )

#define lua_open

#define lua_getregistry( L )

#define lua_getgccount( L )

#define lua_Chunkreader lua_Reader

#define lua_Chunkwriter lua_Writer

#define LUA_HOOKCALL 0

#define LUA_HOOKRET 1

#define LUA_HOOKLINE 2

#define LUA_HOOKCOUNT 3

#define LUA_HOOKTAILRET 4

#define LUA_MASKCALL

#define LUA_MASKRET

#define LUA_MASKLINE

#define LUA_MASKCOUNT


Typedef lua_State

typedef struct lua_State lua_State

Typedef lua_CFunction

typedef int (*lua_CFunction)(lua_State* L)

Typedef lua_Reader

typedef const char* (*lua_Reader)(lua_State* L,void* ud,size_t* sz)

Typedef lua_Writer

typedef int (*lua_Writer)(lua_State* L,const void* p,size_t sz,void* ud)

Typedef lua_Alloc

typedef void* (*lua_Alloc)(void* ud,void* ptr,size_t osize,size_t nsize)

Typedef lua_Number

typedef double lua_Number

Typedef lua_Integer

typedef ptrdiff_t lua_Integer

Typedef lua_Debug

typedef struct lua_Debug lua_Debug
See: Type struct lua_Debug

Typedef lua_Hook

typedef void (*lua_Hook)(lua_State* L,lua_Debug* ar)

Type struct lua_Debug

struct lua_Debug
struct lua_Debug  
   {  
      int event;  
      const char* name;  
      const char* namewhat;  
      const char* what;  
      const char* source;  
      int currentline;  
      int nups;  
      int linedefined;  
      int lastlinedefined;  
      char short_src[60];  
      int i_ci;  
   }  

External Variables

lua_newstate
extern lua_State* ( lua_newstate)(lua_Alloc f,void* ud)

lua_close
extern void ( lua_close)(lua_State* L)

lua_newthread
extern lua_State* ( lua_newthread)(lua_State* L)

lua_atpanic
extern lua_CFunction ( lua_atpanic)(lua_State* L,lua_CFunction panicf)

lua_gettop
extern int ( lua_gettop)(lua_State* L)

lua_settop
extern void ( lua_settop)(lua_State* L,int idx)

lua_pushvalue
extern void ( lua_pushvalue)(lua_State* L,int idx)

lua_remove
extern void ( lua_remove)(lua_State* L,int idx)

lua_insert
extern void ( lua_insert)(lua_State* L,int idx)

lua_replace
extern void ( lua_replace)(lua_State* L,int idx)

lua_checkstack
extern int ( lua_checkstack)(lua_State* L,int sz)

lua_xmove
extern void ( lua_xmove)(lua_State* from,lua_State* to,int n)

lua_isnumber
extern int ( lua_isnumber)(lua_State* L,int idx)

lua_isstring
extern int ( lua_isstring)(lua_State* L,int idx)

lua_iscfunction
extern int ( lua_iscfunction)(lua_State* L,int idx)

lua_isuserdata
extern int ( lua_isuserdata)(lua_State* L,int idx)

lua_type
extern int ( lua_type)(lua_State* L,int idx)

lua_typename
extern const char* ( lua_typename)(lua_State* L,int tp)

lua_equal
extern int ( lua_equal)(lua_State* L,int idx1,int idx2)

lua_rawequal
extern int ( lua_rawequal)(lua_State* L,int idx1,int idx2)

lua_lessthan
extern int ( lua_lessthan)(lua_State* L,int idx1,int idx2)

lua_tonumber
extern lua_Number ( lua_tonumber)(lua_State* L,int idx)

lua_tointeger
extern lua_Integer ( lua_tointeger)(lua_State* L,int idx)

lua_toboolean
extern int ( lua_toboolean)(lua_State* L,int idx)

lua_tolstring
extern const char* ( lua_tolstring)(lua_State* L,int idx,size_t* len)

lua_objlen
extern size_t ( lua_objlen)(lua_State* L,int idx)

lua_tocfunction
extern lua_CFunction ( lua_tocfunction)(lua_State* L,int idx)

lua_touserdata
extern void* ( lua_touserdata)(lua_State* L,int idx)

lua_tothread
extern lua_State* ( lua_tothread)(lua_State* L,int idx)

lua_topointer
extern const void* ( lua_topointer)(lua_State* L,int idx)

lua_pushnil
extern void ( lua_pushnil)(lua_State* L)

lua_pushnumber
extern void ( lua_pushnumber)(lua_State* L,lua_Number n)

lua_pushinteger
extern void ( lua_pushinteger)(lua_State* L,lua_Integer n)

lua_pushlstring
extern void ( lua_pushlstring)(lua_State* L,const char* s,size_t l)

lua_pushstring
extern void ( lua_pushstring)(lua_State* L,const char* s)

lua_pushvfstring
extern const char* ( lua_pushvfstring)(lua_State* L,const char* fmt,va_list argp)

lua_pushfstring
extern const char* ( lua_pushfstring)(lua_State* L,const char* fmt,...)

lua_pushcclosure
extern void ( lua_pushcclosure)(lua_State* L,lua_CFunction fn,int n)

lua_pushboolean
extern void ( lua_pushboolean)(lua_State* L,int b)

lua_pushlightuserdata
extern void ( lua_pushlightuserdata)(lua_State* L,void* p)

lua_pushthread
extern int ( lua_pushthread)(lua_State* L)

lua_gettable
extern void ( lua_gettable)(lua_State* L,int idx)

lua_getfield
extern void ( lua_getfield)(lua_State* L,int idx,const char* k)

lua_rawget
extern void ( lua_rawget)(lua_State* L,int idx)

lua_rawgeti
extern void ( lua_rawgeti)(lua_State* L,int idx,int n)

lua_createtable
extern void ( lua_createtable)(lua_State* L,int narr,int nrec)

lua_newuserdata
extern void* ( lua_newuserdata)(lua_State* L,size_t sz)

lua_getmetatable
extern int ( lua_getmetatable)(lua_State* L,int objindex)

lua_getfenv
extern void ( lua_getfenv)(lua_State* L,int idx)

lua_settable
extern void ( lua_settable)(lua_State* L,int idx)

lua_setfield
extern void ( lua_setfield)(lua_State* L,int idx,const char* k)

lua_rawset
extern void ( lua_rawset)(lua_State* L,int idx)

lua_rawseti
extern void ( lua_rawseti)(lua_State* L,int idx,int n)

lua_setmetatable
extern int ( lua_setmetatable)(lua_State* L,int objindex)

lua_setfenv
extern int ( lua_setfenv)(lua_State* L,int idx)

lua_call
extern void ( lua_call)(lua_State* L,int nargs,int nresults)

lua_pcall
extern int ( lua_pcall)(lua_State* L,int nargs,int nresults,int errfunc)

lua_cpcall
extern int ( lua_cpcall)(lua_State* L,lua_CFunction func,void* ud)

lua_load
extern int ( lua_load)(lua_State* L,lua_Reader reader,void* dt,const char* chunkname)

lua_dump
extern int ( lua_dump)(lua_State* L,lua_Writer writer,void* data)

lua_yield
extern int ( lua_yield)(lua_State* L,int nresults)

lua_resume
extern int ( lua_resume)(lua_State* L,int narg)

lua_status
extern int ( lua_status)(lua_State* L)

lua_gc
extern int ( lua_gc)(lua_State* L,int what,int data)

lua_error
extern int ( lua_error)(lua_State* L)

lua_next
extern int ( lua_next)(lua_State* L,int idx)

lua_concat
extern void ( lua_concat)(lua_State* L,int n)

lua_getallocf
extern lua_Alloc ( lua_getallocf)(lua_State* L,void** ud)