lua-users home
lua-l archive

Macro Names in 5.3w2

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


I just noticed there is a discrepancy in the macro names in lobject.h for floating point numbers and thought I would mention it here.
The macro to access the floating value is named `fltvalue`, however, the macro to set the value is named `setnvalue`. The macro to set the integer value is named `ivalue` which matches the setter macro named `setivalue`.
The getter/setter macros seem to use the same letter as the variables defined in the union, however, with the new integer/float number types I can see why the integer macro would be changed; to prevent confusion with previous Lua versions.
Instead of `flt`, however, why not use `r` for "real"? This would then give us `rvalue` and `setrvalue` for the macros. I suppose the variable in the union could also be changed to `r` from `n` for consistency, though not really necessary.
In any case, either `fltvalue` or `setnvalue` should be changed so both macros are using the same naming convention. :)
~pmd~

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