Victor Stinner
40b41e1ffd
Issue #12100 : Don't reset incremental encoders of CJK codecs at each call to
...
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
2011-05-24 22:29:13 +02:00
Victor Stinner
d6703b5e38
Issue #5640 : Fix Shift-JIS incremental encoder for error handlers different
...
than strict
2010-05-21 22:50:28 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Larry Hastings
402b73fb8d
Backported PyCapsule from 3.1, and converted most uses of
...
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Andrew M. Kuchling
658c45fd3b
Docstring typo.
2008-10-03 12:26:42 +00:00
Hirokazu Yamamoto
41a81eb6cb
Backport r65661, r65760: Issue #3575 : Incremental decoder's decode
...
function now takes bytearray by using 's*' instead of 't#'.
2008-08-17 13:10:46 +00:00
Georg Brandl
b9b68ae7a5
#3305 : self->stream can be NULL.
2008-07-16 22:04:20 +00:00
Gregory P. Smith
9d53457e59
Merge in release25-maint r60793:
...
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-06-11 07:41:16 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
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-06-09 04:58:54 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Hye-Shik Chang
9b5414090b
Bug #1728403 : Fix a bug that CJKCodecs StreamReader hangs when it
...
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
2007-06-05 18:58:51 +00:00
Georg Brandl
96a8c3954c
Make use of METH_O and METH_NOARGS where possible.
...
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Martin v. Löwis
26fd9607c7
Fix more ssize_t problems.
2006-04-22 11:15:41 +00:00
Hye-Shik Chang
db8955bc54
Backport p3yk r45619:
...
Add empty __init__ methods for stateful multibytecodec instances.
This resolves a problem found by Thomas Wouters:
http://mail.python.org/pipermail/python-dev/2006-April/064051.html
2006-04-21 16:28:34 +00:00
Neal Norwitz
7491d2a23a
Try to get rid of a Coverity warning by consistently using origpending.
2006-03-28 06:19:28 +00:00
Hye-Shik Chang
b9c03e999f
Fix reference leaks introduced by the recent incremental codec
...
changes.
2006-03-27 08:24:54 +00:00
Hye-Shik Chang
04904faac5
Utilize %zd for Py_ssize_t formatting instead of casting to long.
2006-03-26 06:53:37 +00:00
Hye-Shik Chang
9f4b632212
Allow long objects as a position value of error callbacks returned.
2006-03-26 06:21:34 +00:00
Hye-Shik Chang
e2ac4abd01
Patch #1443155 : Add the incremental codecs support for CJK codecs.
...
(reviewed by Walter Dörwald)
2006-03-26 02:34:59 +00:00
Hye-Shik Chang
4b96c1384e
- Modernize code to use Py_ssize_t more intensively.
...
- Do some minor code clean-ups.
2006-03-04 16:08:19 +00:00
Martin v. Löwis
02cbf4ae4b
More unconsting.
2006-02-27 17:20:04 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Jeremy Hylton
af68c874a6
Add const to several API functions that take char *.
...
In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.
I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
2005-12-10 18:50:16 +00:00
Neal Norwitz
058bde1944
SF Patch #1297028 , cjkcodecs does not initialize type pointer
...
Fix segfault. I tried to write a test, but it wouldn't crash
when running regrtest. This really should have some sort of test.
Should definitely be backported.
2005-09-21 06:44:25 +00:00
Hye-Shik Chang
f5a149a6b6
Bug #1005737 , #1007249 : Fix several build problems and warnings
...
found on legacy C compilers of HP-UX, IRIX and Tru64. (Reported
by roadkill, Richard Townsend, Maik Hertha and Minsik Kim)
2004-08-19 17:49:56 +00:00
Hye-Shik Chang
2bb146f2f4
Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
...
and installed layouts to make maintenance simple and easy. And it
also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004
and iso2022-jp-2004.
2004-07-18 03:06:29 +00:00
Hye-Shik Chang
3e2a306920
Add CJK codecs support as discussed on python-dev. (SF #873597 )
...
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
2004-01-17 14:29:29 +00:00