Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
On Sat, May 8, 2010 at 8:07 AM, Martin v. Löwis <rep...@bugs.python.org>wrote:
> 1. add a flag to PyModuleDef, indicating whether the module was built in
> UCS-2 or UCS-4 mode. Then let the interpreter refuse the load the module,
> instead of having the dynamic linker do so.
I just thought of another risk inherit in this approach. If the extension
module is composed of more than one C file, the extension author may
inadvertently compile the file defining the PyModuleDef in Unicode-agnostic
mode but compile another file in Unicode-sensitive mode. Then they would
have a Unicode-sensitive extension as Unicode-agnostic, which would lead to
mysterious crashes if the Unicode settings are mismatched. :-(
----------
Added file: http://bugs.python.org/file17273/unnamed
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8654>
_______________________________________
<div class="gmail_quote">On Sat, May 8, 2010 at 8:07 AM, Martin v. Löwis <span
dir="ltr"><<a
href="mailto:rep...@bugs.python.org">rep...@bugs.python.org</a>></span>
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
1. add a flag to PyModuleDef, indicating whether the module was built in UCS-2
or UCS-4 mode. Then let the interpreter refuse the load the module, instead of
having the dynamic linker do so.</blockquote><div><br>I just thought of another
risk inherit in this approach. If the extension module is composed of more
than one C file, the extension author may inadvertently compile the file
defining the PyModuleDef in Unicode-agnostic mode but compile another file in
Unicode-sensitive mode. Then they would have a Unicode-sensitive extension as
Unicode-agnostic, which would lead to mysterious crashes if the Unicode
settings are mismatched. :-(<br>
</div></div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com