Excise DL_EXPORT from Include.
Thanks to Skip Montanaro and Kalle Svensson for the patches.
diff --git a/Include/methodobject.h b/Include/methodobject.h
index 21dcdda..993bdae 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -7,7 +7,7 @@
extern "C" {
#endif
-extern DL_IMPORT(PyTypeObject) PyCFunction_Type;
+PyAPI_DATA(PyTypeObject) PyCFunction_Type;
#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
@@ -16,9 +16,9 @@
PyObject *);
typedef PyObject *(*PyNoArgsFunction)(PyObject *);
-extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *);
-extern DL_IMPORT(PyObject *) PyCFunction_GetSelf(PyObject *);
-extern DL_IMPORT(int) PyCFunction_GetFlags(PyObject *);
+PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
+PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
+PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
/* Macros for direct access to these values. Type checks are *not*
done, so use with care. */
@@ -28,7 +28,7 @@
(((PyCFunctionObject *)func) -> m_self)
#define PyCFunction_GET_FLAGS(func) \
(((PyCFunctionObject *)func) -> m_ml -> ml_flags)
-extern DL_IMPORT(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
struct PyMethodDef {
char *ml_name;
@@ -38,9 +38,9 @@
};
typedef struct PyMethodDef PyMethodDef;
-extern DL_IMPORT(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, char *);
+PyAPI_FUNC(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, char *);
-extern DL_IMPORT(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
+PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
/* Flag passed to newmethodobject */
#define METH_OLDARGS 0x0000
@@ -61,7 +61,7 @@
struct PyMethodChain *link; /* NULL or base type */
} PyMethodChain;
-extern DL_IMPORT(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *,
+PyAPI_FUNC(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *,
char *);
typedef struct {