summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-1/+1
|
* Fix warnings GCC emits where the argument of PyErr_Format is a single variable.Georg Brandl2009-02-131-3/+3
|
* fix indentation in commentBenjamin Peterson2009-01-311-2/+2
|
* fix indentation; looks like all I managed to do the first time is make ↵Benjamin Peterson2009-01-311-2558/+2558
| | | | things uglier
* fix indentationBenjamin Peterson2009-01-311-2/+2
|
* completely detabify unicodeobject.cBenjamin Peterson2009-01-311-3010/+3010
|
* Remove unnecessary casts related to unicode_decode_call_errorhandler.Alexandre Vassalotti2008-12-271-27/+29
| | | | | | Make the _PyUnicode_Resize macro a static function. These changes are needed to avoid breaking strict aliasing rules.
* Fix a small typo in docstringAmaury Forgeot d'Arc2008-11-291-1/+1
|
* Docstring change for *partition: use same tense as other docstrings.Andrew M. Kuchling2008-10-041-6/+6
| | | | | Hyphenate left- and right-justified. Fix 'registerd' typo
* Fixed a couple more C99 comments and one occurence of inline.Christian Heimes2008-10-021-15/+15
|
* Fix varname in docstring. #3822.Georg Brandl2008-09-091-2/+2
|
* Correct a crash when two successive unicode allocations fail with a MemoryError:Amaury Forgeot d'Arc2008-07-311-1/+3
| | | | | | | | | the freelist contained half-initialized objects with freed pointers. The comment /* XXX UNREF/NEWREF interface should be more symmetrical */ was copied from tupleobject.c, and appears in some other places. I sign the petition.
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-311-14/+47
|
* #2242: utf7 decoding crashes on bogus input on some Windows/MSVC versionsAntoine Pitrou2008-07-251-1/+1
|
* Backed out r65069, pending fixing it in Windows.Eric Smith2008-07-171-8/+5
|
* Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.Eric Smith2008-07-171-5/+8
|
* Added additional __sizeof__ implementations and addressed comments made inRobert Schuppenies2008-07-101-14/+2
| | | | Issue3122.
* Issue 3048: Fixed sys.getsizeof for unicode objects.Robert Schuppenies2008-06-101-0/+24
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-66/+66
| | | | | | | 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.
* Refactor and clean up str.format() code (and helpers) in advance of ↵Eric Smith2008-05-301-2/+29
| | | | optimizations.
* #2999: fix name of third parameter in unicode.replace()'s docstring.Georg Brandl2008-05-301-3/+3
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-66/+66
|
* First step of the C API rename:Christian Heimes2008-05-261-1/+1
| | | | | | renamed Include/bytesobject.h to Include/bytearrayobject.h renamed Include/stringobject.h to Include/bytesobject.h added Include/stringobject.h with aliases
* #2809 followup: even better split docstring.Georg Brandl2008-05-111-2/+2
|
* #2809: elaborate str.split docstring a bit.Georg Brandl2008-05-111-2/+3
|
* get rid of assert (size >= 0) now that an explicit if (size < 0) is in the code.Gregory P. Smith2008-04-101-1/+0
|
* Raise SystemError when size < 0 is passed into PyString_FromStringAndSize,Gregory P. Smith2008-04-091-0/+8
| | | | PyBytes_FromStringAndSize or PyUnicode_FromStringAndSize. [issue2587]
* Bug #2388: Fix gcc warnings when compiling with --enable-unicode=ucs4.Martin v. Löwis2008-04-071-1/+1
|
* Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.Neal Norwitz2008-03-281-2/+2
| | | | | | Rather than sprinkle casts throughout the code, change Py_CHARMASK to always cast it's result to an unsigned char. This should ensure we do the right thing when accessing an array with the result.
* Fix warnings about using char as an array subscript. This is not portableNeal Norwitz2008-03-271-2/+2
| | | | since char is signed on some platforms and unsigned on others.
* Merged revisions ↵Christian Heimes2008-03-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
* Try to fix a bunch of compiler warnings on Win64.Neal Norwitz2008-03-251-1/+1
|
* Issue2469: Correct a typo I introduced at r61793: compilation error with ↵Amaury Forgeot d'Arc2008-03-241-1/+1
| | | | | | UCS4 builds. All buildbots compile with UCS2...
* #1477: ur'\U0010FFFF' raised in narrow unicode builds.Amaury Forgeot d'Arc2008-03-231-4/+42
| | | | | Corrected the raw-unicode-escape codec to use UTF-16 surrogates in this case, just like the unicode-escape codec.
* Remove compiler warnings (on Alpha at least) about using chars asNeal Norwitz2008-03-231-4/+4
| | | | | array subscripts. Using chars are dangerous b/c they are signed on some platforms and unsigned on others.
* Issue 2321: reduce memory usage (increase the memory that is returnedNeal Norwitz2008-03-171-17/+21
| | | | | | to the system) by using pymalloc for the data of unicode objects. Will backport.
* Fix the overflows in expandtabs(). "This time for sure!"Guido van Rossum2008-03-111-25/+33
| | | | (Exploit at request.)
* Issue 1742669. Now %d accepts very big float numbers.Facundo Batista2008-02-241-13/+42
| | | | Thanks Gabriel Genellina.
* Backport of PEP 3101, Advanced String Formatting, from py3k.Eric Smith2008-02-171-14/+20
| | | | | | | | | | | | | | | Highlights: - Adding PyObject_Format. - Adding string.Format class. - Adding __format__ for str, unicode, int, long, float, datetime. - Adding builtin format. - Adding ''.format and u''.format. - str/unicode fixups for formatters. The files in Objects/stringlib that implement PEP 3101 (stringdefs.h, unicodedefs.h, formatter.h, string_format.h) are identical in trunk and py3k. Any changes from here on should be made to trunk, and changes will propogate to py3k).
* Implemented Martin's suggestion to clear the free lists during the garbage ↵Christian Heimes2008-02-141-12/+21
| | | | collection of the highest generation.
* Unified naming convention for free lists and their limits. All free listsChristian Heimes2008-02-061-20/+20
| | | | | | | | in Object/ are named ``free_list``, the counter ``numfree`` and the upper limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block. The chances should make it easier to adjust Python for platforms with less memory, e.g. mobile phones.
* Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak ↵Christian Heimes2008-01-301-18/+81
| | | | detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
* Backport of several functions from Python 3.0 to 2.6 including ↵Christian Heimes2008-01-251-0/+465
| | | | | | | PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0. First chapter of the Python 3.0 io framework back port: _fileio The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-031-1/+1
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-11/+11
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc2007-11-201-2/+19
| | | | | | | Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py.
* Made _ParseTupleFinds only defined to unicodeobject.cFacundo Batista2007-11-161-0/+1
|
* Now in find, rfind, index, and rindex, you can use None as defaults,Facundo Batista2007-11-161-30/+14
| | | | | | | | | | | | as usual with slicing (both with str and unicode strings). This fixes issue 1259. For str only the stringobject.c file was modified. But for unicode, I needed to repeat in the four functions a lot of code, so created a new function that does part of the job for them (and placed it in find.h, following a suggestion of Barry). Also added tests for this behaviour.
* Backport fixes for the code that decodes octal escapes (and for PyStringGuido van Rossum2007-10-291-3/+6
| | | | | | | also hex escapes) -- this was reaching beyond the end of the input string buffer, even though it is not supposed to be \0-terminated. This has no visible effect but is clearly the correct thing to do. (In 3.0 it had a visible effect after removing ob_sstate from PyString.)
* Set startinpos before calling the error handler.Walter Dörwald2007-08-301-0/+1
|