summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMaciej Fijalkowski <fijall@gmail.com>2012-06-14 16:28:17 +0200
committerMaciej Fijalkowski <fijall@gmail.com>2012-06-14 16:28:17 +0200
commit468c3970461dd7adfab2ae589f5671d6f301b49f (patch)
treef7e6644a52e9ab514cdcc4f743bf7030a78f221c /README.md
parent994850199d7b172a12df4dd0062b8e0db441ea46 (diff)
downloadcffi-468c3970461dd7adfab2ae589f5671d6f301b49f.tar.gz
(fijal, arigo) work on example
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 12 insertions, 4 deletions
diff --git a/README.md b/README.md
index 8ae81b6..b2a0661 100644
--- a/README.md
+++ b/README.md
@@ -20,10 +20,18 @@ Simple example
>>> from cffi import FFI
>>> ffi = FFI()
>>> ffi.cdef("""
- ... int printf(const char *format, ...);
- ... """)
- >>> C = ffi.rawload(None) # loads the entire C namespace
- >>> C.printf("hi there, %s!\n", ffi.new("char[]", "world"));
+ ... int printf(const char *format, ...); // copy-pasted from the man page
+ ... """)
+ >>> C = ffi.dlopen(None) # loads the entire C namespace
+ >>> arg = ffi.new("char[]", "world") # equivalent to C code: char arg[] = "world";
+ >>> C.printf("hi there, %s!\n", arg); # call printf
+ hi there, world!
+ >>>
+
+More documentation
+------------------
+
+See [More docs](https://bitbucket.org/xxx) for examples and supported features.
Contact
-------