gtk2-perl / casting from perl objects to gtk objects



Goran,

There are many times in the C code where there is the need to
cast/convert from the perl objet to the gtk object, for example:

(GtkWidget*) SvIV(SvRV(widget))
(GtkProgressBar*) SvIV(SvRV(pbar))
etc

Would you accept a patch that would convert all those to a
shorter macro we could use to make the code lighter?

I'm thinking of:

#define pGtkWidget(o) ((GtkWidget*) SvIV(SvRV(o)))
#define pGtkProgressBar(o) ((GtkProgressBar*) SvIV(SvRV(o)))
etc

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/



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