Browse files

Put a MODULE= line at the end of the xs, so the boot stuff goes in th…

…e right module.

Fix a SvIV that excaped back into a SvPV_nolen.
  • Loading branch information...
1 parent 1ce7d24 commit 395c415e36f5f6d1876f19a0615b211e2e2bd7c2 @theorbtwo committed Mar 12, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/ExtUtils/XSify.pm
View
8 lib/ExtUtils/XSify.pm
@@ -147,6 +147,12 @@ END
}
}
+ $self->xs_file->print(<<END);
+
+MODULE = $base PACKAGE = $base
+
+END
+
$self->typemap->write(file => $self->output_dir."/typemap") or die;
}
@@ -381,7 +387,7 @@ END
code => <<END);
if( sv_isobject(\$arg) && (SvTYPE(SvRV(\$arg)) == SVt_PVMG) ) {
/* FIXME: Should probably check if isa $perl_name */
- \$var = (\$type)SvIV((SV*)SvRV( \$arg ));
+ \$var = (\$type)SvPV_nolen((SV*)SvRV( \$arg ));
} else if ( !SvOK(\$arg) ) {
\$var = NULL;
} else {

0 comments on commit 395c415

Please sign in to comment.