Skip to content

Commit aca8c40

Browse files
authored
bpo-38321: Fix _testcapimodule.c warning (GH-16494)
Fix the following warning: modules\_testcapimodule.c(6409): warning C4146: unary minus operator applied to unsigned type, result still unsigned
1 parent bcda460 commit aca8c40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ unicode_asutf8andsize(PyObject *self, PyObject *args)
19521952
return NULL;
19531953
}
19541954

1955-
buffer = PyUnicode_AsUTF8AndSize(unicode, &utf8_len);
1955+
buffer = PyUnicode_AsUTF8AndSize(unicode, &utf8_len);
19561956
if (buffer == NULL) {
19571957
return NULL;
19581958
}
@@ -6406,7 +6406,7 @@ static PyType_Spec HeapCTypeWithDict_spec = {
64066406

64076407
static struct PyMemberDef heapctypewithnegativedict_members[] = {
64086408
{"dictobj", T_OBJECT, offsetof(HeapCTypeWithDictObject, dict)},
6409-
{"__dictoffset__", T_PYSSIZET, -sizeof(void*), READONLY},
6409+
{"__dictoffset__", T_PYSSIZET, -(Py_ssize_t)sizeof(void*), READONLY},
64106410
{NULL} /* Sentinel */
64116411
};
64126412

0 commit comments

Comments
 (0)