RetroArch
lfunc.h
Go to the documentation of this file.
1 /*
2 ** $Id: lfunc.h,v 2.15.1.1 2017/04/19 17:39:34 roberto Exp $
3 ** Auxiliary functions to manipulate prototypes and closures
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef lfunc_h
8 #define lfunc_h
9 
10 
11 #include "lobject.h"
12 
13 
14 #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
15  cast(int, sizeof(TValue)*((n)-1)))
16 
17 #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
18  cast(int, sizeof(TValue *)*((n)-1)))
19 
20 
21 /* test whether thread is in 'twups' list */
22 #define isintwups(L) (L->twups != L)
23 
24 
25 /*
26 ** maximum number of upvalues in a closure (both C and Lua). (Value
27 ** must fit in a VM register.)
28 */
29 #define MAXUPVAL 255
30 
31 
32 /*
33 ** Upvalues for Lua closures
34 */
35 struct UpVal {
36  TValue *v; /* points to stack or to its own value */
37  lu_mem refcount; /* reference counter */
38  union {
39  struct { /* (when open) */
40  UpVal *next; /* linked list */
41  int touched; /* mark to avoid cycles with dead threads */
42  } open;
43  TValue value; /* the value (when closed) */
44  } u;
45 };
46 
47 #define upisopen(up) ((up)->v != &(up)->u.value)
48 
49 
57 LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
58  int pc);
59 
60 
61 #endif
Definition: lobject.h:113
TValue value
Definition: lfunc.h:43
LUAI_FUNC CClosure * luaF_newCclosure(lua_State *L, int nelems)
Definition: lfunc.c:25
GLfloat f
Definition: glext.h:8207
LUAI_FUNC void luaF_freeproto(lua_State *L, Proto *f)
Definition: lfunc.c:125
lu_mem refcount
Definition: lfunc.h:37
#define LUAI_FUNC
Definition: luaconf.h:282
union UpVal::@100 u
LUAI_FUNC const char * luaF_getlocalname(const Proto *func, int local_number, int pc)
Definition: lfunc.c:140
Definition: lobject.h:446
LUAI_FUNC void luaF_initupvals(lua_State *L, LClosure *cl)
Definition: lfunc.c:45
LUAI_FUNC Proto * luaF_newproto(lua_State *L)
Definition: lfunc.c:99
GLenum func
Definition: glext.h:6668
GLint level
Definition: glext.h:6293
unsigned long lu_mem
Definition: llimits.h:29
Definition: lobject.h:407
LUAI_FUNC void luaF_close(lua_State *L, StkId level)
Definition: lfunc.c:83
Ιστορικό Εικόνα Πληροφορίες Όλοι Οι Χρήστες Χειρίζονται Το Μενού Αριστερό Αναλογικό Αριστερό Αναλογικό Αριστερό Αναλογικό Y Αριστερό Αναλογικό Δεξί Αναλογικό X Δεξί Αναλογικό Δεξί Αναλογικό Y Δεξί Αναλογικό Σκανδάλη Όπλου Όπλο Aux A Όπλο Aux C Όπλο Select Όπλο D pad Κάτω Όπλο D pad Δεξιά Νεκρή Ζώνη Αναλογικού Σύνδεση Όλων Λήξη Χρόνου Σύνδεσης Hide Unbound Core Input Descriptors Κατάλογος Συσκευών Κατάλογος Ποντικιού Duty Cycle Keyboard Gamepad Mapping Enable Κουμπί D pad κάτω Κουμπί Κουμπί L(πίσω)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT
UpVal * next
Definition: lfunc.h:40
Definition: lobject.h:453
LUAI_FUNC LClosure * luaF_newLclosure(lua_State *L, int nelems)
Definition: lfunc.c:33
Definition: lfunc.h:35
LUAI_FUNC UpVal * luaF_findupval(lua_State *L, StkId level)
Definition: lfunc.c:57
Definition: lstate.h:178
TValue * v
Definition: lfunc.h:36
int touched
Definition: lfunc.h:41
struct UpVal::@100::@101 open