lua/ldo.h

Go to the documentation of this file.
00001 /*
00002 ** $Id: ldo.h,v 2.20 2011/11/29 15:55:08 roberto Exp $
00003 ** Stack and Call structure of Lua
00004 ** See Copyright Notice in lua.h
00005 */
00006 
00007 #ifndef ldo_h
00008 #define ldo_h
00009 
00010 
00011 #include "lobject.h"
00012 #include "lstate.h"
00013 #include "lzio.h"
00014 
00015 
00016 #define luaD_checkstack(L,n)    if (L->stack_last - L->top <= (n)) \
00017                     luaD_growstack(L, n); else condmovestack(L);
00018 
00019 
00020 #define incr_top(L) {L->top++; luaD_checkstack(L,0);}
00021 
00022 #define savestack(L,p)      ((char *)(p) - (char *)L->stack)
00023 #define restorestack(L,n)   ((TValue *)((char *)L->stack + (n)))
00024 
00025 
00026 /* type of protected functions, to be ran by `runprotected' */
00027 typedef void (*Pfunc) (lua_State *L, void *ud);
00028 
00029 LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
00030                                                   const char *mode);
00031 LUAI_FUNC void luaD_hook (lua_State *L, int event, int line);
00032 LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);
00033 LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults,
00034                                         int allowyield);
00035 LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
00036                                         ptrdiff_t oldtop, ptrdiff_t ef);
00037 LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
00038 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
00039 LUAI_FUNC void luaD_growstack (lua_State *L, int n);
00040 LUAI_FUNC void luaD_shrinkstack (lua_State *L);
00041 
00042 LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode);
00043 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
00044 
00045 #endif
00046 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:03 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs