line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#define PERL_constant_NOTFOUND 1 |
2
|
|
|
|
|
|
|
#define PERL_constant_NOTDEF 2 |
3
|
|
|
|
|
|
|
#define PERL_constant_ISIV 3 |
4
|
|
|
|
|
|
|
#define PERL_constant_ISNO 4 |
5
|
|
|
|
|
|
|
#define PERL_constant_ISNV 5 |
6
|
|
|
|
|
|
|
#define PERL_constant_ISPV 6 |
7
|
|
|
|
|
|
|
#define PERL_constant_ISPVN 7 |
8
|
|
|
|
|
|
|
#define PERL_constant_ISSV 8 |
9
|
|
|
|
|
|
|
#define PERL_constant_ISUNDEF 9 |
10
|
|
|
|
|
|
|
#define PERL_constant_ISUV 10 |
11
|
|
|
|
|
|
|
#define PERL_constant_ISYES 11 |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#ifndef NVTYPE |
14
|
|
|
|
|
|
|
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ |
15
|
|
|
|
|
|
|
#endif |
16
|
|
|
|
|
|
|
#ifndef aTHX_ |
17
|
|
|
|
|
|
|
#define aTHX_ /* 5.6 or later define this for threading support. */ |
18
|
|
|
|
|
|
|
#endif |
19
|
|
|
|
|
|
|
#ifndef pTHX_ |
20
|
|
|
|
|
|
|
#define pTHX_ /* 5.6 or later define this for threading support. */ |
21
|
|
|
|
|
|
|
#endif |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
static int |
24
|
6
|
|
|
|
|
|
_rebase_operation_constant_4 (pTHX_ const char *name, IV *iv_return) { |
25
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
26
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
27
|
|
|
|
|
|
|
EDIT EXEC PICK */ |
28
|
|
|
|
|
|
|
/* Offset 2 gives the best switch position. */ |
29
|
6
|
|
|
|
|
|
switch (name[2]) { |
30
|
|
|
|
|
|
|
case 'C': |
31
|
2
|
50
|
|
|
|
|
if (memEQ(name, "PICK", 4)) { |
32
|
|
|
|
|
|
|
/* ^ */ |
33
|
|
|
|
|
|
|
#ifdef PICK |
34
|
2
|
|
|
|
|
|
*iv_return = PICK; |
35
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
36
|
|
|
|
|
|
|
#else |
37
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
38
|
|
|
|
|
|
|
#endif |
39
|
|
|
|
|
|
|
} |
40
|
0
|
|
|
|
|
|
break; |
41
|
|
|
|
|
|
|
case 'E': |
42
|
2
|
50
|
|
|
|
|
if (memEQ(name, "EXEC", 4)) { |
43
|
|
|
|
|
|
|
/* ^ */ |
44
|
|
|
|
|
|
|
#ifdef EXEC |
45
|
2
|
|
|
|
|
|
*iv_return = EXEC; |
46
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
47
|
|
|
|
|
|
|
#else |
48
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
49
|
|
|
|
|
|
|
#endif |
50
|
|
|
|
|
|
|
} |
51
|
0
|
|
|
|
|
|
break; |
52
|
|
|
|
|
|
|
case 'I': |
53
|
2
|
50
|
|
|
|
|
if (memEQ(name, "EDIT", 4)) { |
54
|
|
|
|
|
|
|
/* ^ */ |
55
|
|
|
|
|
|
|
#ifdef EDIT |
56
|
2
|
|
|
|
|
|
*iv_return = EDIT; |
57
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
58
|
|
|
|
|
|
|
#else |
59
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
60
|
|
|
|
|
|
|
#endif |
61
|
|
|
|
|
|
|
} |
62
|
0
|
|
|
|
|
|
break; |
63
|
|
|
|
|
|
|
} |
64
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
static int |
68
|
12
|
|
|
|
|
|
_rebase_operation_constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { |
69
|
|
|
|
|
|
|
/* Initially switch on the length of the name. */ |
70
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
71
|
|
|
|
|
|
|
in this section of perl code. Rather than manually editing these functions |
72
|
|
|
|
|
|
|
to add or remove constants, which would result in this comment and section |
73
|
|
|
|
|
|
|
of code becoming inaccurate, we recommend that you edit this section of |
74
|
|
|
|
|
|
|
code, and use it to regenerate a new set of constant functions which you |
75
|
|
|
|
|
|
|
then use to replace the originals. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Regenerate these constant functions by feeding this entire source file to |
78
|
|
|
|
|
|
|
perl -x |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
#!/usr/local/bin/perl -w |
81
|
|
|
|
|
|
|
use ExtUtils::Constant qw (constant_types C_constant XS_constant); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $types = {map {($_, 1)} qw(IV)}; |
84
|
|
|
|
|
|
|
my @names = (qw(EDIT EXEC FIXUP PICK REWORD SQUASH)); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
print constant_types(), "\n"; # macro defs |
87
|
|
|
|
|
|
|
foreach (C_constant ("Git::Raw::Rebase::Operation", '_rebase_operation_constant', 'IV', $types, undef, 3, @names) ) { |
88
|
|
|
|
|
|
|
print $_, "\n"; # C constant subs |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
print "\n#### XS Section:\n"; |
91
|
|
|
|
|
|
|
print XS_constant ("Git::Raw::Rebase::Operation", $types); |
92
|
|
|
|
|
|
|
__END__ |