lua-users home
lua-l archive

lua_number2int and cast_int

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello lua,
 I saw in ltable.c line 121, (in function arrayindex) . It uses
 lua_number2int to convet "nvalue(key)" to a "int".
 In lapi.c , line 317. It uses the same way.
 But in lcode.c, line 230/231. It uses "cast_int(nvalue(idx))".
 I think using lua_number2int would be better, isn't it?
-- 
Best regards,
 cloudwu mailto:cloudwu@163.com
 http://www.codingnow.com
[忘掉自己,你就会变得勇敢;关怀?人,才能让你?得尊重]

AltStyle によって変換されたページ (->オリジナル) /