examples/unix/ffi_example.py: Remove TODO, make output more clear.
This commit is contained in:
parent
ecfd8e102d
commit
70536212d5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue