[pypy-commit] cffi default: (fijal, arigo) work on example
fijal
noreply at buildbot.pypy.org
Thu Jun 14 16:32:27 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r340:dc76fa41d703
Date: 2012-06-14 16:28 +0200
http://bitbucket.org/cffi/cffi/changeset/dc76fa41d703/
Log: (fijal, arigo) work on example
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -20,10 +20,18 @@
>>> 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
-------
More information about the pypy-commit
mailing list