On Mon, Jul 21, 2008 at 5:50 PM, Vincent Ferries
<vin...@gm...> wrote:
> My work is going pretty well thanks to all your support and advices,
> and I can see the light.
> Unfortunately, I encountered another problem.
>
> Using one of the wrapped methods, I've a Segmentation fault exception.
> I tried to call this method with the same argument directly from my
> C++ compiled code and all worked well, without any exception.
>
> I double-looked at my python code and can't see any mistake.
>
> This method is defined in a class called NastranDatabase. It simply
> reads a file and stores the data in the NastranDatabase class as
> attributes.
> The method has 6 parameters, the last 2 ones are optional.
> Param 1 : string const & -> the file name
> Param 2 : vector<std::string> const & -> just a filter, I can put an
> empty vector in
> Param 3 : string const & -> the jidType, no matter what it is, I can
> give it an empty string
> Param 4 : map<std::string, std::string> const & -> another filter, I
> can put an empty map in
> Param 5 : boolean -> verbose or not
> Param 6 : boolean -> If we must read the header or not, default false
> This method doesn't return anything.
>
> I tried following solutions to map it correctly :
> - leaving py++ generate it automaticaly
> - a lot of different method conversions like
> nastranDb.member_functions('readBdf').add_transformation(FT.modify_type(0,
> declarations.remove_reference), FT.input(1), FT.input(2), FT.input(3))
>
> None of these worked.
> The wrapper generation and the compilation seem to work fine.
> But the execution never work...
>
> Do you have an idea of what could be wrong?
No. In order to save you and me time, please create small and complete
example that reproduce the problem.
This is the only way to solve issues like that.
P.S. It looks like the member function could be exposed as-is, you
don't need any function transformations.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|