David Malcolm
9696088b6d
Issue #10288 : The deprecated family of "char"-handling macros
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc
instead.
15 years ago
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
15 years ago
Senthil Kumaran
f77342076e
Merged revisions 84629 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84629 | senthil.kumaran | 2010-09-08 18:20:29 +0530 (Wed, 08 Sep 2010) | 3 lines
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
........
16 years ago
Senthil Kumaran
9a9dd1c140
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
16 years ago
Antoine Pitrou
bc760d9f45
Merged revisions 84070,84074 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84070 | antoine.pitrou | 2010-08-15 19:12:55 +0200 (dim., 15 août 2010) | 5 lines
Fix some compilation warnings under 64-bit Windows (issue #9566 ).
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
........
r84074 | antoine.pitrou | 2010-08-15 19:41:31 +0200 (dim., 15 août 2010) | 3 lines
Fix (harmless) warning with MSVC.
........
16 years ago
Antoine Pitrou
0010d37a43
Fix some compilation warnings under 64-bit Windows (issue #9566 ).
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
16 years ago
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
va_copy, but available on all python platforms. Untabified a few
unrelated files.
16 years ago
Mark Dickinson
cf940c701f
Issue #9530 : Fix undefined-behaviour-inducing overflow checks in bytes and bytearray implementations.
16 years ago
Senthil Kumaran
c3ce882c75
Merged revisions 83882 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83882 | senthil.kumaran | 2010-08-09 14:33:57 +0530 (Mon, 09 Aug 2010) | 3 lines
spelling mistake.
........
16 years ago
Senthil Kumaran
f2de1ffc88
spelling mistake.
16 years ago
Senthil Kumaran
a3aee53776
Merged revisions 83880 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83880 | senthil.kumaran | 2010-08-09 14:26:25 +0530 (Mon, 09 Aug 2010) | 3 lines
Fix Issue5416 - explain negative value for count in bytes object replace.
........
16 years ago
Senthil Kumaran
77210b4fa9
Fix Issue5416 - explain negative value for count in bytes object replace.
16 years ago
Antoine Pitrou
a57aae7d47
Merged revisions 81862 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81862 | antoine.pitrou | 2010-06-09 18:38:55 +0200 (mer., 09 juin 2010) | 9 lines
Merged revisions 81860 via svnmerge from
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
........
................
16 years ago
Antoine Pitrou
d118856049
Merged revisions 81860 via svnmerge from
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
........
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
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.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
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.
........
16 years ago
Benjamin Peterson
0ff8a505c6
Merged revisions 80125,80128,80130 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80125 | benjamin.peterson | 2010-04-16 17:35:32 -0500 (Fri, 16 Apr 2010) | 13 lines
Merged revisions 80123-80124 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80123 | benjamin.peterson | 2010-04-16 17:24:16 -0500 (Fri, 16 Apr 2010) | 1 line
bytearray -> type2test
........
r80124 | benjamin.peterson | 2010-04-16 17:25:57 -0500 (Fri, 16 Apr 2010) | 1 line
fix typo
........
................
r80128 | benjamin.peterson | 2010-04-16 17:51:37 -0500 (Fri, 16 Apr 2010) | 9 lines
Merged revisions 80126 via svnmerge from
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
........
................
r80130 | benjamin.peterson | 2010-04-16 18:00:53 -0500 (Fri, 16 Apr 2010) | 9 lines
Merged revisions 80129 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80129 | benjamin.peterson | 2010-04-16 17:52:44 -0500 (Fri, 16 Apr 2010) | 1 line
tiny simplification
........
................
16 years ago
Benjamin Peterson
8380dd5aa4
Merged revisions 80126 via svnmerge from
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
........
16 years ago
Ezio Melotti
4c81fbb118
Merged revisions 77745 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77745 | ezio.melotti | 2010-01-25 13:58:28 +0200 (Mon, 25 Jan 2010) | 9 lines
Merged revisions 77743 via svnmerge from
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
........
................
16 years ago
Ezio Melotti
5b2b242f07
Merged revisions 77743 via svnmerge from
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
........
16 years ago
Antoine Pitrou
f2c5484f9e
Merged revisions 77461 via svnmerge from
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.
........
16 years ago
Alexandre Vassalotti
41f58a70ac
Issue #7382 : Fix bytes.__getnewargs__.
16 years ago
Alexandre Vassalotti
a5c565a534
Issue #6688 : Optimize PyBytes_FromObject().
- 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.
16 years ago
Alexandre Vassalotti
eb6f8de8bf
Issue #6687 : Moved the special-case for integers out of PyBytes_FromObject.
16 years ago
Eric Smith
0f78bff646
Issue #5748 : bytesobject.c should not have its own private defines for stringlib macros. Also removed unused defines and include for localutil.h.
16 years ago
Benjamin Peterson
308d637c94
Merged revisions 74929 via svnmerge from
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
........
17 years ago
Benjamin Peterson
80688efd6c
rename internal methods of the bytes object to bytes_
17 years ago
Eric Smith
0923d1d8d7
The other half of Issue #1580 : use short float repr where possible.
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.
17 years ago
Georg Brandl
abc387747d
Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
string.maketrans() which actually works on bytes. (Also closes #5675.)
17 years ago
Eric Smith
a3b1ac8dca
Added ',' thousands grouping to int.__format__. See PEP 378.
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).
17 years ago
Alexandre Vassalotti
e2641f45b6
Optimize slicing of bytes and bytearray by avoiding useless copying.
This restores the behavior that was present in Python 2.x.
17 years ago
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.
17 years ago
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.
........
17 years ago
Georg Brandl
09923f3b45
Remove confusing error message in bytes.translate.
17 years ago
Mark Dickinson
fd24b323f9
Issue #4445 : save 3 bytes of memory (on average) per bytes allocation.
(This is a forward port of r67601).
17 years ago
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).
17 years ago
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
18 years ago
Benjamin Peterson
4b24a42f3c
add NULL checking for PyBytes_FromObject; R=Neal
18 years ago
Benjamin Peterson
c15a07333e
make bytes(o) respect __bytes__ #2415
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject.
Reviewer: Barry
18 years ago
Christian Heimes
ce694b78fb
Fixed yet another compiler warning of 64bit builds.
Reviewed by Georg Brandl.
18 years ago
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
........
18 years ago
Amaury Forgeot d'Arc
20443f3043
#3650 : fix a reference leak in bytes.split('x')
Actually the same as r65785, but trunk only has bytearray.
18 years ago
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*.
........
18 years ago
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.
18 years ago
Antoine Pitrou
2f89aa6785
#2538 : bytes objects can only provide read-only buffers
18 years ago
Gregory P. Smith
b7fea62cca
Rename bytesobject.c back to stringobject.c to keep with the PyString theme.
Part of reverting most of r63675 per the mailing list discussion.
18 years ago
Gregory P. Smith
99a3dce92d
More reverting of r63675 per the mailing list discussions. This restores
occurances of PyBytes_ in the code to their original PyString_ names. The
bytesobject.c file will be renamed back to stringobject.c in a future checkin.
18 years ago
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
18 years ago
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.
18 years ago
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.
........
18 years ago