Skip to content

Commit cc2b5a9

Browse files
committed
Fix signed conversions
1 parent 0285818 commit cc2b5a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/pybind11/cast.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ class unpacking_vectorcall_collector {
24112411
// -1 to account for PY_VECTORCALL_ARGUMENTS_OFFSET
24122412
size_t nargs = m_args.size() - 1;
24132413
if (m_names) {
2414-
nargs -= PyTuple_GET_SIZE(m_names.ptr());
2414+
nargs -= static_cast<size_t>(PyTuple_GET_SIZE(m_names.ptr()));
24152415
}
24162416
PyObject *result = PyObject_Vectorcall(
24172417
ptr, m_args.data() + 1, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, m_names.ptr());
@@ -2425,7 +2425,7 @@ class unpacking_vectorcall_collector {
24252425
// -1 to account for PY_VECTORCALL_ARGUMENTS_OFFSET
24262426
size_t nargs = m_args.size() - 1;
24272427
if (m_names) {
2428-
nargs -= PyTuple_GET_SIZE(m_names.ptr());
2428+
nargs -= static_cast<size_t>(PyTuple_GET_SIZE(m_names.ptr()));
24292429
}
24302430
tuple val(nargs);
24312431
for (size_t i = 0; i < nargs; ++i) {

0 commit comments

Comments
 (0)