annotate lib/lua/lua-5.2.2/ldo.h @ 2274:90f56da08d76

small cleaning
author Ritor1
date Fri, 14 Mar 2014 09:32:25 +0600
parents 41cc4dd3c122
children
rev   line source
1866
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
1 /*
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
2 ** $Id: ldo.h,v 2.20 2011/11/29 15:55:08 roberto Exp $
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
3 ** Stack and Call structure of Lua
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
4 ** See Copyright Notice in lua.h
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
5 */
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
6
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
7 #ifndef ldo_h
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
8 #define ldo_h
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
9
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
10
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
11 #include "lobject.h"
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
12 #include "lstate.h"
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
13 #include "lzio.h"
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
14
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
15
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
16 #define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
17 luaD_growstack(L, n); else condmovestack(L);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
18
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
19
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
20 #define incr_top(L) {L->top++; luaD_checkstack(L,0);}
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
21
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
22 #define savestack(L,p) ((char *)(p) - (char *)L->stack)
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
23 #define restorestack(L,n) ((TValue *)((char *)L->stack + (n)))
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
24
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
25
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
26 /* type of protected functions, to be ran by `runprotected' */
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
27 typedef void (*Pfunc) (lua_State *L, void *ud);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
28
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
29 LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
30 const char *mode);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
31 LUAI_FUNC void luaD_hook (lua_State *L, int event, int line);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
32 LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
33 LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults,
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
34 int allowyield);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
35 LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
36 ptrdiff_t oldtop, ptrdiff_t ef);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
37 LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
38 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
39 LUAI_FUNC void luaD_growstack (lua_State *L, int n);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
40 LUAI_FUNC void luaD_shrinkstack (lua_State *L);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
41
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
42 LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
43 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
44
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
45 #endif
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
46