[C++-sig] [Py++] Missing struct

Nikolaus Rath Nikolaus at rath.org
Mon Dec 14 14:37:12 CET 2009

Roman Yakovenko <roman.yakovenko at gmail.com> writes:
> On Mon, Dec 14, 2009 at 2:06 AM, Nikolaus Rath <Nikolaus at rath.org> wrote:
>> mb = ctypes_module_builder_t( [header_file], symbols_file, gccxml_cfg )
>> select_fn = lambda f: (check if f is the struct that I want)
>> mb.calldefs( select_fn ).include()
>> But I could not figure out what kind of argument the select_fn function
>> gets. Can you help me out again?
> http://language-binding.net/pygccxml/query_interface.html

Thanks. The following now includes the missing struct:


but I am actually not really interested in that struct itself, but in
the struct fuse_lowlevel_ops whose definitions happens to include a
reference to fuse_conn_info:

# from the generated code
fuse_lowlevel_ops._fields_ = [ #class fuse_lowlevel_ops
    ("init", ctypes.POINTER( ctypes.CFUNCTYPE( None, ctypes.c_void_p, ctypes.POINTER( fuse_conn_info ) ) )),
    ("destroy", ctypes.POINTER( ctypes.CFUNCTYPE( None, ctypes.c_void_p ) )),
# [...]

So I tried to include the class that I'm interested in instead:


but in that case fuse_conn_info is no longer exported. Does that mean
that I have to manually trace and include all dependencies? I can't
quite believe that...



 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

More information about the Cplusplus-sig mailing list