Ceph-Rados-Striper

 view release on metacpan or  search on metacpan

Striper.xs  view on Meta::CPAN

    RETVAL

void
_stat(striper, soid)
    rados_striper_t  striper
    const char *     soid
  PREINIT:
    size_t           psize;
    time_t           pmtime;
    int              err;
  PPCODE:
    err = rados_striper_stat(striper, soid, &psize, &pmtime);
    if (err < 0)
        croak("cannot stat object '%s': %s", soid, strerror(-err));
    XPUSHs(sv_2mortal(newSVuv(psize)));
    XPUSHs(sv_2mortal(newSVuv(pmtime)));

SV *
_read(striper, soid, len, off = 0)
    rados_striper_t  striper
    const char *     soid

fallback/const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	IV		iv;
	/* 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:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* 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 Ceph::Rados::Striper macro", s));
          PUSHs(sv);



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