FAQ Database Discussion Community


Python cffi module: does verify() require re-compiling the entire c library I want to use from my python code?

python,python-2.7,ffi,cffi,python-cffi
Say I need to use a few functions from a shared library, e. g. libfoo.so, from python code. I figured the cffi module could help me, especially as it seems to support opaque types if one uses the verify() function. I did not fully understand though, what the documentation means...

cffi function call hangs

common-lisp,sbcl,cffi
I want to use stat(2) from Common Lisp. I've defined the structs used by the stat function: (cffi:defctype mode_t :unsigned-int) (cffi:defctype ino_t :unsigned-int) (cffi:defctype dev_t :int) (cffi:defctype nlink_t :int) (cffi:defctype uid_t :unsigned-int) (cffi:defctype gid_t :unsigned-int) (cffi:defctype off_t :int) (cffi:defctype time_t :long) (cffi:defctype blksize_t :unsigned-int) (cffi:defctype blkcnt_t :int) (cffi:defcstruct stat (st_dev...

where is the text printed by C printf

io,common-lisp,cffi
I happened encounter a trouble with calling C printf function from SBCL via cffi. The problem is when I call printf function, I can't find the output text, just the return value of printf function show on the REPL. But when I quit SBCL, the output text appears on the...

How to support 64 bits pointers in cffi?

python,c++,osx,pointers,cffi
I'm using cffi to interface my Python module with a C-library. I got everything working fine on Linux but I'm having a hard time with Mac OS X (Yosemite - 64 bits). Here is a minimal sample I wrote that shows the problem: foo.h #ifndef FOO_H #define FOO_H #include <stddef.h>...