aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Limit significant digits in numbers.json to 14Mark Pulford2012-03-041-6/+6
| | | | | | The dtoa.c strtod() function slows down significantly when the number of digits exceeds the accuracy of a "double". JSON containing excessive digits is an unrepresentative test, limit to 14 digits.
* Add error checking to dtoa locking primitivesMark Pulford2012-03-041-4/+12
|
* Document dtoa build optionsMark Pulford2012-03-041-0/+16
|
* Use internal dtoa/strtod for double conversionMark Pulford2012-03-046-16/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | The internal Lua CJSON dtoa/strtod routines have locale support disabled. This avoids problems under locales with comma decimal separators. Build changes: - CMake: Check for big endian architectures - Makefile: Provide option to build with dtoa.c Modifications to dtoa.c: - Include locale dtoa_config.h configuration - Rename Infinity/NaN to inf/nan to match common C libraries - Rename strtod() -> internal_strtod() to prevent conflict with libc function Modifications to g_fmt.c: - Return output string length (instead of original buffer pointer) - Provide precision as an argument to g_fmt() - Silence compilations warnings from vendor source - while(a = b) - Unused label "done:" - Only swap to scientific notation when once the number of decimal digits required exceeds the precision available. This matches standard printf format %g. - Display a "0" in front of numbers < 1.
* Merge branch 'vendor-netlib-dtoa'Mark Pulford2012-03-042-0/+4460
|\
| * Added Netlib dtoa.c/g_fmt.c routines (20110428)Mark Pulford2011-12-292-0/+4460
| | | | | | | | See "www.netlib.org/fp/changes" for details.
* | Add support for Lua 5.2 environments to lua2jsonMark Pulford2012-01-031-9/+23
| |
* | Rename encode/decode scripts to lua2json/json2luaMark Pulford2012-01-032-6/+6
| |
* | Convert common.lua into cjson-misc moduleMark Pulford2012-01-035-35/+43
| |
* | Tidy Makefile sections and commentsMark Pulford2012-01-021-17/+16
| |
* | Fix Windows TARGET modificationsMark Pulford2012-01-021-3/+3
| |
* | Fix typos (lists, hexadecimal)Mark Pulford2012-01-022-9/+9
| |
* | Update all package descriptions for consistencyMark Pulford2012-01-023-9/+19
| |
* | Add build option to disable invalid numbersMark Pulford2012-01-014-16/+39
| | | | | | | | | | Windows MinGW doesn't convert Infinity/NaN/hexadecimal numbers. Add DISABLE_INVALID_NUMBERS build option option to disable invalid numbers.
* | Sanitise locale code, comments and documentationMark Pulford2012-01-014-41/+71
| |
* | Add Windows MinGW target to MakefileMark Pulford2012-01-011-4/+12
| |
* | Add NDEBUG to performance CFLAGSMark Pulford2011-12-311-1/+1
| |
* | Remove redundant comment from test.luaMark Pulford2011-12-311-7/+0
| |
* | Update NEWS for 1.0.5Mark Pulford2011-12-311-1/+5
| |
* | Minor code cleanupMark Pulford2011-12-311-10/+12
| | | | | | | | | | | | - Sanitised arg ordering to encode functions - Commented json->tmp to explain why decode string processing uses strbuf_*_unsafe() functions.
* | Remove "update_locale" Lua functionMark Pulford2011-12-312-10/+2
| | | | | | | | | | | | | | Only update the locale when the module is initialised. cjson.new() can be used if the locale changes part way through program execution.
* | Add option for private bufferMark Pulford2011-12-311-26/+44
| | | | | | | | | | | | When encode_keep_buffer is false, a private buffer will be used. This will allow multiple encoders to run within a single Lua state.
* | Fix minor warning from Clang analyzerMark Pulford2011-12-311-1/+1
| |
* | Remove shared current_depth var from cfg structMark Pulford2011-12-311-25/+17
| |
* | Remove strbuf:die() from global symbol tableMark Pulford2011-12-301-1/+1
| |
* | Add support for Lua 5.2 and cjson.newMark Pulford2011-12-308-47/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update all Lua scripts to use new module init style everywhere: local json = require "cjson" Lua CJSON does not register a global table under Lua 5.2. The global table can be disabled under Lua 5.1 with DISABLE_CJSON_GLOBAL. Other changes: - Store CJSON configuration as an upvalue for each function. - Add "cjson.new" function to create another module table with a separate configuration. - Add _NAME and _VERSION variables.
* | Add fpconv to work around comma decimal pointsMark Pulford2011-12-308-20/+206
| | | | | | | | | | | | | | | | 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
* | Remove POSIX locale workaroundMark Pulford2011-12-296-124/+4
| |
* | Display success when all tests passMark Pulford2011-12-301-3/+4
| |
* | Display failed test count (test.lua)Mark Pulford2011-12-261-1/+1
| |
* | Generate git tag based version number for packagesMark Pulford2011-12-261-20/+10
| |
* | Fix typo in lua_cjson.cMark Pulford2011-12-241-1/+1
| |
* | Clarify optional args and return valuesMark Pulford2011-12-201-0/+15
| |
* | Add original JSON parser design outlineMark Pulford2011-12-201-0/+50
| |
* | Add .gitignore for object files, html, extra dirsMark Pulford2011-12-202-0/+9
| |
* | Remove cjson prefix from function headingsMark Pulford2011-12-201-18/+18
| |
* | Add UTF-8 caution to manual (and misc changes)Mark Pulford2011-12-201-10/+24
| |
* | Update manual (various minor improvements)Mark Pulford2011-12-151-84/+79
| | | | | | | | | | | | | | - Fix typo (keep_encode_buffer -> encode_keep_buffer) - Update for consistency - Remove duplicate sparse table example - Change manual to use horizontal item lists
* | Add CMake build documentationMark Pulford2011-12-151-7/+26
| |
* | Remove TODO from releasesMark Pulford2011-12-153-5/+2
| |
* | Update examples in documentationMark Pulford2011-12-151-32/+16
| | | | | | | | | | - Remove block quotes - Add titles
* | Rewrite cjson.encode_sparse_array documentationMark Pulford2011-12-151-29/+25
| |
* | Clean up build options documentation in manualMark Pulford2011-12-151-8/+7
| |
* | Automate package releases with build-packages.shMark Pulford2011-12-158-29/+82
| | | | | | | | | | | | build-packages.sh has several advantages: - Automatically bumps version numbers - Builds HTML documentation on the fly
* | Remove quirks section from manualMark Pulford2011-12-141-74/+55
| | | | | | | | | | | | | | | | Merge quirks section into: - Build overview (locales) - API docs Add API section for variables.
* | Add support for building via CMakeMark Pulford2011-12-132-0/+57
| |
* | Update build testing to show test counts/failuresMark Pulford2011-12-133-7/+28
| | | | | | | | | | Display failed tests, and successful/total test counts. Use "awk" to provide a portable "ggrep -E" with context.
* | Order API functions in manual alphabeticallyMark Pulford2011-12-131-81/+81
| |
* | Remove external VERSION #define for lua_cjson.cMark Pulford2011-12-133-5/+9
| | | | | | | | | | The external #define complicates compilation but is only used in lua_cjson.c and Makefile.
* | Ensure build tests only use the current cjson.soMark Pulford2011-12-131-6/+13
| | | | | | | | Update runtests.sh to exit if an old copy of cjson.so is found.