File: ldo.h

package info (click to toggle)
residualvm 0.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 31,284 kB
  • sloc: cpp: 227,029; sh: 7,256; xml: 1,731; perl: 1,067; java: 861; asm: 738; python: 691; ansic: 272; makefile: 139; objc: 81; sed: 22; php: 1
file content (45 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/

#ifndef GRIM_LDO_H
#define GRIM_LDO_H


#include "engines/grim/lua/lobject.h"
#include "engines/grim/lua/lstate.h"

namespace Grim {

#define MULT_RET        255


/*
** macro to increment stack top.
** There must be always an empty slot at the lua_state->stack.top
*/
#define incr_top { if (lua_state->stack.top >= lua_state->stack.last) luaD_checkstack(1); lua_state->stack.top++; }

// macros to convert from lua_Object to (TObject *) and back

#define Address(lo)     ((lo) + lua_state->stack.stack - 1)
#define Ref(st)         ((st) - lua_state->stack.stack + 1)

void luaD_init();
void luaD_initthr();
void luaD_adjusttop(StkId newtop);
void luaD_openstack(int32 nelems);
void luaD_lineHook(int32 line);
void luaD_callHook(StkId base, TProtoFunc *tf, int32 isreturn);
void luaD_postret(StkId firstResult);
int32 luaD_call(StkId base, int32 nResults);
void luaD_callTM(TObject *f, int32 nParams, int32 nResults);
int32 luaD_protectedrun(int32 nResults);
void luaD_gcIM(TObject *o);
void luaD_travstack(int32 (*fn)(TObject *));
void luaD_checkstack(int32 n);

} // end of namespace Grim

#endif