Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Marc-Andre Lemburg wrote: [SNIP] > The above cast needs to be (Py_ssize_t). size_t is an unsigned length type.
Actually, the cast is right (even though it is not strictly necessary). It just the patch that is confusing. Here is the relevant code: /* Normal module, so work out the package name if any */ char *start = PyUnicode_AsString(modname); char *lastdot = strrchr(start, '.'); size_t len; int error; /* snip */ len = (size_t)(lastdot - start); if (len >= MAXPATHLEN) { PyErr_SetString(PyExc_ValueError, "Module name too long"); return NULL; } I removed the cast from the patch (I don't know why I added it, anyway) to avoid further confusion. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1950> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com