| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The PyStdPrinter_Type type now uses the
Py_TPFLAGS_DISALLOW_INSTANTIATION flag to disallow instantiation,
rather than seting a tp_init method which always fail.
Write also unit tests for PyStdPrinter_Type.
|
|
|
|
| |
"fildes". (GH-22620)
|
| |
|
|
|
|
| |
(GH-19472)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bulk of this patch was generated automatically with:
for name in \
PyObject_Vectorcall \
Py_TPFLAGS_HAVE_VECTORCALL \
PyObject_VectorcallMethod \
PyVectorcall_Function \
PyObject_CallOneArg \
PyObject_CallMethodNoArgs \
PyObject_CallMethodOneArg \
;
do
echo $name
git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
done
old=_PyObject_FastCallDict
new=PyObject_VectorcallDict
git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"
and then cleaned up:
- Revert changes to in docs & news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
|
|
|
|
| |
Replace direct acccess to PyObject.ob_refcnt with usage of the
Py_REFCNT() macro.
|
|
|
| |
Moving repetitive `_Py_IDENTIFIER` instances to a global location helps identify them more easily in regards to sub-interpreter support.
|
|
|
|
|
|
| |
* Use the 'p' format unit instead of manually called PyObject_IsTrue().
* Pass boolean value instead 0/1 integers to functions that needs boolean.
* Convert some arguments to boolean only once.
|
|
|
| |
Only AttributeError should be silenced.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
|
|
| |
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
|
|
|
|
| |
(GH-12252)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Split _Py_InitializeCore_impl() into subfunctions: add multiple pycore_init_xxx() functions
* Preliminary sys.stderr is now set earlier to get an usable
sys.stderr ealier.
* Move code into _Py_Initialize_ReconfigureCore() to be able to call
it from _Py_InitializeCore().
* Split _PyExc_Init(): create a new _PyBuiltins_AddExceptions()
function.
* Call _PyExc_Init() earlier in _Py_InitializeCore_impl()
and new_interpreter() to get working exceptions earlier.
* _Py_ReadyTypes() now returns _PyInitError rather than calling
Py_FatalError().
* Misc code cleanup
|
|
|
|
| |
Rename our new MEMORY_SANITIZER define to _Py_MEMORY_SANITIZER.
Project based C Preprocessor namespacing at its finest. :P
|
|
|
|
| |
clang's MemorySanitizer understand getc() but does not understand
getc_unlocked(). Workaround: Don't use it on msan builds.
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
UTF-8 represenatation of Unicode objects.
|
|
|
|
|
|
|
|
| |
Issue #27809:
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
|
|
|
|
|
| |
Issue #27128: PyFile_WriteObject() now calls _PyObject_FastCall() to avoid the
creation of a temporary tuple.
|
|\ |
|
| |
| |
| |
| | |
Restore also errno value before calling PyErr_SetFromErrno().
|
|\ \
| |/
| |
| | |
imported at startup) now uses the backslashreplace error handler.
|
| |
| |
| |
| | |
imported at startup) now uses the backslashreplace error handler.
|
| | |
|
|/
|
|
|
|
|
|
| |
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
|
| |
|
|\
| |
| |
| | |
error messages and comments.
|
| |
| |
| |
| | |
error messages and comments.
|
| |\
| | |
| | |
| | |
| | |
| | | |
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
|
| | |
| | |
| | |
| | |
| | |
| | | |
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
|
| | | |
|
|/ /
| |
| |
| | |
when result of PyLong_AsLong() narrowed to int without checks.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
This function is only by imp.find_module() which does return the filename in a
separated variable.
|
|
|
|
|
|
|
|
|
|
| |
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.
........
|
|
|
|
|
| |
PyUnicode_FromString() to support surrogates in the filename and use the right
encoding
|
|
|
|
|
| |
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
|
| |
|
| |
|
| |
|