Commit d8fae2b9 authored by Mark Dickinson's avatar Mark Dickinson

Use size_t instead of int for a PyMem_MALLOC argument; silences a gcc...

Use size_t instead of int for a PyMem_MALLOC argument;  silences a gcc 'comparison always false' warning.
parent 8ebdcc79
......@@ -197,7 +197,7 @@ PyCapsule_Import(const char *name, int no_block)
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment