Howdy!

I'm wrapping a C libary with Boost Python and having a really difficult time
with void * typedefs. For example, here's a typedef and the function header
that uses it:

typedef void * EmoEngineEventHandle;
EmoEngineEventHandle EE_EmoEngineEventCreate();

And my undoubtedly overly simplistic wrapper for the function:

def("EE_EmoEngineEventCreate", EE_EmoEngineEventCreate);

The compiler complains with lots of similar messages:

1>C:\boost_1_45_0\boost/python/detail/caller.hpp(223) : error C2027: use of
undefined type
'boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<T>'
1>        with
1>        [
1>            T=result_t
1>        ]
1>        C:\boost_1_45_0\boost/python/detail/caller.hpp(200) : while
compiling class template member function 'PyObject
*boost::python::detail::caller_arity<0>::impl<F,Policies,Sig>::operator
()(PyObject *,PyObject *)'
1>        with
1>        [
1>            F=void (__cdecl *)(void),
1>            Policies=boost::python::default_call_policies,
1>            Sig=boost::mpl::vector1<EmoEngineEventHandle>
1>        ]

There are also functions that pass these typedefs as args, and I expect I'll
have problems with these, too. i.e.:

void EE_EmoEngineEventFree(EmoEngineEventHandle hEvent);

There are a *lot* of these functions in the library I'm wrapping that use
and return void * typedefs. Is there a way to translate the typedefs to get
all of my function wrappers to pass them properly? Failing that, how do I
modify my wrappers to support the typedefs?

Much obliged,
Jacob Davis
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to