| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Move the bytes_methods.h header file to the internal C API as
pycore_bytes_methods.h: it only contains private symbols (prefixed by
"_Py"), except of the PyDoc_STRVAR_shared() macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
Adding the const to the type cast, as in:
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
These changes will not change code, but they will make it much easier to check for errors in consts
|
|
|
|
| |
bytearray. (GH-16603)
|
| |
|
|
|
|
| |
* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updates B.index documentation.
* Updates str.index documentation, makes it Argument Clinic compatible.
* Removes ArgumentClinic code.
* Finishes string.index documentation.
* Updates string.rindex documentation.
* Documents B.rindex.
|
|
|
|
| |
messages (#650)
|
| |
|
|
|
|
|
| |
bytearray for integers in and out of the Py_ssize_t range.
Patch by Xiang Zhang.
|
| |
|
|
|
|
| |
to bytes_methods.c.
|
|
|
|
| |
private functions.
|
|\
| |
| |
| | |
and PyObject_AsWriteBuffer().
|
| |
| |
| |
| | |
and PyObject_AsWriteBuffer().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
|/
|
|
| |
Patch by Tal Einat.
|
| |
|
| |
|
|
|
|
| |
bytearray object.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
........
|
|
|
|
| |
using byte values greater than 127. Patch by egreen.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72040 | eric.smith | 2009-04-27 15:04:37 -0400 (Mon, 27 Apr 2009) | 1 line
Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
........
|
|
|
|
| |
string.maketrans() which actually works on bytes. (Also closes #5675.)
|
| |
|
|
to be called a buffer). Shares code with stringobject when possible.
Adds unit tests with common code that should be usable to test the PEPs
mutable buffer() and immutable bytes() types.
http://bugs.python.org/issue1261
|