| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Add _Py_PACK_VERSION for CPython's own definitions
Py_PACK_VERSION was added to limited API in 3.14, so if
Py_LIMITED_API is lower, the macro can't be used.
Add a private version that can be used in CPython headers
for checks like `Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 14)`.
|
| |
|
|
|
|
| |
into a Python bool (#28634)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings when using -Wimplicit-fallthrough compiler flag.
Annotate explicitly "fall through" switch cases with a new
_Py_FALLTHROUGH macro which uses __attribute__((fallthrough)) if
available. Replace "fall through" comments with _Py_FALLTHROUGH.
Add _Py__has_attribute() macro. No longer define __has_attribute()
macro if it's not defined. Move also _Py__has_builtin() at the top
of pyport.h.
Co-Authored-By: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
| |
(GH-21158)
The docs state that the space, tab, colon, and comma characters are
ignored in Py_BuildValue() format strings.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
It is a fixed implementation of PyModule_AddObject() which consistently
steals reference both on success and on failure.
|
|
|
|
|
|
|
|
| |
Deprecate the old Py_UNICODE and PY_UNICODE_TYPE types in the C API:
use wchar_t instead.
Replace Py_UNICODE with wchar_t in multiple C files.
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
| |
|
|
|
| |
There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL.
|
|
|
|
| |
(in Python/) (#102193)
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
| |
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.
|
|
|
|
|
| |
Added PyModule_AddObjectRef() function: similar to
PyModule_AddObjectRef() but don't steal a reference to the value on
success.
|
|
|
|
| |
Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack
|
|
|
|
|
|
|
| |
The PY_SSIZE_T_CLEAN macro must now be defined to use
PyArg_ParseTuple() and Py_BuildValue() "#" formats: "es#", "et#",
"s#", "u#", "y#", "z#", "U#" and "Z#". See the PEP 353.
Update _testcapi.test_buildvalue_issue38913().
|
|
|
|
|
|
|
|
|
| |
Add _PyIndex_Check() function to the internal C API: fast inlined
verson of PyIndex_Check().
Add Include/internal/pycore_abstract.h header file.
Replace PyIndex_Check() with _PyIndex_Check() in C files of Objects
and Python subdirectories.
|
| |
|
|
|
|
| |
exception raised. (GH-18656)
|
|
|
| |
We will remove int support from 3.10 or 4.0.
|
|
|
| |
if pass `accept={int, NoneType}`.
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
|
|
|
|
| |
Sorry, I didn't want to push this change before the review :-( I was pushing a
change into the 2.7 branch.
|
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
| |
Issue #28915: Similar to Py_VaBuildValue(), but work on a C array of PyObject*,
instead of creating a tuple.
|
|
|
|
|
|
|
|
| |
Issue #28915: Py_ssize_t type is better for indexes. The compiler might emit
more efficient code for i++. Py_ssize_t is the type of a PyTuple index for
example.
Replace also "int endchar" with "char endchar".
|
|
|
|
| |
Issue #28915.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #28838: Rename parameters of the "calls" functions of the Python C API.
* Rename 'callable_object' and 'func' to 'callable': any Python callable object
is accepted, not only Python functions
* Rename 'method' and 'nameid' to 'name' (method name)
* Rename 'o' to 'obj'
* Move, fix and update documentation of PyObject_CallXXX() functions
in abstract.h
* Update also the documentaton of the C API (update parameter names)
|
|
|
|
| |
rather of "char *".
|
|
|
|
| |
functions.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Don't pass "()" format to PyObject_CallXXX() to call a function without
argument: pass NULL as the format string instead. It avoids to have to parse a
string to produce 0 argument.
|
| |
|
|\
| |
| |
| | |
format unit.
|
| |
| |
| |
| | |
format unit.
|
|/
|
|
| |
private functions.
|
|
|
|
| |
building an item if the build of a previous item failed.
|
| |
|
|
|
|
|
|
| |
Py_BuildValue("C") doesn't have to check the code point,
PyUnicode_FromOrdinal() checks its input and now supports non-BMP characters
(range U+10000-U+10FFFF).
|
|
|
|
|
| |
va_copy, but available on all python platforms. Untabified a few
unrelated files.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
|
|
|
| |
number support (was broken anyway)
|
| |
|
| |
|
|
|
|
|
|
| |
unicode range
even on "narrow Unicode" builds; the result is a pair of UTF-16 surrogates.
|
| |
|