| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* Fix integer overflows due to using wrong integer size.
* Add assertions / panic when overflow still happens.
Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
|
|
|
| |
Co-authored-by: Jesper Lundgren <jesperlundgren@exosite.com>
|
|
|
|
| |
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Create a separate buffer and translate comma <> dot before calling
strtod(), and after calling sprintf() as required.
- Add "update_locale" Lua API call and init locale on module load.
- Move sprintf format string to fpconv
|
|
|
|
|
|
| |
Add cjson.encode_number_precision(). Reducing the number precision from
14 to 3 can increase performance up to 50% with number heavy
conversions.
|
| |
|
| |
|
|
|
|
|
| |
The preallocated buffer removes the need for buffer length checks while
processing strings and results in a 10 - 15% speedup.
|
|
|
|
|
| |
Add strbuf_reset() to reset string length and hide the string
implementation.
|
|
|
|
|
|
|
|
| |
The separate strbuf_append_number() function avoids a potential double
call to the slow vsnprintf() function required by strbuf_append_fmt().
Also inline strbuf_append_mem() since it is very simple and will
be used often.
|
| |
|
|
|
|
|
|
| |
- Check stack usage during decode to prevent crashing in excessively
nested data structures.
- Preallocate the required memory for json_append_string().
|
|
|
|
|
| |
- Change default to 1024 byte strings and doubling in size
- Add strbuf debug statistics
|
|
|
|
|
|
|
|
| |
- Support strbuf_free() when strbuf is not dynamically created.
- Ensure strbuf_free_to_string() returns a null terminated string.
- Tidy API function naming.
- Add strbuf_append_string(), strbuf_string().
- Allocate initial buffer in strbuf_init().
|
|
Split Lua JSON from parent project to create standalone module.
Remove unnecesssary files from new repo.
|