Help for this page

Select Code to Download


  1. or download this
        /* assume "buffer" is a C struct */
        /* assume "package" is a perl string naming the package
    ...
    
        /* ref is now a perl object containing a pointer to the "buffer" s
    +truct */
    
  2. or download this
        if (sv_derived_from(sv, "Expected::Package"))
           buffer_pointer = (buffer_type*) SvIV((SV*)SvRV(perlobject));