-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypemap
42 lines (38 loc) · 1.32 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
_Bool T_IV
void * T_PTROBJ
const void * T_PTROBJ
nfc_device_spec_t T_PTROBJ
nfc_property T_U_CHAR
nfc_modulation_type T_ENUM
nfc_modulation_type * T_PTROBJ
nfc_baud_rate T_ENUM
nfc_baud_rate * T_PTROBJ
uint32_t T_UV
uint32_t * T_PTROBJ
size_t * T_PTROBJ
uint64_t T_NV
uint8_t T_U_CHAR
uint8_t * T_PV
const uint8_t * T_PV
RFID::Libnfc::ISO14443AInfo T_PTROBJ
RFID::Libnfc::TargetInfo T_PTROBJ
RFID::Libnfc::Device T_PTROBJ
RFID::Libnfc::Target T_PTROBJ
RFID::Libnfc::Modulation T_PTROBJ
#############################################################################
INPUT
T_OPAQUE_STRUCT
if (sv_derived_from($arg, \"${ntype}\")) {
STRLEN len;
char *s = SvPV((SV*)SvRV($arg), len);
if (len != sizeof($var))
croak(\"Size %d of packed data != expected %d\",
len, sizeof($var));
$var = *($type *)s;
}
else
croak(\"$var is not of type ${ntype}\")
#############################################################################
OUTPUT
T_OPAQUE_STRUCT
sv_setref_pvn($arg, \"${ntype}\", (char *)&$var, sizeof($var));