Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
805502fe
Commit
805502fe
authored
Mar 24, 2017
by
qinsoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpython tests import dynamic lib as RTLD_GLOBAL so that zebu runtime can
find symbols
parent
30d18479
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_jit/util.py
tests/test_jit/util.py
+5
-5
No files found.
tests/test_jit/util.py
View file @
805502fe
...
...
@@ -72,7 +72,7 @@ def compile_c_script(c_src_name):
return
py
.
path
.
local
(
'emit'
).
join
(
'lib%(testname)s'
%
locals
()
+
libext
)
def
ctypes_fncptr_from_lib
(
libpath
,
fnc_name
,
argtypes
=
[],
restype
=
ctypes
.
c_longlong
,
mode
=
ctypes
.
RTLD_
LOC
AL
):
def
ctypes_fncptr_from_lib
(
libpath
,
fnc_name
,
argtypes
=
[],
restype
=
ctypes
.
c_longlong
,
mode
=
ctypes
.
RTLD_
GLOB
AL
):
lib
=
ctypes
.
CDLL
(
libpath
.
strpath
,
mode
)
fnp
=
getattr
(
lib
,
fnc_name
)
fnp
.
argtypes
=
argtypes
...
...
@@ -80,7 +80,7 @@ def ctypes_fncptr_from_lib(libpath, fnc_name, argtypes=[], restype=ctypes.c_long
return
fnp
,
lib
def
rffi_fncptr_from_lib
(
libpath
,
fnc_name
,
llargtypes
,
restype
,
mode
=
ctypes
.
RTLD_
LOC
AL
):
def
rffi_fncptr_from_lib
(
libpath
,
fnc_name
,
llargtypes
,
restype
,
mode
=
ctypes
.
RTLD_
GLOB
AL
):
from
rpython.rtyper.lltypesystem
import
rffi
from
rpython.translator.platform
import
platform
if
platform
.
name
.
startswith
(
'linux'
):
...
...
@@ -101,7 +101,7 @@ def rffi_fncptr_from_lib(libpath, fnc_name, llargtypes, restype, mode=ctypes.RTL
_nowrapper
=
True
)
def
fncptr_from_c_script
(
c_src_name
,
name
,
argtypes
=
[],
restype
=
ctypes
.
c_ulonglong
,
mode
=
ctypes
.
RTLD_
LOC
AL
):
def
fncptr_from_c_script
(
c_src_name
,
name
,
argtypes
=
[],
restype
=
ctypes
.
c_ulonglong
,
mode
=
ctypes
.
RTLD_
GLOB
AL
):
libpath
=
compile_c_script
(
c_src_name
)
return
ctypes_fncptr_from_lib
(
libpath
,
name
,
argtypes
,
restype
,
mode
)
...
...
@@ -110,7 +110,7 @@ def is_ctypes(t):
return
isinstance
(
t
,
type
(
ctypes
.
c_longlong
))
def
fncptr_from_py_script
(
py_fnc
,
heapinit_fnc
,
name
,
argtypes
=
[],
restype
=
ctypes
.
c_longlong
,
mode
=
ctypes
.
RTLD_
LOC
AL
,
**
kwargs
):
def
fncptr_from_py_script
(
py_fnc
,
heapinit_fnc
,
name
,
argtypes
=
[],
restype
=
ctypes
.
c_longlong
,
mode
=
ctypes
.
RTLD_
GLOB
AL
,
**
kwargs
):
import
os
# NOTE: requires mu-client-pypy
from
rpython.rlib.rmu
import
zebu
as
rmu
...
...
@@ -155,7 +155,7 @@ def may_spawn_proc(test_fnc):
return
wrapper
def
fncptr_from_rpy_func
(
rpy_fnc
,
llargtypes
,
llrestype
,
mode
=
ctypes
.
RTLD_
LOC
AL
,
**
kwargs
):
def
fncptr_from_rpy_func
(
rpy_fnc
,
llargtypes
,
llrestype
,
mode
=
ctypes
.
RTLD_
GLOB
AL
,
**
kwargs
):
# NOTE: requires mu-client-pypy
from
rpython.rtyper.lltypesystem
import
rffi
from
rpython.translator.interactive
import
Translation
...
...
Write
Preview
Markdown
is supported
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