Commit fe871226 authored by Erik M. Bray's avatar Erik M. Bray

Fix declarations and callingconvention tests to not incorrectly use DL_IMPORT...

Fix declarations and callingconvention tests to not incorrectly use DL_IMPORT when building the module

See https://github.com/cython/cython/pull/360#issuecomment-214420624
parent 03607398
......@@ -17,7 +17,7 @@ setup(
######## callingconvention.pyx ########
# mode: compile
cdef extern from "external_callingconvention.h":
cdef extern from "callingconvention.h":
pass
cdef extern int f1()
......@@ -35,10 +35,19 @@ p2 = f2
p3 = f3
p4 = f4
######## callingconvention.h ########
#define DLL_EXPORT
#include "external_callingconvention.h"
######## external_callingconvention.h ########
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#elif defined(DLL_EXPORT)
#define DL_IMPORT(t) DL_EXPORT(t)
#endif
#ifdef __cplusplus
......
......@@ -17,7 +17,7 @@ setup(
######## declarations.pyx ########
# mode: compile
cdef extern from "external_declarations.h":
cdef extern from "declarations.h":
pass
cdef extern char *cp
......@@ -48,10 +48,19 @@ cdef char *g():
f()
g()
######## declarations.h ########
#define DLL_EXPORT
#include "external_declarations.h"
######## external_declarations.h ########
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#elif defined(DLL_EXPORT)
#define DL_IMPORT(t) DL_EXPORT(t)
#endif
#ifdef __cplusplus
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment