diff -r e22b505acc49 Python/getargs.c --- a/Python/getargs.c Fri May 09 01:44:58 2008 +0200 +++ b/Python/getargs.c Fri May 09 11:59:35 2008 +0200 @@ -822,10 +822,7 @@ } else return converterr("string", arg, msgbuf, bufsize); - /* XXX(gb): this test is completely wrong -- p is a - * byte string while arg is a Unicode. I *think* it should - * check against the size of uarg... */ - if ((Py_ssize_t)strlen(*p) != PyUnicode_GetSize(arg)) + if ((Py_ssize_t) strlen(*p) != PyString_GET_SIZE(uarg)) return converterr("string without null bytes", arg, msgbuf, bufsize); } @@ -900,9 +897,8 @@ } format++; } - /* XXX(gb): same comment as for 's' applies here... */ else if (*p != NULL && - (Py_ssize_t)strlen(*p) != PyUnicode_GetSize(arg)) + (Py_ssize_t) strlen(*p) != PyString_GET_SIZE(uarg)) return converterr( "string without null bytes or None", arg, msgbuf, bufsize);