summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-01-07 10:09:35 +0100
committerArmin Rigo <arigo@tunes.org>2016-01-07 10:09:35 +0100
commitad32e2e8e7c2d3e7fe20e5119846fe5e0ab292ac (patch)
treed426b80e01522c8735ba1aa34bcbc33b196b8c50 /demo
parent4a19cb555f248b75db4f9d8254bfcbdd756d67c3 (diff)
downloadcffi-ad32e2e8e7c2d3e7fe20e5119846fe5e0ab292ac.tar.gz
Stop running the embedding_init_code() code as if it was part of the
extension module. Instead, be explicit and require a "from xx import ffi" line. This is clearer because it is the same line needed at the start of other modules, if the logic becomes too large for this single triple-quoted string.
Diffstat (limited to 'demo')
-rw-r--r--demo/embedding.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/demo/embedding.py b/demo/embedding.py
index c04b02a..279d6f2 100644
--- a/demo/embedding.py
+++ b/demo/embedding.py
@@ -9,6 +9,7 @@ ffi.cdef("""
""", dllexport=True)
ffi.embedding_init_code("""
+ from _embedding_cffi import ffi
print "preparing" # printed once
@ffi.def_extern()