[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Macro Names in 5.3w2
- From: Paige DePol <lual@...>
- Date: Sun, 20 Apr 2014 23:32:07 -0500
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~