Re: [pygccxml-development] Two problems
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-05-31 20:05:10
|
On 5/31/06, Lakin Wecker <lak...@gm...> wrote:
> In finishing the Ogre bindings, I have run into two problems (one is
> caused by the other).
>
> 1. First, I get an error when compiling Matrix4.cpp ..
I will take a look and give you an answer
> 2. But if I take Matrix4 out, (just so I can test the basics of the
> bindings), I get the following:
> build/TagPoint.pypp.cpp:94: instantiated from here
> /usr/include/boost/python/detail/invoke.hpp:88: error: no match for
> call to '(const
> boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const
> Ogre::Matrix4&>) (const Ogre::Matrix4&)'
If you does not register Matrix4 you can use API that takes it as argument
or returns it.
> but, I have the following python code in my generate script, which (if
> I understand correctly) should take care of it:
>
> This code doesn't work, it returns 0 results:
> matrix4 = ogre_ns.calldefs(return_type="const Ogre::Matrix4&")
----------------------------------------------------------^^^^^^^^^^^^^
I am not sure about this. The best way to do this is to find some function that
return const Ogre::Matrix4& and then
print func.return_type.decl_string
After this you can use the printed text in queries. In this case I
guess it will
be written "Ogre::Matrix const &", but I could be wrong
> matrix4.call_policies = call_policies.return_value_policy(
> call_policies.reference_existing_object )
>
> This code works for nearly all other pointer/reference types, but I
> still get that error?!
> mem_funs = ogre_ns.calldefs()
> for mem_fun in mem_funs:
> if mem_fun.call_policies:
> continue
> if declarations.is_pointer (mem_fun.return_type) \
> or declarations.is_reference (mem_fun.return_type):
> mem_fun.call_policies = call_policies.return_value_policy(
> call_policies.reference_existing_object )
I don't see any problem with the code.
> Lakin
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|