Roman Yakovenko <roman.yakove...@gmail.com> writes: > May be you should take a look on > "module_builder/ctypes_decl_dependencies.py" module. It contains > "find_out_dependencies" functionality. As input it takes a set of > declarations you want to expose, the output is a set of all classes, > that need to be exposed.
Update: I found an usage example in ctypes_builder.py and came up with the following code: included_decls = set([mb.global_ns.class_('fuse_lowlevel_ops')]) to_be_included = ctypes_decls_dependencies.find_out_dependencies(included_decls) to_be_included.update(included_decls) map( lambda d: d.include(), to_be_included ) but the resulted generated code still contains only the single struct: 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 ) )), ("lookup", ctypes.POINTER( ctypes.CFUNCTYPE( None, ctypes.POINTER( fuse_req ), ctypes.c_ulong, ctypes.c_char_p ) )), although there are clearly dependencies on fuse_conn_info and fuse_req. Thank you for taking so much time on my flood of questions! -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig