Message93659
| Author |
lemburg |
| Recipients |
Rhamphoryncus, amaury.forgeotdarc, bupjae, ezio.melotti, lemburg, vstinner |
| Date |
2009年10月06日.20:41:38 |
| SpamBayes Score |
5.161832e-11 |
| Marked as misclassified |
No |
| Message-id |
<1254861700.66.0.306140310588.issue5127@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It's not as easy as that.
The functions for case conversion are used in a way that assumes they
never fail (and indeed, the existing functions cannot fail).
What we can do is change the input parameter to Py_UCS4, but not the
Py_UNICODE output parameter, since that would cause lots of compiler
warnings and implicit truncation on UCS2 builds, which would be a pretty
disruptive change.
However, this change would not really help anyone if there are no
mappings from BMP to non-BMP or vice-versa, so I'm not sure whether this
whole exercise is worth the effort.
It appears to be better to just leave the case mapping APIs unchanged -
or am I missing something ?
The situation is different for the various Py_UNICODE_IS*() APIs: for
these we can change the input parameter to Py_UCS4, remove the name
mangling and add UCS2 helper functions to maintain API compatibility on
UCS2 builds. |
|