diff options
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 1.87 2002/07/08 18:21:33 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.88 2002/07/08 20:22:08 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -87,13 +87,22 @@ typedef struct stringtable { | |||
87 | */ | 87 | */ |
88 | typedef struct CallInfo { | 88 | typedef struct CallInfo { |
89 | StkId base; /* base for called function */ | 89 | StkId base; /* base for called function */ |
90 | const Instruction *savedpc; | 90 | StkId top; /* top for this function */ |
91 | StkId top; /* top for this function (when it's a Lua function) */ | 91 | const Instruction *savedpc; /* NULL means not a Lua function */ |
92 | const Instruction **pc; /* points to `pc' variable in `luaV_execute' */ | 92 | union { |
93 | StkId *pb; /* points to `base' variable in `luaV_execute' */ | 93 | struct { /* for Lua functions */ |
94 | int yield_results; | 94 | const Instruction **pc; /* points to `pc' variable in `luaV_execute' */ |
95 | StkId *pb; /* points to `base' variable in `luaV_execute' */ | ||
96 | } l; | ||
97 | struct { /* for C functions */ | ||
98 | int yield_results; | ||
99 | } c; | ||
100 | } u; | ||
95 | } CallInfo; | 101 | } CallInfo; |
96 | 102 | ||
103 | |||
104 | #define isLua(ci) ((ci)->savedpc != NULL) | ||
105 | |||
97 | #define ci_func(ci) (clvalue((ci)->base - 1)) | 106 | #define ci_func(ci) (clvalue((ci)->base - 1)) |
98 | 107 | ||
99 | 108 | ||