[pypy-commit] pypy default: fix function export for visual studio
mattip
noreply at buildbot.pypy.org
Wed Aug 15 17:17:59 CEST 2012
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r56729:dcf93174e81d
Date: 2012-08-15 18:17 +0300
http://bitbucket.org/pypy/pypy/changeset/dcf93174e81d/
Log: fix function export for visual studio
diff --git a/pypy/module/_cffi_backend/test/_test_lib.c b/pypy/module/_cffi_backend/test/_test_lib.c
--- a/pypy/module/_cffi_backend/test/_test_lib.c
+++ b/pypy/module/_cffi_backend/test/_test_lib.c
@@ -2,6 +2,12 @@
#include <stdarg.h>
#include <errno.h>
+#ifdef _WIN32
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT
+#endif
+
static char _testfunc0(char a, char b)
{
return a + b;
@@ -140,7 +146,7 @@
return ptr->a1 + ptr->a2;
}
-void *gettestfunc(int num)
+DLLEXPORT void *gettestfunc(int num)
{
void *f;
switch (num) {
More information about the pypy-commit
mailing list