-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtypemap
More file actions
25 lines (20 loc) · 763 Bytes
/
typemap
File metadata and controls
25 lines (20 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);