Hi, compiling the callback stuff results in warnings/errors I do not fully understand (compiler messages are quoted inline): Torsten Schoenfeld wrote:
To make things easier, you should depend on Gtk2 and thus on Glib. Above the MODULE line, do this: #include <gperl.h> #include <cairo-perl.h> static void perl_aosd_renderer (cairo_t *cr, void *user_data) { GPerlCallback *callback = user_data; dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVCairoContext (cr)));
Aosd.xs: In function 'perl_aosd_renderer': Aosd.xs:28: warning: passing argument 2 of 'Perl_sv_2mortal' makes pointer from integer without a cast
PUSHs (sv_2mortal (newSVsv (callback->data))); PUTBACK; call_sv (callback->func, G_DISCARD); FREETMPS; LEAVE; } And somewhere below the MODULE line, add this: void aosd_set_renderer (Aosd *aosd, SV *func, SV *data=NULL) PREINIT: CPerlCallback *callback; CODE: callback = gperl_callback_new (func, data, 0, NULL, 0); aosd_set_renderer (aosd, perl_aosd_renderer, callback);
Aosd.xs: In function 'XS_X11__Aosd_aosd_set_renderer': Aosd.xs:110: error: 'CPerlCallback' undeclared (first use in this function) Aosd.xs:110: error: (Each undeclared identifier is reported only once Aosd.xs:110: error: for each function it appears in.) Aosd.xs:110: error: 'callback' undeclared (first use in this function) Where does 'CPerlCallback' come from? Can't find it in any header file (grep through /usr/include and /usr/lib/perl), and even Google doesn't know anything about it :) Thanks, Jörn -- $a=$a[8][67][9][0][42][214][82][78][0][50][69][68][69][82][0][73][78][0] [65][0][20][16][0][68][73][77][69][78][83][73][79][78][65][76][0][65][82 ][82][65][89]=sub{sub _($){print$_[ z]}($z,$i)= _;(++$i)while!$z->[$i];$ s+=$i;_ chr($i+32);$s!=2292&&&$a($z->[$i],$c>>$e)};&$a(\ a,$d<<$f);_"\n"
Attachment:
pgpV3DXuClMMe.pgp
Description: PGP signature