[Python-checkins] cpython: Add missing PyAPI_FUNC macro's to the public functions as other .c files do

gregory.p.smith python-checkins at python.org
Sun Apr 26 07:00:09 CEST 2015


https://hg.python.org/cpython/rev/b46308353ed9
changeset:   95802:b46308353ed9
user:        Gregory P. Smith <greg at krypto.org>
date:        Sun Apr 26 04:59:52 2015 +0000
summary:
  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.

files:
  Python/pystrhex.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Python/pystrhex.c b/Python/pystrhex.c
--- a/Python/pystrhex.c
+++ b/Python/pystrhex.c
@@ -47,14 +47,14 @@
     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);
 }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list