summaryrefslogtreecommitdiff
path: root/Python/codecs.c
AgeCommit message (Collapse)AuthorLines
2003-03-19Fixed SF bug #663074. The codec system was using global staticGustavo Niemeyer-83/+64
variables to store internal data. As a result, any atempts to use the unicode system with multiple active interpreters, or successive interpreter executions, would fail. Now that information is stored into members of the PyInterpreterState structure.
2003-02-14Patch for bug reported in patch #686627: import race condition inMarc-André Lemburg-1/+1
codecs registry startup.
2002-11-21Properly compute array size even for --disable-unicode.Martin v. Löwis-1/+1
2002-11-21Fix PEP 293 related problems with --disable-unicode buildsWalter Dörwald-0/+6
reported by Michael Hudson in http://mail.python.org/pipermail/python-dev/2002-November/030299.html
2002-09-26Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.Martin v. Löwis-2/+2
2002-09-02Check string for NULL before using it to format the error message.Walter Dörwald-3/+6
(Spotted by Neal Norwitz)
2002-09-02PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald-0/+399
2002-07-18Fix bug [ 549731 ] Unicode encoders appears to leak references.Mark Hammond-4/+10
Python 2.2.1 bugfix candidate.
2000-09-26Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake-3/+0
Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
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-22Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters-3/+3
declarations yet, those come later.
2000-07-16Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters-2/+2
comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-03Include limits.h if we have it.Jack Jansen-0/+3
2000-06-29Change the loop index in normalizestring() to size_t too, to avoid aGuido van Rossum-1/+1
warning on Windows.
2000-06-28Trent Mick's Win64 changes: size_t vs. int or long; also some overflowGuido van Rossum-2/+7
tests.
2000-05-09M.-A. Lemburg <mal@lemburg.com>:Fred Drake-9/+5
Moved some docs to the include file. Added a NULL check to _PyCodec_Lookup() to make it core dump safe.
2000-04-05Marc-Andre's third try at this bulk patch seems to work (except thatGuido van Rossum-5/+16
his copy of test_contains.py seems to be broken -- the lines he deleted were already absent). Checkin messages: New Unicode support for int(), float(), complex() and long(). - new APIs PyInt_FromUnicode() and PyLong_FromUnicode() - added support for Unicode to PyFloat_FromString() - new encoding API PyUnicode_EncodeDecimal() which converts Unicode to a decimal char* string (used in the above new APIs) - shortcuts for calls like int(<int object>) and float(<float obj>) - tests for all of the above Unicode compares and contains checks: - comparing Unicode and non-string types now works; TypeErrors are masked, all other errors such as ValueError during Unicode coercion are passed through (note that PyUnicode_Compare does not implement the masking -- PyObject_Compare does this) - contains now works for non-string types too; TypeErrors are masked and 0 returned; all other errors are passed through Better testing support for the standard codecs. Misc minor enhancements, such as an alias dbcs for the mbcs codec. Changes: - PyLong_FromString() now applies the same error checks as does PyInt_FromString(): trailing garbage is reported as error and not longer silently ignored. The only characters which may be trailing the digits are 'L' and 'l' -- these are still silently ignored. - string.ato?() now directly interface to int(), long() and float(). The error strings are now a little different, but the type still remains the same. These functions are now ready to get declared obsolete ;-) - PyNumber_Int() now also does a check for embedded NULL chars in the input string; PyNumber_Long() already did this (and still does) Followed by: Looks like I've gone a step too far there... (and test_contains.py seem to have a bug too). I've changed back to reporting all errors in PyUnicode_Contains() and added a few more test cases to test_contains.py (plus corrected the join() NameError).
2000-03-31Marc-Andre Lemburg: Error reporting in the codec registry and lookupGuido van Rossum-12/+46
mechanism is enhanced to be more informative.
2000-03-24Marc-Andre Lemburg:Guido van Rossum-8/+6
Andy Robinson noted a core dump in the codecs.c file. This was introduced by my latest patch which fixed a memory leak in codecs.c. The bug causes all successful codec lookups to fail.
2000-03-20On 17-Mar-2000, Marc-Andre Lemburg said:Barry Warsaw-2/+12
Attached you find an update of the Unicode implementation. The patch is against the current CVS version. I would appreciate if someone with CVS checkin permissions could check the changes in. The patch contains all bugs and patches sent this week and also fixes a leak in the codecs code and a bug in the free list code for Unicode objects (which only shows up when compiling Python with Py_DEBUG; thanks to MarkH for spotting this one).
2000-03-10Python Codec Registry and support functions, written by Marc-AndreGuido van Rossum-0/+382
Lemburg.