Re: About method macro



On Fri, 2008-01-18 at 16:04 +0200, Naveen Verma wrote:
> Hi,
> 
> Yes that was the reason. Now one thing I still did not understand how
> we can create a new m4 _CONVERSION macro for any data type conversion
> if it is not already defined.
> 
> I check it the "Wrapping C library"document. There is a one example,
> but I did not understand the third argument with $2, $3 values. 

Here is an example of a conversion 
from 
Glib::TimeVal&
to
GTimeVal*

_CONVERSION(`Glib::TimeVal&', `GTimeVal*', static_cast<$2>(&$3))

$2 is the second argument - GTimeVal*
$3 is the thing actually being converted.

so that would be
static_cast<GTimeVal*>(&the_method_parameter)


-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]