Commit Graph

10 Commits

Author SHA1 Message Date
Jason Tishler 0c10015a6e Patch #676839: Cygwin _iconv_codec module patch
The attached patch enables the _iconv_codec
module to build cleanly under Cygwin.
2003-02-10 20:48:35 +00:00
Neal Norwitz 7fe16e79f5 Remove forward static reference since it is not required 2003-02-04 20:46:50 +00:00
Walter Dörwald bda1c86daf Use size_t instead of int for various variables to prevent
signed/unsigned comparison warnings on the call to iconv().

Fix comment typos.

From SF patch #680146.
2003-02-04 18:02:28 +00:00
Walter Dörwald 2e0b18af30 Change the treatment of positions returned by PEP293
error handers in the Unicode codecs: Negative
positions are treated as being relative to the end of
the input and out of bounds positions result in an
IndexError.

Also update the PEP and include an explanation of
this in the documentation for codecs.register_error.

Fixes a small bug in iconv_codecs: if the position
from the callback is negative *add* it to the size
instead of substracting it.

From SF patch #677429.
2003-01-31 17:19:08 +00:00
Walter Dörwald 757246c189 Initialize swappedinput to silence the compiler warning about
uninitialized variables.
2003-01-31 16:26:50 +00:00
Walter Dörwald b4ff1113ca Check whether the choosen encoding requires byte swapping
for this iconv() implementation in the init function.

For encoding: use a byteswapped version of the input if
neccessary.

For decoding: byteswap every piece returned by iconv()
if neccessary (but not those pieces returned from the
callback)

Comment out test_sane() in the test script, because
whether this works depends on whether byte swapping
is neccessary or not (an on Py_UNICODE_SIZE)
2003-01-30 19:55:28 +00:00
Martin v. Löwis 7a565f0b9b Fix reference counting of iconvcodec_Type. Fixes #670715.
Remove GC code; the base type does not need GC.
2003-01-27 11:39:04 +00:00
Neal Norwitz 57c115c8ad Get rid of compiler warnings on Redhat 2003-01-26 16:26:20 +00:00
Martin v. Löwis 727fe66f27 Add _iconv_codec to Setup.dist. Use PyModule_ functions. 2003-01-26 11:48:20 +00:00
Martin v. Löwis 9789aefa61 Patch #670715: Universal Unicode Codec for POSIX iconv. 2003-01-26 11:30:36 +00:00