gtk2-perl / casting from perl objects to gtk objects


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))

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)))

Guillaume Cottenceau -

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