forked from RogerGee/php-git2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
refspec.h
145 lines (130 loc) · 4.2 KB
/
refspec.h
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
* refspec.h
*
* Copyright (C) Roger P. Gee
*/
#ifndef PHPGIT2_REFSPEC_H
#define PHPGIT2_REFSPEC_H
namespace php_git2
{
// Explicitly specialize git2_resource destructor for git_refspec.
template<> php_git_refspec::~git2_resource()
{
// Nothing to do here since the git_refspec is always used read-only.
}
} // namespace php_git2
static constexpr auto ZIF_GIT_REFSPEC_DIRECTION = zif_php_git2_function<
php_git2::func_wrapper<
git_direction,
const git_refspec*>::func<git_refspec_direction>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>
>,
0
>;
static constexpr auto ZIF_GIT_REFSPEC_DST = zif_php_git2_function<
php_git2::func_wrapper<
const char*,
const git_refspec*>::func<git_refspec_dst>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>
>,
0
>;
static constexpr auto ZIF_GIT_REFSPEC_DST_MATCHES = zif_php_git2_function_rethandler<
php_git2::func_wrapper<
int,
const git_refspec*,
const char*>::func<git_refspec_dst_matches>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>,
php_git2::php_string
>,
php_git2::php_boolean_rethandler<int>
>;
static constexpr auto ZIF_GIT_REFSPEC_FORCE = zif_php_git2_function_rethandler<
php_git2::func_wrapper<
int,
const git_refspec*>::func<git_refspec_force>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>
>,
php_git2::php_boolean_rethandler<int>
>;
static constexpr auto ZIF_GIT_REFSPEC_RTRANSFORM = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_buf*,
const git_refspec*,
const char*>::func<git_refspec_rtransform>,
php_git2::local_pack<
php_git2::php_git_buf,
php_git2::php_resource<php_git2::php_git_refspec>,
php_git2::php_string
>,
1,
php_git2::sequence<1,2>,
php_git2::sequence<0,1,2>
>;
static constexpr auto ZIF_GIT_REFSPEC_SRC = zif_php_git2_function<
php_git2::func_wrapper<
const char*,
const git_refspec*>::func<git_refspec_src>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>
>,
0
>;
static constexpr auto ZIF_GIT_REFSPEC_SRC_MATCHES = zif_php_git2_function_rethandler<
php_git2::func_wrapper<
int,
const git_refspec*,
const char*>::func<git_refspec_src_matches>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>,
php_git2::php_string
>,
php_git2::php_boolean_rethandler<int>
>;
static constexpr auto ZIF_GIT_REFSPEC_STRING = zif_php_git2_function<
php_git2::func_wrapper<
const char*,
const git_refspec*>::func<git_refspec_string>,
php_git2::local_pack<
php_git2::php_resource<php_git2::php_git_refspec>
>,
0
>;
static constexpr auto ZIF_GIT_REFSPEC_TRANSFORM = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_buf*,
const git_refspec*,
const char*>::func<git_refspec_transform>,
php_git2::local_pack<
php_git2::php_git_buf,
php_git2::php_resource<php_git2::php_git_refspec>,
php_git2::php_string
>,
1,
php_git2::sequence<1,2>,
php_git2::sequence<0,1,2>
>;
#define GIT_REFSPEC_FE \
PHP_GIT2_FE(git_refspec_direction,ZIF_GIT_REFSPEC_DIRECTION,NULL) \
PHP_GIT2_FE(git_refspec_dst,ZIF_GIT_REFSPEC_DST,NULL) \
PHP_GIT2_FE(git_refspec_dst_matches,ZIF_GIT_REFSPEC_DST_MATCHES,NULL) \
PHP_GIT2_FE(git_refspec_force,ZIF_GIT_REFSPEC_FORCE,NULL) \
PHP_GIT2_FE(git_refspec_rtransform,ZIF_GIT_REFSPEC_RTRANSFORM,NULL) \
PHP_GIT2_FE(git_refspec_src,ZIF_GIT_REFSPEC_SRC,NULL) \
PHP_GIT2_FE(git_refspec_src_matches,ZIF_GIT_REFSPEC_SRC_MATCHES,NULL) \
PHP_GIT2_FE(git_refspec_string,ZIF_GIT_REFSPEC_STRING,NULL) \
PHP_GIT2_FE(git_refspec_transform,ZIF_GIT_REFSPEC_TRANSFORM,NULL)
#endif
/*
* Local Variables:
* mode:c++
* indent-tabs-mode:nil
* tab-width:4
* End:
*/