Message108528
> Ok, let's say we use ((unsigned char)((c) & 0xff)) also for
> __CHAR_UNSIGNED__.
>
> What should the comment say about the intended argument?
That it's either in [-128; 127] or in [0; 255] ?
> Index: Objects/unicodeobject.c
> ===================================================================
> --- Objects/unicodeobject.c (revision 82192)
> +++ Objects/unicodeobject.c (working copy)
> @@ -8417,6 +8417,7 @@
> else if (c >= '0' && c <= '9') {
> prec = c - '0';
> while (--fmtcnt >= 0) {
> + /* XXX: c and *fmt are Py_UNICODE */
> c = Py_CHARMASK(*fmt++);
This is a funny bug:
>>> u"%.1\u1032f" % (1./3)
u'0.333333333333'
> Index: Modules/_json.c
> ===================================================================
> --- Modules/_json.c (revision 82192)
> +++ Modules/_json.c (working copy)
> @@ -603,6 +603,7 @@
> }
> }
> else {
> + /* XXX: c is Py_UNICODE */
> char c_char = Py_CHARMASK(c);
This block can only be entered if c <= 0x7f (`has_unicode` is false), so it's not a problem. |
|
Date |
User |
Action |
Args |
2010-06-24 16:28:00 | pitrou | set | recipients:
+ pitrou, lemburg, loewis, eric.smith, skrah |
2010-06-24 16:28:00 | pitrou | set | messageid: <1277396880.64.0.967482715948.issue9036@psf.upfronthosting.co.za> |
2010-06-24 16:27:59 | pitrou | link | issue9036 messages |
2010-06-24 16:27:59 | pitrou | create | |
|