summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-01-08 11:01:49 +0100
committerArmin Rigo <arigo@tunes.org>2016-01-08 11:01:49 +0100
commit67a018017d788b03619b38631439e31514837d6c (patch)
treec153351c93aba445a61529b6bb72d0d36c7b5c75 /demo
parent6cde8fe03724d78dbb61b510af06a2211eae98aa (diff)
downloadcffi-67a018017d788b03619b38631439e31514837d6c.tar.gz
in-progress: work work work to port this to Python 3
Diffstat (limited to 'demo')
-rw-r--r--demo/embedding.py4
-rw-r--r--demo/embedding_test.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/demo/embedding.py b/demo/embedding.py
index f20b4e4..516373d 100644
--- a/demo/embedding.py
+++ b/demo/embedding.py
@@ -10,11 +10,11 @@ ffi.cdef("""
ffi.embedding_init_code("""
from _embedding_cffi import ffi
- print "preparing" # printed once
+ print("preparing") # printed once
@ffi.def_extern()
def add(x, y):
- print "adding", x, "and", y
+ print("adding %d and %d" % (x, y))
return x + y
""")
diff --git a/demo/embedding_test.c b/demo/embedding_test.c
index 2f050ee..87d313b 100644
--- 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
+ gcc -o embedding_test embedding_test.c _embedding_cffi*.so
*/
#include <stdio.h>