summaryrefslogtreecommitdiffstats
path: root/Modules/_json.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30243: Fixed the possibility of a crash in _json. (#1420)Serhiy Storchaka2017-05-051-66/+20
| | | | | | It was possible to get a core dump by using uninitialized _json objects. Now __new__ methods create initialized objects. __init__ methods are removed.
* bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-1/+1
| | | | (#748)
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-6/+3
| | | | possible but Coccinelle couldn't find opportunity.
* Py_SIZE() was misused for dict.Serhiy Storchaka2017-01-131-1/+1
|\
| * Py_SIZE() was misused for dict.Serhiy Storchaka2017-01-131-1/+1
| |\
| | * Py_SIZE() was misused for dict.Serhiy Storchaka2017-01-131-1/+1
| | |
* | | Fixed possible reference leaks in the _json module.Serhiy Storchaka2017-01-031-4/+9
|\ \ \ | |/ /
| * | Fixed possible reference leaks in the _json module.Serhiy Storchaka2017-01-031-4/+9
| |\ \ | | |/
| | * Fixed possible reference leaks in the _json module.Serhiy Storchaka2017-01-031-4/+9
| | |
* | | Don't parenthesis in _PyObject_CallMethodId() formatVictor Stinner2016-12-081-1/+1
| | | | | | | | | | | | | | | Issue #28915: Without parenthesis, _PyObject_CallMethodId() avoids the creation a temporary tuple, and so is more efficient.
* | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-6/+6
| | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* | Issue #26719: More efficient formatting of ints and floats in json.Serhiy Storchaka2016-04-101-52/+4
|\ \ | |/
| * Issue #26719: More efficient formatting of ints and floats in json.Serhiy Storchaka2016-04-101-52/+4
| |
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-2/+2
|/ | | | private functions.
* Issue #24683: Fixed crashes in _json functions called with arguments ofSerhiy Storchaka2015-07-261-2/+10
|\ | | | | | | inappropriate type.
| * Issue #24683: Fixed crashes in _json functions called with arguments ofSerhiy Storchaka2015-07-261-2/+10
| | | | | | | | inappropriate type.
* | prevent integer overflow in escape_unicode (closes #24522)Benjamin Peterson2015-06-271-3/+9
| |
* | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-7/+17
|\ \ | |/ | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-7/+17
| | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* | merge 3.4 (#24094)Benjamin Peterson2015-05-031-28/+3
|\ \ | |/
| * merge 3.3 (#24094)Benjamin Peterson2015-05-031-28/+3
| |\
| | * just sort the items tuple directly (closes #24094)Benjamin Peterson2015-05-031-27/+3
| | |
* | | Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpatVictor Stinner2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | _codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw modules. pyexpat.c doesn't need to redeclare PyMODINIT_FUNC, it's already declared in Include/pyport.h.
* | | Issue #22883: Got rid of outdated references to PyInt and PyString in comments.Serhiy Storchaka2015-02-171-4/+4
| | |
* | | merge 3.4 (#23369)Benjamin Peterson2015-02-011-4/+11
|\ \ \ | |/ /
| * | merge 3.3 (#23369)Benjamin Peterson2015-02-011-4/+11
| |\ \ | | |/
| | * fix possible overflow in encode_basestring_ascii (closes #23369)Benjamin Peterson2015-02-011-4/+11
| | |
* | | Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.Serhiy Storchaka2015-01-261-11/+10
| | |
* | | Issue #23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the ↵Antoine Pitrou2015-01-111-3/+130
|/ / | | | | | | default case of ``ensure_ascii=True``. Patch by Naoki Inada.
* | Issue #22338: Fix a crash in the json module on memory allocation failure.Victor Stinner2014-09-101-1/+2
| |
* | merge 3.3Benjamin Peterson2014-04-141-4/+5
|\ \ | |/
| * merge 3.2Benjamin Peterson2014-04-141-4/+5
| |\
| | * disallow a negative idx parameterBenjamin Peterson2014-04-141-4/+5
| | |
* | | merge 3.3Benjamin Peterson2014-04-141-1/+4
|\ \ \ | |/ /
| * | merge 3.2Benjamin Peterson2014-04-141-1/+4
| |\ \ | | |/
| | * in scan_once, prevent the reading of arbitrary memory when passed a negative ↵Benjamin Peterson2014-04-141-1/+4
| | | | | | | | | | | | | | | | | | index Bug reported by Guido Vranken.
* | | Issue #11489: JSON decoder now accepts lone surrogates.Serhiy Storchaka2013-11-261-19/+7
|\ \ \ | |/ /
| * | Issue #11489: JSON decoder now accepts lone surrogates.Serhiy Storchaka2013-11-261-19/+7
| | |
* | | Close #18264: int- and float-derived enums now converted to int or float.Ethan Furman2013-08-101-7/+58
| | |
* | | Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() inChristian Heimes2013-01-031-0/+2
|\ \ \ | |/ / | | | | | | | | | non-pydebug builds. Several extension modules now compile cleanly when assert()s are enabled in standard builds (-DDEBUG flag).
| * | Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() inChristian Heimes2013-01-031-0/+2
| | | | | | | | | | | | | | | non-pydebug builds. Several extension modules now compile cleanly when assert()s are enabled in standard builds (-DDEBUG flag).
* | | #16009: JSON error messages now provide more information. Patch by Serhiy ↵Ezio Melotti2013-01-031-24/+24
| | | | | | | | | | | | Storchaka.
* | | Issue #16590: remove obsolete compatibility code from the _json module.Antoine Pitrou2012-12-011-40/+5
| | | | | | | | | | | | Patch by Serhiy Storchaka.
* | | Issue #16228: Fix a crash in the json module where a list changes size while ↵Antoine Pitrou2012-11-011-7/+3
|\ \ \ | |/ / | | | | | | | | | | | | it is being encoded. Patch by Serhiy Storchaka.
| * | Issue #16228: Fix a crash in the json module where a list changes size while ↵Antoine Pitrou2012-11-011-7/+3
| |\ \ | | |/ | | | | | | | | | | | | it is being encoded. Patch by Serhiy Storchaka.
| | * Issue #16228: Fix a crash in the json module where a list changes size while ↵Antoine Pitrou2012-11-011-7/+3
| | | | | | | | | | | | | | | | | | it is being encoded. Patch by Serhiy Storchaka.
* | | Issue #16330: Use surrogate-related macrosVictor Stinner2012-10-301-11/+10
|/ / | | | | | | Patch written by Serhiy Storchaka.
* | Issue #5067: improve some json error messages.Antoine Pitrou2012-06-281-4/+4
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
| * Issue #5067: improve some json error messages.Antoine Pitrou2012-06-281-4/+4
| | | | | | | | Patch by Serhiy Storchaka.