diff options
author | Mike Pall <mike> | 2014-12-20 00:59:16 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2014-12-20 01:48:00 +0100 |
commit | 5cb6e2eaaf860045daa30208b21ae6aa88a0503c (patch) | |
tree | b0b4c4edfc1a9a0c3f51efbd3c36580447eaa509 /src/lj_ccallback.c | |
parent | 6e9145a882ea70fe438d59959ac4e65481fe5e85 (diff) | |
download | luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.tar.gz luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.tar.bz2 luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.zip |
Cleanup of TValue setters. No functional changes.
Diffstat (limited to 'src/lj_ccallback.c')
-rw-r--r-- | src/lj_ccallback.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c index bef379a5..5fe63a76 100644 --- a/src/lj_ccallback.c +++ b/src/lj_ccallback.c | |||
@@ -411,6 +411,7 @@ static void callback_conv_args(CTState *cts, lua_State *L) | |||
411 | int gcsteps = 0; | 411 | int gcsteps = 0; |
412 | CType *ct; | 412 | CType *ct; |
413 | GCfunc *fn; | 413 | GCfunc *fn; |
414 | int fntp; | ||
414 | MSize ngpr = 0, nsp = 0, maxgpr = CCALL_NARG_GPR; | 415 | MSize ngpr = 0, nsp = 0, maxgpr = CCALL_NARG_GPR; |
415 | #if CCALL_NARG_FPR | 416 | #if CCALL_NARG_FPR |
416 | MSize nfpr = 0; | 417 | MSize nfpr = 0; |
@@ -423,15 +424,17 @@ static void callback_conv_args(CTState *cts, lua_State *L) | |||
423 | ct = ctype_get(cts, id); | 424 | ct = ctype_get(cts, id); |
424 | rid = ctype_cid(ct->info); | 425 | rid = ctype_cid(ct->info); |
425 | fn = funcV(lj_tab_getint(cts->miscmap, (int32_t)slot)); | 426 | fn = funcV(lj_tab_getint(cts->miscmap, (int32_t)slot)); |
427 | fntp = LJ_TFUNC; | ||
426 | } else { /* Must set up frame first, before throwing the error. */ | 428 | } else { /* Must set up frame first, before throwing the error. */ |
427 | ct = NULL; | 429 | ct = NULL; |
428 | rid = 0; | 430 | rid = 0; |
429 | fn = (GCfunc *)L; | 431 | fn = (GCfunc *)L; |
432 | fntp = LJ_TTHREAD; | ||
430 | } | 433 | } |
431 | o->u32.lo = LJ_CONT_FFI_CALLBACK; /* Continuation returns from callback. */ | 434 | o->u32.lo = LJ_CONT_FFI_CALLBACK; /* Continuation returns from callback. */ |
432 | o->u32.hi = rid; /* Return type. x86: +(spadj<<16). */ | 435 | o->u32.hi = rid; /* Return type. x86: +(spadj<<16). */ |
433 | o++; | 436 | o++; |
434 | setframe_gc(o, obj2gco(fn)); | 437 | setframe_gc(o, obj2gco(fn), fntp); |
435 | setframe_ftsz(o, ((char *)(o+1) - (char *)L->base) + FRAME_CONT); | 438 | setframe_ftsz(o, ((char *)(o+1) - (char *)L->base) + FRAME_CONT); |
436 | L->top = L->base = ++o; | 439 | L->top = L->base = ++o; |
437 | if (!ct) | 440 | if (!ct) |