Last active
January 3, 2016 11:29
-
-
Save public/8456596 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CDEF = """ | |
| typedef ... ENGINE; | |
| typedef ... ENGINE_CIPHERS_PTR; | |
| int ENGINE_set_ciphers(ENGINE *, ENGINE_CIPHERS_PTR); | |
| """ | |
| f = cffi.FFI() | |
| f.cdef(CDEF) | |
| lib = f.verify(""" | |
| #include <openssl/engine.h> | |
| """, | |
| libraries=["ssl", "crypto"] | |
| ) | |
| f.typeof(lib.ENGINE_set_ciphers) | |
| """ | |
| Traceback (most recent call last): | |
| File "incomplete.py", line 18, in <module> | |
| f.typeof(lib.ENGINE_set_ciphers) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/api.py", line 164, in typeof | |
| res = _builtin_function_type(cdecl) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/api.py", line 487, in _builtin_function_type | |
| return ffi._get_cached_btype(tp) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/api.py", line 322, in _get_cached_btype | |
| BType = type.get_cached_btype(self, finishlist) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/model.py", line 37, in get_cached_btype | |
| BType = self.build_backend_type(ffi, finishlist) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/model.py", line 172, in build_backend_type | |
| tuple(args), result, self.ellipsis) | |
| File "/home/alexs/.virtualenvs/CRYPT/local/lib/python2.7/site-packages/cffi/model.py", line 477, in global_cache | |
| res = getattr(ffi._backend, funcname)(*args) | |
| TypeError: ctype 'ENGINE_CIPHERS_PTR' has incomplete type | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment