Commit 70536212 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

examples/unix/ffi_example.py: Remove TODO, make output more clear.

parent ecfd8e10
......@@ -18,8 +18,8 @@ print()
perror("ffi before error")
open("somethingnonexistent__", 0)
print(errno)
print(errno.get())
print("errno object:", errno)
print("errno value:", errno.get())
perror("ffi after error")
print()
......@@ -32,8 +32,7 @@ def cmp(pa, pb):
cmp_c = ffi.callback("i", cmp, "pp")
print("callback:", cmp_c)
# TODO: violates Py semantics, pass bytearray
s = "foobar"
s = bytearray(b"foobar")
print("org string:", s)
qsort(s, len(s), 1, cmp_c)
print("qsort'ed:", s)
print("qsort'ed string:", s)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment