diff options
Diffstat (limited to 'src/lj_cdata.c')
-rw-r--r-- | src/lj_cdata.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_cdata.c b/src/lj_cdata.c index b477ce77..461b55a2 100644 --- a/src/lj_cdata.c +++ b/src/lj_cdata.c | |||
@@ -46,7 +46,7 @@ GCcdata *lj_cdata_newv(CTState *cts, CTypeID id, CTSize sz, CTSize align) | |||
46 | newwhite(g, obj2gco(cd)); | 46 | newwhite(g, obj2gco(cd)); |
47 | cd->marked |= 0x80; | 47 | cd->marked |= 0x80; |
48 | cd->gct = ~LJ_TCDATA; | 48 | cd->gct = ~LJ_TCDATA; |
49 | cd->typeid = id; | 49 | cd->ctypeid = id; |
50 | return cd; | 50 | return cd; |
51 | } | 51 | } |
52 | 52 | ||
@@ -66,7 +66,7 @@ void LJ_FASTCALL lj_cdata_free(global_State *g, GCcdata *cd) | |||
66 | setgcref(g->gc.mmudata, obj2gco(cd)); | 66 | setgcref(g->gc.mmudata, obj2gco(cd)); |
67 | } | 67 | } |
68 | } else if (LJ_LIKELY(!cdataisv(cd))) { | 68 | } else if (LJ_LIKELY(!cdataisv(cd))) { |
69 | CType *ct = ctype_raw(ctype_ctsG(g), cd->typeid); | 69 | CType *ct = ctype_raw(ctype_ctsG(g), cd->ctypeid); |
70 | CTSize sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR; | 70 | CTSize sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR; |
71 | lua_assert(ctype_hassize(ct->info) || ctype_isfunc(ct->info) || | 71 | lua_assert(ctype_hassize(ct->info) || ctype_isfunc(ct->info) || |
72 | ctype_isextern(ct->info)); | 72 | ctype_isextern(ct->info)); |
@@ -101,7 +101,7 @@ CType *lj_cdata_index(CTState *cts, GCcdata *cd, cTValue *key, uint8_t **pp, | |||
101 | CTInfo *qual) | 101 | CTInfo *qual) |
102 | { | 102 | { |
103 | uint8_t *p = (uint8_t *)cdataptr(cd); | 103 | uint8_t *p = (uint8_t *)cdataptr(cd); |
104 | CType *ct = ctype_get(cts, cd->typeid); | 104 | CType *ct = ctype_get(cts, cd->ctypeid); |
105 | ptrdiff_t idx; | 105 | ptrdiff_t idx; |
106 | 106 | ||
107 | /* Resolve reference for cdata object. */ | 107 | /* Resolve reference for cdata object. */ |
@@ -140,7 +140,7 @@ collect_attrib: | |||
140 | } | 140 | } |
141 | } else if (tviscdata(key)) { /* Integer cdata key. */ | 141 | } else if (tviscdata(key)) { /* Integer cdata key. */ |
142 | GCcdata *cdk = cdataV(key); | 142 | GCcdata *cdk = cdataV(key); |
143 | CType *ctk = ctype_raw(cts, cdk->typeid); | 143 | CType *ctk = ctype_raw(cts, cdk->ctypeid); |
144 | if (ctype_isenum(ctk->info)) ctk = ctype_child(cts, ctk); | 144 | if (ctype_isenum(ctk->info)) ctk = ctype_child(cts, ctk); |
145 | if (ctype_isinteger(ctk->info)) { | 145 | if (ctype_isinteger(ctk->info)) { |
146 | lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ctk, | 146 | lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ctk, |
@@ -167,7 +167,7 @@ collect_attrib: | |||
167 | return ct; | 167 | return ct; |
168 | } | 168 | } |
169 | } | 169 | } |
170 | } else if (cd->typeid == CTID_CTYPEID) { | 170 | } else if (cd->ctypeid == CTID_CTYPEID) { |
171 | /* Allow indexing a (pointer to) struct constructor to get constants. */ | 171 | /* Allow indexing a (pointer to) struct constructor to get constants. */ |
172 | CType *sct = ctype_raw(cts, *(CTypeID *)p); | 172 | CType *sct = ctype_raw(cts, *(CTypeID *)p); |
173 | if (ctype_isptr(sct->info)) | 173 | if (ctype_isptr(sct->info)) |