Created
August 20, 2018 02:04
-
-
Save raku-cat/7221ee2e1b2f035b94f477cb5e7d16b4 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
Python 3.6.6 (default, Jun 27 2018, 14:44:17) | |
[GCC 8.1.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from cffi import FFI | |
>>> ffi = FFI() | |
>>> ffi.cdef(""" | |
... char* crypt(const char*, const char*); | |
... """) | |
>>> C = ffi.dlopen(None) | |
>>> ffi.string(C.crypt("流れる".encode("sjis"), b"ab")) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python3/dist-packages/cffi/api.py", line 882, in __getattr__ | |
make_accessor(name) | |
File "/usr/lib/python3/dist-packages/cffi/api.py", line 878, in make_accessor accessors[name](name) | |
File "/usr/lib/python3/dist-packages/cffi/api.py", line 808, in accessor_function | |
value = backendlib.load_function(BType, name) | |
AttributeError: function/symbol 'crypt' not found in library '<None>': python3: undefined symbol: crypt | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment