mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
interrogate: pass "args" tuple to function that takes PyObject *args
This commit is contained in:
parent
3e83f8c65e
commit
18678214ae
@ -797,6 +797,7 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak
|
|||||||
(_parameters[first_param + 1]._name == "kwargs" ||
|
(_parameters[first_param + 1]._name == "kwargs" ||
|
||||||
_parameters[first_param + 1]._name == "kwds")) {
|
_parameters[first_param + 1]._name == "kwds")) {
|
||||||
_flags |= F_explicit_args;
|
_flags |= F_explicit_args;
|
||||||
|
_args_type = InterfaceMaker::AT_keyword_args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -909,6 +910,13 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (_args_type == InterfaceMaker::AT_single_arg) {
|
||||||
|
// If it takes an argument named "args", we are directly passing the
|
||||||
|
// "args" tuple to the function.
|
||||||
|
if (_parameters[first_param]._name == "args") {
|
||||||
|
_flags |= F_explicit_args;
|
||||||
|
_args_type = InterfaceMaker::AT_varargs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user