[Python-checkins] r75220 - python/branches/py3k/Objects/capsule.c
mark.dickinson
python-checkins at python.org
Sat Oct 3 22:13:42 CEST 2009
Author: mark.dickinson
Date: Sat Oct 3 22:13:37 2009
New Revision: 75220
Log:
Use size_t instead of int for a PyMem_MALLOC argument; silences a gcc 'comparison always false' warning.
Modified:
python/branches/py3k/Objects/capsule.c
Modified: python/branches/py3k/Objects/capsule.c
==============================================================================
--- python/branches/py3k/Objects/capsule.c (original)
+++ python/branches/py3k/Objects/capsule.c Sat Oct 3 22:13:37 2009
@@ -197,7 +197,7 @@
PyObject *object = NULL;
void *return_value = NULL;
char *trace;
- int name_length = (strlen(name) + 1) * sizeof(char);
+ size_t name_length = (strlen(name) + 1) * sizeof(char);
char *name_dup = (char *)PyMem_MALLOC(name_length);
if (!name_dup) {
More information about the Python-checkins
mailing list