Image-PNG-Libpng

 view release on metacpan or  search on metacpan

Libpng.xs  view on Meta::CPAN



void
perl_png_get_internals (Png)
	Image::PNG::Libpng Png
PREINIT:
	png_structp png;
	png_infop info;
	SV * png_sv;
	SV * info_sv;
PPCODE:
	png = Png->png;
	info = Png->info;
	png_sv = newSViv (PTR2IV (png));
	info_sv = newSViv (PTR2IV (info));
	XPUSHs(sv_2mortal(png_sv));
	XPUSHs(sv_2mortal(info_sv));


int
perl_png_libpng_supports (what)

const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	/* IV		iv;	Uncomment this if you need to return IVs */
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv =
	    sv_2mortal(newSVpvf("%s is not a valid Image::PNG::Libpng macro", s));
          PUSHs(sv);
          break;
        case PERL_constant_NOTDEF:



( run in 0.867 second using v1.01-cache-2.11-cpan-71847e10f99 )