From 8ee6f49c289240cfe8241f7886a0bf02cd2408fc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Aug 2024 15:27:06 +0200 Subject: [PATCH] Add static inline to PyUnicodeWriter_WriteStr Add static inline to PyUnicodeWriter_WriteStr() PyUnicodeWriter_WriteRepr(). --- pythoncapi_compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythoncapi_compat.h b/pythoncapi_compat.h index d45828f..4ff5c74 100644 --- a/pythoncapi_compat.h +++ b/pythoncapi_compat.h @@ -1392,7 +1392,7 @@ PyUnicodeWriter_WriteChar(PyUnicodeWriter *writer, Py_UCS4 ch) return _PyUnicodeWriter_WriteChar((_PyUnicodeWriter*)writer, ch); } -int +static inline int PyUnicodeWriter_WriteStr(PyUnicodeWriter *writer, PyObject *obj) { PyObject *str = PyObject_Str(obj); @@ -1405,7 +1405,7 @@ PyUnicodeWriter_WriteStr(PyUnicodeWriter *writer, PyObject *obj) return res; } -int +static inline int PyUnicodeWriter_WriteRepr(PyUnicodeWriter *writer, PyObject *obj) { PyObject *str = PyObject_Repr(obj);