diff --git a/Objects/capsule.c b/Objects/capsule.c index 3d2d626adec..e25af6c2aa8 100644 --- a/Objects/capsule.c +++ b/Objects/capsule.c @@ -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) {