Help for this page

Select Code to Download


  1. or download this
          SP -= items; PUSHMARK(SP); SPAGAIN; /* these pass this set of ar
    +gs on */
          int retvals = perl_call_method("new", G_SCALAR);
          SPAGAIN;
          if (retvals != 1) barf("new returned no values");
          RETVAL = POPs;
    
  2. or download this
    SV *
    topdl(klass, arg1, ...)
    ...
        SvREFCNT_inc(RETVAL);
      OUTPUT:
        RETVAL
    
  3. or download this
    SP -= items; /* make the local SP point at our ST(0) */
    PUSHMARK(SP); /* make the next function's ST(0) be that */
    ...
    SPAGAIN; /* set our local SP to the global "top of current stack" */
    if (retvals != 1) barf("new returned no values"); /* use croak in non-
    +PDL code */
    RETVAL = POPs; /* set the SV* to the return value */