diff options
Diffstat (limited to 'src/lj_clib.c')
-rw-r--r-- | src/lj_clib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_clib.c b/src/lj_clib.c index 2ea6ff45..8da41a83 100644 --- a/src/lj_clib.c +++ b/src/lj_clib.c | |||
@@ -350,7 +350,8 @@ TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name) | |||
350 | lj_err_callerv(L, LJ_ERR_FFI_NODECL, strdata(name)); | 350 | lj_err_callerv(L, LJ_ERR_FFI_NODECL, strdata(name)); |
351 | if (ctype_isconstval(ct->info)) { | 351 | if (ctype_isconstval(ct->info)) { |
352 | CType *ctt = ctype_child(cts, ct); | 352 | CType *ctt = ctype_child(cts, ct); |
353 | lua_assert(ctype_isinteger(ctt->info) && ctt->size <= 4); | 353 | lj_assertCTS(ctype_isinteger(ctt->info) && ctt->size <= 4, |
354 | "only 32 bit const supported"); /* NYI */ | ||
354 | if ((ctt->info & CTF_UNSIGNED) && (int32_t)ct->size < 0) | 355 | if ((ctt->info & CTF_UNSIGNED) && (int32_t)ct->size < 0) |
355 | setnumV(tv, (lua_Number)(uint32_t)ct->size); | 356 | setnumV(tv, (lua_Number)(uint32_t)ct->size); |
356 | else | 357 | else |
@@ -362,7 +363,8 @@ TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name) | |||
362 | #endif | 363 | #endif |
363 | void *p = clib_getsym(cl, sym); | 364 | void *p = clib_getsym(cl, sym); |
364 | GCcdata *cd; | 365 | GCcdata *cd; |
365 | lua_assert(ctype_isfunc(ct->info) || ctype_isextern(ct->info)); | 366 | lj_assertCTS(ctype_isfunc(ct->info) || ctype_isextern(ct->info), |
367 | "unexpected ctype %08x in clib", ct->info); | ||
366 | #if LJ_TARGET_X86 && LJ_ABI_WIN | 368 | #if LJ_TARGET_X86 && LJ_ABI_WIN |
367 | /* Retry with decorated name for fastcall/stdcall functions. */ | 369 | /* Retry with decorated name for fastcall/stdcall functions. */ |
368 | if (!p && ctype_isfunc(ct->info)) { | 370 | if (!p && ctype_isfunc(ct->info)) { |