aboutsummaryrefslogtreecommitdiff
path: root/lobject.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Added field 'srclen' to structure 'lua_Debug'Roberto Ierusalimschy2019-04-041-15/+12
| | | | | | This new field gets the length of 'source' in the same structure. Unlike the other strings in that structure, 'source' can be relatively large, and Lua already has its length readily available.
* Changes in the validation of UTF-8Roberto Ierusalimschy2019-03-151-3/+3
| | | | | | | | | | | All UTF-8 encoding functionality (including the escape sequence '\u') accepts all values from the original UTF-8 specification (with sequences of up to six bytes). By default, the decoding functions in the UTF-8 library do not accept invalid Unicode code points, such as surrogates. A new parameter 'nonstrict' makes them accept all code points up to (2^31)-1, as in the original UTF-8 specification.
* New macros for arithmetic/bitwise operations in 'luaV_execute'Roberto Ierusalimschy2018-11-051-1/+1
| | | | | | | The repetitive code of the arithmetic and bitwise operators in the main iterpreter loop was moved to appropriate macros. (As a detail, the function 'luaV_div' was renamed 'luaV_idiv', as it does an "integer division" (floor division).
* Corrections in the implementation of '%' for floats.Roberto Ierusalimschy2018-08-281-5/+1
| | | | | | | | | The multiplication (m*b) used to test whether 'm' is non-zero and 'm' and 'b' have different signs can underflow for very small numbers, giving a wrong result. The use of explicit comparisons solves this problem. This commit also adds several new tests for '%' (both for floats and for integers) to exercise more corner cases, such as very large and very small values.
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* no more 'luaO_nilobject' to avoid comparison of global variable addressesRoberto Ierusalimschy2018-06-011-5/+1
| | | | (now uses static variables)
* 'luaO_pushvfstring' does not need to reallocate stackRoberto Ierusalimschy2018-04-251-10/+12
| | | | (less error cases in the API)
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-3/+1
|
* janitor work on castsRoberto Ierusalimschy2018-01-281-8/+8
|
* typos in commentsRoberto Ierusalimschy2017-12-301-3/+3
|
* detail (typo in comments)Roberto Ierusalimschy2017-11-231-2/+2
|
* detail ('signal' -> 'sign' in comments)Roberto Ierusalimschy2017-11-161-4/+4
|
* new function 'luaV_flttointeger' to convert floats to integers (withoutRoberto Ierusalimschy2017-11-081-2/+2
| | | | | string coercions) + string operands to bitwise operations handled by string metamethods
* raw operation should not convert strings to numbersRoberto Ierusalimschy2017-10-101-2/+2
|
* coercion string->number in arithmetic operations moved to stringRoberto Ierusalimschy2017-07-071-2/+2
| | | | library
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-19/+26
| | | | (we may want to put extra info there in the future)
* assert removed in 'luaO_arith'Roberto Ierusalimschy2017-05-241-2/+1
| | | | (nobody calls it with L==NULL)
* new macro 'lua_pointer2str' to encapsulate use of 'l_sprintf' insideRoberto Ierusalimschy2017-04-191-2/+3
| | | | the kernel
* detail (removing spaces at end of lines)Roberto Ierusalimschy2016-12-221-2/+2
|
* small corrections for C++ complianceRoberto Ierusalimschy2016-06-271-2/+2
|
* do not convert decimal constants with overflow to integers.Roberto Ierusalimschy2016-05-201-2/+8
| | | | (Therefore, they will be converted as floats)
* 'luaO_str2num' (and, therefore, 'lua_stringtonumber', 'number',Roberto Ierusalimschy2016-05-021-10/+46
| | | | | and coercions) accepts both the locale point and a dot as its radix character
* commentsRoberto Ierusalimschy2015-12-141-11/+13
|
* macro 'incr_top' replaced by function 'luaD_inctop'. (It is not usedRoberto Ierusalimschy2015-11-021-3/+3
| | | | in critical time pathes, can save a few bytes without the macro)
* 'luaO_pushvfstring' now uses 'incr_top' to increment top.Roberto Ierusalimschy2015-11-021-10/+10
|
* simpler code for 'luaO_fb2int'Roberto Ierusalimschy2015-06-261-4/+2
|
* using 'snprintf' in C99 (both for documentation of buffer sizesRoberto Ierusalimschy2015-06-181-4/+4
| | | | and some complains from tools)
* some details in 'luaO_int2fb' + more consistent use of the localeRoberto Ierusalimschy2015-04-111-10/+20
| | | | decimal point
* details (avoid 'lint' warnings)Roberto Ierusalimschy2015-03-281-5/+5
|
* macros 'luai_num*' (for float arithmetic operations) moved toRoberto Ierusalimschy2015-02-051-3/+2
| | | | llimits.h.
* removed useless initializationsRoberto Ierusalimschy2014-12-261-2/+2
|
* 'x//y' extended to floatsRoberto Ierusalimschy2014-11-211-4/+5
|
* no need to cast '*s' to unsigned char when we know it is a digit +Roberto Ierusalimschy2014-11-041-4/+4
| | | | no need to call 'luaO_hexavalue' for decimal digits
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+7
| | | | any other header file
* small simplifications in code for 'lua_strx2number'Roberto Ierusalimschy2014-10-281-15/+13
|
* small reorganization of tests around LUA_USE_C99Roberto Ierusalimschy2014-10-271-20/+2
|
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* added some casts to avoid warnings in some compilersRoberto Ierusalimschy2014-10-241-3/+3
|
* macros 'LUA_QL'/'LUA_QL' deprecatedRoberto Ierusalimschy2014-10-171-4/+3
|
* '$c' in 'lua_pushfstring' prints non-printable characters withRoberto Ierusalimschy2014-10-101-2/+5
| | | | their codes
* added two casts to avoid warnings in VSRoberto Ierusalimschy2014-10-041-3/+3
|
* better to use 'long' to represent UTF-8 code pointsRoberto Ierusalimschy2014-10-011-3/+4
|
* details in commentsRoberto Ierusalimschy2014-08-011-2/+2
|
* new macro 'cvt2str' to better control whether numbers are convertibleRoberto Ierusalimschy2014-07-301-7/+32
| | | | to strings
* detail (typos in comments)Roberto Ierusalimschy2014-06-301-3/+3
|
* addition of '.0' to float representation done by the kernelRoberto Ierusalimschy2014-05-121-1/+4
|
* no more integer exponentiationRoberto Ierusalimschy2014-05-121-5/+3
|
* 'lua_strtonum' (and 'luaO_str2num') now return string size, instead ofRoberto Ierusalimschy2014-05-011-12/+12
| | | | receiving it
* 'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which convertsRoberto Ierusalimschy2014-04-301-3/+17
| | | | to float or integer according to the string syntax)
* 'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')Roberto Ierusalimschy2014-04-291-4/+4
|