Skip to content

Commit

Permalink
quench cast warning (fixes #837, #833)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Jan 6, 2025
1 parent c13fac3 commit eab5d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nb_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ PyObject *nb_func_new(const void *in_) noexcept {
// skips Python's usual logic where __init__ is always called
// if __new__ returns an instance of the type.
bool noargs_ok = true;
for (size_t i = 1; i < fc->nargs - has_var_kwargs; ++i) {
for (uint32_t i = 1; i < fc->nargs - (uint32_t) has_var_kwargs; ++i) {
if (has_var_args && i == fc->nargs_pos)
continue; // skip `nb::args` since it can be empty
if (has_args && fc->args[i].value != nullptr)
Expand Down

0 comments on commit eab5d0f

Please sign in to comment.