Skip to content

Commit 5d0ccd2

Browse files
committed
Add missing PyAPI_FUNC macro's to the public functions as other .c files do
in hopes that this fixes the windows extension module link error for modules trying to call _Py_strhex functions. issue9951.
1 parent 9c6b916 commit 5d0ccd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/pystrhex.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
4747
return retval;
4848
}
4949

50-
PyObject *_Py_strhex(const char* argbuf, const Py_ssize_t arglen)
50+
PyAPI_FUNC(PyObject *) _Py_strhex(const char* argbuf, const Py_ssize_t arglen)
5151
{
5252
return _Py_strhex_impl(argbuf, arglen, 0);
5353
}
5454

5555
/* Same as above but returns a bytes() instead of str() to avoid the
5656
* need to decode the str() when bytes are needed. */
57-
PyObject *_Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen)
57+
PyAPI_FUNC(PyObject *) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen)
5858
{
5959
return _Py_strhex_impl(argbuf, arglen, 1);
6060
}

0 commit comments

Comments
 (0)