On 6/13/06, Neal Norwitz <[EMAIL PROTECTED]> wrote:
Here's a shorter version:
import codecs
decmap = u"".join(unichr(i) for i in xrange(256))# This crashes, but i need to print type(encoding_table) at end of cp1140.py
Here's a shorter version:
print type(codecs.charmap_build(decmap))
The source fo the crash is the EncodingMap type (defined in unicodeobject.c); it has an invalid type:
Breakpoint 2, PyUnicode_BuildEncodingMap (string=0x2b97d44dbf40)
at Objects/unicodeobject.c:3213
(gdb) print EncodingMapType
$1 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 1, ob_type = 0x0,
ob_size = 0, tp_name = 0x53d15a "EncodingMap", tp_basicsize = 80,
[...]
Did someone forget a PyType_Ready() call when EncodingMap was added? (And what other types are missing PyType_Ready() calls? :)
--
Thomas Wouters <[EMAIL PROTECTED] >
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com