Skip to content

Commit

Permalink
Clean up Static Python vectorcall entry points
Browse files Browse the repository at this point in the history
Summary:
* Fix the type of `Ci_PyFunction_CallStatic` to match `vectorcallfunc`.

* Comment what the difference between `Ci_StaticFunction_Vectorcall` and
  `Ci_PyFunction_CallStatic` is.

* Remove a few conditionals or replace with ternaries. It means adding spurious
  `(void)foo;` statements to avoid unused variable warnings, but leads to more
  straight-line code.

* Match the order the functions are declared and defined in.

Reviewed By: DinoV

Differential Revision: D67875121

fbshipit-source-id: d0cfc70432ad470e8663d525dc9607731d11cf2e
  • Loading branch information
Alex Malyshev authored and facebook-github-bot committed Jan 7, 2025
1 parent dcba50f commit 8b21740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Include/eval.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CiAPI_DATA(int) _PyEval_LazyImportsEnabled;

CiAPI_FUNC(PyObject *) Ci_PyFunction_CallStatic(PyFunctionObject *func,
PyObject* const* args,
Py_ssize_t nargsf,
size_t nargsf,
PyObject *kwnames);

#endif
Expand Down

0 comments on commit 8b21740

Please sign in to comment.