| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
|
|
|
| |
compiled with NSMALLPOSINTS = 0.
|
| |
|
|
|
|
| |
Based on patch by Ville Skyttä.
|
| |
|
|\
| |
| |
| |
| | |
__bytes__, __trunc__, and __float__ returning instances of subclasses of
bytes, int, and float to subclasses of bytes, int, and float correspondingly.
|
| |
| |
| |
| |
| | |
__bytes__, __trunc__, and __float__ returning instances of subclasses of
bytes, int, and float to subclasses of bytes, int, and float correspondingly.
|
| |
| |
| |
| |
| |
| | |
avoid undefined behaviour when LONG_MAX type is smaller than 60 bits.
This change should fix a warning with the ICC compiler.
|
| |
| |
| |
| |
| |
| | |
now is
deprecated. Based on patch by Mark Dickinson.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required. (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
|
| |
| |
| |
| | |
Corresponding functions now accept `const char *` (issue #1772673).
|
| |
| |
| |
| |
| |
| |
| | |
warnings in the Objects/ subdirectory.
PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative
slot identifiers.
|
| |
| |
| |
| |
| | |
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
|
|/
|
|
| |
TypeError. Patch by Josh Rosenberg.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| | |
return not int instance. Introduced _PyLong_FromNbInt() and refactored
PyLong_As*() functions.
|
| |
| |
| |
| |
| | |
return not int instance. Introduced _PyLong_FromNbInt() and refactored
PyLong_As*() functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The PyObject_INIT() macros returns obj:
../cpython/Objects/methodobject.c:32:23: warning: expression result unused [-Wunused-value]
PyObject_INIT(op, &PyCFunction_Type);
^~
../cpython/Include/objimpl.h:139:69: note: expanded from macro 'PyObject_INIT'
( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) )
^
1 warning generated.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce the base by the modulus when the base is larger than
the modulus. This can unboundedly speed the "startup costs"
of doing modular exponentiation, particularly in cases where
the base is much larger than the modulus. Original patch
by Armin Rigo, inspired by https://github.com/pyca/ed25519.
Merged from 3.3.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce the base by the modulus when the base is larger than
the modulus. This can unboundedly speed the "startup costs"
of doing modular exponentiation, particularly in cases where
the base is much larger than the modulus. Original patch
by Armin Rigo, inspired by https://github.com/pyca/ed25519.
|
|\ \
| |/
| |
| | |
error messages and comments.
|
| |
| |
| |
| | |
error messages and comments.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- replace 'long int' / 'long' by 'int'
- fix capitalization of "Python" in PyLong_AsUnsignedLong
- "is too large" -> "too large", for consistency with other messages.
|
| |
| |
| |
| |
| |
| |
| |
| | |
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
|
| |
| |
| |
| | |
small integers (0 or 1 digit)
|
| |
| |
| |
| | |
PyLong_FromLong() failure
|
| |
| |
| |
| | |
multiprocessing.h: remove unused MIN and MAX macros
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
objects as the base by using PyNumber_AsSsize_t similar to round().
|
| | |
| | |
| | |
| | | |
Consistent with the behavior in Python 2.
|
| | |
| | |
| | |
| | | |
PyLong_FromVoidPtr.
|