diff options
author | Armin Rigo <arigo@tunes.org> | 2012-09-24 11:00:04 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2012-09-24 11:00:04 +0200 |
commit | f93997ba8e75434dc9b6e7479cae324fa7e7c081 (patch) | |
tree | 5b5efd276f4a6779b860eb4419416d9493400b38 /testing/test_function.py | |
parent | 42b970f5cf60781d3b41916bb99b958c6bac53d8 (diff) | |
download | cffi-f93997ba8e75434dc9b6e7479cae324fa7e7c081.tar.gz |
Change the default dlopen() flags from RTLD_LAZY to RTLD_NOW.
Give access to all flags, for more precise control.
Diffstat (limited to 'testing/test_function.py')
-rw-r--r-- | testing/test_function.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/test_function.py b/testing/test_function.py index 29ccbd2..a4703a9 100644 --- a/testing/test_function.py +++ b/testing/test_function.py @@ -68,6 +68,15 @@ class TestFunction(object): x = m.sin(1.23) assert x is None + def test_dlopen_flags(self): + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" + double cos(double x); + """) + m = ffi.dlopen("m", ffi.RTLD_LAZY | ffi.RTLD_LOCAL) + x = m.cos(1.23) + assert x == math.cos(1.23) + def test_tlsalloc(self): if sys.platform != 'win32': py.test.skip("win32 only") |