Skip to content

Commit 4c9e918

Browse files
committed
Casts to avoid data loss warnings
1 parent 4800a5d commit 4c9e918

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Modules/_testcapi/modsupport.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ pyabiinfo_check(PyObject *Py_UNUSED(module), PyObject *args)
1313
{
1414
return NULL;
1515
}
16-
PyABIInfo info = {maj, min, flags, buildver, abiver};
16+
PyABIInfo info = {
17+
.abiinfo_major_version = (uint8_t)maj,
18+
.abiinfo_minor_version = (uint8_t)min,
19+
.flags = (uint16_t)flags,
20+
.build_version = (uint32_t)buildver,
21+
.abi_version = (uint32_t)abiver};
1722
if (PyABIInfo_Check(&info, modname) < 0) {
1823
return NULL;
1924
}

0 commit comments

Comments
 (0)