Author: Armin Rigo <ar...@tunes.org>
Branch: static-callback-embedding
Changeset: r2518:59062d93c601
Date: 2016-01-02 19:37 +0100
http://bitbucket.org/cffi/cffi/changeset/59062d93c601/

Log:    updates

diff --git a/demo/embedding.py b/demo/embedding.py
--- a/demo/embedding.py
+++ b/demo/embedding.py
@@ -7,9 +7,7 @@
 """, dllexport=True)
 
 ffi.embedding_init_code("""
-    print "preparing"
-
-    intern("foo")
+    print "preparing"   # printed once
 
     @ffi.def_extern()
     def add(x, y):
@@ -20,4 +18,9 @@
 ffi.set_source("_embedding_cffi", """
 """)
 
-ffi.compile()
+#ffi.compile()   -- should be fixed to do the right thing
+
+ffi.emit_c_code('_embedding_cffi.c')
+# then call the compiler manually with the proper options, like:
+#    gcc -shared -fPIC _embedding_cffi.c -o _embedding_cffi.so -lpython2.7
+#        -I/usr/include/python2.7
diff --git a/demo/embedding_test.c b/demo/embedding_test.c
--- a/demo/embedding_test.c
+++ b/demo/embedding_test.c
@@ -1,7 +1,7 @@
 /* Link this program with libembedding_test.so.
    E.g. with gcc:
 
-      gcc -o embedding_test embedding_test.c _embedding_cffi.so -lpython2.7
+      gcc -o embedding_test embedding_test.c _embedding_cffi.so
 */
 
 #include <stdio.h>
diff --git a/testing/embedding/test_tlocal.py b/testing/embedding/test_tlocal.py
--- a/testing/embedding/test_tlocal.py
+++ b/testing/embedding/test_tlocal.py
@@ -5,6 +5,6 @@
     def test_thread_local(self):
         self.prepare_module('tlocal')
         self.compile('tlocal-test', ['_tlocal_cffi'], ['-pthread'])
-        for i in range(50):
+        for i in range(10):
             output = self.execute('tlocal-test')
             assert output == "done\n"
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to