- Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignature.h
161 lines (138 loc) · 4.23 KB
/
signature.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
* signature.h
*
* Copyright (C) Roger P. Gee
*/
#ifndef PHPGIT2_SIGNATURE_H
#definePHPGIT2_SIGNATURE_H
#include"stubs/signature_arginfo.h"
namespacephp_git2
{
// Explicitly specialize git2_resource destructor for git_signature.
template<> php_git_signature::~git2_resource()
{
git_signature_free(handle);
}
} // php_git2
// Functions:
staticconstexprauto ZIF_git_signature_new = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_signature**,
constchar*,
constchar*,
git_time_t,
int>::func<git_signature_new>,
php_git2::local_pack<
php_git2::php_resource_ref<php_git2::php_git_signature>,
php_git2::php_string,
php_git2::php_string,
php_git2::php_long,
php_git2::php_long
>,
1,
php_git2::sequence<1,2,3,4>,
php_git2::sequence<0,1,2,3,4>
>;
staticconstexprauto ZIF_git_signature_free = zif_php_git2_function_free<
php_git2::local_pack<
php_git2::php_resource_cleanup<php_git2::php_git_signature>
>
>;
staticconstexprauto ZIF_git_signature_dup = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_signature**,
const git_signature*>::func<git_signature_dup>,
php_git2::local_pack<
php_git2::php_resource_ref<php_git2::php_git_signature>,
php_git2::php_resource<php_git2::php_git_signature>
>,
1,
php_git2::sequence<1>,
php_git2::sequence<0,1>
>;
staticconstexprauto ZIF_git_signature_default = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_signature**,
git_repository*>::func<git_signature_default>,
php_git2::local_pack<
php_git2::php_resource_ref<php_git2::php_git_signature>,
php_git2::php_resource<php_git2::php_git_repository>
>,
1,
php_git2::sequence<1>,
php_git2::sequence<0,1>
>;
staticconstexprauto ZIF_git_signature_now = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_signature**,
constchar*,
constchar*>::func<git_signature_now>,
php_git2::local_pack<
php_git2::php_resource_ref<php_git2::php_git_signature>,
php_git2::php_string,
php_git2::php_string
>,
1,
php_git2::sequence<1,2>,
php_git2::sequence<0,1,2>
>;
staticconstexprauto ZIF_git_signature_from_buffer = zif_php_git2_function<
php_git2::func_wrapper<
int,
git_signature**,
constchar*>::func<git_signature_from_buffer>,
php_git2::local_pack<
php_git2::php_resource_ref<php_git2::php_git_signature>,
php_git2::php_string
>,
1,
php_git2::sequence<1>,
php_git2::sequence<0,1>
>;
staticPHP_FUNCTION(git2_signature_convert)
{
php_git2::php_bailer bailer;
{
git_signature* handle;
php_git2::php_resource<php_git2::php_git_signature> signature;
php_git2::php_bailout_context ctx(bailer);
if (BAILOUT_ENTER_REGION(ctx)) {
zval* zvp;
if (zend_parse_parameters(ZEND_NUM_ARGS(),"z",&zvp) == FAILURE) {
return;
}
signature.parse(zvp,1);
try {
handle = signature.byval_git2();
} catch (php_git2::php_git2_exception_base& ex) {
php_git2::php_bailout_context ctx2(bailer);
if (BAILOUT_ENTER_REGION(ctx2)) {
ex.handle();
}
return;
}
php_git2::convert_signature(return_value,handle);
}
}
}
// Function Entries:
#defineGIT_SIGNATURE_FE \
PHP_GIT2_FE(git_signature_new) \
PHP_GIT2_FE(git_signature_free) \
PHP_GIT2_FE(git_signature_dup) \
PHP_GIT2_FE(git_signature_default) \
PHP_GIT2_FE(git_signature_now) \
PHP_GIT2_FE(git_signature_from_buffer) \
PHP_FE(git2_signature_convert,arginfo_git2_signature_convert)
#endif
/*
* Local Variables:
* mode:c++
* indent-tabs-mode:nil
* tab-width:4
* End:
*/