Serhiy Storchaka
fff9a31a91
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ( #748 )
9 years ago
Serhiy Storchaka
004e03fb0c
bpo-29116: Improve error message for concatenating str with non-str. ( #710 )
9 years ago
Serhiy Storchaka
202fda55c2
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. ( #485 )
9 years ago
Serhiy Storchaka
370fd202f1
Use Py_RETURN_FALSE/Py_RETURN_TRUE rather than PyBool_FromLong(0)/PyBool_FromLong(1). ( #567 )
9 years ago
Serhiy Storchaka
9f8ad3f39e
bpo-29568: Disable any characters between two percents for escaped percent "%%" in the format string for classic string formatting. (GH-513)
9 years ago
Martin Panter
91a8866dc1
Fix grammar in doc string, RST markup
9 years ago
Serhiy Storchaka
228b12edcc
Issue #28999 : Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible. Patch is writen with Coccinelle.
9 years ago
Serhiy Storchaka
2a404b63d4
Issue #28769 : The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
is now of type "const char *" rather of "char *".
9 years ago
Victor Stinner
0c4a828cad
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286 . Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using "boring" positional arguments.
Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain
consistent with the clinic code.
9 years ago
INADA Naoki
15f94596b6
Issue #20180 : forgot to update AC output.
9 years ago
INADA Naoki
3ae2056512
Issue #20180 : convert unicode methods to AC.
9 years ago
Xiang Zhang
b0541f4cdf
Issue #29145 : Fix overflow checks in str.replace() and str.join().
Based on patch by Martin Panter.
9 years ago
Xiang Zhang
ea1cf87030
Issue #29044 : Fix a use-after-free in string '%c' formatter.
9 years ago
Xiang Zhang
b211068f5c
Issue #28822 : Adjust indices handling of PyUnicode_FindChar().
9 years ago
Xavier de Gaye
76febd0792
Issue #26919 : On Android, operating system data is now always encoded/decoded
to/from UTF-8, instead of the locale encoding to avoid inconsistencies with
os.fsencode() and os.fsdecode() which are already using UTF-8.
9 years ago
Serhiy Storchaka
419967b832
Issue #28808 : PyUnicode_CompareWithASCIIString() now never raises exceptions.
9 years ago
Victor Stinner
de4ae3d486
Backed out changeset b9c9691c72c5
Issue #28858 : The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
9 years ago
Victor Stinner
27580c1fb5
Replace PyObject_CallFunctionObjArgs() with fastcall
* PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func)
* PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg)
PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires
extra work to "parse" C arguments to build a C array of PyObject*.
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
This change is part of the fastcall project. The change on listsort() is
related to the issue #23507 .
9 years ago
Serhiy Storchaka
99250d5c63
Issue #28774 : Simplified encoding a str result of an error handler in ASCII
and Latin1 encoders.
9 years ago
Xiang Zhang
d04d8474df
Issue #28774 : Fix start/end pos in unicode_encode_ucs1().
Fix error position of the unicode error in ASCII and Latin1
encoders when a string returned by the error handler contains multiple
non-encodable characters (non-ASCII for the ASCII codec, characters out
of the U+0000-U+00FF range for Latin1).
9 years ago
Serhiy Storchaka
ac0720eaa4
Issue #28760 : Clean up and fix comments in PyUnicode_AsUnicodeEscapeString().
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
460bd0d284
Issue #19569 : Compiler warnings are now emitted if use most of deprecated
functions.
9 years ago
Serhiy Storchaka
a83a6a3275
Issue #28701 : _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString now
require ASCII right argument and assert this condition in debug build.
9 years ago
Serhiy Storchaka
292dd1b2ad
Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701 ).
9 years ago
Serhiy Storchaka
dddec81b2d
Issue #21449 : Removed private function _PyUnicode_CompareWithId.
9 years ago
Serhiy Storchaka
f5894dd646
Issue #28701 : Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.
The latter function is more readable, faster and doesn't raise exceptions.
Based on patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
f4934ea77d
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
9 years ago
Serhiy Storchaka
b626643734
Issue #28648 : Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters.
9 years ago
Steve Dower
78057b4159
Closes #27781 : Removes special cases for the experimental aspect of PEP 529
9 years ago
Eric V. Smith
5646648678
Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6.
9 years ago
Eric V. Smith
42454af094
Issue 28128: Print out better error/warning messages for invalid string escapes.
9 years ago
Serhiy Storchaka
0093907f0e
Issue #28426 : Deprecated undocumented functions PyUnicode_AsEncodedObject(),
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
PyUnicode_AsEncodedUnicode().
9 years ago
Serhiy Storchaka
c8bc3d1c07
Issue #28408 : Fixed a leak and remove redundant code in _PyUnicodeWriter_Finish().
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
77eede35fc
Issue #28426 : Fixed potential crash in PyUnicode_AsDecodedObject() in debug build.
9 years ago
Serhiy Storchaka
2fbc019c8c
Issue #28439 : Remove redundant checks in PyUnicode_EncodeLocale and
PyUnicode_DecodeLocaleAndSize. Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
f8d7d41507
Issue #28511 : Use the "U" format instead of "O!" in PyArg_Parse*.
9 years ago
Serhiy Storchaka
523c449ca0
Issue #28504 : Cleanup unicode_decode_call_errorhandler_wchar/writer.
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
467ab194fc
Issue #28410 : Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.
_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python
raise exception(format % args) from sys.exc_info()[1]
9 years ago
Benjamin Peterson
8d761ff045
remove extra PyErr_Format arguments ( closes #28454 )
Patch from Xiang Zhang.
9 years ago
Victor Stinner
ebe17e0347
Fix _Py_normalize_encoding() command
It's not exactly the same than encodings.normalize_encoding(): the C function
also converts to lowercase.
9 years ago
Benjamin Peterson
b329e1bb5b
va_end vargs2 once ( closes #28417 )
9 years ago
Serhiy Storchaka
2e58f1a52a
Issue #28400 : Removed uncessary checks in unicode_char and resize_copy.
1. In resize_copy we don't need to PyUnicode_READY(unicode) since when
it's not PyUnicode_WCHAR_KIND it should be ready.
2. In unicode_char, PyUnicode_1BYTE_KIND is handled by get_latin1_char.
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
9c0e1f83af
Issue #28379 : Added sanity checks and tests for PyUnicode_CopyCharacters().
Patch by Xiang Zhang.
9 years ago
Victor Stinner
1ddf53d496
Fix PyUnicode_FromFormatV() error handling
Issue #28233 : Fix a memory leak if the format string contains a non-ASCII
character, destroy the unicode writer.
9 years ago
Christian Heimes
2f2fee19ec
va_end() all va_copy()ed va_lists.
9 years ago
Benjamin Peterson
0c21214f3e
replace usage of Py_VA_COPY with the (C99) standard va_copy
9 years ago
Christian Heimes
f051e43b22
Issue #28126 : Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
9 years ago
Benjamin Peterson
621b430a14
remove all usage of Py_LOCAL
9 years ago
Benjamin Peterson
33d2a492d0
promote some shifts to unsigned, so as not to invoke undefined behavior
9 years ago
R David Murray
110b6fecbb
#27364 : Deprecate invalid escape strings in str/byutes.
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
9 years ago