1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: d3626f5d39317876fc7d4f240b0758f17f3472c8 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
5 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
6 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, lib, IS_STRING, 1, "null")
7 ZEND_END_ARG_INFO()
8
9 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_load, 0, 1, FFI, 1)
10 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
11 ZEND_END_ARG_INFO()
12
13 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_scope, 0, 1, FFI, 0)
14 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
15 ZEND_END_ARG_INFO()
16
17 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_new, 0, 1, FFI\\CData, 0)
18 ZEND_ARG_OBJ_TYPE_MASK(0, type, FFI\\CType, MAY_BE_STRING, NULL)
19 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owned, _IS_BOOL, 0, "true")
20 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent, _IS_BOOL, 0, "false")
21 ZEND_END_ARG_INFO()
22
23 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_free, 0, 1, IS_VOID, 0)
24 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
25 ZEND_END_ARG_INFO()
26
27 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cast, 0, 2, FFI\\CData, 0)
28 ZEND_ARG_OBJ_TYPE_MASK(0, type, FFI\\CType, MAY_BE_STRING, NULL)
29 ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr)
30 ZEND_END_ARG_INFO()
31
32 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_type, 0, 1, FFI\\CType, 0)
33 ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
34 ZEND_END_ARG_INFO()
35
36 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_typeof, 0, 1, FFI\\CType, 0)
37 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
38 ZEND_END_ARG_INFO()
39
40 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_arrayType, 0, 2, FFI\\CType, 0)
41 ZEND_ARG_OBJ_INFO(0, type, FFI\\CType, 0)
42 ZEND_ARG_TYPE_INFO(0, dimensions, IS_ARRAY, 0)
43 ZEND_END_ARG_INFO()
44
45 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_addr, 0, 1, FFI\\CData, 0)
46 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
47 ZEND_END_ARG_INFO()
48
49 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_sizeof, 0, 1, IS_LONG, 0)
50 ZEND_ARG_OBJ_TYPE_MASK(ZEND_SEND_PREFER_REF, ptr, FFI\\CData|FFI\\CType, 0, NULL)
51 ZEND_END_ARG_INFO()
52
53 #define arginfo_class_FFI_alignof arginfo_class_FFI_sizeof
54
55 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcpy, 0, 3, IS_VOID, 0)
56 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, to, FFI\\CData, 0)
57 ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, from)
58 ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
59 ZEND_END_ARG_INFO()
60
61 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcmp, 0, 3, IS_LONG, 0)
62 ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr1)
63 ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr2)
64 ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
65 ZEND_END_ARG_INFO()
66
67 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memset, 0, 3, IS_VOID, 0)
68 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
69 ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0)
70 ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
71 ZEND_END_ARG_INFO()
72
73 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_string, 0, 1, IS_STRING, 0)
74 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
75 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, size, IS_LONG, 1, "null")
76 ZEND_END_ARG_INFO()
77
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_isNull, 0, 1, _IS_BOOL, 0)
79 ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
80 ZEND_END_ARG_INFO()
81
82 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_CType_getName, 0, 0, IS_STRING, 0)
83 ZEND_END_ARG_INFO()
84
85 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_CType_getKind, 0, 0, IS_LONG, 0)
86 ZEND_END_ARG_INFO()
87
88 #define arginfo_class_FFI_CType_getSize arginfo_class_FFI_CType_getKind
89
90 #define arginfo_class_FFI_CType_getAlignment arginfo_class_FFI_CType_getKind
91
92 #define arginfo_class_FFI_CType_getAttributes arginfo_class_FFI_CType_getKind
93
94 #define arginfo_class_FFI_CType_getEnumKind arginfo_class_FFI_CType_getKind
95
96 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_CType_getArrayElementType, 0, 0, FFI\\CType, 0)
97 ZEND_END_ARG_INFO()
98
99 #define arginfo_class_FFI_CType_getArrayLength arginfo_class_FFI_CType_getKind
100
101 #define arginfo_class_FFI_CType_getPointerType arginfo_class_FFI_CType_getArrayElementType
102
103 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_CType_getStructFieldNames, 0, 0, IS_ARRAY, 0)
104 ZEND_END_ARG_INFO()
105
106 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_CType_getStructFieldOffset, 0, 1, IS_LONG, 0)
107 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
108 ZEND_END_ARG_INFO()
109
110 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_CType_getStructFieldType, 0, 1, FFI\\CType, 0)
111 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
112 ZEND_END_ARG_INFO()
113
114 #define arginfo_class_FFI_CType_getFuncABI arginfo_class_FFI_CType_getKind
115
116 #define arginfo_class_FFI_CType_getFuncReturnType arginfo_class_FFI_CType_getArrayElementType
117
118 #define arginfo_class_FFI_CType_getFuncParameterCount arginfo_class_FFI_CType_getKind
119
120 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_CType_getFuncParameterType, 0, 1, FFI\\CType, 0)
121 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
122 ZEND_END_ARG_INFO()
123
124 ZEND_METHOD(FFI, cdef);
125 ZEND_METHOD(FFI, load);
126 ZEND_METHOD(FFI, scope);
127 ZEND_METHOD(FFI, new);
128 ZEND_METHOD(FFI, free);
129 ZEND_METHOD(FFI, cast);
130 ZEND_METHOD(FFI, type);
131 ZEND_METHOD(FFI, typeof);
132 ZEND_METHOD(FFI, arrayType);
133 ZEND_METHOD(FFI, addr);
134 ZEND_METHOD(FFI, sizeof);
135 ZEND_METHOD(FFI, alignof);
136 ZEND_METHOD(FFI, memcpy);
137 ZEND_METHOD(FFI, memcmp);
138 ZEND_METHOD(FFI, memset);
139 ZEND_METHOD(FFI, string);
140 ZEND_METHOD(FFI, isNull);
141 ZEND_METHOD(FFI_CType, getName);
142 ZEND_METHOD(FFI_CType, getKind);
143 ZEND_METHOD(FFI_CType, getSize);
144 ZEND_METHOD(FFI_CType, getAlignment);
145 ZEND_METHOD(FFI_CType, getAttributes);
146 ZEND_METHOD(FFI_CType, getEnumKind);
147 ZEND_METHOD(FFI_CType, getArrayElementType);
148 ZEND_METHOD(FFI_CType, getArrayLength);
149 ZEND_METHOD(FFI_CType, getPointerType);
150 ZEND_METHOD(FFI_CType, getStructFieldNames);
151 ZEND_METHOD(FFI_CType, getStructFieldOffset);
152 ZEND_METHOD(FFI_CType, getStructFieldType);
153 ZEND_METHOD(FFI_CType, getFuncABI);
154 ZEND_METHOD(FFI_CType, getFuncReturnType);
155 ZEND_METHOD(FFI_CType, getFuncParameterCount);
156 ZEND_METHOD(FFI_CType, getFuncParameterType);
157
158 static const zend_function_entry class_FFI_methods[] = {
159 ZEND_ME(FFI, cdef, arginfo_class_FFI_cdef, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
160 ZEND_ME(FFI, load, arginfo_class_FFI_load, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
161 ZEND_ME(FFI, scope, arginfo_class_FFI_scope, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
162 ZEND_ME(FFI, new, arginfo_class_FFI_new, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
163 ZEND_ME(FFI, free, arginfo_class_FFI_free, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
164 ZEND_ME(FFI, cast, arginfo_class_FFI_cast, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
165 ZEND_ME(FFI, type, arginfo_class_FFI_type, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
166 ZEND_ME(FFI, typeof, arginfo_class_FFI_typeof, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
167 ZEND_ME(FFI, arrayType, arginfo_class_FFI_arrayType, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
168 ZEND_ME(FFI, addr, arginfo_class_FFI_addr, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
169 ZEND_ME(FFI, sizeof, arginfo_class_FFI_sizeof, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
170 ZEND_ME(FFI, alignof, arginfo_class_FFI_alignof, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
171 ZEND_ME(FFI, memcpy, arginfo_class_FFI_memcpy, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
172 ZEND_ME(FFI, memcmp, arginfo_class_FFI_memcmp, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
173 ZEND_ME(FFI, memset, arginfo_class_FFI_memset, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
174 ZEND_ME(FFI, string, arginfo_class_FFI_string, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
175 ZEND_ME(FFI, isNull, arginfo_class_FFI_isNull, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
176 ZEND_FE_END
177 };
178
179 static const zend_function_entry class_FFI_CType_methods[] = {
180 ZEND_ME(FFI_CType, getName, arginfo_class_FFI_CType_getName, ZEND_ACC_PUBLIC)
181 ZEND_ME(FFI_CType, getKind, arginfo_class_FFI_CType_getKind, ZEND_ACC_PUBLIC)
182 ZEND_ME(FFI_CType, getSize, arginfo_class_FFI_CType_getSize, ZEND_ACC_PUBLIC)
183 ZEND_ME(FFI_CType, getAlignment, arginfo_class_FFI_CType_getAlignment, ZEND_ACC_PUBLIC)
184 ZEND_ME(FFI_CType, getAttributes, arginfo_class_FFI_CType_getAttributes, ZEND_ACC_PUBLIC)
185 ZEND_ME(FFI_CType, getEnumKind, arginfo_class_FFI_CType_getEnumKind, ZEND_ACC_PUBLIC)
186 ZEND_ME(FFI_CType, getArrayElementType, arginfo_class_FFI_CType_getArrayElementType, ZEND_ACC_PUBLIC)
187 ZEND_ME(FFI_CType, getArrayLength, arginfo_class_FFI_CType_getArrayLength, ZEND_ACC_PUBLIC)
188 ZEND_ME(FFI_CType, getPointerType, arginfo_class_FFI_CType_getPointerType, ZEND_ACC_PUBLIC)
189 ZEND_ME(FFI_CType, getStructFieldNames, arginfo_class_FFI_CType_getStructFieldNames, ZEND_ACC_PUBLIC)
190 ZEND_ME(FFI_CType, getStructFieldOffset, arginfo_class_FFI_CType_getStructFieldOffset, ZEND_ACC_PUBLIC)
191 ZEND_ME(FFI_CType, getStructFieldType, arginfo_class_FFI_CType_getStructFieldType, ZEND_ACC_PUBLIC)
192 ZEND_ME(FFI_CType, getFuncABI, arginfo_class_FFI_CType_getFuncABI, ZEND_ACC_PUBLIC)
193 ZEND_ME(FFI_CType, getFuncReturnType, arginfo_class_FFI_CType_getFuncReturnType, ZEND_ACC_PUBLIC)
194 ZEND_ME(FFI_CType, getFuncParameterCount, arginfo_class_FFI_CType_getFuncParameterCount, ZEND_ACC_PUBLIC)
195 ZEND_ME(FFI_CType, getFuncParameterType, arginfo_class_FFI_CType_getFuncParameterType, ZEND_ACC_PUBLIC)
196 ZEND_FE_END
197 };
198
register_class_FFI(void)199 static zend_class_entry *register_class_FFI(void)
200 {
201 zend_class_entry ce, *class_entry;
202
203 INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods);
204 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NOT_SERIALIZABLE);
205
206 zval const___BIGGEST_ALIGNMENT___value;
207 ZVAL_LONG(&const___BIGGEST_ALIGNMENT___value, __BIGGEST_ALIGNMENT__);
208 zend_string *const___BIGGEST_ALIGNMENT___name = zend_string_init_interned("__BIGGEST_ALIGNMENT__", sizeof("__BIGGEST_ALIGNMENT__") - 1, 1);
209 zend_declare_typed_class_constant(class_entry, const___BIGGEST_ALIGNMENT___name, &const___BIGGEST_ALIGNMENT___value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
210 zend_string_release(const___BIGGEST_ALIGNMENT___name);
211
212 return class_entry;
213 }
214
register_class_FFI_CData(void)215 static zend_class_entry *register_class_FFI_CData(void)
216 {
217 zend_class_entry ce, *class_entry;
218
219 INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", NULL);
220 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NOT_SERIALIZABLE);
221
222 return class_entry;
223 }
224
register_class_FFI_CType(void)225 static zend_class_entry *register_class_FFI_CType(void)
226 {
227 zend_class_entry ce, *class_entry;
228
229 INIT_NS_CLASS_ENTRY(ce, "FFI", "CType", class_FFI_CType_methods);
230 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NOT_SERIALIZABLE);
231
232 zval const_TYPE_VOID_value;
233 ZVAL_LONG(&const_TYPE_VOID_value, ZEND_FFI_TYPE_VOID);
234 zend_string *const_TYPE_VOID_name = zend_string_init_interned("TYPE_VOID", sizeof("TYPE_VOID") - 1, 1);
235 zend_declare_typed_class_constant(class_entry, const_TYPE_VOID_name, &const_TYPE_VOID_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
236 zend_string_release(const_TYPE_VOID_name);
237
238 zval const_TYPE_FLOAT_value;
239 ZVAL_LONG(&const_TYPE_FLOAT_value, ZEND_FFI_TYPE_FLOAT);
240 zend_string *const_TYPE_FLOAT_name = zend_string_init_interned("TYPE_FLOAT", sizeof("TYPE_FLOAT") - 1, 1);
241 zend_declare_typed_class_constant(class_entry, const_TYPE_FLOAT_name, &const_TYPE_FLOAT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
242 zend_string_release(const_TYPE_FLOAT_name);
243
244 zval const_TYPE_DOUBLE_value;
245 ZVAL_LONG(&const_TYPE_DOUBLE_value, ZEND_FFI_TYPE_DOUBLE);
246 zend_string *const_TYPE_DOUBLE_name = zend_string_init_interned("TYPE_DOUBLE", sizeof("TYPE_DOUBLE") - 1, 1);
247 zend_declare_typed_class_constant(class_entry, const_TYPE_DOUBLE_name, &const_TYPE_DOUBLE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
248 zend_string_release(const_TYPE_DOUBLE_name);
249 #if defined(HAVE_LONG_DOUBLE)
250
251 zval const_TYPE_LONGDOUBLE_value;
252 ZVAL_LONG(&const_TYPE_LONGDOUBLE_value, ZEND_FFI_TYPE_LONGDOUBLE);
253 zend_string *const_TYPE_LONGDOUBLE_name = zend_string_init_interned("TYPE_LONGDOUBLE", sizeof("TYPE_LONGDOUBLE") - 1, 1);
254 zend_declare_typed_class_constant(class_entry, const_TYPE_LONGDOUBLE_name, &const_TYPE_LONGDOUBLE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
255 zend_string_release(const_TYPE_LONGDOUBLE_name);
256 #endif
257
258 zval const_TYPE_UINT8_value;
259 ZVAL_LONG(&const_TYPE_UINT8_value, ZEND_FFI_TYPE_UINT8);
260 zend_string *const_TYPE_UINT8_name = zend_string_init_interned("TYPE_UINT8", sizeof("TYPE_UINT8") - 1, 1);
261 zend_declare_typed_class_constant(class_entry, const_TYPE_UINT8_name, &const_TYPE_UINT8_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
262 zend_string_release(const_TYPE_UINT8_name);
263
264 zval const_TYPE_SINT8_value;
265 ZVAL_LONG(&const_TYPE_SINT8_value, ZEND_FFI_TYPE_SINT8);
266 zend_string *const_TYPE_SINT8_name = zend_string_init_interned("TYPE_SINT8", sizeof("TYPE_SINT8") - 1, 1);
267 zend_declare_typed_class_constant(class_entry, const_TYPE_SINT8_name, &const_TYPE_SINT8_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
268 zend_string_release(const_TYPE_SINT8_name);
269
270 zval const_TYPE_UINT16_value;
271 ZVAL_LONG(&const_TYPE_UINT16_value, ZEND_FFI_TYPE_UINT16);
272 zend_string *const_TYPE_UINT16_name = zend_string_init_interned("TYPE_UINT16", sizeof("TYPE_UINT16") - 1, 1);
273 zend_declare_typed_class_constant(class_entry, const_TYPE_UINT16_name, &const_TYPE_UINT16_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
274 zend_string_release(const_TYPE_UINT16_name);
275
276 zval const_TYPE_SINT16_value;
277 ZVAL_LONG(&const_TYPE_SINT16_value, ZEND_FFI_TYPE_SINT16);
278 zend_string *const_TYPE_SINT16_name = zend_string_init_interned("TYPE_SINT16", sizeof("TYPE_SINT16") - 1, 1);
279 zend_declare_typed_class_constant(class_entry, const_TYPE_SINT16_name, &const_TYPE_SINT16_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
280 zend_string_release(const_TYPE_SINT16_name);
281
282 zval const_TYPE_UINT32_value;
283 ZVAL_LONG(&const_TYPE_UINT32_value, ZEND_FFI_TYPE_UINT32);
284 zend_string *const_TYPE_UINT32_name = zend_string_init_interned("TYPE_UINT32", sizeof("TYPE_UINT32") - 1, 1);
285 zend_declare_typed_class_constant(class_entry, const_TYPE_UINT32_name, &const_TYPE_UINT32_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
286 zend_string_release(const_TYPE_UINT32_name);
287
288 zval const_TYPE_SINT32_value;
289 ZVAL_LONG(&const_TYPE_SINT32_value, ZEND_FFI_TYPE_SINT32);
290 zend_string *const_TYPE_SINT32_name = zend_string_init_interned("TYPE_SINT32", sizeof("TYPE_SINT32") - 1, 1);
291 zend_declare_typed_class_constant(class_entry, const_TYPE_SINT32_name, &const_TYPE_SINT32_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
292 zend_string_release(const_TYPE_SINT32_name);
293
294 zval const_TYPE_UINT64_value;
295 ZVAL_LONG(&const_TYPE_UINT64_value, ZEND_FFI_TYPE_UINT64);
296 zend_string *const_TYPE_UINT64_name = zend_string_init_interned("TYPE_UINT64", sizeof("TYPE_UINT64") - 1, 1);
297 zend_declare_typed_class_constant(class_entry, const_TYPE_UINT64_name, &const_TYPE_UINT64_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
298 zend_string_release(const_TYPE_UINT64_name);
299
300 zval const_TYPE_SINT64_value;
301 ZVAL_LONG(&const_TYPE_SINT64_value, ZEND_FFI_TYPE_SINT64);
302 zend_string *const_TYPE_SINT64_name = zend_string_init_interned("TYPE_SINT64", sizeof("TYPE_SINT64") - 1, 1);
303 zend_declare_typed_class_constant(class_entry, const_TYPE_SINT64_name, &const_TYPE_SINT64_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
304 zend_string_release(const_TYPE_SINT64_name);
305
306 zval const_TYPE_ENUM_value;
307 ZVAL_LONG(&const_TYPE_ENUM_value, ZEND_FFI_TYPE_ENUM);
308 zend_string *const_TYPE_ENUM_name = zend_string_init_interned("TYPE_ENUM", sizeof("TYPE_ENUM") - 1, 1);
309 zend_declare_typed_class_constant(class_entry, const_TYPE_ENUM_name, &const_TYPE_ENUM_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
310 zend_string_release(const_TYPE_ENUM_name);
311
312 zval const_TYPE_BOOL_value;
313 ZVAL_LONG(&const_TYPE_BOOL_value, ZEND_FFI_TYPE_BOOL);
314 zend_string *const_TYPE_BOOL_name = zend_string_init_interned("TYPE_BOOL", sizeof("TYPE_BOOL") - 1, 1);
315 zend_declare_typed_class_constant(class_entry, const_TYPE_BOOL_name, &const_TYPE_BOOL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
316 zend_string_release(const_TYPE_BOOL_name);
317
318 zval const_TYPE_CHAR_value;
319 ZVAL_LONG(&const_TYPE_CHAR_value, ZEND_FFI_TYPE_CHAR);
320 zend_string *const_TYPE_CHAR_name = zend_string_init_interned("TYPE_CHAR", sizeof("TYPE_CHAR") - 1, 1);
321 zend_declare_typed_class_constant(class_entry, const_TYPE_CHAR_name, &const_TYPE_CHAR_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
322 zend_string_release(const_TYPE_CHAR_name);
323
324 zval const_TYPE_POINTER_value;
325 ZVAL_LONG(&const_TYPE_POINTER_value, ZEND_FFI_TYPE_POINTER);
326 zend_string *const_TYPE_POINTER_name = zend_string_init_interned("TYPE_POINTER", sizeof("TYPE_POINTER") - 1, 1);
327 zend_declare_typed_class_constant(class_entry, const_TYPE_POINTER_name, &const_TYPE_POINTER_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
328 zend_string_release(const_TYPE_POINTER_name);
329
330 zval const_TYPE_FUNC_value;
331 ZVAL_LONG(&const_TYPE_FUNC_value, ZEND_FFI_TYPE_FUNC);
332 zend_string *const_TYPE_FUNC_name = zend_string_init_interned("TYPE_FUNC", sizeof("TYPE_FUNC") - 1, 1);
333 zend_declare_typed_class_constant(class_entry, const_TYPE_FUNC_name, &const_TYPE_FUNC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
334 zend_string_release(const_TYPE_FUNC_name);
335
336 zval const_TYPE_ARRAY_value;
337 ZVAL_LONG(&const_TYPE_ARRAY_value, ZEND_FFI_TYPE_ARRAY);
338 zend_string *const_TYPE_ARRAY_name = zend_string_init_interned("TYPE_ARRAY", sizeof("TYPE_ARRAY") - 1, 1);
339 zend_declare_typed_class_constant(class_entry, const_TYPE_ARRAY_name, &const_TYPE_ARRAY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
340 zend_string_release(const_TYPE_ARRAY_name);
341
342 zval const_TYPE_STRUCT_value;
343 ZVAL_LONG(&const_TYPE_STRUCT_value, ZEND_FFI_TYPE_STRUCT);
344 zend_string *const_TYPE_STRUCT_name = zend_string_init_interned("TYPE_STRUCT", sizeof("TYPE_STRUCT") - 1, 1);
345 zend_declare_typed_class_constant(class_entry, const_TYPE_STRUCT_name, &const_TYPE_STRUCT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
346 zend_string_release(const_TYPE_STRUCT_name);
347
348 zval const_ATTR_CONST_value;
349 ZVAL_LONG(&const_ATTR_CONST_value, ZEND_FFI_ATTR_CONST);
350 zend_string *const_ATTR_CONST_name = zend_string_init_interned("ATTR_CONST", sizeof("ATTR_CONST") - 1, 1);
351 zend_declare_typed_class_constant(class_entry, const_ATTR_CONST_name, &const_ATTR_CONST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
352 zend_string_release(const_ATTR_CONST_name);
353
354 zval const_ATTR_INCOMPLETE_TAG_value;
355 ZVAL_LONG(&const_ATTR_INCOMPLETE_TAG_value, ZEND_FFI_ATTR_INCOMPLETE_TAG);
356 zend_string *const_ATTR_INCOMPLETE_TAG_name = zend_string_init_interned("ATTR_INCOMPLETE_TAG", sizeof("ATTR_INCOMPLETE_TAG") - 1, 1);
357 zend_declare_typed_class_constant(class_entry, const_ATTR_INCOMPLETE_TAG_name, &const_ATTR_INCOMPLETE_TAG_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
358 zend_string_release(const_ATTR_INCOMPLETE_TAG_name);
359
360 zval const_ATTR_VARIADIC_value;
361 ZVAL_LONG(&const_ATTR_VARIADIC_value, ZEND_FFI_ATTR_VARIADIC);
362 zend_string *const_ATTR_VARIADIC_name = zend_string_init_interned("ATTR_VARIADIC", sizeof("ATTR_VARIADIC") - 1, 1);
363 zend_declare_typed_class_constant(class_entry, const_ATTR_VARIADIC_name, &const_ATTR_VARIADIC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
364 zend_string_release(const_ATTR_VARIADIC_name);
365
366 zval const_ATTR_INCOMPLETE_ARRAY_value;
367 ZVAL_LONG(&const_ATTR_INCOMPLETE_ARRAY_value, ZEND_FFI_ATTR_INCOMPLETE_ARRAY);
368 zend_string *const_ATTR_INCOMPLETE_ARRAY_name = zend_string_init_interned("ATTR_INCOMPLETE_ARRAY", sizeof("ATTR_INCOMPLETE_ARRAY") - 1, 1);
369 zend_declare_typed_class_constant(class_entry, const_ATTR_INCOMPLETE_ARRAY_name, &const_ATTR_INCOMPLETE_ARRAY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
370 zend_string_release(const_ATTR_INCOMPLETE_ARRAY_name);
371
372 zval const_ATTR_VLA_value;
373 ZVAL_LONG(&const_ATTR_VLA_value, ZEND_FFI_ATTR_VLA);
374 zend_string *const_ATTR_VLA_name = zend_string_init_interned("ATTR_VLA", sizeof("ATTR_VLA") - 1, 1);
375 zend_declare_typed_class_constant(class_entry, const_ATTR_VLA_name, &const_ATTR_VLA_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
376 zend_string_release(const_ATTR_VLA_name);
377
378 zval const_ATTR_UNION_value;
379 ZVAL_LONG(&const_ATTR_UNION_value, ZEND_FFI_ATTR_UNION);
380 zend_string *const_ATTR_UNION_name = zend_string_init_interned("ATTR_UNION", sizeof("ATTR_UNION") - 1, 1);
381 zend_declare_typed_class_constant(class_entry, const_ATTR_UNION_name, &const_ATTR_UNION_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
382 zend_string_release(const_ATTR_UNION_name);
383
384 zval const_ATTR_PACKED_value;
385 ZVAL_LONG(&const_ATTR_PACKED_value, ZEND_FFI_ATTR_PACKED);
386 zend_string *const_ATTR_PACKED_name = zend_string_init_interned("ATTR_PACKED", sizeof("ATTR_PACKED") - 1, 1);
387 zend_declare_typed_class_constant(class_entry, const_ATTR_PACKED_name, &const_ATTR_PACKED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
388 zend_string_release(const_ATTR_PACKED_name);
389
390 zval const_ATTR_MS_STRUCT_value;
391 ZVAL_LONG(&const_ATTR_MS_STRUCT_value, ZEND_FFI_ATTR_MS_STRUCT);
392 zend_string *const_ATTR_MS_STRUCT_name = zend_string_init_interned("ATTR_MS_STRUCT", sizeof("ATTR_MS_STRUCT") - 1, 1);
393 zend_declare_typed_class_constant(class_entry, const_ATTR_MS_STRUCT_name, &const_ATTR_MS_STRUCT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
394 zend_string_release(const_ATTR_MS_STRUCT_name);
395
396 zval const_ATTR_GCC_STRUCT_value;
397 ZVAL_LONG(&const_ATTR_GCC_STRUCT_value, ZEND_FFI_ATTR_GCC_STRUCT);
398 zend_string *const_ATTR_GCC_STRUCT_name = zend_string_init_interned("ATTR_GCC_STRUCT", sizeof("ATTR_GCC_STRUCT") - 1, 1);
399 zend_declare_typed_class_constant(class_entry, const_ATTR_GCC_STRUCT_name, &const_ATTR_GCC_STRUCT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
400 zend_string_release(const_ATTR_GCC_STRUCT_name);
401
402 zval const_ABI_DEFAULT_value;
403 ZVAL_LONG(&const_ABI_DEFAULT_value, ZEND_FFI_ABI_DEFAULT);
404 zend_string *const_ABI_DEFAULT_name = zend_string_init_interned("ABI_DEFAULT", sizeof("ABI_DEFAULT") - 1, 1);
405 zend_declare_typed_class_constant(class_entry, const_ABI_DEFAULT_name, &const_ABI_DEFAULT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
406 zend_string_release(const_ABI_DEFAULT_name);
407
408 zval const_ABI_CDECL_value;
409 ZVAL_LONG(&const_ABI_CDECL_value, ZEND_FFI_ABI_CDECL);
410 zend_string *const_ABI_CDECL_name = zend_string_init_interned("ABI_CDECL", sizeof("ABI_CDECL") - 1, 1);
411 zend_declare_typed_class_constant(class_entry, const_ABI_CDECL_name, &const_ABI_CDECL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
412 zend_string_release(const_ABI_CDECL_name);
413
414 zval const_ABI_FASTCALL_value;
415 ZVAL_LONG(&const_ABI_FASTCALL_value, ZEND_FFI_ABI_FASTCALL);
416 zend_string *const_ABI_FASTCALL_name = zend_string_init_interned("ABI_FASTCALL", sizeof("ABI_FASTCALL") - 1, 1);
417 zend_declare_typed_class_constant(class_entry, const_ABI_FASTCALL_name, &const_ABI_FASTCALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
418 zend_string_release(const_ABI_FASTCALL_name);
419
420 zval const_ABI_THISCALL_value;
421 ZVAL_LONG(&const_ABI_THISCALL_value, ZEND_FFI_ABI_THISCALL);
422 zend_string *const_ABI_THISCALL_name = zend_string_init_interned("ABI_THISCALL", sizeof("ABI_THISCALL") - 1, 1);
423 zend_declare_typed_class_constant(class_entry, const_ABI_THISCALL_name, &const_ABI_THISCALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
424 zend_string_release(const_ABI_THISCALL_name);
425
426 zval const_ABI_STDCALL_value;
427 ZVAL_LONG(&const_ABI_STDCALL_value, ZEND_FFI_ABI_STDCALL);
428 zend_string *const_ABI_STDCALL_name = zend_string_init_interned("ABI_STDCALL", sizeof("ABI_STDCALL") - 1, 1);
429 zend_declare_typed_class_constant(class_entry, const_ABI_STDCALL_name, &const_ABI_STDCALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
430 zend_string_release(const_ABI_STDCALL_name);
431
432 zval const_ABI_PASCAL_value;
433 ZVAL_LONG(&const_ABI_PASCAL_value, ZEND_FFI_ABI_PASCAL);
434 zend_string *const_ABI_PASCAL_name = zend_string_init_interned("ABI_PASCAL", sizeof("ABI_PASCAL") - 1, 1);
435 zend_declare_typed_class_constant(class_entry, const_ABI_PASCAL_name, &const_ABI_PASCAL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
436 zend_string_release(const_ABI_PASCAL_name);
437
438 zval const_ABI_REGISTER_value;
439 ZVAL_LONG(&const_ABI_REGISTER_value, ZEND_FFI_ABI_REGISTER);
440 zend_string *const_ABI_REGISTER_name = zend_string_init_interned("ABI_REGISTER", sizeof("ABI_REGISTER") - 1, 1);
441 zend_declare_typed_class_constant(class_entry, const_ABI_REGISTER_name, &const_ABI_REGISTER_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
442 zend_string_release(const_ABI_REGISTER_name);
443
444 zval const_ABI_MS_value;
445 ZVAL_LONG(&const_ABI_MS_value, ZEND_FFI_ABI_MS);
446 zend_string *const_ABI_MS_name = zend_string_init_interned("ABI_MS", sizeof("ABI_MS") - 1, 1);
447 zend_declare_typed_class_constant(class_entry, const_ABI_MS_name, &const_ABI_MS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
448 zend_string_release(const_ABI_MS_name);
449
450 zval const_ABI_SYSV_value;
451 ZVAL_LONG(&const_ABI_SYSV_value, ZEND_FFI_ABI_SYSV);
452 zend_string *const_ABI_SYSV_name = zend_string_init_interned("ABI_SYSV", sizeof("ABI_SYSV") - 1, 1);
453 zend_declare_typed_class_constant(class_entry, const_ABI_SYSV_name, &const_ABI_SYSV_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
454 zend_string_release(const_ABI_SYSV_name);
455
456 zval const_ABI_VECTORCALL_value;
457 ZVAL_LONG(&const_ABI_VECTORCALL_value, ZEND_FFI_ABI_VECTORCALL);
458 zend_string *const_ABI_VECTORCALL_name = zend_string_init_interned("ABI_VECTORCALL", sizeof("ABI_VECTORCALL") - 1, 1);
459 zend_declare_typed_class_constant(class_entry, const_ABI_VECTORCALL_name, &const_ABI_VECTORCALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
460 zend_string_release(const_ABI_VECTORCALL_name);
461
462 return class_entry;
463 }
464
register_class_FFI_Exception(zend_class_entry * class_entry_Error)465 static zend_class_entry *register_class_FFI_Exception(zend_class_entry *class_entry_Error)
466 {
467 zend_class_entry ce, *class_entry;
468
469 INIT_NS_CLASS_ENTRY(ce, "FFI", "Exception", NULL);
470 class_entry = zend_register_internal_class_with_flags(&ce, class_entry_Error, 0);
471
472 return class_entry;
473 }
474
register_class_FFI_ParserException(zend_class_entry * class_entry_FFI_Exception)475 static zend_class_entry *register_class_FFI_ParserException(zend_class_entry *class_entry_FFI_Exception)
476 {
477 zend_class_entry ce, *class_entry;
478
479 INIT_NS_CLASS_ENTRY(ce, "FFI", "ParserException", NULL);
480 class_entry = zend_register_internal_class_with_flags(&ce, class_entry_FFI_Exception, ZEND_ACC_FINAL);
481
482 return class_entry;
483 }
484