summaryrefslogtreecommitdiff
path: root/Objects/bytesobject.c
AgeCommit message (Collapse)AuthorLines
2010-12-12remove (un)transform methodsBenjamin Peterson-64/+0
2010-12-03Merge branches/pep-0384.Martin v. Löwis-1/+1
2010-12-02#7475: add (un)transform method to bytes/bytearray and str, add back codecs ↵Georg Brandl-0/+64
that can be used with them from Python 2.
2010-11-07str, bytes, bytearray docstring: remove unnecessary [...]Victor Stinner-1/+1
2010-11-07Fix encode/decode method doc of str, bytes, bytearray typesVictor Stinner-3/+3
* Specify the default encoding: write 'utf-8' instead of sys.getdefaultencoding(), because the default encoding is now constant * Specify the default errors value
2010-11-05Issue #10288: The deprecated family of "char"-handling macrosDavid Malcolm-14/+14
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc instead.
2010-10-17make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson-2/+2
2010-09-08Revert the doc change done in r83880. str.replace with negative count value ↵Senthil Kumaran-2/+1
is not a feature.
2010-08-15Fix some compilation warnings under 64-bit Windows (issue #9566).Antoine Pitrou-6/+6
Some of these are genuine bugs with objects bigger than 2GB, but my system doesn't allow me to write tests for it.
2010-08-11Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99Alexander Belopolsky-9/+1
va_copy, but available on all python platforms. Untabified a few unrelated files.
2010-08-10Issue #9530: Fix undefined-behaviour-inducing overflow checks in bytes and ↵Mark Dickinson-34/+23
bytearray implementations.
2010-08-09spelling mistake.Senthil Kumaran-1/+1
2010-08-09Fix Issue5416 - explain negative value for count in bytes object replace.Senthil Kumaran-1/+2
2010-06-09Merged revisions 81860 via svnmerge fromAntoine Pitrou-19/+19
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81860 | antoine.pitrou | 2010-06-09 18:24:00 +0200 (mer., 09 juin 2010) | 3 lines Issue #8930: fix some C code indentation ........
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-2199/+2199
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. ........
2010-04-16Merged revisions 80126 via svnmerge fromBenjamin Peterson-5/+7
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line have a clear error when passing something > sys.maxsize to bytearray ........
2010-01-25Merged revisions 77743 via svnmerge fromEzio Melotti-1/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77743 | ezio.melotti | 2010-01-25 13:24:37 +0200 (Mon, 25 Jan 2010) | 1 line #7775: fixed docstring for rpartition ........
2010-01-13Merged revisions 77461 via svnmerge fromAntoine Pitrou-447/+76
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77461 | antoine.pitrou | 2010-01-13 08:55:48 +0100 (mer., 13 janv. 2010) | 5 lines Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods of bytes, bytearray and unicode objects by using a common implementation based on stringlib's fast search. Patch by Florent Xicluna. ........
2010-01-12Issue #7382: Fix bytes.__getnewargs__.Alexandre Vassalotti-1/+1
2010-01-09Issue #6688: Optimize PyBytes_FromObject().Alexandre Vassalotti-7/+52
- Add special-cases for list and tuple objects. - Use _PyObject_LengthHint() instead of an arbitrary value for the size of the initial buffer of the returned object.
2009-12-31Issue #6687: Moved the special-case for integers out of PyBytes_FromObject.Alexandre Vassalotti-21/+25
2009-11-30Issue #5748: bytesobject.c should not have its own private defines for ↵Eric Smith-16/+2
stringlib macros. Also removed unused defines and include for localutil.h.
2009-09-18Merged revisions 74929 via svnmerge fromBenjamin Peterson-3/+4
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line add keyword arguments support to str/unicode encode and decode #6300 ........
2009-04-18rename internal methods of the bytes object to bytes_Benjamin Peterson-102/+102
2009-04-16The other half of Issue #1580: use short float repr where possible.Eric Smith-0/+1
Addresses the float -> string conversion, using David Gay's code which was added in Mark Dickinson's checkin r71663. Also addresses these, which are intertwined with the short repr changes: - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100' - Issue #5515: 'n' formatting with commas no longer works poorly with leading zeros. - PEP 378 Format Specifier for Thousands Separator: implemented for floats.
2009-04-12Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecateGeorg Brandl-0/+8
string.maketrans() which actually works on bytes. (Also closes #5675.)
2009-04-03Added ',' thousands grouping to int.__format__. See PEP 378.Eric Smith-0/+1
This is incomplete, but I want to get some version into the next alpha. I am still working on: Documentation. More tests. Implement for floats. In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
2009-04-03Optimize slicing of bytes and bytearray by avoiding useless copying.Alexandre Vassalotti-7/+5
This restores the behavior that was present in Python 2.x.
2009-02-02Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson-2/+2
type of tp_compare in a separate commit, for ease of reversion should things go wrong.
2009-01-11Merged revisions 68381 via svnmerge fromBenjamin Peterson-1/+1
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. ........
2008-12-27Remove confusing error message in bytes.translate.Georg Brandl-5/+0
2008-12-06Issue #4445: save 3 bytes of memory (on average) per bytes allocation.Mark Dickinson-10/+18
(This is a forward port of r67601).
2008-10-17STINNER Victor (haypo)'s patch for bug 3988, Byte warning mode and b'' != ''Barry Warsaw-1/+1
Also, his patch to runtests.sh to pass the -bb option (issue 4125).
2008-10-02Merged revisions 66748 via svnmerge fromChristian Heimes-1/+1
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-08-27add NULL checking for PyBytes_FromObject; R=NealBenjamin Peterson-0/+5
2008-08-26make bytes(o) respect __bytes__ #2415Benjamin Peterson-2/+9
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
2008-08-24Fixed yet another compiler warning of 64bit builds.Christian Heimes-1/+1
Reviewed by Georg Brandl.
2008-08-24Closes release blocker #3627.Neal Norwitz-1/+7
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-22#3650: fix a reference leak in bytes.split('x')Amaury Forgeot d'Arc-4/+10
Actually the same as r65785, but trunk only has bytearray.
2008-08-13Merged revisions 65654 via svnmerge fromMartin v. Löwis-15/+15
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-07Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg-1/+1
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-02#2538: bytes objects can only provide read-only buffersAntoine Pitrou-1/+1
2008-06-06Move the codec decode type checks to bytes/bytearray.decode().Marc-André Lemburg-2/+2
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-04Merged revisions 63856-63857,63859-63860 via svnmerge fromMartin v. Löwis-0/+13
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-04Fix misspelling.Georg Brandl-1/+1
2008-05-30Fix all return types for str/bytes/bytearray docstrings and make the wording ↵Georg Brandl-17/+17
more consistent.
2008-05-27clean up some docstrings and errors in bytesobject.cBenjamin Peterson-21/+18
2008-05-26Renamed files bytesobject.[ch] and stringobject.[ch]Christian Heimes-2754/+2883
Fixed Windows build
2008-05-26Renamed PyString to PyBytesChristian Heimes-3/+3
2008-05-26Renamed PyBytes to PyByteArrayChristian Heimes-233/+233