| Commit message (Collapse) | Author | Age |
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently this is more or less a straight off reimplementation,
but this allow further optimizations down the line, especially
for avoiding memory allocations of rpc objects.
Current score for "make functionaltest; make oldtest" on a -DEXITFREE build:
is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Since the rbuffer contents are used by string functions (like sscan,
strlen, etc.), it is not safe to use uninitialized memory. Using
xcalloc ensures the string-based functions do not run past the end of
the buffer.
Closes #5676
|
|\
| |
| | |
Fix for missing output (#4569, ...)
|
| |
| |
| |
| |
| | |
For a terminating process, it's output streams could be closed,
before all data is read.
|
|/
|
|
| |
Still no busted tests. Not tested without HAVE_PREADV.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If at least two escape sequences were read, the beginning of the
second sequence would be off by one and the sequence would be
misinterpreted.
An escape sequence could be split in two parts and be
misinterpreted, when saved in a ring buffer with wrap around.
Fixes #2936
|
|
Extract the RBuffer class from rstream.c and reimplement it as a ring buffer,
a more efficient version that doesn't need to relocate memory.
The old rbuffer_read/rbuffer_write interfaces are kept for simple
reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to
hide wrapping logic when more control is required(such as passing the buffer
pointer to a library function that writes directly to the pointer)
Also add a basic infrastructure for writing helper C files that are only
compiled in the unit test library, and use this to write unit tests for RBuffer
which contains some macros that can't be accessed directly by luajit.
Helped-by: oni-link <knil.ino@gmail.com>
Reviewed-by: oni-link <knil.ino@gmail.com>
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
|