Christian Heimes
000a074c95
Modified PyImport_Import and PyImport_ImportModule to always use absolute 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
2008-01-03 22:16:32 +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
Christian Heimes
2518b25578
Fixed a warning in _codecs_iso2022.c and some non C89 conform // comments.
2007-12-14 03:02:34 +00:00
Hye-Shik Chang
2390104d81
Add cheot-ga-keut composed make-up sequence support in EUC-KR codec.
2007-08-20 06:49:18 +00:00
Hye-Shik Chang
f3e93a0268
Fix gb18030 codec's bug that doesn't map two-byte characters on
...
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
2007-08-04 04:10:18 +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
Hye-Shik Chang
b788346573
Bug #1572832 : fix a bug in ISO-2022 codecs which may cause segfault
...
when encoding non-BMP unicode characters. (Submitted by Ray Chason)
2006-10-08 13:48:34 +00:00
Hye-Shik Chang
199f1db1fa
Fix a few bugs on cjkcodecs found by Oren Tirosh:
...
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2
codepoints now.
2006-09-05 12:07:09 +00:00
Hye-Shik Chang
58ce5bc14c
Fix a potentially invalid memory access of CJKCodecs' shift-jis
...
decoder. (found by Neal Norwitz)
2006-06-05 00:59:54 +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
abb903fd54
Bug #1448490 : Fix a bug that ISO-2022 codecs could not handle
...
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:20:08 +00:00
Hye-Shik Chang
32feb8592f
Check NULL if Py_InitModule fails.
2006-03-06 07:51:19 +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
Hye-Shik Chang
c5c57e6d98
Bug #1290333 : Added a workaround for cjkcodecs' _codecs_cn module
...
build problem on AIX.
2005-12-12 11:48:32 +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
Hye-Shik Chang
331649acc7
Change the internal "undefined codepoint" mark for CJKCodecs decoders
...
from U+FFFD to U+FFFE which is considered more appropriate. (from
MAL's comment)
2005-10-06 15:51:59 +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
Georg Brandl
08c02dbb85
[ 1243081 ] repair typos
2005-07-22 18:39:19 +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
eb34110190
Remove CJKCodecs implementation of UTF-7 and UTF-8 codec which
...
aren't intended to be part of Python distributiuon. This was
accidently imported on mass converting from standalone version of
CJKCodecs.
2004-07-28 09:36:52 +00:00
Hye-Shik Chang
64a9e38f35
Replace an extern magic to assigning declared pointer from array's.
...
And unifdef(1) compatibility blocks.
2004-07-18 15:02:45 +00:00
Hye-Shik Chang
ca455e8bc9
Remove unused CNS-11643 mapping which shouldn't merged into main Python
...
yet.
2004-07-18 08:35:43 +00:00
Tim Peters
91380d5f28
Repair MS compiler warning about signed-vs-unsigned mismatch. The plane
...
and width clearly don't need to be signed.
2004-07-18 04:34:33 +00:00
Tim Peters
7c7b3da46e
Added a comment explaining the extern ugliness.
2004-07-18 04:26:10 +00:00
Tim Peters
0f27166e6a
Changed the "predefinitions" of codec_list and mapping_list from static
...
to extern. It's not legal C to say
static whatever[];
because the size isn't given. Presumably this is a gcc extension.
2004-07-18 04:20:15 +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
Neal Norwitz
75a3204095
Remove warning (static not being first) when building with -W
2004-06-13 20:31:17 +00:00
Hye-Shik Chang
d210a5bed2
Fix MSVC6 warnings. (spotted by Tim Peters)
2004-01-23 14:36:17 +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