| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* bpo-35454: Fix miscellaneous minor issues in error handling.
* Fix a null pointer dereference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename Include/internal/ header files:
* pyatomic.h -> pycore_atomic.h
* ceval.h -> pycore_ceval.h
* condvar.h -> pycore_condvar.h
* context.h -> pycore_context.h
* pygetopt.h -> pycore_getopt.h
* gil.h -> pycore_gil.h
* hamt.h -> pycore_hamt.h
* hash.h -> pycore_hash.h
* mem.h -> pycore_mem.h
* pystate.h -> pycore_state.h
* warnings.h -> pycore_warnings.h
* PCbuild project, Makefile.pre.in, Modules/Setup: add the
Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
with #include "pycore_mem.h".
|
|
|
|
| |
sys_setcheckinterval() now uses a local variable to parse arguments,
before writing into interp->check_interval.
|
| |
|
|
|
|
|
| |
(GH-5222)
Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
_PyObject_CallArg1(func, arg)
with
PyObject_CallFunctionObjArgs(func, arg, NULL)
Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
PyObject_CallFunction(func, "O", arg)
and
PyObject_CallFunction(func, "O", arg, NULL)
with
_PyObject_CallArg1(func, arg)
Replace
PyObject_CallFunction(func, NULL)
with
_PyObject_CallNoArg(func)
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
|
|
|
|
| |
UTF-8 represenatation of Unicode objects.
|
|
|
|
|
| |
Since PyUnicodeDecodeError_GetObject() always returns bytes, following
PyBytes_AsString() can be replaced with PyBytes_AS_STRING().
|
|
|
|
| |
This affects documentation, code comments, and a debugging messages.
|
|
|
|
|
| |
Handle PyCapsule_Import() failure (exception) in PyCodec_NameReplaceErrors():
return immedialty NULL.
|
|\
| |
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
| |
| |
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
decoding and translating.
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
"xmlcharrefreplace", and "surrogatepass" error handlers.
|
| |
| |
| |
| | |
"xmlcharrefreplace", and "surrogatepass" error handlers.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|/
|
|
| |
encodings.
|
|
|
|
|
|
|
|
|
| |
- io.TextIOWrapper (and hence the open() builtin) now use the
internal codec marking system added for issue #19619
- also tweaked the C code to only look up the encoding once,
rather than multiple times
- the existing output type checks remain in place to deal with
unmarked third party codecs.
|
|
|
|
|
|
|
|
|
|
| |
str.encode, bytes.decode and bytearray.decode now use an
internal API to throw LookupError for known non-text encodings,
rather than attempting the encoding or decoding operation and
then throwing a TypeError for an unexpected output type.
The latter mechanism remains in place for third party non-text
encodings.
|
|
|
|
|
|
|
|
|
|
| |
The utf-16* and utf-32* encoders no longer allow surrogate code points
(U+D800-U+DFFF) to be encoded.
The utf-32* decoders no longer decode byte sequences that correspond to
surrogate code points.
The surrogatepass error handler now works with the utf-16* and utf-32* codecs.
Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu.
|
| |
|
|
|
|
|
|
|
|
| |
- output type errors now redirect users to the type-neutral
convenience functions in the codecs module
- stateless errors that occur during encoding and decoding
will now be automatically wrapped in exceptions that give
the name of the codec involved
|
| |
|
| |
|
|
|
|
| |
failure
|
| |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Serhiy Storchaka.
|
|/ /
| |
| |
| | |
Patch written by Serhiy Storchaka.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* In debug mode, fill the string data with invalid characters
* Simplify also reference counting in PyCodec_BackslashReplaceErrors()
and PyCodec_XMLCharRefReplaceError()
|
|\ \
| |/
| |
| | |
registry.
|
| |
| |
| |
| | |
registry.
|
| | |
|