PBS

 view release on metacpan or  search on metacpan

Attr/Attr.xs  view on Meta::CPAN

    if (RETVAL == NULL) {
        XSRETURN_UNDEF;
    }
OUTPUT:
    RETVAL

void
set_name(self, name)
    struct attrl *self
    char         *name
PPCODE:
    self->name = strdup(name);

char *
get_resource(self)
    struct attrl *self
CODE:
    RETVAL = self->resource; 
    if (RETVAL == NULL) {
        XSRETURN_UNDEF;
    }
OUTPUT:
    RETVAL

void
set_resource(self, resource)
    struct attrl *self
    char         *resource
PPCODE:
    self->resource = strdup(resource);

char *
get_value(self)
    struct attrl *self
CODE:
    RETVAL = self->value; 
    if (RETVAL == NULL) {
        XSRETURN_UNDEF;
    }
OUTPUT:
    RETVAL

void
set_value(self, value)
    struct attrl *self
    char         *value
PPCODE:
    self->value = strdup(value);

void
push(self, next)
    struct attrl *self
    struct attrl *next
PPCODE:
    self->next = next;

void
set_current(self, values)
    struct attrl *self
    HV           *values
PREINIT:
    SV           **ssv;
PPCODE:
    ssv = hv_fetch(values, "name", strlen("name"), 0);
    if (ssv != NULL) {
        self->name = SvPV_nolen(*ssv);
    }
    
    ssv = hv_fetch(values, "resource", strlen("resource"), 0);
    if (ssv != NULL) {
        self->resource = SvPV_nolen(*ssv);
    }

Attr/Attr.xs  view on Meta::CPAN

    RETVAL 
CLEANUP:
    SvREFCNT_dec(rtn);

void
DESTROY(self)
    struct attrl *self
PREINIT:
    struct attrl *p;
    struct attrl *q;
PPCODE:
    if (self != NULL) {
        p = self;
        while (p != NULL) {
            q = p;
            p = p->next;
            safefree(q);
        }
    }

Status/Status.xs  view on Meta::CPAN

    }
OUTPUT:
    RETVAL

void
DESTROY(self)
    struct batch_status *self
PREINIT:
    struct batch_status *p;
    struct batch_status *q;
PPCODE:
    if (self != NULL) {
        p = self;
        while (p != NULL) {
           q = p;
           p = p->next;
           safefree(q);
        }
    }

char *

Status/Status.xs  view on Meta::CPAN

    RETVAL = newSV(0);
    RETVAL = newRV_noinc(RETVAL);
    RETVAL = sv_setref_pv(RETVAL, "PBS::Attr", (void *)self->attribs);
OUTPUT:
    RETVAL

void
push(self, next)
    struct batch_status *self
    struct batch_status *next
PPCODE:
    self->next = next;

SV *
get(self)
    struct batch_status *self
PREINIT:
    HV                  *hvval;
    SV                  *svval;
    AV                  *rtn;
    struct batch_status *p;

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 PBS macro", s));
          PUSHs(sv);
          break;

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 PBS macro", s));
          PUSHs(sv);
          break;



( run in 0.642 second using v1.01-cache-2.11-cpan-5511b514fd6 )