Static inline functions in header files, limited API and the stable ABI
30 Jan
2020
30 Jan
'20
4:37 a.m.
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); I came to this question while reviewing "Make Vectorcall public" C API: https://bugs.python.org/issue39245 https://github.com/python/cpython/pull/17893 Victor -- Night gathers, and now my watch begins. It shall not end until my death.
1519
Age (days ago)
1519
Last active (days ago)
1 comments
2 participants
participants (2)
-
encukouļ¼ gmail.com
-
Victor Stinner