diff options
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r-- | src/lj_obj.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h index f243a75b..a6637954 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
@@ -429,7 +429,7 @@ typedef struct GCfuncC { | |||
429 | 429 | ||
430 | typedef struct GCfuncL { | 430 | typedef struct GCfuncL { |
431 | GCfuncHeader; | 431 | GCfuncHeader; |
432 | GCRef pt; /* Link to prototype this function is based on. */ | 432 | MRef pc; /* Start PC (and GCproto reference). */ |
433 | GCRef uvptr[1]; /* Array of _pointers_ to upvalue objects (GCupval). */ | 433 | GCRef uvptr[1]; /* Array of _pointers_ to upvalue objects (GCupval). */ |
434 | } GCfuncL; | 434 | } GCfuncL; |
435 | 435 | ||
@@ -443,7 +443,8 @@ typedef union GCfunc { | |||
443 | #define isluafunc(fn) ((fn)->c.ffid == FF_LUA) | 443 | #define isluafunc(fn) ((fn)->c.ffid == FF_LUA) |
444 | #define iscfunc(fn) ((fn)->c.ffid == FF_C) | 444 | #define iscfunc(fn) ((fn)->c.ffid == FF_C) |
445 | #define isffunc(fn) ((fn)->c.ffid > FF_C) | 445 | #define isffunc(fn) ((fn)->c.ffid > FF_C) |
446 | #define funcproto(fn) check_exp(isluafunc(fn), &gcref((fn)->l.pt)->pt) | 446 | #define funcproto(fn) \ |
447 | check_exp(isluafunc(fn), (GCproto *)(mref((fn)->l.pc, char)-sizeof(GCproto))) | ||
447 | #define sizeCfunc(n) (sizeof(GCfuncC)-sizeof(TValue)+sizeof(TValue)*(n)) | 448 | #define sizeCfunc(n) (sizeof(GCfuncC)-sizeof(TValue)+sizeof(TValue)*(n)) |
448 | #define sizeLfunc(n) (sizeof(GCfuncL)-sizeof(GCRef)+sizeof(GCRef)*(n)) | 449 | #define sizeLfunc(n) (sizeof(GCfuncL)-sizeof(GCRef)+sizeof(GCRef)*(n)) |
449 | 450 | ||