[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


Greetings

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 {
public:
  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.

Regards
- Puneet


More information about the Cplusplus-sig mailing list