-
Notifications
You must be signed in to change notification settings - Fork 3
/
typemap
71 lines (63 loc) · 2.17 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
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
TYPEMAP
DNS__LDNS__Zone LDNS_GENERIC_STRUCT
DNS__LDNS__RRList LDNS_GENERIC_STRUCT
DNS__LDNS__RR LDNS_GENERIC_STRUCT
DNS__LDNS__RData LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecZone LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecRRSets LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecRRs LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecName LDNS_GENERIC_STRUCT
DNS__LDNS__RBTree LDNS_GENERIC_STRUCT
DNS__LDNS__RBNode LDNS_GENERIC_STRUCT
DNS__LDNS__Resolver LDNS_GENERIC_STRUCT
DNS__LDNS__Packet LDNS_GENERIC_STRUCT
DNS__LDNS__Key LDNS_GENERIC_STRUCT
DNS__LDNS__KeyList LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecDataChain LDNS_GENERIC_STRUCT
DNS__LDNS__DNSSecTrustTree LDNS_GENERIC_STRUCT
Mortal_PV Mortal_PV
DNS__LDNS__RR__Opt LDNS_GENERIC_STRUCT_OPT
DNS__LDNS__RData__Opt LDNS_GENERIC_STRUCT_OPT
LDNS_Pkt_Opcode T_ENUM
LDNS_Pkt_Rcode T_ENUM
LDNS_Pkt_Section T_ENUM
LDNS_Pkt_Type T_ENUM
LDNS_RR_Type T_ENUM
LDNS_RR_Class T_ENUM
LDNS_RDF_Type T_ENUM
LDNS_Hash T_ENUM
LDNS_Status T_ENUM
LDNS_Signing_Algorithm T_ENUM
uint32_t T_UV
uint16_t T_UV
uint8_t T_UV
signed char T_UV
INPUT
LDNS_GENERIC_STRUCT_OPT
if (!SvOK($arg)) {
$var = NULL;
}
else if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\")){
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type, tmp);
}
else
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\")
INPUT
LDNS_GENERIC_STRUCT
if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")){
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type, tmp);
}
else
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")
OUTPUT
LDNS_GENERIC_STRUCT
sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\", (void*)$var);
OUTPUT
LDNS_GENERIC_STRUCT_OPT
sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\", (void*)$var);
OUTPUT
Mortal_PV
sv_setsv($arg, sv_2mortal(newSVpv($var, 0)));
free((void *)$var);