Message105321
| Author |
stutzbach |
| Recipients |
gvanrossum, lemburg, loewis, r.david.murray, scoder, stutzbach, vstinner, zooko |
| Date |
2010年05月08日.17:50:20 |
| SpamBayes Score |
0.045616932 |
| Marked as misclassified |
No |
| Message-id |
<1273341024.37.0.0671421629743.issue8654@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|