summaryrefslogtreecommitdiff
path: root/Modules/_codecsmodule.c
AgeCommit message (Collapse)AuthorLines
2010-06-09Issue #8930: fix some C code indentationAntoine Pitrou-64/+64
2010-05-09Untabify C files. Will watch buildbots.Antoine Pitrou-337/+337
2010-04-05fix escape_encode to return the correct consumed sizePhilip Jenvey-4/+5
2009-05-06Issue 3739: The unicode-internal encoder now reports the number of *characters*Walter Dörwald-1/+1
consumed like any other encoder (instead of the number of bytes).
2009-03-15#5496: fix docstring of lookup().Georg Brandl-1/+1
2008-10-03Docstring typo.Andrew M. Kuchling-1/+1
2008-08-12Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,Martin v. Löwis-149/+118
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-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-11/+11
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.
2008-05-26Renamed PyString to PyBytesChristian Heimes-11/+11
2007-11-20The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc-6/+13
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.
2007-08-17Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.Walter Dörwald-0/+204
2007-07-19Document that codecs.lookup() returns a CodecInfo object.Walter Dörwald-4/+5
(fixes SF bug #1754453).
2006-08-12Klocwork made another run and found a bunch more problems.Neal Norwitz-1/+2
This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
2006-08-02Correction of patch #1455898: In the mbcs decoder, set final=FalseMartin v. Löwis-1/+1
for stream decoder, but final=True for the decode function.
2006-06-14Patch #1455898: Incremental mode for "mbcs" codec.Martin v. Löwis-5/+10
2006-06-04Patch #1359618: Speed-up charmap encoder.Martin v. Löwis-0/+10
2006-05-29Make use of METH_O and METH_NOARGS where possible.Georg Brandl-51/+15
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-27Explain why 'consumed' is initialized.Martin v. Löwis-8/+4
2006-04-22Fix more ssize_t issues.Martin v. Löwis-3/+3
2006-02-15Merge ssize_t branch.Martin v. Löwis-23/+48
2005-11-02Whitespace cleanup.Walter Dörwald-27/+27
2005-08-30SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complainWalter Dörwald-2/+2
about illegal code points. The codec now supports PEP 293 style error handlers. (This is a variant of the Nik Haldimann's patch that detects truncated data)
2005-03-08Build with --disable-unicode again. Fixes #1158607.Martin v. Löwis-0/+14
Will backport to 2.4.
2004-09-07SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now supportWalter Dörwald-24/+57
decoding incomplete input (when the input stream is temporarily exhausted). codecs.StreamReader now implements buffering, which enables proper readline support for the UTF-16 decoders. codecs.StreamReader.read() has a new argument chars which specifies the number of characters to return. codecs.StreamReader.readline() and codecs.StreamReader.readlines() have a new argument keepends. Trailing "\n"s will be stripped from the lines if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and PyUnicode_DecodeUTF16Stateful.
2004-07-10Change some declarations from ``char *`` to ``const char *``. Also addedBrett Cannon-6/+8
docstrings for decode and encode; accidentally were left out of the PyMethodDev table.
2004-07-10Add generic codecs.encode() and .decode() APIs that don't imposeMarc-André Lemburg-4/+72
any restriction on the return type (like unicode.encode() et al. do).
2003-02-04Fix for [ 543344 ] Interpreter crashes when recoding; suggestedMarc-André Lemburg-1/+3
by Michael Stone (mbrierst). Python 2.1.4, 2.2.2 candidate.
2002-10-31Add docstrings to register, lookup, register_errorWalter Dörwald-4/+36
and lookup_error. This closes SF patch #630622.
2002-09-02PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald-0/+28
2002-08-14Patch #505705: Remove eval in pickle and cPickle.Martin v. Löwis-1/+45
2002-08-02Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond-1/+1
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-06-30Patch #569753: Remove support for WIN16.Martin v. Löwis-5/+5
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
2002-01-17Patch #477750: Use METH_ constants in Modules.Martin v. Löwis-29/+29
2001-09-20Patch #435971: UTF-7 codec by Brian Quinlan.Marc-André Lemburg-0/+42
2001-08-17Patch #445762: Support --disable-unicodeMartin v. Löwis-0/+4
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
2001-06-26experimental UCS-4 support: don't assume that MS_WIN32 impliesFredrik Lundh-3/+3
HAVE_USABLE_WCHAR_T
2001-06-17Fix for bug [ #433047 ] missing args to PyArg_ParseTupleMarc-André Lemburg-2/+2
2000-09-21Added a true unicode_internal_encode function and fixed theMarc-André Lemburg-7/+41
unicode_internal_decode function to support Unicode objects directly rather than by generating a copy of the object.
2000-08-03Changing the CNRI copyright notice according to CNRI's instructions.Guido van Rossum-1/+1
This is a notice without a date, which apparently is not a claim to copyright but only advice to the reader. IANAL. :-)
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-1/+1
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
2000-07-05Modified the encode interfaces of all builtin codecs to acceptMarc-André Lemburg-50/+105
any object which can be converted to Unicode by means of PyUnicode_FromObject().
2000-03-28Marc-Andre Lemburg:Guido van Rossum-0/+46
The attached patch set includes a workaround to get Python with Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause is a bug in the BSDI wchar.h header file) and Python interfaces for the MBCS codec donated by Mark Hammond. Also included are some minor corrections w/r to the docs of the new "es" and "es#" parser markers (use PyMem_Free() instead of free(); thanks to Mark Hammond for finding these). The unicodedata tests are now in a separate file (test_unicodedata.py) to avoid problems if the module cannot be found.
2000-03-10Internal module _codecs -- Provides access to the codec registry andGuido van Rossum-0/+529
the builtin codecs. Written by Marc-Andre Lemburg.