Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: kill-exported-symbols-list
Changeset: r74155:605546cf9024
Date: 2014-10-24 12:18 +0200
http://bitbucket.org/pypy/pypy/changeset/605546cf9024/

Log:    Whack whack whack

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
@@ -1,12 +1,8 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <errno.h>
+#include "src/precommondefs.h"
 
-#ifdef _WIN32
-#define DLLEXPORT __declspec(dllexport)
-#else
-#define DLLEXPORT
-#endif
 
 static char _testfunc0(char a, char b)
 {
@@ -180,7 +176,7 @@
     return -42;
 }
 
-DLLEXPORT void *gettestfunc(int num)
+RPY_EXPORTED void *gettestfunc(int num)
 {
     void *f;
     switch (num) {
diff --git a/pypy/module/_cffi_backend/test/test_c.py 
b/pypy/module/_cffi_backend/test/test_c.py
--- a/pypy/module/_cffi_backend/test/test_c.py
+++ b/pypy/module/_cffi_backend/test/test_c.py
@@ -22,6 +22,7 @@
 from rpython.tool.udir import udir
 from pypy.interpreter import gateway
 from pypy.module._cffi_backend import Module
+from rpython.translator import cdir
 from rpython.translator.platform import host
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 
@@ -51,7 +52,7 @@
         test_lib_c = tmpdir.join('_test_lib.c')
         src_test_lib_c = py.path.local(__file__).dirpath().join('_test_lib.c')
         src_test_lib_c.copy(test_lib_c)
-        eci = ExternalCompilationInfo()
+        eci = ExternalCompilationInfo(include_dirs=[cdir])
         test_lib = host.compile([test_lib_c], eci, standalone=False)
 
         cdll = ctypes.CDLL(str(test_lib))
diff --git a/rpython/translator/c/src/stacklet/stacklet.h 
b/rpython/translator/c/src/stacklet/stacklet.h
--- a/rpython/translator/c/src/stacklet/stacklet.h
+++ b/rpython/translator/c/src/stacklet/stacklet.h
@@ -2,6 +2,7 @@
 #ifndef _STACKLET_H_
 #define _STACKLET_H_
 
+#include "src/precommondefs.h"
 #include <stdlib.h>
 
 
@@ -21,7 +22,7 @@
  */
 typedef struct stacklet_thread_s *stacklet_thread_handle;
 
-stacklet_thread_handle stacklet_newthread(void);
+RPY_EXPORTED_FOR_TESTS stacklet_thread_handle stacklet_newthread(void);
 void stacklet_deletethread(stacklet_thread_handle thrd);
 
 
@@ -34,7 +35,7 @@
 /* Call 'run(source, run_arg)' in a new stack.  See stacklet_switch()
  * for the return value.
  */
-stacklet_handle stacklet_new(stacklet_thread_handle thrd,
+RPY_EXPORTED_FOR_TESTS stacklet_handle stacklet_new(stacklet_thread_handle 
thrd,
                              stacklet_run_fn run, void *run_arg);
 
 /* Switch to the target handle, resuming its stack.  This returns:
@@ -44,7 +45,7 @@
  * Don't call this with an already-used target, with EMPTY_STACKLET_HANDLE,
  * or with a stack handle from another thread (in multithreaded apps).
  */
-stacklet_handle stacklet_switch(stacklet_handle target);
+RPY_EXPORTED_FOR_TESTS stacklet_handle stacklet_switch(stacklet_handle target);
 
 /* Delete a stack handle without resuming it at all.
  * (This works even if the stack handle is of a different thread)
diff --git a/rpython/translator/c/test/test_genc.py 
b/rpython/translator/c/test/test_genc.py
--- a/rpython/translator/c/test/test_genc.py
+++ b/rpython/translator/c/test/test_genc.py
@@ -480,6 +480,7 @@
         return 3
 
     f.c_name = 'pypy_xyz_f'
+    f.exported_symbol = True
 
     t = Translation(f, [], backend="c")
     t.annotate()
diff --git a/rpython/translator/interactive.py 
b/rpython/translator/interactive.py
--- a/rpython/translator/interactive.py
+++ b/rpython/translator/interactive.py
@@ -1,5 +1,6 @@
 from rpython.translator.translator import TranslationContext
 from rpython.translator import driver
+from rpython.rlib.entrypoint import export_symbol
 
 
 DEFAULTS = {
@@ -14,7 +15,7 @@
         self.driver = driver.TranslationDriver(overrides=DEFAULTS)
         self.config = self.driver.config
 
-        self.entry_point = entry_point
+        self.entry_point = export_symbol(entry_point)
         self.context = TranslationContext(config=self.config)
 
         policy = kwds.pop('policy', None)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to