Avoids calling ffi.dlopen(None) on Windows
ffi.dlopen(None) cannot work on Windows and it is a
known issue [1]. This patch avoids this call on Windows
hosts.
[1] https://bugs.python.org/issue23606
Change-Id: I44436146cdc402087f33f4b99054176134ec5b81
Closes-Bug: #1788025
(cherry picked from commit b1f50df3b1
)
This commit is contained in:
parent
26f834d617
commit
f7ba0aa49a
|
@ -108,13 +108,13 @@ int prctl (int __option, ...);
|
|||
'''
|
||||
|
||||
ffi = cffi.FFI()
|
||||
crt = ffi.dlopen(None)
|
||||
ffi.cdef(CDEF)
|
||||
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
# mock.patching crt.* directly seems to upset cffi. Use an
|
||||
# indirection point here for easier testing.
|
||||
crt = ffi.dlopen(None)
|
||||
_prctl = crt.prctl
|
||||
_capget = crt.capget
|
||||
_capset = crt.capset
|
||||
|
|
Loading…
Reference in New Issue