annotate lib/lua/lua-5.2.2/lfunc.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: lfunc.h,v 2.8 2012/05/08 13:53:33 roberto Exp $
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
3 ** Auxiliary functions to manipulate prototypes and closures
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 lfunc_h
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
8 #define lfunc_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
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
13
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
14 #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
15 cast(int, sizeof(TValue)*((n)-1)))
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
16
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
17 #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
18 cast(int, sizeof(TValue *)*((n)-1)))
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
19
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
20
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
21 LUAI_FUNC Proto *luaF_newproto (lua_State *L);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
22 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
23 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
24 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
25 LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
26 LUAI_FUNC void luaF_close (lua_State *L, StkId level);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
27 LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
28 LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
29 LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
30 int pc);
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
31
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
32
41cc4dd3c122 Lua 5.2.2 added.
Nomad
parents:
diff changeset
33 #endif