| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
CID 983315: Resource leak (RESOURCE_LEAK)
CID 983316: Resource leak (RESOURCE_LEAK)
CID 983317: Resource leak (RESOURCE_LEAK)
|
|
|
|
|
| |
CID 983319 (#1 of 2): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable substring going out of scope leaks the storage it points to.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
CID 1040368 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable substring going out of scope leaks the storage it points to.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
OverflowError when an argument of %c format is out of range.
|
| |
| |
| |
| | |
OverflowError when an argument of %c format is out of range.
|
| | |
|
| |
| |
| |
| |
| |
| | |
allocators
The new API require more discussion.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
(see #18183)
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
iterators: change the C type of tupleiterobject.it_index from long to
Py_ssize_t.
|
| |
| |
| |
| | |
multiprocessing.h: remove unused MIN and MAX macros
|
| |
| |
| |
| | |
change the C type of seqiterobject.it_index from long to Py_ssize_t.
|
| |
| |
| |
| |
| | |
PyObject_CallMethod() now changed to `const char*`.
Based on patches by Jörg Müller and Lars Buitinck.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
(Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
reference cycle.
|
| |
| |
| |
| | |
Fix a compiler warning on Windows 64-bit
|
| | |
|
| |
| |
| |
| | |
of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
|
|\ \
| |/
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
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).
|
| | |
|
| |
| |
| |
| | |
Bug introduced by changesets 7ed9993d53b4 and edf029fc9591.
|
| |
| |
| |
| | |
Bug introduced by changeset 7ed9993d53b4.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| | |
* No need to double-check that strings are ready: test already done by
PyUnicode_FromObject()
* Remove useless kind variable (use kind1 instead)
|