FFI: Fix ffi.alignof() for reference types.
Reported by Eric Gouyer.
This commit is contained in:
@@ -328,6 +328,14 @@ CTInfo lj_ctype_info(CTState *cts, CTypeID id, CTSize *szp)
|
||||
return qual;
|
||||
}
|
||||
|
||||
/* Ditto, but follow a reference. */
|
||||
CTInfo lj_ctype_info_raw(CTState *cts, CTypeID id, CTSize *szp)
|
||||
{
|
||||
CType *ct = ctype_get(cts, id);
|
||||
if (ctype_isref(ct->info)) id = ctype_cid(ct->info);
|
||||
return lj_ctype_info(cts, id, szp);
|
||||
}
|
||||
|
||||
/* Get ctype metamethod. */
|
||||
cTValue *lj_ctype_meta(CTState *cts, CTypeID id, MMS mm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user