Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix a compiler warning.
  • Loading branch information
ericsnowcurrently committed Apr 30, 2025
commit a727d7b769e172f9a33b40d781e4ecc2b968c200
5 changes: 3 additions & 2 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1849,11 +1849,12 @@ _PyCode_GetVarCounts(PyCodeObject *co, _PyCode_var_counts_t *counts)
assert(numfree == co->co_nfreevars);

// Get the unbound counts.
assert(PyTuple_GET_SIZE(co->co_names) >= 0);
struct co_unbound_counts unbound = {
.total = PyTuple_GET_SIZE(co->co_names),
.total = (int)PyTuple_GET_SIZE(co->co_names),
// numglobal and numattrs can be set later
// with _PyCode_SetUnboundVarCounts().
.numunknown = PyTuple_GET_SIZE(co->co_names),
.numunknown = (int)PyTuple_GET_SIZE(co->co_names),
};

// "Return" the result.
Expand Down