[C++-sig] Boost Python: C++ struct with a function pointer

puneet goel p_goel at coverify.net
Tue Mar 2 12:09:49 CET 2010


I am boost.python newbie. I tried searching the web for a solution but
could not find one.
I am trying to generate Python Bindings for a C++ API. The API has
some data structures with a set function pointers as its members.

struct foo {
  int a, b;
  char *str;

  int (*func1) ();
  int (*func2) ();

I am wondering if it is possible to bind this struct to Python. Let me
know how this can be done.

- Puneet

More information about the Cplusplus-sig mailing list