[pypy-commit] pypy default: fix
arigo
noreply at buildbot.pypy.org
Sat Oct 25 16:44:59 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r74225:ccfbb215e8ed
Date: 2014-10-25 16:44 +0200
http://bitbucket.org/pypy/pypy/changeset/ccfbb215e8ed/
Log: fix
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c b/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
--- a/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
+++ b/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
@@ -1,13 +1,11 @@
+#include "src/precommondefs.h"
+
#if defined(_MSC_VER) || defined(__CYGWIN__)
#include <windows.h>
#define MS_WIN32
#endif
-#if defined(MS_WIN32)
-#define EXPORT(x) __declspec(dllexport) x
-#else
-#define EXPORT(x) x
-#endif
+#define EXPORT(x) RPY_EXPORTED x
#include <stdlib.h>
#include <math.h>
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/conftest.py b/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
@@ -8,6 +8,7 @@
def compile_so_file():
from rpython.translator.platform import platform
from rpython.translator.tool.cbuild import ExternalCompilationInfo
+ from rpython.translator import cdir
udir = pytest.ensuretemp('_ctypes_test')
cfile = py.path.local(__file__).dirpath().join("_ctypes_test.c")
@@ -15,7 +16,8 @@
libraries = ['oleaut32']
else:
libraries = []
- eci = ExternalCompilationInfo(libraries=libraries)
+ eci = ExternalCompilationInfo(libraries=libraries,
+ include_dirs=[cdir])
return platform.compile([cfile], eci, str(udir.join('_ctypes_test')),
standalone=False)
More information about the pypy-commit
mailing list