Benjamin Peterson
ae530c2bab
tiny simplification
2010-04-16 22:52:44 +00:00
Benjamin Peterson
821a8ea39f
have a clear error when passing something > sys.maxsize to bytearray
2010-04-16 22:35:38 +00:00
Mark Dickinson
2d7911eda4
Silence more compiler warnings; fix an instance of potential undefined behaviour from signed overflow.
2010-02-14 12:31:26 +00:00
Mark Dickinson
36ecd676ea
Issue #7788 : Fix a crash produced by deleting a list slice with huge
...
step value. Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Ezio Melotti
1fafaab5e5
#7775 : fixed docstring for rpartition
2010-01-25 11:24:37 +00:00
Antoine Pitrou
e80a6a4ead
Issue #7561 : Operations on empty bytearrays (such as `int(bytearray())`)
...
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL. The macro now returns a statically allocated empty
string instead.
2010-01-17 12:26:20 +00:00
Ezio Melotti
d234208588
Fixed typo
2010-01-14 11:34:10 +00:00
Antoine Pitrou
6467213bfd
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-13 07:55:48 +00:00
Antoine Pitrou
5b7139aab4
Issue #7462 : Implement the stringlib fast search algorithm for the `rfind`,
...
`rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
2010-01-02 21:12:58 +00:00
Mark Dickinson
9d109742c0
Fix missing semicolon
2009-10-15 15:18:55 +00:00
Benjamin Peterson
dc782b55f2
backport keyword argument support for bytearray.decode
2009-09-18 21:46:21 +00:00
Mark Dickinson
135a7cf540
Issue #6847 : s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen Fürstenau.
2009-09-06 10:32:21 +00:00
Mark Dickinson
c8a7c7c3b9
Issue #6846 : bytearray.pop was returning ints in the range [-128, 128)
...
instead of [0, 256). Thanks Hagen Fürstenau for the report and fix.
2009-09-06 10:03:31 +00:00
Georg Brandl
ec812caf5d
Issue #6540 : Fixed crash for bytearray.translate() with invalid parameters.
2009-07-22 11:57:15 +00:00
Eric Smith
cac7af6863
Issue #5793 : rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
2009-04-27 19:04:37 +00:00
Benjamin Peterson
d672001b03
rename internal bytes_ functions to bytearray
2009-04-18 15:31:34 +00:00
Georg Brandl
517cfdcfd9
Whitespace normalization.
2009-04-05 13:16:35 +00:00
Benjamin Peterson
9c1f7b2b04
fix funky indentation
2009-03-08 00:21:17 +00:00
Hirokazu Yamamoto
a3e6c9763c
Fixed memory leak on failure.
2009-03-05 09:34:14 +00:00
Raymond Hettinger
b516370bcb
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
2009-02-02 21:50:13 +00:00
Benjamin Peterson
78821ddf8c
fix building the core with --disable-unicode
...
I changed some bytearray methods to use strings instead of unicode like bytes_repr
Also, bytearray.fromhex() can take strings as well as unicode
2009-01-25 17:15:10 +00:00
Georg Brandl
6425a2fa8f
Backport r67974:
...
#4759 : allow None as first argument of bytearray.translate(), for consistency with bytes.translate().
Also fix segfault for bytearray.translate(x, None) -- will backport this part to 3.0 and 2.6.
2008-12-28 11:54:53 +00:00
Antoine Pitrou
ae5beceb35
Issue #4509 : bugs in bytearray with exports (buffer protocol)
2008-12-06 21:29:24 +00:00
Benjamin Peterson
46cc6d1102
make sure that bytearray methods return a new bytearray even if there is no change
...
Fixes #4348
Reviewed by Brett
2008-11-19 21:49:09 +00:00
Christian Heimes
7d4c3177d5
Silenced compiler warning
...
Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used
Reviewed by Benjamin Peterson
2008-08-22 19:47:25 +00:00
Amaury Forgeot d'Arc
313bda12e8
Fix a refleak in bytearray.split and bytearray.rsplit, detected by
...
regrtest.py -R:: test_bytes
2008-08-17 21:05:18 +00:00
Martin v. Löwis
f91d46a17d
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-12 14:49:50 +00:00
Neal Norwitz
c86b54cb03
Fix a couple of names in error messages that were wrong
2008-07-20 19:35:23 +00:00
Georg Brandl
3238a3e329
Backport part of r65043.
2008-07-16 23:17:46 +00:00
Georg Brandl
3e75846cf6
Use _getbytevalue() in init too.
2008-07-16 23:10:05 +00:00
Georg Brandl
3e483f643d
#3156 : fix consistency in what type bytearray methods accept as items.
...
Also rename confusing "item" parameters to "index".
2008-07-16 22:57:41 +00:00
Robert Schuppenies
9be2ec109b
Added additional __sizeof__ implementations and addressed comments made in
...
Issue3122.
2008-07-10 15:24:04 +00:00
Andrew M. Kuchling
d897264464
Docstring typo
2008-06-21 13:29:12 +00:00
Christian Heimes
44720838eb
Renamed bytesobject.c to bytearrayobject.c
...
Renamed stringobject.c to bytesobject.c
Fixed Windows builds
2008-05-26 13:01:01 +00:00