diff options
author | Maciej Fijalkowski <fijall@gmail.com> | 2012-06-14 16:28:17 +0200 |
---|---|---|
committer | Maciej Fijalkowski <fijall@gmail.com> | 2012-06-14 16:28:17 +0200 |
commit | 468c3970461dd7adfab2ae589f5671d6f301b49f (patch) | |
tree | f7e6644a52e9ab514cdcc4f743bf7030a78f221c /README.md | |
parent | 994850199d7b172a12df4dd0062b8e0db441ea46 (diff) | |
download | cffi-468c3970461dd7adfab2ae589f5671d6f301b49f.tar.gz |
(fijal, arigo) work on example
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 ------- |