-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypemap
41 lines (33 loc) · 1.19 KB
/
typemap
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
TYPEMAP
uu2System * O_SYSTEM_OBJECT
uu2Unit * O_UNIT_OBJECT
uu2Converter * O_CONVERTER_OBJECT
INPUT
O_SYSTEM_OBJECT
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
$var = INT2PTR($type,SvIV((SV*)SvRV( $arg )));
else{
warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
XSRETURN_UNDEF;
}
O_UNIT_OBJECT
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
$var = INT2PTR($type,SvIV((SV*)SvRV( $arg )));
else{
warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
XSRETURN_UNDEF;
}
O_CONVERTER_OBJECT
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
$var = INT2PTR($type,SvIV((SV*)SvRV( $arg )));
else{
warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
XSRETURN_UNDEF;
}
OUTPUT
O_SYSTEM_OBJECT
sv_setref_pv( $arg, (char *)\"Physics::Udunits2::System\", (void*)$var );
O_UNIT_OBJECT
sv_setref_pv( $arg, (char *)\"Physics::Udunits2::Unit\", (void*)$var );
O_CONVERTER_OBJECT
sv_setref_pv( $arg, (char *)\"Physics::Udunits2::Converter\", (void*)$var );