line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "EXTERN.h" |
2
|
|
|
|
|
|
|
#include "perl.h" |
3
|
|
|
|
|
|
|
#include "XSUB.h" |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
MODULE = D64::Disk::Layout::Dir PACKAGE = D64::Disk::Layout::Dir |
6
|
|
|
|
|
|
|
PROTOTYPES: ENABLE |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# my $var_iok = _set_iok($var); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
SV* |
11
|
|
|
|
|
|
|
_set_iok(var) |
12
|
|
|
|
|
|
|
SV *var |
13
|
|
|
|
|
|
|
CODE: |
14
|
416
|
50
|
|
|
|
|
if (SvIOKp(var) || SvNOKp(var)) { |
|
|
0
|
|
|
|
|
|
15
|
416
|
|
|
|
|
|
SvIOK_on(var); |
16
|
416
|
50
|
|
|
|
|
if (SvNOK(var)) |
17
|
0
|
0
|
|
|
|
|
sv_setiv(var, (IV) SvNV(var)); |
18
|
416
|
50
|
|
|
|
|
RETVAL = newSViv(SvIV(var)); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
else { |
21
|
0
|
|
|
|
|
|
XSRETURN_UNDEF; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
OUTPUT: |
24
|
|
|
|
|
|
|
RETVAL |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# my $int = _magic_to_int($magic); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
SV* |
29
|
|
|
|
|
|
|
_magic_to_int(magic) |
30
|
|
|
|
|
|
|
SV *magic |
31
|
|
|
|
|
|
|
CODE: |
32
|
98
|
50
|
|
|
|
|
if (SvIOKp(magic)) |
33
|
98
|
50
|
|
|
|
|
RETVAL = newSViv(SvIV(magic)); |
34
|
|
|
|
|
|
|
else |
35
|
0
|
|
|
|
|
|
XSRETURN_UNDEF; |
36
|
|
|
|
|
|
|
OUTPUT: |
37
|
|
|
|
|
|
|
RETVAL |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# my $is_numeric = _is_numeric($var); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
SV* |
42
|
|
|
|
|
|
|
_is_numeric(var) |
43
|
|
|
|
|
|
|
SV *var |
44
|
|
|
|
|
|
|
CODE: |
45
|
29
|
100
|
|
|
|
|
if (SvIOKp(var) || SvNOKp(var)) |
|
|
100
|
|
|
|
|
|
46
|
11
|
|
|
|
|
|
RETVAL = newSViv(1); |
47
|
|
|
|
|
|
|
else |
48
|
18
|
|
|
|
|
|
RETVAL = newSViv(0); |
49
|
|
|
|
|
|
|
OUTPUT: |
50
|
|
|
|
|
|
|
RETVAL |