File: typemap.oldperl

package info (click to toggle)
libimager-perl 1.005%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,308 kB
  • ctags: 4,067
  • sloc: perl: 30,915; ansic: 27,680; makefile: 55; cpp: 4
file content (29 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (4)
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
26
27
28
29
# typemaps for perl before 5.8
# STRLEN isn't in the default typemap in older perls
STRLEN	       	      	T_UV
PerlIO *		T_INOUT

#############################################################################
INPUT
# the pre-5.8.0 T_AVREF input map was fixed in 5.8.0
T_AVREF
	STMT_START {
	    SV *const xsub_tmp_sv = $arg;
	    SvGETMAGIC(xsub_tmp_sv);
            if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv))==SVt_PVAV)
            	$var = (AV*)SvRV(xsub_tmp_sv);
            else
            	Perl_croak(aTHX_ \"$var is not an array reference\");
	} STMT_END

# the pre-5.8.0 T_HVREF input map was fixed in 5.8.0
T_HVREF
	STMT_START {
	    SV *const xsub_tmp_sv = $arg;
	    SvGETMAGIC(xsub_tmp_sv);
            if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv))==SVt_PVHV)
                $var = (HV*)SvRV(xsub_tmp_sv);
            else
            	Perl_croak(aTHX_ \"$var is not a hash reference\");
	} STMT_END