logo       

Re: Problems with %rename (const): msg#00166

programming.swig

Subject: Re: Problems with %rename (const)

Emanuel Greisen wrote:

I have been a fool. I mistook IMeshBuffer for SMeshBuffer.

But, the error remains, now I can just figure out more of what is wrong.

SMeshBuffer is a subclass of IMeshBuffer, thus it has (possibly) 4
functions (two regular, and two renamed to const).

Now, I looked into the -dump_tree again (this time the correct place).
And here is what I found:


<snip>

Reducing to the essential bits, you get:

struct SMeshBuffer
{
virtual const video::SMaterial& getMaterial() const
{
return Material;
}

virtual video::SMaterial& getMaterial()
{
return Material;
}

video::SMaterial Material; //! material for this meshBuffer.
};

Bearing in mind that all public members are wrapped with JavaBean type getters and setters, the problem should be apparent. You probably need to make Material private, %ignore or %rename it. I'll see if I can get SWIG to issue a warning in this case for the future.

William

_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise