Author hyeshik.chang
Recipients
Date 2006-06-23.15:00:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
codec_getstreamcodec passes a None object (null
pointer, originally) as a "error" argument when errors
is given as a null pointer.  Due to this behavior,
parsers can't utilize cjkcodecs which doesn't allow
None as a default argument:

SyntaxError: encoding problem: with BOM

Attached patch fixes it to omit the argument, "errors",
and changed it to use PyObject_CallFunction instead of
PyEval_CallFunction because PyEval_CallFunction doesn't
work for simple "O" argument. (I don't know it was
intended. But we can still use PyEval_CallFunction if
we write it as "(O)")  I wonder if there's a reason
that you chose PyEval_CallFunction for the
initialization order or something?


How to reproduce the error:

echo "# coding: cp949" > test.py
./python test.py
History
Date User Action Args
2007-08-23 14:40:45adminlinkissue1511381 messages
2007-08-23 14:40:45admincreate