summaryrefslogtreecommitdiff
path: root/src/lj_ccall.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-10-27 01:52:37 +0200
committerMike Pall <mike>2011-10-27 01:57:30 +0200
commit2dc574d06bc6e828109a3bffa975592f9417434c (patch)
tree1239baece908e2390eb378e6d7d8063825926f9b /src/lj_ccall.c
parent1d190c99a2547b44deb8f5e483452d9f51925fb2 (diff)
downloadluajit-2dc574d06bc6e828109a3bffa975592f9417434c.tar.gz
luajit-2dc574d06bc6e828109a3bffa975592f9417434c.tar.bz2
luajit-2dc574d06bc6e828109a3bffa975592f9417434c.zip
FFI: Compile calls to stdcall, fastcall and vararg functions.
Diffstat (limited to 'src/lj_ccall.c')
-rw-r--r--src/lj_ccall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_ccall.c b/src/lj_ccall.c
index 281b45a6..c1c04b6f 100644
--- a/src/lj_ccall.c
+++ b/src/lj_ccall.c
@@ -402,7 +402,7 @@ static void ccall_struct_ret(CCallState *cc, int *rcl, uint8_t *dp, CTSize sz)
402/* -- Common C call handling ---------------------------------------------- */ 402/* -- Common C call handling ---------------------------------------------- */
403 403
404/* Infer the destination CTypeID for a vararg argument. */ 404/* Infer the destination CTypeID for a vararg argument. */
405static CTypeID ccall_ctid_vararg(CTState *cts, cTValue *o) 405CTypeID lj_ccall_ctid_vararg(CTState *cts, cTValue *o)
406{ 406{
407 if (tvisnumber(o)) { 407 if (tvisnumber(o)) {
408 return CTID_DOUBLE; 408 return CTID_DOUBLE;
@@ -506,7 +506,7 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct,
506 } else { 506 } else {
507 if (!(ct->info & CTF_VARARG)) 507 if (!(ct->info & CTF_VARARG))
508 lj_err_caller(L, LJ_ERR_FFI_NUMARG); /* Too many arguments. */ 508 lj_err_caller(L, LJ_ERR_FFI_NUMARG); /* Too many arguments. */
509 did = ccall_ctid_vararg(cts, o); /* Infer vararg type. */ 509 did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */
510 isva = 1; 510 isva = 1;
511 } 511 }
512 d = ctype_raw(cts, did); 512 d = ctype_raw(cts, did);