Victor Stinner wrote: > Hi, > Is it ok to add a static inline function to the limited API? Can it > cause ABI issue? Or is it safer to add a regular function? For > example, is it safe to add the following function to the limited API? > static inline PyObject > _PyObject_CallOneArg(PyObject func, PyObject *arg) > { > ... > return _PyObject_VectorcallTstate(tstate, func, args, nargsf, NULL); > } > Or should it be an opaque definition like the following function? > PyAPI_FUNC(PyObject ) PyObject_CallNoArgs(PyObject func);
Yes, it should need the opaque definition. Otherwise we'd need to ensure ABI compatibility for _PyObject_VectorcallTstate and we would need to support the exact definition of the static inline function "forever". > I came to this question while reviewing "Make Vectorcall public" C API: > https://bugs.python.org/issue39245 > https://github.com/python/cpython/pull/17893 Just to clarify, that PR does not propose adding things to the limited API. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/O4NI45WC64EBET65AN6FZIRBYIRRKAHD/ Code of Conduct: http://python.org/psf/codeofconduct/