Roberto Ierusalimschy
|
2b4975dca7
|
LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better
support for ANSI systems
|
12 years ago |
Roberto Ierusalimschy
|
e39da66c8c
|
macro 'lua_strx2number' does not need to be global
|
12 years ago |
Roberto Ierusalimschy
|
483c2ccd0f
|
avoid using raw representation of numbers for hashing, as number may
not use all its space (e.g., long double can have sizeof=12 but
use only 10 bytes)
|
12 years ago |
Roberto Ierusalimschy
|
982aa7058f
|
'luaL_len' returns lua_Integer instead of 'int'
|
12 years ago |
Roberto Ierusalimschy
|
80cdf39d0e
|
avoid using 'modf' in the implementation of 'math.modf', to avoid
problems with 'double*'. (When using 'float' as lua_Number,
'float*' is not compatible with 'double*'...)
|
12 years ago |
Roberto Ierusalimschy
|
45f3797a5b
|
'long' may have more than 32 bits in some machines; use 'int' for
small lua_Integer unless necessary to use 'long'
|
12 years ago |
Roberto Ierusalimschy
|
de6e5a5919
|
small bugs uncovered in a 64-bit machine (where 'long' has 64 bits)
|
12 years ago |
Roberto Ierusalimschy
|
81102d3689
|
try to avoid warnings when converting int to pointer
|
12 years ago |
Roberto Ierusalimschy
|
6579bd4190
|
reorganization of warnings + update of explicit dependencies (gcc -MM)
|
12 years ago |
Roberto Ierusalimschy
|
f45177f2d3
|
In the table that hashes constants, use a light userdata as keys
to integer values to avoid collisions with floats with the same
numerical value
|
12 years ago |
Roberto Ierusalimschy
|
d6f5fb2d2c
|
avoid warning for unary minus over an unsigned value
|
12 years ago |
Roberto Ierusalimschy
|
7c4cc505db
|
added "reasonable" limit for 'string.rep' (otherwise it is too easy
to crash the machine)
|
12 years ago |
Roberto Ierusalimschy
|
453450d687
|
new macro 'l_floor' (allows 'floorf' even when other math operations
do not have an 'f' variant)
|
12 years ago |
Roberto Ierusalimschy
|
55f566bd22
|
use lua_Integer for integer parameters to avoid truncation
|
12 years ago |
Roberto Ierusalimschy
|
130c0e40e0
|
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
from Lua; these must fit in a lua_Integer
|
12 years ago |
Roberto Ierusalimschy
|
c72fb1cf8e
|
detail (removed 'assert')
|
12 years ago |
Roberto Ierusalimschy
|
138e69cc55
|
correct error message for floating-point values out of (integer) range
|
12 years ago |
Roberto Ierusalimschy
|
53210d7e5b
|
correct way (I hope) to convert floats to unsigned int
|
12 years ago |
Roberto Ierusalimschy
|
0394314c7a
|
avoid using a negative value to test 'lua_tounsigned'
|
12 years ago |
Roberto Ierusalimschy
|
0beeb4f6fa
|
configuration of number sizes goes "mainstream"
|
12 years ago |
Roberto Ierusalimschy
|
788b251157
|
'math.random' operates with integers when used for integer results
(1 or 2 parameters)
|
12 years ago |
Roberto Ierusalimschy
|
318575627f
|
avoid adding '.0' to "numbers" like "nan" and "inf"
|
12 years ago |
Roberto Ierusalimschy
|
a14992992a
|
new version (5.3)
|
12 years ago |
Roberto Ierusalimschy
|
48adb6984c
|
'io.write' writes integers directly (and correctly)
|
12 years ago |
Roberto Ierusalimschy
|
c5069528e1
|
details ('Type* id' -> 'Type *id')
|
12 years ago |
Roberto Ierusalimschy
|
6fb0b11350
|
string contatenation handles conversion of integers to strings +
floats always format as floats (with decimal dot or exponent)
|
12 years ago |
Roberto Ierusalimschy
|
932e7fb0e1
|
'lua_tounsigned' takes number modulo 2^numbits as a result when
number is a float
(That may change...)
|
12 years ago |
Roberto Ierusalimschy
|
188192ce9a
|
'luai_hashnum' "inlined" into 'hashfloat'
|
12 years ago |
Roberto Ierusalimschy
|
fc083f1138
|
removed all tricks for conversions + 'luai_hashnum' moved to ltable.c
|
12 years ago |
Roberto Ierusalimschy
|
ee865b9fe7
|
new implementation for 'lua_strx2number' to correct small
problems with numbers like 0x10000...000p-100
|
12 years ago |
Roberto Ierusalimschy
|
d630daca1a
|
"legal" way to convert a float to an integer in C
|
12 years ago |
Roberto Ierusalimschy
|
8c883cb4e8
|
'objlen' can return integers
|
12 years ago |
Roberto Ierusalimschy
|
c75cca0559
|
detail (case '%d' of 'luaO_pushvfstring' should use integers)
|
12 years ago |
Roberto Ierusalimschy
|
1414b7123c
|
support for the case when 'l_mathop' does not conform to lua_Number
(problem with pointers to lua_Number solved by a typedef selected
automatically by 'l_mathop')
|
12 years ago |
Roberto Ierusalimschy
|
3563b3f519
|
first version of control for number sizes (still in 'local' section)
|
12 years ago |
Roberto Ierusalimschy
|
d46ed54646
|
no more IEEE tricks
|
12 years ago |
Roberto Ierusalimschy
|
e2c8c756ee
|
removed 'IEEE tricks' (should not be needed in Lua with integers)
|
12 years ago |
Roberto Ierusalimschy
|
5ca5086c19
|
'tonumber' now works with integers too
|
12 years ago |
Roberto Ierusalimschy
|
2d6a0ae149
|
added patch to last bug
|
12 years ago |
Roberto Ierusalimschy
|
b5ec26101f
|
new API function 'lua_cvtonum' to convert a value (number or string)
to a number, following the rules of the language to create integers
or floats
|
12 years ago |
Roberto Ierusalimschy
|
36e8771076
|
'luaO_str2int' more generic: accepts white spaces around the numeral
and handles signal
|
12 years ago |
Roberto Ierusalimschy
|
27f09415e3
|
new read format "*i" for reading integers
|
12 years ago |
Roberto Ierusalimschy
|
4ad9970649
|
uses integers for time
|
12 years ago |
Roberto Ierusalimschy
|
bef345a4b8
|
bug: Wrong error message in some short-cut expressions
|
12 years ago |
Roberto Ierusalimschy
|
0ce3018109
|
'pushnum' pushes a "number" (float) + new C instruction 'pushint'
|
12 years ago |
Roberto Ierusalimschy
|
0233ce0815
|
new function 'math.numbits' (not a final decision)
|
12 years ago |
Roberto Ierusalimschy
|
1f2b82bf25
|
correct way to avoid compile-time errors in integer divisions
|
12 years ago |
Roberto Ierusalimschy
|
f2043b7a58
|
correct error message for conversion errors from float to int
|
12 years ago |
Roberto Ierusalimschy
|
2b1c2c61b0
|
bug: Wrong assert when reporting concatenation errors.
|
12 years ago |
Roberto Ierusalimschy
|
fa6ea831b3
|
macro 'nvalue' removed (direct conversion from integer to double,
without an intermediate variable, can cause "excessive precision"
|
12 years ago |