≈ the.bay.news

Combining the argument-conversion loops in _PyEval_Vector

Discussions on Python.org
Combining the argument-conversion loops in _PyEval_Vector
In _PyEval_Vector, positional and keyword argument values are converted to _PyStackRef in separate loops. Both loops call PyStackRef_FromPyObjectNew. The values are consecutive in args, and total_args already includes both groups. I replaced the two loops locally with: for (size_t i = 0; i < total_args; i++) { arguments[i] = PyStackRef_FromPyObjectNew(args[i]); } This removes the duplicated conversion code and the second kwnames check. Conversion order and reference ownership stay the sam...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.