[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

Daniel Stutzbach report at bugs.python.org
Sat May 8 19:50:24 CEST 2010


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

In Unicode-agnostic mode, instead of leaving Py_UNICODE, PyUnicodeObject, and many functions undefined, I wonder if it would be sufficient to declare Py_UNICODE like this:

struct PY_UNICODE_TYPE;
typedef struct PY_UNICODE_TYPE Py_UNICODE;

That would allow extensions to pass opaque Py_UNICODE pointers around, but not allow them to dereference the pointers nor evaluate sizeof(Py_UNICODE).

That would make PyUnicodeObject safe, as well as PyUnicode_Encode* and several other functions (anything that doesn't manipulate individual characters, basically).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8654>
_______________________________________


More information about the Python-bugs-list mailing list