| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
an OSError. (GH-11172)
|
|
|
| |
Fix also return type for few other functions (clear, releasebuffer).
|
|
|
|
| |
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
| |
|
|
|
|
|
| |
* Add declarations even if they are overridden by macros.
* Make the declaration and the definition of PyExceptionClass_Name
consistent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During development of the limited API support for PySide,
we saw an error in a macro that accessed a type field.
This patch fixes the 7 errors in the Python headers.
Macros which were not written as capitals were implemented
as function.
To do the necessary analysis again, a script was included that
parses all headers and looks for "->tp_" in serctions which can
be reached with active limited API.
It is easily possible to call this script as a test.
Error listing:
../../Include/objimpl.h:243
#define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \
(Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
Action: commented only
../../Include/objimpl.h:362
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
Action: commented only
../../Include/objimpl.h:364
#define PyObject_GET_WEAKREFS_LISTPTR(o) \
((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
Action: commented only
../../Include/pyerrors.h:143
#define PyExceptionClass_Name(x) \
((char *)(((PyTypeObject*)(x))->tp_name))
Action: implemented function
../../Include/abstract.h:593
#define PyIter_Check(obj) \
((obj)->ob_type->tp_iternext != NULL && \
(obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
Action: implemented function
../../Include/abstract.h:713
#define PyIndex_Check(obj) \
((obj)->ob_type->tp_as_number != NULL && \
(obj)->ob_type->tp_as_number->nb_index != NULL)
Action: implemented function
../../Include/abstract.h:924
#define PySequence_ITEM(o, i)\
( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
Action: commented only
|
|
|
|
|
|
|
|
|
| |
(GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
|
|
|
|
|
|
|
| |
Better account for single-line compound statements and
semi-colon separated statements when suggesting
Py3 replacements for Py2 print statements.
Initial patch by Nitish Chandra.
|
|
|
|
|
|
|
| |
The suggested replacement for print statements previously failed to account
for leading whitespace and hence could end up including unwanted text in
the proposed call to the print builtin.
Patch by Sanyam Khurana.
|
| |
|
| |
|
|
|
|
| |
This function returns the last component of tp_name after a dot.
Returns tp_name itself if it doesn't contain a dot.
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
| |
Subclasses such as IndentError and TabError should not have this message
applied.
|
| |
|
|
|
|
|
|
| |
raised an error.
Replace them with using concrete types API that never fails if appropriate.
|
|
|
| |
attributes.
|
| |
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
| |
|
| |
|
|\
| |
| |
| | |
invalid keyword args.
|
| |
| |
| |
| | |
invalid keyword args.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
| |
| |
| |
| |
| |
| | |
ESHUTDOWN is also exposed conditionally in Modules/errnomodule.c.
Patch by Ed Schouten.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Based on patch by Ville Skyttä.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|/ |
|
|
|
|
|
| |
This patch is manually crafted and contains changes that couldn't be handled
automatically.
|
|
|
|
| |
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
|
|
|
|
| |
macro Py_SETREF.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
and PyObject_AsWriteBuffer().
|
| |
| |
| |
| | |
and PyObject_AsWriteBuffer().
|
|/
|
|
|
|
|
| |
warnings in the Objects/ subdirectory.
PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative
slot identifiers.
|
| |
|