diff options
author | Jesus Cea <jcea@jcea.es> | 2011-04-20 17:59:29 +0200 |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2011-04-20 17:59:29 +0200 |
commit | 8ace033a89888f3f1e4af7ee37c4176370b4de6b (patch) | |
tree | 660702d6def19b6ab2ce443e9f01d7ea58f6c9bf /Objects/bytesobject.c | |
parent | 67a2d7acf997a69c0592c1753be6a0986006c65f (diff) | |
parent | d3c46aa8ad0cac7b40757fb896c456f8a4dad14c (diff) | |
download | cpython-8ace033a89888f3f1e4af7ee37c4176370b4de6b.tar.gz |
MERGE: startswith and endswith don't accept None as slice index. Patch by Torsten Becker. (closes #11828)
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 97512017e3..7561ae57a3 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -41,10 +41,6 @@ static PyBytesObject *nullstring; #define PyBytesObject_SIZE (offsetof(PyBytesObject, ob_sval) + 1) /* - For both PyBytes_FromString() and PyBytes_FromStringAndSize(), the - parameter `size' denotes number of characters to allocate, not counting any - null terminating character. - For PyBytes_FromString(), the parameter `str' points to a null-terminated string containing exactly `size' bytes. @@ -61,8 +57,8 @@ static PyBytesObject *nullstring; The PyObject member `op->ob_size', which denotes the number of "extra items" in a variable-size object, will contain the number of bytes - allocated for string data, not counting the null terminating character. It - is therefore equal to the equal to the `size' parameter (for + allocated for string data, not counting the null terminating character. + It is therefore equal to the `size' parameter (for PyBytes_FromStringAndSize()) or the length of the string in the `str' parameter (for PyBytes_FromString()). */ |