-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error if not match grid-allocating and -freeing routine
- Loading branch information
Showing
4 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
PLcGridPtr T_PTR | ||
PLcGrid2Ptr T_PTR | ||
PLcGridPtr T_PLPTROBJ | ||
PLcGridPtr__OUT T_PLPTROBJ__OUT | ||
PLcGrid2Ptr T_PLPTROBJ | ||
PLcGrid2Ptr__OUT T_PLPTROBJ__OUT | ||
|
||
INPUT | ||
|
||
T_PLPTROBJ | ||
if (!(SvROK($arg) && sv_derived_from($arg, \"$ntype\"))) | ||
Perl_croak_nocontext(\"%s: %s is not of type %s but %s, did you match allocate and free?\", | ||
${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, | ||
\"$var\", \"$ntype\", sv_reftype(SvROK($arg) ? SvRV($arg) : $arg, 1)); | ||
IV tmp = SvIV((SV*)SvRV($arg)); | ||
$var = INT2PTR($type,tmp); | ||
|
||
T_PLPTROBJ__OUT | ||
if (SvROK($arg) && sv_derived_from($arg, \"${(my $ntype = $type) =~ s:__OUT$::; \$ntype}\")) { | ||
IV tmp = SvIV((SV*)SvRV($arg)); | ||
$var = INT2PTR($type,tmp); | ||
} | ||
|
||
OUTPUT | ||
|
||
T_PLPTROBJ__OUT | ||
sv_setref_pv($arg, \"${(my $ntype = $type) =~ s:__OUT$::; \$ntype}\", (void*)$var); |