Roberto Ierusalimschy
279c3a6961
A few changes in tests about number of bits in integers
...
- The preprocessor must work with at least 'long', and therefore must
do shifts of up to 31 bits correctly.
- Whenever possible, use unsigned types in shifts.
2019-05-13 16:17:21 -03:00
Roberto Ierusalimschy
49c42f3615
Some improvements in 'luaconf.h'
...
Added '#if !defined' in some definitions to allow external definitions;
more comments; other small changes.
2019-05-13 14:24:10 -03:00
Roberto Ierusalimschy
39bb3cf242
Name 'nonstrict' in the UTF-8 library changed to 'lax'
...
It is not a good idea to use negative words to describe boolean
values. (When we negate that boolean we create a double negative...)
2019-03-19 11:15:49 -03:00
Roberto Ierusalimschy
1e0c73d5b6
Changes in the validation of UTF-8
...
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.
2019-03-15 13:14:17 -03:00
Roberto Ierusalimschy
fb18346ddd
Avoid using 'int' for UTF-8 values
...
An 'int' may have only 16 bits, so it may not be big enough for UTF-8
values. The new type 'utfint' (in the utf8 library) ensures at least
21 bits for those values.
2018-07-12 15:56:44 -03:00
Roberto Ierusalimschy
1a1b2f3d7f
added 'return' to calls to 'luaL_error' (to signal to the compiler
...
that the function cannot continue past that call)
2017-03-14 09:40:44 -03:00
Roberto Ierusalimschy
2a235312f0
detail (removing spaces at end of lines)
2016-12-22 11:08:50 -02:00
Roberto Ierusalimschy
f2a813ae10
details (avoid some 'lint' warnings)
2015-03-28 16:16:55 -03:00
Roberto Ierusalimschy
297512b34c
avoid using 'lua_pushliteral' in a non-zero-terminated string
2015-03-05 13:07:46 -03:00
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
...
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
745618d941
'charpatt' -> 'charpattern'
2014-10-15 11:31:10 -03:00
Roberto Ierusalimschy
34b6664dcb
better to use 'long' to represent UTF-8 code points
2014-10-01 08:52:33 -03:00
Roberto Ierusalimschy
f14662fca6
detail (added placeholders for non-function fields to preallocate
...
space for them)
2014-07-16 10:56:14 -03:00
Roberto Ierusalimschy
e58ef8d0bb
missing macro 'LUAMOD_API' in function to open library
2014-05-14 15:33:37 -03:00
Roberto Ierusalimschy
e1daf10e4c
details in comments
2014-04-11 15:19:07 -03:00
Roberto Ierusalimschy
144afa4d47
several changes in 'utf8.offset'
2014-04-03 10:45:09 -03:00
Roberto Ierusalimschy
3a044de5a1
new implementation for 'utf8.len'
2014-04-02 14:01:22 -03:00
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy
738b3b64af
detail (to avoid warnings with '-O3')
2014-03-20 16:36:02 -03:00
Roberto Ierusalimschy
7707f3e7c3
'posrelat' -> 'u_posrelat' (to avoid name conflict in 'one.c')
2014-03-20 11:11:00 -03:00
Roberto Ierusalimschy
68df7c6279
added proper headers for a standard lib file
2014-02-06 18:03:24 -02:00
Roberto Ierusalimschy
6ccf150039
new library: utf8
2014-02-06 15:32:33 -02:00