summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup hashtable.hVictor Stinner2016-03-231-1/+1
| | | | | | | | | | | | Issue #26588: * Pass the hash table rather than the key size to hash and compare functions * _Py_HASHTABLE_READ_KEY() and _Py_HASHTABLE_ENTRY_READ_KEY() macros now expect the hash table as the first parameter, rather than the key size * tracemalloc_get_traces_fill(): use _Py_HASHTABLE_ENTRY_READ_DATA() rather than pointer dereference * Remove the _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Move "PKEY" and "PDATA" macros inside hashtable.c
* Issue #26588:Victor Stinner2016-03-231-1/+1
| | | | | | | | * _Py_HASHTABLE_ENTRY_DATA: change type from "char *" to "const void *" * Add _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Rename _Py_HASHTABLE_ENTRY_WRITE_DATA() macro to _Py_HASHTABLE_ENTRY_WRITE_PDATA() * Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
* hashtable.h now supports keys of any sizeVictor Stinner2016-03-211-5/+10
| | | | | | Issue #26588: hashtable.h now supports keys of any size, not only sizeof(void*). It allows to support key larger than sizeof(void*), but also to use less memory for key smaller than sizeof(void*).
* Ooops, revert changeset ea9efa06c137Victor Stinner2016-03-211-7/+4
| | | | | | | | | | | Change pushed by mistake, the patch is still under review :-/ """ _tracemalloc: add domain to trace keys * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces """
* _tracemalloc: add domain to trace keysVictor Stinner2016-03-181-4/+7
| | | | | * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces
* Issue #26146: marshal.loads() now uses the empty frozenset singletonVictor Stinner2016-01-231-29/+40
|
* Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-16/+18
| | | | private functions.
* Issue #25899: Converted non-ASCII characters in docstrings and manpageSerhiy Storchaka2015-12-181-2/+2
| | | | to ASCII replacements. Original patch by Chris Angelico.
* Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner2015-03-301-1/+1
| | | | Add _Py_fstat_noraise() function when a Python exception is not welcome.
* Issue #23753: Python doesn't support anymore platforms without stat() orVictor Stinner2015-03-241-4/+0
| | | | | | | fstat(), these functions are always required. Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and DONT_HAVE_FSTAT.
* Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-211-6/+10
| | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
* Issue #23450: Fixed possible integer overflows.Serhiy Storchaka2015-02-161-1/+1
|
* Splitted the WFILE structure to WFILE and RFILE.Serhiy Storchaka2015-02-111-6/+11
|
* Issue #23344: marshal.dumps() is now 20-25% faster on average.Serhiy Storchaka2015-02-111-21/+62
|
* Issue #20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster onSerhiy Storchaka2015-02-111-40/+55
| | | | average.
* Fixed memory leak in marshal.Serhiy Storchaka2015-01-281-1/+3
|\
| * Fixed memory leak in marshal.Serhiy Storchaka2015-01-281-1/+3
| |
* | Issue #22581: Use more "bytes-like object" throughout the docs and comments.Serhiy Storchaka2014-12-051-1/+1
|\ \ | |/
| * Issue #22581: Use more "bytes-like object" throughout the docs and comments.Serhiy Storchaka2014-12-051-1/+1
| |
* | #22734 marshal needs a lower stack depth for debug builds on WindowsSteve Dower2014-11-011-1/+1
| |
* | Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY()Victor Stinner2014-05-141-5/+3
|/ | | | | Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between pyconfig.h and pymacros.h.
* Fix compiler warning (on Windows 64-bit): explicit cast Py_ssize_t to unsignedVictor Stinner2013-11-151-2/+2
| | | | char, n is in range [0; 255] (a tuple cannot have a negative length)
* Issue #19437: Cleanup r_ref() of the marshal moduleVictor Stinner2013-10-311-5/+6
|
* Issue #19437: Fix r_object() of marshal module, handle PyDict_SetItem() failureVictor Stinner2013-10-311-3/+12
| | | | for TYPE_DICT and stop immedialty on first r_object() failure
* Issue #19437: Fix r_object() of marshal module, handle r_byte() failure forVictor Stinner2013-10-311-0/+2
| | | | TYPE_SMALL_TUPLE
* Issue #19437: Fix r_PyLong() of marshal module, stop immediatly at firstVictor Stinner2013-10-311-4/+11
| | | | failure, don't read any more data
* Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-191-3/+3
|
* Close #19260: remove outdated comment in marshal.cAntoine Pitrou2013-10-141-2/+0
|
* Catch a few extra error cases in marshal.cKristján Valur Jónsson2013-10-131-0/+4
|
* Issue #19219 Remove a lot of "retval = NULL" statements, now that retvalKristján Valur Jónsson2013-10-131-79/+22
| | | | is pre-initialized to that value. Test show a 5% speedup as a bonus.
* Issue #19219: retval may be used uninitialized valueChristian Heimes2013-10-131-1/+1
| | | | CID 486239: Uninitialized pointer read (UNINIT)
* Try to fix weird assertion error on the Fedora buildbot.Antoine Pitrou2013-10-121-3/+3
|
* Issue #19219: Speed up marshal.loads(), and make pyc files slightly (5% to ↵Antoine Pitrou2013-10-121-126/+266
| | | | 10%) smaller.
* Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-2/+2
|\ | | | | | | error messages and comments.
| * Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-2/+2
| | | | | | | | error messages and comments.
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-2/+2
| |
* | Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-111-15/+20
|\ \ | |/ | | | | more bytes than requested.
| * Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-111-15/+20
| | | | | | | | more bytes than requested.
* | Fix reference leaks introduced by the patch for issue #5308.Serhiy Storchaka2013-07-111-12/+11
|\ \ | |/
| * Fix reference leaks introduced by the patch for issue #5308.Serhiy Storchaka2013-07-111-12/+11
| |
* | Issue #18408: Fix marshal reader for Unicode strings: handleVictor Stinner2013-07-081-0/+4
| | | | | | | | PyUnicode_DecodeUTF8() failure (ex: MemoryError).
* | marshal: optimize parsing of empty Unicode stringsVictor Stinner2013-06-211-12/+17
| | | | | | | | | | Don't create a temporary buffer of zeroy byte nor call r_string() if the length is zero, create directly the empty string.
* | Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.Antoine Pitrou2013-04-131-46/+1
| | | | | | | | Initial patch by Daniel Riti.
* | Issue #16475 : Correctly handle the EOF when reading marshal streams.Kristján Valur Jónsson2013-03-201-9/+9
| |
* | Issue #16475: Simplify the interface to r_ref_allocate and improve comments.Kristján Valur Jónsson2013-03-201-26/+33
| |
* | fix compiler warningBenjamin Peterson2013-03-201-1/+1
| |
* | Backed out changeset 521232b05b97Benjamin Peterson2013-03-201-1/+1
| |
* | fix compiler warningBenjamin Peterson2013-03-201-1/+1
| |
* | Issue #16475: Support object instancing, recursion and interned stringsKristján Valur Jónsson2013-03-201-27/+245
|/ | | | in marshal
* Issue #5308: Raise ValueError when marshalling too large object (a sequenceSerhiy Storchaka2013-02-131-59/+59
|\ | | | | | | with size >= 2**31), instead of producing illegal marshal data.