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
7bfe4b21
Commit
7bfe4b21
authored
Jan 09, 2015
by
Paul Sokolovsky
Browse files
tests: Make ffi_callback.py be able to run on uclibc and macosx.
Similar to ffi_float.py.
parent
58056b0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unix/ffi_callback.py
View file @
7bfe4b21
...
...
@@ -5,7 +5,18 @@ except ImportError:
print
(
"SKIP"
)
sys
.
exit
()
libc
=
ffi
.
open
(
"libc.so.6"
)
def
ffi_open
(
names
):
err
=
None
for
n
in
names
:
try
:
mod
=
ffi
.
open
(
n
)
return
mod
except
OSError
as
e
:
err
=
e
raise
err
libc
=
ffi_open
((
'libc.so'
,
'libc.so.0'
,
'libc.so.6'
,
'libc.dylib'
))
qsort
=
libc
.
func
(
"v"
,
"qsort"
,
"piip"
)
...
...
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