summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Fix ref leak in error case of unicode find, count, formatlongChristian Heimes2013-06-291-3/+11
| | | | | | CID 983315: Resource leak (RESOURCE_LEAK) CID 983316: Resource leak (RESOURCE_LEAK) CID 983317: Resource leak (RESOURCE_LEAK)
* Fix ref leak in error case of unicode indexChristian Heimes2013-06-291-2/+6
| | | | | CID 983319 (#1 of 2): Resource leak (RESOURCE_LEAK) leaked_storage: Variable substring going out of scope leaks the storage it points to.
* Fix ref leak in error case of unicode rindex and rfindChristian Heimes2013-06-291-4/+12
| | | | | | CID 983320: Resource leak (RESOURCE_LEAK) CID 983321: Resource leak (RESOURCE_LEAK) leaked_storage: Variable substring going out of scope leaks the storage it points to.
* Fix memory leak in endswithChristian Heimes2013-06-291-1/+1
| | | | | CID 1040368 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable substring going out of scope leaks the storage it points to.
* Issue #13483: Use VirtualAlloc in obmalloc on Windows.Martin v. Löwis2013-06-271-2/+12
|
* If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.Victor Stinner2013-06-241-1/+1
|
* Issue #9566: More long/Py_ssize_t fixes in tuple and list iterators (it_index)Victor Stinner2013-06-242-5/+5
|
* Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64Victor Stinner2013-06-241-1/+1
|
* Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raiseSerhiy Storchaka2013-06-231-1/+1
|\ | | | | | | OverflowError when an argument of %c format is out of range.
| * Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raiseSerhiy Storchaka2013-06-231-2/+7
| | | | | | | | OverflowError when an argument of %c format is out of range.
* | Fix compilation warning with gcc 4.8 (unused typedef)Antoine Pitrou2013-06-181-1/+0
| |
* | Revert changeset 6661a8154eb3: Issue #3329: Add new APIs to customize memory ↵Victor Stinner2013-06-152-364/+157
| | | | | | | | | | | | allocators The new API require more discussion.
* | Issue #3329: Add new APIs to customize memory allocatorsVictor Stinner2013-06-142-157/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a new PyMemAllocators structure * New functions: - PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory allocator functions - PyMem_GetRawAllocators(), PyMem_SetRawAllocators() - PyMem_GetAllocators(), PyMem_SetAllocators() - PyMem_SetupDebugHooks() - _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators() * Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0) * Add unit test for new get/set allocators functions * PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls back on PyMem_Realloc() instead of realloc() * PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(), instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
* | Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* | merge 3.3 (#18183)Benjamin Peterson2013-06-101-24/+19
|\ \ | |/
| * remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value ↵Benjamin Peterson2013-06-101-31/+26
| | | | | | | | (see #18183)
* | Issue #9566: Fix compiler warning on Windows 64-bitVictor Stinner2013-06-041-3/+5
| |
* | Issue #9566: Fix a compiler warning on Windows 64-bit in namespace_init()Victor Stinner2013-06-041-1/+1
| | | | | | | | | | | | The result type is int, return -1 to avoid a compiler warning (cast Py_ssize_t to int). PyObject_Size() can only fail with -1, and anyway a constructor should return -1 on error, not an arbitrary negative number.
* | Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tupleVictor Stinner2013-06-041-1/+1
| | | | | | | | | | iterators: change the C type of tupleiterobject.it_index from long to Py_ssize_t.
* | Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macrosVictor Stinner2013-06-043-26/+11
| | | | | | | | multiprocessing.h: remove unused MIN and MAX macros
* | Close #17932: Fix an integer overflow issue on Windows 64-bit in iterators:Victor Stinner2013-06-041-1/+1
| | | | | | | | change the C type of seqiterobject.it_index from long to Py_ssize_t.
* | Issue #9369: The types of `char*` arguments of PyObject_CallFunction() andSerhiy Storchaka2013-05-291-7/+10
| | | | | | | | | | PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
* | rewrite the parsing of field names to be more consistent wrt recursive expansionBenjamin Peterson2013-05-171-62/+53
| |
* | merge 3.3Benjamin Peterson2013-05-171-2/+8
|\ \ | |/
| * only recursively expand in the format spec (closes #17644)Benjamin Peterson2013-05-171-2/+8
| |
* | mergeRaymond Hettinger2013-05-171-7/+11
|\ \ | |/
| * Issue #17563: Fix dict resize performance regression.Raymond Hettinger2013-05-171-7/+11
| |
| * when arguments are cells clear the locals slot (backport of #17927)Benjamin Peterson2013-05-151-0/+12
| |
* | Backout c89febab4648 following private feedback by Guido.Antoine Pitrou2013-05-142-266/+239
| | | | | | | | (Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
* | when an argument is a cell, set the local copy to NULL (see #17927)Benjamin Peterson2013-05-121-3/+11
| |
* | Touch up grammar for dict.update() docstring.Brett Cannon2013-05-111-4/+4
| |
* | Issue #17237: Fix crash in the ASCII decoder on m68k.Antoine Pitrou2013-05-111-0/+9
|\ \ | |/
| * Issue #17237: Fix crash in the ASCII decoder on m68k.Antoine Pitrou2013-05-111-0/+9
| |
* | #17927: Keep frame from referencing cell-ified arguments.Guido van Rossum2013-05-101-0/+4
| |
* | Issue #17807: Generators can now be finalized even when they are part of a ↵Antoine Pitrou2013-05-082-239/+266
| | | | | | | | reference cycle.
* | Use Py_intptr_t to store the difference between two pointers, instead of intVictor Stinner2013-05-071-1/+1
| | | | | | | | Fix a compiler warning on Windows 64-bit
* | Fix uninitialized value in charmap_decode_mapping()Victor Stinner2013-05-061-1/+1
| |
* | Issue #7330: Implement width and precision (ex: "%5.3s") for the format stringVictor Stinner2013-05-061-46/+109
| | | | | | | | of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
* | Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-5/+17
|\ \ | |/ | | | | the interpreter is shutdown and then started again.
| * Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-5/+17
| | | | | | | | the interpreter is shutdown and then started again.
* | #17115,17116: Have modules initialize the __package__ and __loader__Brett Cannon2013-05-041-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attributes to None. The long-term goal is for people to be able to rely on these attributes existing and checking for None to see if they have been set. Since import itself sets these attributes when a loader does not the only instances when the attributes are None are from someone overloading __import__() and not using a loader or someone creating a module from scratch. This patch also unifies module initialization. Before you could have different attributes with default values depending on how the module object was created. Now the only way to not get the same default set of attributes is to circumvent initialization by calling ModuleType.__new__() directly.
* | Closes #17892: Fix the name of _PyObject_CallMethodObjIdArgsAlexandre Vassalotti2013-05-021-1/+1
| |
* | Merge removal of trailing whitespace from 3.3.Ezio Melotti2013-04-211-7/+7
|\ \ | |/
| * Remove trailing whitespace.Ezio Melotti2013-04-211-7/+7
| |
* | Partial revert of changeset 9744b2df134cVictor Stinner2013-04-181-5/+4
| | | | | | | | | | PyUnicode_Append() cannot call directly resize_compact(): I forgot that a string can be ready *and* not compact (a legacy string can also be ready).
* | Split PyUnicode_DecodeCharmap() into subfunction for readabilityVictor Stinner2013-04-171-178/+213
| |
* | Fix bug in Unicode decoders related to _PyUnicodeWriterVictor Stinner2013-04-171-6/+14
| | | | | | | | Bug introduced by changesets 7ed9993d53b4 and edf029fc9591.
* | Fix typo in unicode_decode_call_errorhandler_writer()Victor Stinner2013-04-171-1/+1
| | | | | | | | Bug introduced by changeset 7ed9993d53b4.
* | Close #17694: Add minimum length to _PyUnicodeWriterVictor Stinner2013-04-175-60/+63
| | | | | | | | | | | | | | | | | | | | | | | | * Add also min_char attribute to _PyUnicodeWriter structure (currently unused) * _PyUnicodeWriter_Init() has no more argument (except the writer itself): min_length and overallocate must be set explicitly * In error handlers, only enable overallocation if the replacement string is longer than 1 character * CJK decoders don't use overallocation anymore * Set min_length, instead of preallocating memory using _PyUnicodeWriter_Prepare(), in many decoders * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
* | Cleanup PyUnicode_Contains()Victor Stinner2013-04-141-11/+6
| | | | | | | | | | | | * No need to double-check that strings are ready: test already done by PyUnicode_FromObject() * Remove useless kind variable (use kind1 instead)