ExtUtils-XSBuilder
view release on metacpan or search on metacpan
XSBuilder/WrapXS.pm view on Meta::CPAN
if ($passthru) {
$thx ||= 'aTHX_ ';
$parms = 'items, MARK+1, SP';
}
my $retval = $return_type eq 'void' ?
["", ""] : ["RETVAL = ", "OUTPUT:\n RETVAL\n"];
my $retnum = $retdecl?scalar(@$retargs) + ($return_type eq 'void' ?0:1):0 ;
$code .= $retdecl?"PPCODE:":"CODE:" ;
$code .= "\n $retval->[0]$dispatch($thx$parms);\n" ;
if ($retdecl) {
my $retclass = $self -> typemap -> map_class ($return_type) || $return_type ;
if ($retclass =~ / /)
{
print "ERROR: return class '$retclass' contains spaces" ;
}
$code .= " XSprePUSH;\n" ;
$code .= " EXTEND(SP, $retnum) ;\n" ;
$code .= ' PUSHs(' . $self -> convert_2obj ($retclass, 'RETVAL') . ") ;\n" ;
( run in 1.345 second using v1.01-cache-2.11-cpan-71847e10f99 )