mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 13:33:26 +00:00
FFI: Allow ffi.metatype() for typedefs with attributes.
Reported by Eric Gouyer.
This commit is contained in:
parent
674afcd4e2
commit
27a6fee82e
@ -743,7 +743,7 @@ LJLIB_CF(ffi_metatype)
|
|||||||
CTypeID id = ffi_checkctype(L, cts, NULL);
|
CTypeID id = ffi_checkctype(L, cts, NULL);
|
||||||
GCtab *mt = lj_lib_checktab(L, 2);
|
GCtab *mt = lj_lib_checktab(L, 2);
|
||||||
GCtab *t = cts->miscmap;
|
GCtab *t = cts->miscmap;
|
||||||
CType *ct = ctype_get(cts, id); /* Only allow raw types. */
|
CType *ct = ctype_raw(cts, id);
|
||||||
TValue *tv;
|
TValue *tv;
|
||||||
GCcdata *cd;
|
GCcdata *cd;
|
||||||
if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) ||
|
if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user