note
syphilis
I'm no expert on XS files either, which is why I usually let Inline::C handle that side of things ... but I don't think 'data' should be safefree()'d ... and I wish you had pointed it out sooner :-) <br><br> I got sidetracked into thinking that there must be something bodgey in the way the GD::Image objects were being created. <br><br>You could probably go a little further and not even declare and assign a value to 'data'. I think one could just as well write
<code>
RETVAL = (GD__Image) gdImageCreateFromGdPtr(len,(void*)SvPV(imageData, len));
</code>but that's only a minor point.<br>It's unclear to me how 'len' gets assigned the appropriate value for when it's needed ... but it seems to happen ok.<br><br>You should probably go to [http://rt.cpan.org/Public/Dist/Display.html?Name=GD] and report the bug there - or at least let the author know.<br><br>Well spotted !!<br><br>Cheers,<br>Rob
527970
528418