aboutsummaryrefslogtreecommitdiff
path: root/src/lib_ffi.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib_ffi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib_ffi.c b/src/lib_ffi.c
index b2b2d37f..7be624b4 100644
--- a/src/lib_ffi.c
+++ b/src/lib_ffi.c
@@ -505,10 +505,7 @@ LJLIB_CF(ffi_new) LJLIB_REC(.)
505 } 505 }
506 if (sz == CTSIZE_INVALID) 506 if (sz == CTSIZE_INVALID)
507 lj_err_arg(L, 1, LJ_ERR_FFI_INVSIZE); 507 lj_err_arg(L, 1, LJ_ERR_FFI_INVSIZE);
508 if (!(info & CTF_VLA) && ctype_align(info) <= CT_MEMALIGN) 508 cd = lj_cdata_newx(cts, id, sz, info);
509 cd = lj_cdata_new(cts, id, sz);
510 else
511 cd = lj_cdata_newv(L, id, sz, ctype_align(info));
512 setcdataV(L, o-1, cd); /* Anchor the uninitialized cdata. */ 509 setcdataV(L, o-1, cd); /* Anchor the uninitialized cdata. */
513 lj_cconv_ct_init(cts, ct, sz, cdataptr(cd), 510 lj_cconv_ct_init(cts, ct, sz, cdataptr(cd),
514 o, (MSize)(L->top - o)); /* Initialize cdata. */ 511 o, (MSize)(L->top - o)); /* Initialize cdata. */