diff options
author | Mike Pall <mike> | 2022-07-13 00:30:23 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2022-07-13 00:30:23 +0200 |
commit | 27a6fee82e91319bbed8c3aa443aa2b0f1b0a470 (patch) | |
tree | 0a51c5ba8858767fc5cd04ae47c03ea08f752767 | |
parent | 674afcd4e21d0cf64de3219d347557a0aed8ecc7 (diff) | |
download | luajit-27a6fee82e91319bbed8c3aa443aa2b0f1b0a470.tar.gz luajit-27a6fee82e91319bbed8c3aa443aa2b0f1b0a470.tar.bz2 luajit-27a6fee82e91319bbed8c3aa443aa2b0f1b0a470.zip |
FFI: Allow ffi.metatype() for typedefs with attributes.
Reported by Eric Gouyer.
-rw-r--r-- | src/lib_ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_ffi.c b/src/lib_ffi.c index cc8d419d..6eaec71c 100644 --- a/src/lib_ffi.c +++ b/src/lib_ffi.c | |||
@@ -743,7 +743,7 @@ LJLIB_CF(ffi_metatype) | |||
743 | CTypeID id = ffi_checkctype(L, cts, NULL); | 743 | CTypeID id = ffi_checkctype(L, cts, NULL); |
744 | GCtab *mt = lj_lib_checktab(L, 2); | 744 | GCtab *mt = lj_lib_checktab(L, 2); |
745 | GCtab *t = cts->miscmap; | 745 | GCtab *t = cts->miscmap; |
746 | CType *ct = ctype_get(cts, id); /* Only allow raw types. */ | 746 | CType *ct = ctype_raw(cts, id); |
747 | TValue *tv; | 747 | TValue *tv; |
748 | GCcdata *cd; | 748 | GCcdata *cd; |
749 | if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) || | 749 | if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) || |