Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
...
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
2009-02-02 20:36:42 +00:00
Benjamin Peterson
a4a37fefb6
Merged revisions 68381 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68381 | martin.v.loewis | 2009-01-07 12:40:40 -0600 (Wed, 07 Jan 2009) | 2 lines
Issue #4850 : Change COUNT_ALLOCS variables to Py_ssize_t.
........
2009-01-11 17:13:55 +00:00
Georg Brandl
09923f3b45
Remove confusing error message in bytes.translate.
2008-12-27 23:12:09 +00:00
Mark Dickinson
fd24b323f9
Issue #4445 : save 3 bytes of memory (on average) per bytes allocation.
...
(This is a forward port of r67601).
2008-12-06 15:33:31 +00:00
Barry Warsaw
9e9dcd6d42
STINNER Victor (haypo)'s patch for bug 3988, Byte warning mode and b'' != ''
...
Also, his patch to runtests.sh to pass the -bb option (issue 4125).
2008-10-17 01:50:37 +00:00
Christian Heimes
1a8501c648
Merged revisions 66748 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66748 | christian.heimes | 2008-10-02 21:47:50 +0200 (Thu, 02 Oct 2008) | 1 line
Fixed a couple more C99 comments and one occurence of inline.
........
+ another // comment in bytesobject
2008-10-02 19:56:01 +00:00
Benjamin Peterson
4b24a42f3c
add NULL checking for PyBytes_FromObject; R=Neal
2008-08-27 00:28:34 +00:00
Benjamin Peterson
c15a07333e
make bytes(o) respect __bytes__ #2415
...
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject.
Reviewer: Barry
2008-08-26 16:46:47 +00:00
Christian Heimes
ce694b78fb
Fixed yet another compiler warning of 64bit builds.
...
Reviewed by Georg Brandl.
2008-08-24 16:15:19 +00:00
Neal Norwitz
3ce5d9207e
Closes release blocker #3627 .
...
Merged revisions 65335 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt)
........
r65335 | neal.norwitz | 2008-07-31 10:17:14 -0700 (Thu, 31 Jul 2008) | 1 line
Security patches from Apple: prevent int overflow when allocating memory
........
2008-08-24 07:08:55 +00:00
Amaury Forgeot d'Arc
20443f3043
#3650 : fix a reference leak in bytes.split('x')
...
Actually the same as r65785, but trunk only has bytearray.
2008-08-22 22:05:20 +00:00
Martin v. Löwis
423be95dcf
Merged revisions 65654 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65654 | martin.v.loewis | 2008-08-12 16:49:50 +0200 (Tue, 12 Aug 2008) | 6 lines
Issue #3139 : Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.
More module might need to get converted to use s*.
........
2008-08-13 15:53:07 +00:00
Marc-André Lemburg
4cc0f24857
Rename PyUnicode_AsString -> _PyUnicode_AsString and
...
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.
We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
2008-08-07 18:54:33 +00:00
Antoine Pitrou
2f89aa6785
#2538 : bytes objects can only provide read-only buffers
2008-08-02 21:02:48 +00:00
Marc-André Lemburg
b2750b5d33
Move the codec decode type checks to bytes/bytearray.decode().
...
Use faster PyUnicode_FromEncodedObject() for bytes/bytearray.decode().
Add new PyCodec_KnownEncoding() API.
Add new PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode() APIs.
Add missing PyUnicode_AsDecodedObject() to unicodeobject.h
Fix punicode codec to also work on memoryviews.
2008-06-06 12:18:17 +00:00
Martin v. Löwis
00709aaa3d
Merged revisions 63856-63857,63859-63860 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r63856 | robert.schuppenies | 2008-06-01 18:16:17 +0200 (So, 01 Jun 2008) | 2 lines
Issue #2898 : Added sys.getsizeof() to retrieve size of objects in bytes.
........
r63859 | georg.brandl | 2008-06-01 18:42:16 +0200 (So, 01 Jun 2008) | 2 lines
Some style nits. Also clarify in the docstrings what __sizeof__ does.
........
r63860 | georg.brandl | 2008-06-01 19:05:56 +0200 (So, 01 Jun 2008) | 2 lines
Fix test_descrtut.
........
2008-06-04 14:18:43 +00:00
Georg Brandl
e5d68aceb5
Fix misspelling.
2008-06-04 11:30:26 +00:00
Georg Brandl
17cb8a85d4
Fix all return types for str/bytes/bytearray docstrings and make the wording more consistent.
2008-05-30 08:20:09 +00:00
Benjamin Peterson
4116f36967
clean up some docstrings and errors in bytesobject.c
2008-05-27 00:36:20 +00:00
Christian Heimes
2c9c7a5f33
Renamed files bytesobject.[ch] and stringobject.[ch]
...
Fixed Windows build
2008-05-26 13:42:13 +00:00
Christian Heimes
72b710a596
Renamed PyString to PyBytes
2008-05-26 13:28:38 +00:00
Christian Heimes
9c4756ea26
Renamed PyBytes to PyByteArray
2008-05-26 13:22:05 +00:00
Alexandre Vassalotti
14a767d4f4
Made the TypeError message in bytes_iconcat() less confusing.
...
Before this change, the following example would output:
>>> b = bytearray(b"hello")
>>> b += "world"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't concat bytes to bytearray
2008-05-09 19:50:27 +00:00
Alexandre Vassalotti
e0313f20c0
Re-indented bytes_getbuffer() and bytes_releasebuffer() to 4-space
...
indents.
2008-04-14 20:53:13 +00:00
Alexandre Vassalotti
8dcdb25d58
Improved bytes_extend() to avoid making a full copy of the temporary
...
buffer. This also makes the code slightly cleaner.
2008-04-14 20:51:05 +00:00