]> granicus.if.org Git - python/commitdiff
Add missing PyAPI_FUNC macro's to the public functions as other .c files do
authorGregory P. Smith <greg@krypto.org>
Sun, 26 Apr 2015 04:59:52 +0000 (04:59 +0000)
committerGregory P. Smith <greg@krypto.org>
Sun, 26 Apr 2015 04:59:52 +0000 (04:59 +0000)
in hopes that this fixes the windows extension module link error for modules
trying to call _Py_strhex functions.  issue9951.

Python/pystrhex.c

index b8f314607c19836c0370e1a91253490f5097f8b9..a20e30747b76bb672da139bf132bf015b1478792 100644 (file)
@@ -47,14 +47,14 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
     return retval;
 }
 
-PyObject *_Py_strhex(const char* argbuf, const Py_ssize_t arglen)
+PyAPI_FUNC(PyObject *) _Py_strhex(const char* argbuf, const Py_ssize_t arglen)
 {
     return _Py_strhex_impl(argbuf, arglen, 0);
 }
 
 /* Same as above but returns a bytes() instead of str() to avoid the
  * need to decode the str() when bytes are needed. */
-PyObject *_Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen)
+PyAPI_FUNC(PyObject *) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen)
 {
     return _Py_strhex_impl(argbuf, arglen, 1);
 }