Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
ecfd8e10
Commit
ecfd8e10
authored
Jun 17, 2016
by
Paul Sokolovsky
Browse files
examples/unix/ffi_example.py: Update for current "ffi" module API.
parent
df453f06
Changes
1
Show whitespace changes
Inline
Side-by-side
examples/unix/ffi_example.py
View file @
ecfd8e10
...
...
@@ -5,9 +5,9 @@ print("libc:", libc)
print
()
# Declare few functions
perror
=
libc
.
func
(
"v"
,
"perror"
,
[
"s"
]
)
perror
=
libc
.
func
(
"v"
,
"perror"
,
"s"
)
time
=
libc
.
func
(
"i"
,
"time"
,
"p"
)
open
=
libc
.
func
(
"i"
,
"open"
,
[
"s
"
,
"
i"
]
)
open
=
libc
.
func
(
"i"
,
"open"
,
"si"
)
qsort
=
libc
.
func
(
"v"
,
"qsort"
,
"piip"
)
# And one variable
errno
=
libc
.
var
(
"i"
,
"errno"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment