aboutsummaryrefslogtreecommitdiff
path: root/src/lj_lib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_lib.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/lj_lib.c b/src/lj_lib.c
index b6aa97a0..a4bde57a 100644
--- a/src/lj_lib.c
+++ b/src/lj_lib.c
@@ -223,20 +223,6 @@ int32_t lj_lib_optint(lua_State *L, int narg, int32_t def)
223 return (o < L->top && !tvisnil(o)) ? lj_lib_checkint(L, narg) : def; 223 return (o < L->top && !tvisnil(o)) ? lj_lib_checkint(L, narg) : def;
224} 224}
225 225
226int32_t lj_lib_checkbit(lua_State *L, int narg)
227{
228 TValue *o = L->base + narg-1;
229 if (!(o < L->top && lj_strscan_numberobj(o)))
230 lj_err_argt(L, narg, LUA_TNUMBER);
231 if (LJ_LIKELY(tvisint(o))) {
232 return intV(o);
233 } else {
234 int32_t i = lj_num2bit(numV(o));
235 if (LJ_DUALNUM) setintV(o, i);
236 return i;
237 }
238}
239
240GCfunc *lj_lib_checkfunc(lua_State *L, int narg) 226GCfunc *lj_lib_checkfunc(lua_State *L, int narg)
241{ 227{
242 TValue *o = L->base + narg-1; 228 TValue *o = L->base + narg-1;