[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_number2int and cast_int
- From: cloudwu <cloudwu@...>
- Date: Tue, 13 Jun 2006 19:28:46 +0800
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
[忘掉自己,你就会变得勇敢;关怀?人,才能让你?得尊重]