From 27a6fee82e91319bbed8c3aa443aa2b0f1b0a470 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 13 Jul 2022 00:30:23 +0200 Subject: FFI: Allow ffi.metatype() for typedefs with attributes. Reported by Eric Gouyer. --- src/lib_ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) CTypeID id = ffi_checkctype(L, cts, NULL); GCtab *mt = lj_lib_checktab(L, 2); GCtab *t = cts->miscmap; - CType *ct = ctype_get(cts, id); /* Only allow raw types. */ + CType *ct = ctype_raw(cts, id); TValue *tv; GCcdata *cd; if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) || -- cgit v1.2.3-55-g6feb