> - I'm not sure why you make self->ok handling more complicated than it was
tell() requires self->ok=1. I choosed to reset self->ok to zero on error, but
it's maybe useless.
> - encodefunc should not be forced to NULL, otherwise it will yield a big
> decrease in write() performance
self>encodefunc value have to be changed because <encoder>.setstate() changes
the encoding function: UTF-16 => UTF-16-LE or UTF-16-BE.
I don't know how to get the new value of self>encodefunc. I will try to write
another patch. |