File: typemap

package info (click to toggle)
libgraphics-libplot-perl 2.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: perl: 369; ansic: 238; makefile: 5
file content (99 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download | duplicates (7)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# $Header$ 
# basic C types
int			T_IV
unsigned		T_IV
unsigned int		T_IV
long			T_IV
unsigned long		T_IV
short			T_IV
unsigned short		T_IV
char			T_CHAR
unsigned char		T_U_CHAR
char *			T_PV
unsigned char *		T_PV
caddr_t			T_PV
wchar_t *		T_PV
wchar_t			T_IV
bool_t			T_IV
size_t			T_IV
ssize_t			T_IV
time_t			T_NV
unsigned long *		T_OPAQUEPTR
char **			T_PACKED
void *			T_PTR
Time_t *		T_PV
SV *			T_SV
SVREF			T_SVREF
AV *			T_AVREF
HV *			T_HVREF
CV *			T_CVREF

IV			T_IV
I32			T_IV
I16			T_IV
I8			T_IV
U32			T_U_LONG
U16			T_U_SHORT
U8			T_IV
Result			T_U_CHAR
Boolean			T_IV
double			T_DOUBLE
SysRet			T_SYSRET
SysRetLong		T_SYSRET
#FILE *			T_IN
#FileHandle		T_PTROBJ
#InputStream		T_IN
#InOutStream		T_INOUT
#OutputStream		T_OUT


double *		T_PV
float  *		T_PV
double **		T_PV
int    *                T_PV
u_int			T_U_LONG

INPUT

#T_PTROBJ
#	if (sv_isa($arg, \"${ntype}\")) {
#	    IV tmp = SvIV((SV*)SvRV($arg));
#	    $var = ($type) tmp;
#	}
#	else
#	    croak(\"$var is not of type ${ntype}\")

T_PTROBJ
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = ($type) tmp;

O_OBJECT
 if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
   $var = ($type)SvIV((SV*)SvRV( $arg ));
   else{
    warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
    XSRETURN_UNDEF;
 }

O_OBJECTR
 if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
   $var = ($type)SvIV(SvRV( $arg ));
   else{
    warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
    XSRETURN_UNDEF;
 }

OUTPUT

# The Perl object is blessed into 'CLASS', which should be a
# char* having the name of the package for the blessing.
O_OBJECT
 sv_setref_pv( $arg, CLASS, (void*)$var );
#O_OBJECT
#  sv_setref_pv($arg, \"${ntype}\", (void*)$var);

T_PTROBJ
	sv_setref_pv($arg, \"${ntype}\", (void*)$var);

#############################################################################