This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexandre.vassalotti
Recipients alexandre.vassalotti, belopolsky, gvanrossum, lemburg
Date 2008-05-03.17:58:31
SpamBayes Score 0.0017184644
Marked as misclassified No
Message-id <1209837515.65.0.865282921585.issue1950@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-05-03 17:58:35alexandre.vassalottisetspambayes_score: 0.00171846 -> 0.0017184644
recipients: + alexandre.vassalotti, lemburg, gvanrossum, belopolsky
2008-05-03 17:58:35alexandre.vassalottisetspambayes_score: 0.00171846 -> 0.00171846
messageid: <1209837515.65.0.865282921585.issue1950@psf.upfronthosting.co.za>
2008-05-03 17:58:32alexandre.vassalottilinkissue1950 messages
2008-05-03 17:58:31alexandre.vassalotticreate