annotate lib/lua/lua-5.2.2/lapi.h @ 2064:74f06d8a8017

Merge
author Ritor1
date Mon, 02 Dec 2013 20:43:28 +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: lapi.h,v 2.7 2009/11/27 15:37:59 roberto Exp $
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
3 ** Auxiliary functions from Lua API
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 lapi_h
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
8 #define lapi_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 "llimits.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
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
14 #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
15 "stack overflow");}
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
16
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
17 #define adjustresults(L,nres) \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
18 { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
19
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
20 #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
21 "not enough elements in the stack")
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
22
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
23
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
24 #endif