Hope this is not too elementary for this group else please redirect to another group which is more appropiate for XS-newbies like me.
After programming perl for 5 years I thought it is time to learn XS and so I walked through the XS-manpages and amazingly everythings worked fine until I had the idea that I could restore a C-structure into my perl-Object.
----------------------------8<----------------------------
void
xs_convert( self, svgfile, bitmapfile, dpi=0, format="png", quality=100 )
SV * sv
char * svgfile
char * bitmapfile
double dpi
char * format
int quality
PREINIT:
HV* real_obj = (HV *)SvRV(self);
CODE:
GdkPixbuf *pixbuf;g_type_init ();
if (dpi > 0.) {
rsvg_set_default_dpi (dpi);
}pixbuf = rsvg_pixbuf_from_file( svgfile, NULL );
hv_store(real_obj, "pixbuf", 6, ???what goes here???, 0);
save( quality, format, pixbuf, bitmapfile );
g_object_unref ( G_OBJECT (pixbuf) ); ----------------------------8<----------------------------
I'm not sure about the following things:
1. How to store a value into a instance-var 2. How to store the value of pixbuf into the an perl var
thx
Tom
