Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _ffi.c

View raw Download
text/x-c • 164.94 kiB
C source, ASCII text
        
            
1
#define _CFFI_
2
3
/* We try to define Py_LIMITED_API before including Python.h.
4
5
Mess: we can only define it if Py_DEBUG, Py_TRACE_REFS and
6
Py_REF_DEBUG are not defined. This is a best-effort approximation:
7
we can learn about Py_DEBUG from pyconfig.h, but it is unclear if
8
the same works for the other two macros. Py_DEBUG implies them,
9
but not the other way around.
10
11
The implementation is messy (issue #350): on Windows, with _MSC_VER,
12
we have to define Py_LIMITED_API even before including pyconfig.h.
13
In that case, we guess what pyconfig.h will do to the macros above,
14
and check our guess after the #include.
15
16
Note that on Windows, with CPython 3.x, you need >= 3.5 and virtualenv
17
version >= 16.0.0. With older versions of either, you don't get a
18
copy of PYTHON3.DLL in the virtualenv. We can't check the version of
19
CPython *before* we even include pyconfig.h. ffi.set_source() puts
20
a ``#define _CFFI_NO_LIMITED_API'' at the start of this file if it is
21
running on Windows < 3.5, as an attempt at fixing it, but that's
22
arguably wrong because it may not be the target version of Python.
23
Still better than nothing I guess. As another workaround, you can
24
remove the definition of Py_LIMITED_API here.
25
26
See also 'py_limited_api' in cffi/setuptools_ext.py.
27
*/
28
#if !defined(_CFFI_USE_EMBEDDING) && !defined(Py_LIMITED_API)
29
# ifdef _MSC_VER
30
# if !defined(_DEBUG) && !defined(Py_DEBUG) && !defined(Py_TRACE_REFS) && !defined(Py_REF_DEBUG) && !defined(_CFFI_NO_LIMITED_API)
31
# define Py_LIMITED_API
32
# endif
33
# include <pyconfig.h>
34
/* sanity-check: Py_LIMITED_API will cause crashes if any of these
35
are also defined. Normally, the Python file PC/pyconfig.h does not
36
cause any of these to be defined, with the exception that _DEBUG
37
causes Py_DEBUG. Double-check that. */
38
# ifdef Py_LIMITED_API
39
# if defined(Py_DEBUG)
40
# error "pyconfig.h unexpectedly defines Py_DEBUG, but Py_LIMITED_API is set"
41
# endif
42
# if defined(Py_TRACE_REFS)
43
# error "pyconfig.h unexpectedly defines Py_TRACE_REFS, but Py_LIMITED_API is set"
44
# endif
45
# if defined(Py_REF_DEBUG)
46
# error "pyconfig.h unexpectedly defines Py_REF_DEBUG, but Py_LIMITED_API is set"
47
# endif
48
# endif
49
# else
50
# include <pyconfig.h>
51
# if !defined(Py_DEBUG) && !defined(Py_TRACE_REFS) && !defined(Py_REF_DEBUG) && !defined(_CFFI_NO_LIMITED_API)
52
# define Py_LIMITED_API
53
# endif
54
# endif
55
#endif
56
57
#include <Python.h>
58
#ifdef __cplusplus
59
extern "C" {
60
#endif
61
#include <stddef.h>
62
63
/* This part is from file 'cffi/parse_c_type.h'. It is copied at the
64
beginning of C sources generated by CFFI's ffi.set_source(). */
65
66
typedef void *_cffi_opcode_t;
67
68
#define _CFFI_OP(opcode, arg) (_cffi_opcode_t)(opcode | (((uintptr_t)(arg)) << 8))
69
#define _CFFI_GETOP(cffi_opcode) ((unsigned char)(uintptr_t)cffi_opcode)
70
#define _CFFI_GETARG(cffi_opcode) (((intptr_t)cffi_opcode) >> 8)
71
72
#define _CFFI_OP_PRIMITIVE 1
73
#define _CFFI_OP_POINTER 3
74
#define _CFFI_OP_ARRAY 5
75
#define _CFFI_OP_OPEN_ARRAY 7
76
#define _CFFI_OP_STRUCT_UNION 9
77
#define _CFFI_OP_ENUM 11
78
#define _CFFI_OP_FUNCTION 13
79
#define _CFFI_OP_FUNCTION_END 15
80
#define _CFFI_OP_NOOP 17
81
#define _CFFI_OP_BITFIELD 19
82
#define _CFFI_OP_TYPENAME 21
83
#define _CFFI_OP_CPYTHON_BLTN_V 23 // varargs
84
#define _CFFI_OP_CPYTHON_BLTN_N 25 // noargs
85
#define _CFFI_OP_CPYTHON_BLTN_O 27 // O (i.e. a single arg)
86
#define _CFFI_OP_CONSTANT 29
87
#define _CFFI_OP_CONSTANT_INT 31
88
#define _CFFI_OP_GLOBAL_VAR 33
89
#define _CFFI_OP_DLOPEN_FUNC 35
90
#define _CFFI_OP_DLOPEN_CONST 37
91
#define _CFFI_OP_GLOBAL_VAR_F 39
92
#define _CFFI_OP_EXTERN_PYTHON 41
93
94
#define _CFFI_PRIM_VOID 0
95
#define _CFFI_PRIM_BOOL 1
96
#define _CFFI_PRIM_CHAR 2
97
#define _CFFI_PRIM_SCHAR 3
98
#define _CFFI_PRIM_UCHAR 4
99
#define _CFFI_PRIM_SHORT 5
100
#define _CFFI_PRIM_USHORT 6
101
#define _CFFI_PRIM_INT 7
102
#define _CFFI_PRIM_UINT 8
103
#define _CFFI_PRIM_LONG 9
104
#define _CFFI_PRIM_ULONG 10
105
#define _CFFI_PRIM_LONGLONG 11
106
#define _CFFI_PRIM_ULONGLONG 12
107
#define _CFFI_PRIM_FLOAT 13
108
#define _CFFI_PRIM_DOUBLE 14
109
#define _CFFI_PRIM_LONGDOUBLE 15
110
111
#define _CFFI_PRIM_WCHAR 16
112
#define _CFFI_PRIM_INT8 17
113
#define _CFFI_PRIM_UINT8 18
114
#define _CFFI_PRIM_INT16 19
115
#define _CFFI_PRIM_UINT16 20
116
#define _CFFI_PRIM_INT32 21
117
#define _CFFI_PRIM_UINT32 22
118
#define _CFFI_PRIM_INT64 23
119
#define _CFFI_PRIM_UINT64 24
120
#define _CFFI_PRIM_INTPTR 25
121
#define _CFFI_PRIM_UINTPTR 26
122
#define _CFFI_PRIM_PTRDIFF 27
123
#define _CFFI_PRIM_SIZE 28
124
#define _CFFI_PRIM_SSIZE 29
125
#define _CFFI_PRIM_INT_LEAST8 30
126
#define _CFFI_PRIM_UINT_LEAST8 31
127
#define _CFFI_PRIM_INT_LEAST16 32
128
#define _CFFI_PRIM_UINT_LEAST16 33
129
#define _CFFI_PRIM_INT_LEAST32 34
130
#define _CFFI_PRIM_UINT_LEAST32 35
131
#define _CFFI_PRIM_INT_LEAST64 36
132
#define _CFFI_PRIM_UINT_LEAST64 37
133
#define _CFFI_PRIM_INT_FAST8 38
134
#define _CFFI_PRIM_UINT_FAST8 39
135
#define _CFFI_PRIM_INT_FAST16 40
136
#define _CFFI_PRIM_UINT_FAST16 41
137
#define _CFFI_PRIM_INT_FAST32 42
138
#define _CFFI_PRIM_UINT_FAST32 43
139
#define _CFFI_PRIM_INT_FAST64 44
140
#define _CFFI_PRIM_UINT_FAST64 45
141
#define _CFFI_PRIM_INTMAX 46
142
#define _CFFI_PRIM_UINTMAX 47
143
#define _CFFI_PRIM_FLOATCOMPLEX 48
144
#define _CFFI_PRIM_DOUBLECOMPLEX 49
145
#define _CFFI_PRIM_CHAR16 50
146
#define _CFFI_PRIM_CHAR32 51
147
148
#define _CFFI__NUM_PRIM 52
149
#define _CFFI__UNKNOWN_PRIM (-1)
150
#define _CFFI__UNKNOWN_FLOAT_PRIM (-2)
151
#define _CFFI__UNKNOWN_LONG_DOUBLE (-3)
152
153
#define _CFFI__IO_FILE_STRUCT (-1)
154
155
156
struct _cffi_global_s {
157
const char *name;
158
void *address;
159
_cffi_opcode_t type_op;
160
void *size_or_direct_fn; // OP_GLOBAL_VAR: size, or 0 if unknown
161
// OP_CPYTHON_BLTN_*: addr of direct function
162
};
163
164
struct _cffi_getconst_s {
165
unsigned long long value;
166
const struct _cffi_type_context_s *ctx;
167
int gindex;
168
};
169
170
struct _cffi_struct_union_s {
171
const char *name;
172
int type_index; // -> _cffi_types, on a OP_STRUCT_UNION
173
int flags; // _CFFI_F_* flags below
174
size_t size;
175
int alignment;
176
int first_field_index; // -> _cffi_fields array
177
int num_fields;
178
};
179
#define _CFFI_F_UNION 0x01 // is a union, not a struct
180
#define _CFFI_F_CHECK_FIELDS 0x02 // complain if fields are not in the
181
// "standard layout" or if some are missing
182
#define _CFFI_F_PACKED 0x04 // for CHECK_FIELDS, assume a packed struct
183
#define _CFFI_F_EXTERNAL 0x08 // in some other ffi.include()
184
#define _CFFI_F_OPAQUE 0x10 // opaque
185
186
struct _cffi_field_s {
187
const char *name;
188
size_t field_offset;
189
size_t field_size;
190
_cffi_opcode_t field_type_op;
191
};
192
193
struct _cffi_enum_s {
194
const char *name;
195
int type_index; // -> _cffi_types, on a OP_ENUM
196
int type_prim; // _CFFI_PRIM_xxx
197
const char *enumerators; // comma-delimited string
198
};
199
200
struct _cffi_typename_s {
201
const char *name;
202
int type_index; /* if opaque, points to a possibly artificial
203
OP_STRUCT which is itself opaque */
204
};
205
206
struct _cffi_type_context_s {
207
_cffi_opcode_t *types;
208
const struct _cffi_global_s *globals;
209
const struct _cffi_field_s *fields;
210
const struct _cffi_struct_union_s *struct_unions;
211
const struct _cffi_enum_s *enums;
212
const struct _cffi_typename_s *typenames;
213
int num_globals;
214
int num_struct_unions;
215
int num_enums;
216
int num_typenames;
217
const char *const *includes;
218
int num_types;
219
int flags; /* future extension */
220
};
221
222
struct _cffi_parse_info_s {
223
const struct _cffi_type_context_s *ctx;
224
_cffi_opcode_t *output;
225
unsigned int output_size;
226
size_t error_location;
227
const char *error_message;
228
};
229
230
struct _cffi_externpy_s {
231
const char *name;
232
size_t size_of_result;
233
void *reserved1, *reserved2;
234
};
235
236
#ifdef _CFFI_INTERNAL
237
static int parse_c_type(struct _cffi_parse_info_s *info, const char *input);
238
static int search_in_globals(const struct _cffi_type_context_s *ctx,
239
const char *search, size_t search_len);
240
static int search_in_struct_unions(const struct _cffi_type_context_s *ctx,
241
const char *search, size_t search_len);
242
#endif
243
244
/* this block of #ifs should be kept exactly identical between
245
c/_cffi_backend.c, cffi/vengine_cpy.py, cffi/vengine_gen.py
246
and cffi/_cffi_include.h */
247
#if defined(_MSC_VER)
248
# include <malloc.h> /* for alloca() */
249
# if _MSC_VER < 1600 /* MSVC < 2010 */
250
typedef __int8 int8_t;
251
typedef __int16 int16_t;
252
typedef __int32 int32_t;
253
typedef __int64 int64_t;
254
typedef unsigned __int8 uint8_t;
255
typedef unsigned __int16 uint16_t;
256
typedef unsigned __int32 uint32_t;
257
typedef unsigned __int64 uint64_t;
258
typedef __int8 int_least8_t;
259
typedef __int16 int_least16_t;
260
typedef __int32 int_least32_t;
261
typedef __int64 int_least64_t;
262
typedef unsigned __int8 uint_least8_t;
263
typedef unsigned __int16 uint_least16_t;
264
typedef unsigned __int32 uint_least32_t;
265
typedef unsigned __int64 uint_least64_t;
266
typedef __int8 int_fast8_t;
267
typedef __int16 int_fast16_t;
268
typedef __int32 int_fast32_t;
269
typedef __int64 int_fast64_t;
270
typedef unsigned __int8 uint_fast8_t;
271
typedef unsigned __int16 uint_fast16_t;
272
typedef unsigned __int32 uint_fast32_t;
273
typedef unsigned __int64 uint_fast64_t;
274
typedef __int64 intmax_t;
275
typedef unsigned __int64 uintmax_t;
276
# else
277
# include <stdint.h>
278
# endif
279
# if _MSC_VER < 1800 /* MSVC < 2013 */
280
# ifndef __cplusplus
281
typedef unsigned char _Bool;
282
# endif
283
# endif
284
# define _cffi_float_complex_t _Fcomplex /* include <complex.h> for it */
285
# define _cffi_double_complex_t _Dcomplex /* include <complex.h> for it */
286
#else
287
# include <stdint.h>
288
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX) || defined(__hpux)
289
# include <alloca.h>
290
# endif
291
# define _cffi_float_complex_t float _Complex
292
# define _cffi_double_complex_t double _Complex
293
#endif
294
295
#ifdef __GNUC__
296
# define _CFFI_UNUSED_FN __attribute__((unused))
297
#else
298
# define _CFFI_UNUSED_FN /* nothing */
299
#endif
300
301
#ifdef __cplusplus
302
# ifndef _Bool
303
typedef bool _Bool; /* semi-hackish: C++ has no _Bool; bool is builtin */
304
# endif
305
#endif
306
307
/********** CPython-specific section **********/
308
#ifndef PYPY_VERSION
309
310
311
#if PY_MAJOR_VERSION >= 3
312
# define PyInt_FromLong PyLong_FromLong
313
#endif
314
315
#define _cffi_from_c_double PyFloat_FromDouble
316
#define _cffi_from_c_float PyFloat_FromDouble
317
#define _cffi_from_c_long PyInt_FromLong
318
#define _cffi_from_c_ulong PyLong_FromUnsignedLong
319
#define _cffi_from_c_longlong PyLong_FromLongLong
320
#define _cffi_from_c_ulonglong PyLong_FromUnsignedLongLong
321
#define _cffi_from_c__Bool PyBool_FromLong
322
323
#define _cffi_to_c_double PyFloat_AsDouble
324
#define _cffi_to_c_float PyFloat_AsDouble
325
326
#define _cffi_from_c_int(x, type) \
327
(((type)-1) > 0 ? /* unsigned */ \
328
(sizeof(type) < sizeof(long) ? \
329
PyInt_FromLong((long)x) : \
330
sizeof(type) == sizeof(long) ? \
331
PyLong_FromUnsignedLong((unsigned long)x) : \
332
PyLong_FromUnsignedLongLong((unsigned long long)x)) : \
333
(sizeof(type) <= sizeof(long) ? \
334
PyInt_FromLong((long)x) : \
335
PyLong_FromLongLong((long long)x)))
336
337
#define _cffi_to_c_int(o, type) \
338
((type)( \
339
sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \
340
: (type)_cffi_to_c_i8(o)) : \
341
sizeof(type) == 2 ? (((type)-1) > 0 ? (type)_cffi_to_c_u16(o) \
342
: (type)_cffi_to_c_i16(o)) : \
343
sizeof(type) == 4 ? (((type)-1) > 0 ? (type)_cffi_to_c_u32(o) \
344
: (type)_cffi_to_c_i32(o)) : \
345
sizeof(type) == 8 ? (((type)-1) > 0 ? (type)_cffi_to_c_u64(o) \
346
: (type)_cffi_to_c_i64(o)) : \
347
(Py_FatalError("unsupported size for type " #type), (type)0)))
348
349
#define _cffi_to_c_i8 \
350
((int(*)(PyObject *))_cffi_exports[1])
351
#define _cffi_to_c_u8 \
352
((int(*)(PyObject *))_cffi_exports[2])
353
#define _cffi_to_c_i16 \
354
((int(*)(PyObject *))_cffi_exports[3])
355
#define _cffi_to_c_u16 \
356
((int(*)(PyObject *))_cffi_exports[4])
357
#define _cffi_to_c_i32 \
358
((int(*)(PyObject *))_cffi_exports[5])
359
#define _cffi_to_c_u32 \
360
((unsigned int(*)(PyObject *))_cffi_exports[6])
361
#define _cffi_to_c_i64 \
362
((long long(*)(PyObject *))_cffi_exports[7])
363
#define _cffi_to_c_u64 \
364
((unsigned long long(*)(PyObject *))_cffi_exports[8])
365
#define _cffi_to_c_char \
366
((int(*)(PyObject *))_cffi_exports[9])
367
#define _cffi_from_c_pointer \
368
((PyObject *(*)(char *, struct _cffi_ctypedescr *))_cffi_exports[10])
369
#define _cffi_to_c_pointer \
370
((char *(*)(PyObject *, struct _cffi_ctypedescr *))_cffi_exports[11])
371
#define _cffi_get_struct_layout \
372
not used any more
373
#define _cffi_restore_errno \
374
((void(*)(void))_cffi_exports[13])
375
#define _cffi_save_errno \
376
((void(*)(void))_cffi_exports[14])
377
#define _cffi_from_c_char \
378
((PyObject *(*)(char))_cffi_exports[15])
379
#define _cffi_from_c_deref \
380
((PyObject *(*)(char *, struct _cffi_ctypedescr *))_cffi_exports[16])
381
#define _cffi_to_c \
382
((int(*)(char *, struct _cffi_ctypedescr *, PyObject *))_cffi_exports[17])
383
#define _cffi_from_c_struct \
384
((PyObject *(*)(char *, struct _cffi_ctypedescr *))_cffi_exports[18])
385
#define _cffi_to_c_wchar_t \
386
((_cffi_wchar_t(*)(PyObject *))_cffi_exports[19])
387
#define _cffi_from_c_wchar_t \
388
((PyObject *(*)(_cffi_wchar_t))_cffi_exports[20])
389
#define _cffi_to_c_long_double \
390
((long double(*)(PyObject *))_cffi_exports[21])
391
#define _cffi_to_c__Bool \
392
((_Bool(*)(PyObject *))_cffi_exports[22])
393
#define _cffi_prepare_pointer_call_argument \
394
((Py_ssize_t(*)(struct _cffi_ctypedescr *, \
395
PyObject *, char **))_cffi_exports[23])
396
#define _cffi_convert_array_from_object \
397
((int(*)(char *, struct _cffi_ctypedescr *, PyObject *))_cffi_exports[24])
398
#define _CFFI_CPIDX 25
399
#define _cffi_call_python \
400
((void(*)(struct _cffi_externpy_s *, char *))_cffi_exports[_CFFI_CPIDX])
401
#define _cffi_to_c_wchar3216_t \
402
((int(*)(PyObject *))_cffi_exports[26])
403
#define _cffi_from_c_wchar3216_t \
404
((PyObject *(*)(int))_cffi_exports[27])
405
#define _CFFI_NUM_EXPORTS 28
406
407
struct _cffi_ctypedescr;
408
409
static void *_cffi_exports[_CFFI_NUM_EXPORTS];
410
411
#define _cffi_type(index) ( \
412
assert((((uintptr_t)_cffi_types[index]) & 1) == 0), \
413
(struct _cffi_ctypedescr *)_cffi_types[index])
414
415
static PyObject *_cffi_init(const char *module_name, Py_ssize_t version,
416
const struct _cffi_type_context_s *ctx)
417
{
418
PyObject *module, *o_arg, *new_module;
419
void *raw[] = {
420
(void *)module_name,
421
(void *)version,
422
(void *)_cffi_exports,
423
(void *)ctx,
424
};
425
426
module = PyImport_ImportModule("_cffi_backend");
427
if (module == NULL)
428
goto failure;
429
430
o_arg = PyLong_FromVoidPtr((void *)raw);
431
if (o_arg == NULL)
432
goto failure;
433
434
new_module = PyObject_CallMethod(
435
module, (char *)"_init_cffi_1_0_external_module", (char *)"O", o_arg);
436
437
Py_DECREF(o_arg);
438
Py_DECREF(module);
439
return new_module;
440
441
failure:
442
Py_XDECREF(module);
443
return NULL;
444
}
445
446
447
#ifdef HAVE_WCHAR_H
448
typedef wchar_t _cffi_wchar_t;
449
#else
450
typedef uint16_t _cffi_wchar_t; /* same random pick as _cffi_backend.c */
451
#endif
452
453
_CFFI_UNUSED_FN static uint16_t _cffi_to_c_char16_t(PyObject *o)
454
{
455
if (sizeof(_cffi_wchar_t) == 2)
456
return (uint16_t)_cffi_to_c_wchar_t(o);
457
else
458
return (uint16_t)_cffi_to_c_wchar3216_t(o);
459
}
460
461
_CFFI_UNUSED_FN static PyObject *_cffi_from_c_char16_t(uint16_t x)
462
{
463
if (sizeof(_cffi_wchar_t) == 2)
464
return _cffi_from_c_wchar_t((_cffi_wchar_t)x);
465
else
466
return _cffi_from_c_wchar3216_t((int)x);
467
}
468
469
_CFFI_UNUSED_FN static int _cffi_to_c_char32_t(PyObject *o)
470
{
471
if (sizeof(_cffi_wchar_t) == 4)
472
return (int)_cffi_to_c_wchar_t(o);
473
else
474
return (int)_cffi_to_c_wchar3216_t(o);
475
}
476
477
_CFFI_UNUSED_FN static PyObject *_cffi_from_c_char32_t(unsigned int x)
478
{
479
if (sizeof(_cffi_wchar_t) == 4)
480
return _cffi_from_c_wchar_t((_cffi_wchar_t)x);
481
else
482
return _cffi_from_c_wchar3216_t((int)x);
483
}
484
485
union _cffi_union_alignment_u {
486
unsigned char m_char;
487
unsigned short m_short;
488
unsigned int m_int;
489
unsigned long m_long;
490
unsigned long long m_longlong;
491
float m_float;
492
double m_double;
493
long double m_longdouble;
494
};
495
496
struct _cffi_freeme_s {
497
struct _cffi_freeme_s *next;
498
union _cffi_union_alignment_u alignment;
499
};
500
501
_CFFI_UNUSED_FN static int
502
_cffi_convert_array_argument(struct _cffi_ctypedescr *ctptr, PyObject *arg,
503
char **output_data, Py_ssize_t datasize,
504
struct _cffi_freeme_s **freeme)
505
{
506
char *p;
507
if (datasize < 0)
508
return -1;
509
510
p = *output_data;
511
if (p == NULL) {
512
struct _cffi_freeme_s *fp = (struct _cffi_freeme_s *)PyObject_Malloc(
513
offsetof(struct _cffi_freeme_s, alignment) + (size_t)datasize);
514
if (fp == NULL)
515
return -1;
516
fp->next = *freeme;
517
*freeme = fp;
518
p = *output_data = (char *)&fp->alignment;
519
}
520
memset((void *)p, 0, (size_t)datasize);
521
return _cffi_convert_array_from_object(p, ctptr, arg);
522
}
523
524
_CFFI_UNUSED_FN static void
525
_cffi_free_array_arguments(struct _cffi_freeme_s *freeme)
526
{
527
do {
528
void *p = (void *)freeme;
529
freeme = freeme->next;
530
PyObject_Free(p);
531
} while (freeme != NULL);
532
}
533
534
/********** end CPython-specific section **********/
535
#else
536
_CFFI_UNUSED_FN
537
static void (*_cffi_call_python_org)(struct _cffi_externpy_s *, char *);
538
# define _cffi_call_python _cffi_call_python_org
539
#endif
540
541
542
#define _cffi_array_len(array) (sizeof(array) / sizeof((array)[0]))
543
544
#define _cffi_prim_int(size, sign) \
545
((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8 : _CFFI_PRIM_UINT8) : \
546
(size) == 2 ? ((sign) ? _CFFI_PRIM_INT16 : _CFFI_PRIM_UINT16) : \
547
(size) == 4 ? ((sign) ? _CFFI_PRIM_INT32 : _CFFI_PRIM_UINT32) : \
548
(size) == 8 ? ((sign) ? _CFFI_PRIM_INT64 : _CFFI_PRIM_UINT64) : \
549
_CFFI__UNKNOWN_PRIM)
550
551
#define _cffi_prim_float(size) \
552
((size) == sizeof(float) ? _CFFI_PRIM_FLOAT : \
553
(size) == sizeof(double) ? _CFFI_PRIM_DOUBLE : \
554
(size) == sizeof(long double) ? _CFFI__UNKNOWN_LONG_DOUBLE : \
555
_CFFI__UNKNOWN_FLOAT_PRIM)
556
557
#define _cffi_check_int(got, got_nonpos, expected) \
558
((got_nonpos) == (expected <= 0) && \
559
(got) == (unsigned long long)expected)
560
561
#ifdef MS_WIN32
562
# define _cffi_stdcall __stdcall
563
#else
564
# define _cffi_stdcall /* nothing */
565
#endif
566
567
#ifdef __cplusplus
568
}
569
#endif
570
571
/************************************************************/
572
573
574
#include <wayland-client-core.h>
575
#include <wayland-server-core.h>
576
#include <wayland-version.h>
577
578
#include <fcntl.h>
579
#include <errno.h>
580
#include <sys/types.h>
581
582
struct wl_listener_container {
583
void *handle;
584
struct wl_listener destroy_listener;
585
};
586
587
/* This code is taken from Weston (MIT licensed) to provide access to anonymous
588
* files with CLOEXEC set
589
* Copyright (c) 2012 Collabora, Ltd.
590
* http://cgit.freedesktop.org/wayland/weston/tree/shared/os-compatibility.c?id=1.8.0
591
*/
592
593
static int
594
set_cloexec_or_close(int fd)
595
{
596
long flags;
597
598
if (fd == -1)
599
return -1;
600
601
flags = fcntl(fd, F_GETFD);
602
if (flags == -1)
603
goto err;
604
605
if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
606
goto err;
607
608
return fd;
609
610
err:
611
close(fd);
612
return -1;
613
}
614
615
static int
616
create_tmpfile_cloexec(char *tmpname)
617
{
618
int fd;
619
620
#ifdef HAVE_MKOSTEMP
621
fd = mkostemp(tmpname, O_CLOEXEC);
622
if (fd >= 0)
623
unlink(tmpname);
624
#else
625
fd = mkstemp(tmpname);
626
if (fd >= 0) {
627
fd = set_cloexec_or_close(fd);
628
unlink(tmpname);
629
}
630
#endif
631
632
return fd;
633
}
634
635
int
636
os_create_anonymous_file(off_t size)
637
{
638
static const char template[] = "/weston-shared-XXXXXX";
639
const char *path;
640
char *name;
641
int fd;
642
int ret;
643
644
path = getenv("XDG_RUNTIME_DIR");
645
if (!path) {
646
errno = ENOENT;
647
return -1;
648
}
649
650
name = malloc(strlen(path) + sizeof(template));
651
if (!name)
652
return -1;
653
654
strcpy(name, path);
655
strcat(name, template);
656
657
fd = create_tmpfile_cloexec(name);
658
659
free(name);
660
661
if (fd < 0)
662
return -1;
663
664
#ifdef HAVE_POSIX_FALLOCATE
665
ret = posix_fallocate(fd, 0, size);
666
if (ret != 0) {
667
close(fd);
668
errno = ret;
669
return -1;
670
}
671
#else
672
ret = ftruncate(fd, size);
673
if (ret < 0) {
674
close(fd);
675
return -1;
676
}
677
#endif
678
679
return fd;
680
}
681
682
683
/************************************************************/
684
685
static void *_cffi_types[] = {
686
/* 0 */ _CFFI_OP(_CFFI_OP_FUNCTION, 23), // char const *()(struct wl_display *)
687
/* 1 */ _CFFI_OP(_CFFI_OP_POINTER, 262), // struct wl_display *
688
/* 2 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
689
/* 3 */ _CFFI_OP(_CFFI_OP_FUNCTION, 70), // double()(int32_t)
690
/* 4 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 21), // int32_t
691
/* 5 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
692
/* 6 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(int)
693
/* 7 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7), // int
694
/* 8 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
695
/* 9 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(int, uint32_t, void *)
696
/* 10 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
697
/* 11 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22), // uint32_t
698
/* 12 */ _CFFI_OP(_CFFI_OP_POINTER, 283), // void *
699
/* 13 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
700
/* 14 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(int, void *)
701
/* 15 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
702
/* 16 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
703
/* 17 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
704
/* 18 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_display *)
705
/* 19 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
706
/* 20 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
707
/* 21 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_display *, char const *)
708
/* 22 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
709
/* 23 */ _CFFI_OP(_CFFI_OP_POINTER, 256), // char const *
710
/* 24 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
711
/* 25 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_display *, struct wl_event_queue *)
712
/* 26 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
713
/* 27 */ _CFFI_OP(_CFFI_OP_POINTER, 264), // struct wl_event_queue *
714
/* 28 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
715
/* 29 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_event_loop *)
716
/* 30 */ _CFFI_OP(_CFFI_OP_POINTER, 263), // struct wl_event_loop *
717
/* 31 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
718
/* 32 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_event_loop *, int)
719
/* 33 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
720
/* 34 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
721
/* 35 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
722
/* 36 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_event_source *)
723
/* 37 */ _CFFI_OP(_CFFI_OP_POINTER, 265), // struct wl_event_source *
724
/* 38 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
725
/* 39 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_event_source *, int)
726
/* 40 */ _CFFI_OP(_CFFI_OP_NOOP, 37),
727
/* 41 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
728
/* 42 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
729
/* 43 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_event_source *, uint32_t)
730
/* 44 */ _CFFI_OP(_CFFI_OP_NOOP, 37),
731
/* 45 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
732
/* 46 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
733
/* 47 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_list const *)
734
/* 48 */ _CFFI_OP(_CFFI_OP_POINTER, 269), // struct wl_list const *
735
/* 49 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
736
/* 50 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_proxy *, int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *), void const *, void *)
737
/* 51 */ _CFFI_OP(_CFFI_OP_POINTER, 275), // struct wl_proxy *
738
/* 52 */ _CFFI_OP(_CFFI_OP_POINTER, 62), // int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *)
739
/* 53 */ _CFFI_OP(_CFFI_OP_POINTER, 283), // void const *
740
/* 54 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
741
/* 55 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
742
/* 56 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(struct wl_resource *)
743
/* 57 */ _CFFI_OP(_CFFI_OP_POINTER, 276), // struct wl_resource *
744
/* 58 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
745
/* 59 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(void *)
746
/* 60 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
747
/* 61 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
748
/* 62 */ _CFFI_OP(_CFFI_OP_FUNCTION, 7), // int()(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *)
749
/* 63 */ _CFFI_OP(_CFFI_OP_NOOP, 53),
750
/* 64 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
751
/* 65 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
752
/* 66 */ _CFFI_OP(_CFFI_OP_POINTER, 272), // struct wl_message const *
753
/* 67 */ _CFFI_OP(_CFFI_OP_POINTER, 279), // union wl_argument *
754
/* 68 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
755
/* 69 */ _CFFI_OP(_CFFI_OP_FUNCTION, 4), // int32_t()(double)
756
/* 70 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 14), // double
757
/* 71 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
758
/* 72 */ _CFFI_OP(_CFFI_OP_FUNCTION, 4), // int32_t()(int)
759
/* 73 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
760
/* 74 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
761
/* 75 */ _CFFI_OP(_CFFI_OP_FUNCTION, 139), // struct wl_client *()(struct wl_display *, int)
762
/* 76 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
763
/* 77 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
764
/* 78 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
765
/* 79 */ _CFFI_OP(_CFFI_OP_FUNCTION, 139), // struct wl_client *()(struct wl_resource *)
766
/* 80 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
767
/* 81 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
768
/* 82 */ _CFFI_OP(_CFFI_OP_FUNCTION, 1), // struct wl_display *()(char const *)
769
/* 83 */ _CFFI_OP(_CFFI_OP_NOOP, 23),
770
/* 84 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
771
/* 85 */ _CFFI_OP(_CFFI_OP_FUNCTION, 1), // struct wl_display *()(int)
772
/* 86 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
773
/* 87 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
774
/* 88 */ _CFFI_OP(_CFFI_OP_FUNCTION, 1), // struct wl_display *()(void)
775
/* 89 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
776
/* 90 */ _CFFI_OP(_CFFI_OP_FUNCTION, 30), // struct wl_event_loop *()(struct wl_display *)
777
/* 91 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
778
/* 92 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
779
/* 93 */ _CFFI_OP(_CFFI_OP_FUNCTION, 30), // struct wl_event_loop *()(void)
780
/* 94 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
781
/* 95 */ _CFFI_OP(_CFFI_OP_FUNCTION, 27), // struct wl_event_queue *()(struct wl_display *)
782
/* 96 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
783
/* 97 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
784
/* 98 */ _CFFI_OP(_CFFI_OP_FUNCTION, 37), // struct wl_event_source *()(struct wl_event_loop *, int(*)(void *), void *)
785
/* 99 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
786
/* 100 */ _CFFI_OP(_CFFI_OP_POINTER, 59), // int(*)(void *)
787
/* 101 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
788
/* 102 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
789
/* 103 */ _CFFI_OP(_CFFI_OP_FUNCTION, 37), // struct wl_event_source *()(struct wl_event_loop *, int, int(*)(int, void *), void *)
790
/* 104 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
791
/* 105 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
792
/* 106 */ _CFFI_OP(_CFFI_OP_POINTER, 14), // int(*)(int, void *)
793
/* 107 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
794
/* 108 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
795
/* 109 */ _CFFI_OP(_CFFI_OP_FUNCTION, 37), // struct wl_event_source *()(struct wl_event_loop *, int, uint32_t, int(*)(int, uint32_t, void *), void *)
796
/* 110 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
797
/* 111 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
798
/* 112 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
799
/* 113 */ _CFFI_OP(_CFFI_OP_POINTER, 9), // int(*)(int, uint32_t, void *)
800
/* 114 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
801
/* 115 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
802
/* 116 */ _CFFI_OP(_CFFI_OP_FUNCTION, 37), // struct wl_event_source *()(struct wl_event_loop *, void(*)(void *), void *)
803
/* 117 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
804
/* 118 */ _CFFI_OP(_CFFI_OP_POINTER, 253), // void(*)(void *)
805
/* 119 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
806
/* 120 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
807
/* 121 */ _CFFI_OP(_CFFI_OP_FUNCTION, 200), // struct wl_global *()(struct wl_display *, struct wl_interface const *, int, void *, void(*)(struct wl_client *, void *, uint32_t, uint32_t))
808
/* 122 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
809
/* 123 */ _CFFI_OP(_CFFI_OP_POINTER, 268), // struct wl_interface const *
810
/* 124 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
811
/* 125 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
812
/* 126 */ _CFFI_OP(_CFFI_OP_POINTER, 177), // void(*)(struct wl_client *, void *, uint32_t, uint32_t)
813
/* 127 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
814
/* 128 */ _CFFI_OP(_CFFI_OP_FUNCTION, 51), // struct wl_proxy *()(struct wl_proxy *, struct wl_interface const *)
815
/* 129 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
816
/* 130 */ _CFFI_OP(_CFFI_OP_NOOP, 123),
817
/* 131 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
818
/* 132 */ _CFFI_OP(_CFFI_OP_FUNCTION, 51), // struct wl_proxy *()(struct wl_proxy *, uint32_t, union wl_argument *, struct wl_interface const *)
819
/* 133 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
820
/* 134 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
821
/* 135 */ _CFFI_OP(_CFFI_OP_NOOP, 67),
822
/* 136 */ _CFFI_OP(_CFFI_OP_NOOP, 123),
823
/* 137 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
824
/* 138 */ _CFFI_OP(_CFFI_OP_FUNCTION, 57), // struct wl_resource *()(struct wl_client *, struct wl_interface const *, int, uint32_t)
825
/* 139 */ _CFFI_OP(_CFFI_OP_POINTER, 261), // struct wl_client *
826
/* 140 */ _CFFI_OP(_CFFI_OP_NOOP, 123),
827
/* 141 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
828
/* 142 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
829
/* 143 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
830
/* 144 */ _CFFI_OP(_CFFI_OP_FUNCTION, 57), // struct wl_resource *()(struct wl_client *, uint32_t)
831
/* 145 */ _CFFI_OP(_CFFI_OP_NOOP, 139),
832
/* 146 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
833
/* 147 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
834
/* 148 */ _CFFI_OP(_CFFI_OP_FUNCTION, 278), // uint32_t *()(struct wl_display *, uint32_t)
835
/* 149 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
836
/* 150 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
837
/* 151 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
838
/* 152 */ _CFFI_OP(_CFFI_OP_FUNCTION, 11), // uint32_t()(struct wl_display *)
839
/* 153 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
840
/* 154 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
841
/* 155 */ _CFFI_OP(_CFFI_OP_FUNCTION, 11), // uint32_t()(struct wl_resource *)
842
/* 156 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
843
/* 157 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
844
/* 158 */ _CFFI_OP(_CFFI_OP_FUNCTION, 12), // void *()(struct wl_proxy *)
845
/* 159 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
846
/* 160 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
847
/* 161 */ _CFFI_OP(_CFFI_OP_FUNCTION, 12), // void *()(struct wl_resource *)
848
/* 162 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
849
/* 163 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
850
/* 164 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_client *)
851
/* 165 */ _CFFI_OP(_CFFI_OP_NOOP, 139),
852
/* 166 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
853
/* 167 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_client *, int *, unsigned int *, unsigned int *)
854
/* 168 */ _CFFI_OP(_CFFI_OP_NOOP, 139),
855
/* 169 */ _CFFI_OP(_CFFI_OP_POINTER, 7), // int *
856
/* 170 */ _CFFI_OP(_CFFI_OP_POINTER, 280), // unsigned int *
857
/* 171 */ _CFFI_OP(_CFFI_OP_NOOP, 170),
858
/* 172 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
859
/* 173 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_client *, struct wl_listener *)
860
/* 174 */ _CFFI_OP(_CFFI_OP_NOOP, 139),
861
/* 175 */ _CFFI_OP(_CFFI_OP_POINTER, 270), // struct wl_listener *
862
/* 176 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
863
/* 177 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_client *, void *, uint32_t, uint32_t)
864
/* 178 */ _CFFI_OP(_CFFI_OP_NOOP, 139),
865
/* 179 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
866
/* 180 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
867
/* 181 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
868
/* 182 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
869
/* 183 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_display *)
870
/* 184 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
871
/* 185 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
872
/* 186 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_event_loop *)
873
/* 187 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
874
/* 188 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
875
/* 189 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_event_loop *, struct wl_listener *)
876
/* 190 */ _CFFI_OP(_CFFI_OP_NOOP, 30),
877
/* 191 */ _CFFI_OP(_CFFI_OP_NOOP, 175),
878
/* 192 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
879
/* 193 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_event_queue *)
880
/* 194 */ _CFFI_OP(_CFFI_OP_NOOP, 27),
881
/* 195 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
882
/* 196 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_event_source *)
883
/* 197 */ _CFFI_OP(_CFFI_OP_NOOP, 37),
884
/* 198 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
885
/* 199 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_global *)
886
/* 200 */ _CFFI_OP(_CFFI_OP_POINTER, 266), // struct wl_global *
887
/* 201 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
888
/* 202 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_list *)
889
/* 203 */ _CFFI_OP(_CFFI_OP_POINTER, 269), // struct wl_list *
890
/* 204 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
891
/* 205 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_listener *, void *)
892
/* 206 */ _CFFI_OP(_CFFI_OP_NOOP, 175),
893
/* 207 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
894
/* 208 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
895
/* 209 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_proxy *)
896
/* 210 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
897
/* 211 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
898
/* 212 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_proxy *, uint32_t, union wl_argument *)
899
/* 213 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
900
/* 214 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
901
/* 215 */ _CFFI_OP(_CFFI_OP_NOOP, 67),
902
/* 216 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
903
/* 217 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_proxy *, void *)
904
/* 218 */ _CFFI_OP(_CFFI_OP_NOOP, 51),
905
/* 219 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
906
/* 220 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
907
/* 221 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_resource *)
908
/* 222 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
909
/* 223 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
910
/* 224 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_resource *, int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *), void const *, void *, void(*)(struct wl_resource *))
911
/* 225 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
912
/* 226 */ _CFFI_OP(_CFFI_OP_NOOP, 52),
913
/* 227 */ _CFFI_OP(_CFFI_OP_NOOP, 53),
914
/* 228 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
915
/* 229 */ _CFFI_OP(_CFFI_OP_POINTER, 221), // void(*)(struct wl_resource *)
916
/* 230 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
917
/* 231 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_resource *, struct wl_listener *)
918
/* 232 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
919
/* 233 */ _CFFI_OP(_CFFI_OP_NOOP, 175),
920
/* 234 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
921
/* 235 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_resource *, uint32_t, char const *, ...)
922
/* 236 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
923
/* 237 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
924
/* 238 */ _CFFI_OP(_CFFI_OP_NOOP, 23),
925
/* 239 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 1),
926
/* 240 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_resource *, uint32_t, union wl_argument *)
927
/* 241 */ _CFFI_OP(_CFFI_OP_NOOP, 57),
928
/* 242 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
929
/* 243 */ _CFFI_OP(_CFFI_OP_NOOP, 67),
930
/* 244 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
931
/* 245 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_signal *, struct wl_listener *)
932
/* 246 */ _CFFI_OP(_CFFI_OP_POINTER, 277), // struct wl_signal *
933
/* 247 */ _CFFI_OP(_CFFI_OP_NOOP, 175),
934
/* 248 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
935
/* 249 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(struct wl_signal *, void *)
936
/* 250 */ _CFFI_OP(_CFFI_OP_NOOP, 246),
937
/* 251 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
938
/* 252 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
939
/* 253 */ _CFFI_OP(_CFFI_OP_FUNCTION, 283), // void()(void *)
940
/* 254 */ _CFFI_OP(_CFFI_OP_NOOP, 12),
941
/* 255 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
942
/* 256 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 2), // char
943
/* 257 */ _CFFI_OP(_CFFI_OP_ENUM, 0), // enum $1
944
/* 258 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 28), // size_t
945
/* 259 */ _CFFI_OP(_CFFI_OP_POINTER, 260), // struct wl_array *
946
/* 260 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 1), // struct wl_array
947
/* 261 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 2), // struct wl_client
948
/* 262 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 3), // struct wl_display
949
/* 263 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 4), // struct wl_event_loop
950
/* 264 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 5), // struct wl_event_queue
951
/* 265 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 6), // struct wl_event_source
952
/* 266 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 7), // struct wl_global
953
/* 267 */ _CFFI_OP(_CFFI_OP_POINTER, 123), // struct wl_interface const * *
954
/* 268 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 8), // struct wl_interface
955
/* 269 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 9), // struct wl_list
956
/* 270 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 10), // struct wl_listener
957
/* 271 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 11), // struct wl_listener_container
958
/* 272 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 12), // struct wl_message
959
/* 273 */ _CFFI_OP(_CFFI_OP_POINTER, 274), // struct wl_object *
960
/* 274 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 13), // struct wl_object
961
/* 275 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 14), // struct wl_proxy
962
/* 276 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 15), // struct wl_resource
963
/* 277 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 16), // struct wl_signal
964
/* 278 */ _CFFI_OP(_CFFI_OP_POINTER, 11), // uint32_t *
965
/* 279 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 0), // union wl_argument
966
/* 280 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 8), // unsigned int
967
/* 281 */ _CFFI_OP(_CFFI_OP_POINTER, 205), // void(*)(struct wl_listener *, void *)
968
/* 282 */ _CFFI_OP(_CFFI_OP_POINTER, 235), // void(*)(struct wl_resource *, uint32_t, char const *, ...)
969
/* 283 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 0), // void
970
};
971
972
static int _cffi_const_WL_EVENT_READABLE(unsigned long long *o)
973
{
974
int n = (WL_EVENT_READABLE) <= 0;
975
*o = (unsigned long long)((WL_EVENT_READABLE) | 0); /* check that WL_EVENT_READABLE is an integer */
976
return n;
977
}
978
979
static int _cffi_const_WL_EVENT_WRITABLE(unsigned long long *o)
980
{
981
int n = (WL_EVENT_WRITABLE) <= 0;
982
*o = (unsigned long long)((WL_EVENT_WRITABLE) | 0); /* check that WL_EVENT_WRITABLE is an integer */
983
return n;
984
}
985
986
static int _cffi_const_WL_EVENT_HANGUP(unsigned long long *o)
987
{
988
int n = (WL_EVENT_HANGUP) <= 0;
989
*o = (unsigned long long)((WL_EVENT_HANGUP) | 0); /* check that WL_EVENT_HANGUP is an integer */
990
return n;
991
}
992
993
static int _cffi_const_WL_EVENT_ERROR(unsigned long long *o)
994
{
995
int n = (WL_EVENT_ERROR) <= 0;
996
*o = (unsigned long long)((WL_EVENT_ERROR) | 0); /* check that WL_EVENT_ERROR is an integer */
997
return n;
998
}
999
1000
static struct _cffi_externpy_s _cffi_externpy__dispatcher_func =
1001
{ "pywayland._ffi.dispatcher_func", (int)sizeof(int), 0, 0 };
1002
1003
static int dispatcher_func(void const * a0, void * a1, uint32_t a2, struct wl_message const * a3, union wl_argument * a4)
1004
{
1005
char a[40];
1006
char *p = a;
1007
*(void const * *)(p + 0) = a0;
1008
*(void * *)(p + 8) = a1;
1009
*(uint32_t *)(p + 16) = a2;
1010
*(struct wl_message const * *)(p + 24) = a3;
1011
*(union wl_argument * *)(p + 32) = a4;
1012
_cffi_call_python(&_cffi_externpy__dispatcher_func, p);
1013
return *(int *)p;
1014
}
1015
1016
static struct _cffi_externpy_s _cffi_externpy__event_loop_fd_func =
1017
{ "pywayland._ffi.event_loop_fd_func", (int)sizeof(int), 0, 0 };
1018
1019
static int event_loop_fd_func(int a0, uint32_t a1, void * a2)
1020
{
1021
char a[24];
1022
char *p = a;
1023
*(int *)(p + 0) = a0;
1024
*(uint32_t *)(p + 8) = a1;
1025
*(void * *)(p + 16) = a2;
1026
_cffi_call_python(&_cffi_externpy__event_loop_fd_func, p);
1027
return *(int *)p;
1028
}
1029
1030
static struct _cffi_externpy_s _cffi_externpy__event_loop_idle_func =
1031
{ "pywayland._ffi.event_loop_idle_func", 0, 0, 0 };
1032
1033
static void event_loop_idle_func(void * a0)
1034
{
1035
char a[8];
1036
char *p = a;
1037
*(void * *)(p + 0) = a0;
1038
_cffi_call_python(&_cffi_externpy__event_loop_idle_func, p);
1039
}
1040
1041
static struct _cffi_externpy_s _cffi_externpy__event_loop_signal_func =
1042
{ "pywayland._ffi.event_loop_signal_func", (int)sizeof(int), 0, 0 };
1043
1044
static int event_loop_signal_func(int a0, void * a1)
1045
{
1046
char a[16];
1047
char *p = a;
1048
*(int *)(p + 0) = a0;
1049
*(void * *)(p + 8) = a1;
1050
_cffi_call_python(&_cffi_externpy__event_loop_signal_func, p);
1051
return *(int *)p;
1052
}
1053
1054
static struct _cffi_externpy_s _cffi_externpy__event_loop_timer_func =
1055
{ "pywayland._ffi.event_loop_timer_func", (int)sizeof(int), 0, 0 };
1056
1057
static int event_loop_timer_func(void * a0)
1058
{
1059
char a[8];
1060
char *p = a;
1061
*(void * *)(p + 0) = a0;
1062
_cffi_call_python(&_cffi_externpy__event_loop_timer_func, p);
1063
return *(int *)p;
1064
}
1065
1066
static struct _cffi_externpy_s _cffi_externpy__global_bind_func =
1067
{ "pywayland._ffi.global_bind_func", 0, 0, 0 };
1068
1069
static void global_bind_func(struct wl_client * a0, void * a1, uint32_t a2, uint32_t a3)
1070
{
1071
char a[32];
1072
char *p = a;
1073
*(struct wl_client * *)(p + 0) = a0;
1074
*(void * *)(p + 8) = a1;
1075
*(uint32_t *)(p + 16) = a2;
1076
*(uint32_t *)(p + 24) = a3;
1077
_cffi_call_python(&_cffi_externpy__global_bind_func, p);
1078
}
1079
1080
static struct _cffi_externpy_s _cffi_externpy__notify_func =
1081
{ "pywayland._ffi.notify_func", 0, 0, 0 };
1082
1083
static void notify_func(struct wl_listener * a0, void * a1)
1084
{
1085
char a[16];
1086
char *p = a;
1087
*(struct wl_listener * *)(p + 0) = a0;
1088
*(void * *)(p + 8) = a1;
1089
_cffi_call_python(&_cffi_externpy__notify_func, p);
1090
}
1091
1092
static struct _cffi_externpy_s _cffi_externpy__resource_destroy_func =
1093
{ "pywayland._ffi.resource_destroy_func", 0, 0, 0 };
1094
1095
static void resource_destroy_func(struct wl_resource * a0)
1096
{
1097
char a[8];
1098
char *p = a;
1099
*(struct wl_resource * *)(p + 0) = a0;
1100
_cffi_call_python(&_cffi_externpy__resource_destroy_func, p);
1101
}
1102
1103
static int _cffi_d_os_create_anonymous_file(int x0)
1104
{
1105
return os_create_anonymous_file(x0);
1106
}
1107
#ifndef PYPY_VERSION
1108
static PyObject *
1109
_cffi_f_os_create_anonymous_file(PyObject *self, PyObject *arg0)
1110
{
1111
int x0;
1112
int result;
1113
PyObject *pyresult;
1114
1115
x0 = _cffi_to_c_int(arg0, int);
1116
if (x0 == (int)-1 && PyErr_Occurred())
1117
return NULL;
1118
1119
Py_BEGIN_ALLOW_THREADS
1120
_cffi_restore_errno();
1121
{ result = os_create_anonymous_file(x0); }
1122
_cffi_save_errno();
1123
Py_END_ALLOW_THREADS
1124
1125
(void)self; /* unused */
1126
pyresult = _cffi_from_c_int(result, int);
1127
return pyresult;
1128
}
1129
#else
1130
# define _cffi_f_os_create_anonymous_file _cffi_d_os_create_anonymous_file
1131
#endif
1132
1133
static void _cffi_d_wl_client_add_destroy_listener(struct wl_client * x0, struct wl_listener * x1)
1134
{
1135
wl_client_add_destroy_listener(x0, x1);
1136
}
1137
#ifndef PYPY_VERSION
1138
static PyObject *
1139
_cffi_f_wl_client_add_destroy_listener(PyObject *self, PyObject *args)
1140
{
1141
struct wl_client * x0;
1142
struct wl_listener * x1;
1143
Py_ssize_t datasize;
1144
struct _cffi_freeme_s *large_args_free = NULL;
1145
PyObject *arg0;
1146
PyObject *arg1;
1147
1148
if (!PyArg_UnpackTuple(args, "wl_client_add_destroy_listener", 2, 2, &arg0, &arg1))
1149
return NULL;
1150
1151
datasize = _cffi_prepare_pointer_call_argument(
1152
_cffi_type(139), arg0, (char **)&x0);
1153
if (datasize != 0) {
1154
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
1155
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
1156
datasize, &large_args_free) < 0)
1157
return NULL;
1158
}
1159
1160
datasize = _cffi_prepare_pointer_call_argument(
1161
_cffi_type(175), arg1, (char **)&x1);
1162
if (datasize != 0) {
1163
x1 = ((size_t)datasize) <= 640 ? (struct wl_listener *)alloca((size_t)datasize) : NULL;
1164
if (_cffi_convert_array_argument(_cffi_type(175), arg1, (char **)&x1,
1165
datasize, &large_args_free) < 0)
1166
return NULL;
1167
}
1168
1169
Py_BEGIN_ALLOW_THREADS
1170
_cffi_restore_errno();
1171
{ wl_client_add_destroy_listener(x0, x1); }
1172
_cffi_save_errno();
1173
Py_END_ALLOW_THREADS
1174
1175
(void)self; /* unused */
1176
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1177
Py_INCREF(Py_None);
1178
return Py_None;
1179
}
1180
#else
1181
# define _cffi_f_wl_client_add_destroy_listener _cffi_d_wl_client_add_destroy_listener
1182
#endif
1183
1184
static struct wl_client * _cffi_d_wl_client_create(struct wl_display * x0, int x1)
1185
{
1186
return wl_client_create(x0, x1);
1187
}
1188
#ifndef PYPY_VERSION
1189
static PyObject *
1190
_cffi_f_wl_client_create(PyObject *self, PyObject *args)
1191
{
1192
struct wl_display * x0;
1193
int x1;
1194
Py_ssize_t datasize;
1195
struct _cffi_freeme_s *large_args_free = NULL;
1196
struct wl_client * result;
1197
PyObject *pyresult;
1198
PyObject *arg0;
1199
PyObject *arg1;
1200
1201
if (!PyArg_UnpackTuple(args, "wl_client_create", 2, 2, &arg0, &arg1))
1202
return NULL;
1203
1204
datasize = _cffi_prepare_pointer_call_argument(
1205
_cffi_type(1), arg0, (char **)&x0);
1206
if (datasize != 0) {
1207
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1208
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1209
datasize, &large_args_free) < 0)
1210
return NULL;
1211
}
1212
1213
x1 = _cffi_to_c_int(arg1, int);
1214
if (x1 == (int)-1 && PyErr_Occurred())
1215
return NULL;
1216
1217
Py_BEGIN_ALLOW_THREADS
1218
_cffi_restore_errno();
1219
{ result = wl_client_create(x0, x1); }
1220
_cffi_save_errno();
1221
Py_END_ALLOW_THREADS
1222
1223
(void)self; /* unused */
1224
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(139));
1225
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1226
return pyresult;
1227
}
1228
#else
1229
# define _cffi_f_wl_client_create _cffi_d_wl_client_create
1230
#endif
1231
1232
static void _cffi_d_wl_client_destroy(struct wl_client * x0)
1233
{
1234
wl_client_destroy(x0);
1235
}
1236
#ifndef PYPY_VERSION
1237
static PyObject *
1238
_cffi_f_wl_client_destroy(PyObject *self, PyObject *arg0)
1239
{
1240
struct wl_client * x0;
1241
Py_ssize_t datasize;
1242
struct _cffi_freeme_s *large_args_free = NULL;
1243
1244
datasize = _cffi_prepare_pointer_call_argument(
1245
_cffi_type(139), arg0, (char **)&x0);
1246
if (datasize != 0) {
1247
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
1248
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
1249
datasize, &large_args_free) < 0)
1250
return NULL;
1251
}
1252
1253
Py_BEGIN_ALLOW_THREADS
1254
_cffi_restore_errno();
1255
{ wl_client_destroy(x0); }
1256
_cffi_save_errno();
1257
Py_END_ALLOW_THREADS
1258
1259
(void)self; /* unused */
1260
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1261
Py_INCREF(Py_None);
1262
return Py_None;
1263
}
1264
#else
1265
# define _cffi_f_wl_client_destroy _cffi_d_wl_client_destroy
1266
#endif
1267
1268
static void _cffi_d_wl_client_flush(struct wl_client * x0)
1269
{
1270
wl_client_flush(x0);
1271
}
1272
#ifndef PYPY_VERSION
1273
static PyObject *
1274
_cffi_f_wl_client_flush(PyObject *self, PyObject *arg0)
1275
{
1276
struct wl_client * x0;
1277
Py_ssize_t datasize;
1278
struct _cffi_freeme_s *large_args_free = NULL;
1279
1280
datasize = _cffi_prepare_pointer_call_argument(
1281
_cffi_type(139), arg0, (char **)&x0);
1282
if (datasize != 0) {
1283
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
1284
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
1285
datasize, &large_args_free) < 0)
1286
return NULL;
1287
}
1288
1289
Py_BEGIN_ALLOW_THREADS
1290
_cffi_restore_errno();
1291
{ wl_client_flush(x0); }
1292
_cffi_save_errno();
1293
Py_END_ALLOW_THREADS
1294
1295
(void)self; /* unused */
1296
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1297
Py_INCREF(Py_None);
1298
return Py_None;
1299
}
1300
#else
1301
# define _cffi_f_wl_client_flush _cffi_d_wl_client_flush
1302
#endif
1303
1304
static void _cffi_d_wl_client_get_credentials(struct wl_client * x0, int * x1, unsigned int * x2, unsigned int * x3)
1305
{
1306
wl_client_get_credentials(x0, x1, x2, x3);
1307
}
1308
#ifndef PYPY_VERSION
1309
static PyObject *
1310
_cffi_f_wl_client_get_credentials(PyObject *self, PyObject *args)
1311
{
1312
struct wl_client * x0;
1313
int * x1;
1314
unsigned int * x2;
1315
unsigned int * x3;
1316
Py_ssize_t datasize;
1317
struct _cffi_freeme_s *large_args_free = NULL;
1318
PyObject *arg0;
1319
PyObject *arg1;
1320
PyObject *arg2;
1321
PyObject *arg3;
1322
1323
if (!PyArg_UnpackTuple(args, "wl_client_get_credentials", 4, 4, &arg0, &arg1, &arg2, &arg3))
1324
return NULL;
1325
1326
datasize = _cffi_prepare_pointer_call_argument(
1327
_cffi_type(139), arg0, (char **)&x0);
1328
if (datasize != 0) {
1329
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
1330
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
1331
datasize, &large_args_free) < 0)
1332
return NULL;
1333
}
1334
1335
datasize = _cffi_prepare_pointer_call_argument(
1336
_cffi_type(169), arg1, (char **)&x1);
1337
if (datasize != 0) {
1338
x1 = ((size_t)datasize) <= 640 ? (int *)alloca((size_t)datasize) : NULL;
1339
if (_cffi_convert_array_argument(_cffi_type(169), arg1, (char **)&x1,
1340
datasize, &large_args_free) < 0)
1341
return NULL;
1342
}
1343
1344
datasize = _cffi_prepare_pointer_call_argument(
1345
_cffi_type(170), arg2, (char **)&x2);
1346
if (datasize != 0) {
1347
x2 = ((size_t)datasize) <= 640 ? (unsigned int *)alloca((size_t)datasize) : NULL;
1348
if (_cffi_convert_array_argument(_cffi_type(170), arg2, (char **)&x2,
1349
datasize, &large_args_free) < 0)
1350
return NULL;
1351
}
1352
1353
datasize = _cffi_prepare_pointer_call_argument(
1354
_cffi_type(170), arg3, (char **)&x3);
1355
if (datasize != 0) {
1356
x3 = ((size_t)datasize) <= 640 ? (unsigned int *)alloca((size_t)datasize) : NULL;
1357
if (_cffi_convert_array_argument(_cffi_type(170), arg3, (char **)&x3,
1358
datasize, &large_args_free) < 0)
1359
return NULL;
1360
}
1361
1362
Py_BEGIN_ALLOW_THREADS
1363
_cffi_restore_errno();
1364
{ wl_client_get_credentials(x0, x1, x2, x3); }
1365
_cffi_save_errno();
1366
Py_END_ALLOW_THREADS
1367
1368
(void)self; /* unused */
1369
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1370
Py_INCREF(Py_None);
1371
return Py_None;
1372
}
1373
#else
1374
# define _cffi_f_wl_client_get_credentials _cffi_d_wl_client_get_credentials
1375
#endif
1376
1377
static struct wl_resource * _cffi_d_wl_client_get_object(struct wl_client * x0, uint32_t x1)
1378
{
1379
return wl_client_get_object(x0, x1);
1380
}
1381
#ifndef PYPY_VERSION
1382
static PyObject *
1383
_cffi_f_wl_client_get_object(PyObject *self, PyObject *args)
1384
{
1385
struct wl_client * x0;
1386
uint32_t x1;
1387
Py_ssize_t datasize;
1388
struct _cffi_freeme_s *large_args_free = NULL;
1389
struct wl_resource * result;
1390
PyObject *pyresult;
1391
PyObject *arg0;
1392
PyObject *arg1;
1393
1394
if (!PyArg_UnpackTuple(args, "wl_client_get_object", 2, 2, &arg0, &arg1))
1395
return NULL;
1396
1397
datasize = _cffi_prepare_pointer_call_argument(
1398
_cffi_type(139), arg0, (char **)&x0);
1399
if (datasize != 0) {
1400
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
1401
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
1402
datasize, &large_args_free) < 0)
1403
return NULL;
1404
}
1405
1406
x1 = _cffi_to_c_int(arg1, uint32_t);
1407
if (x1 == (uint32_t)-1 && PyErr_Occurred())
1408
return NULL;
1409
1410
Py_BEGIN_ALLOW_THREADS
1411
_cffi_restore_errno();
1412
{ result = wl_client_get_object(x0, x1); }
1413
_cffi_save_errno();
1414
Py_END_ALLOW_THREADS
1415
1416
(void)self; /* unused */
1417
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(57));
1418
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1419
return pyresult;
1420
}
1421
#else
1422
# define _cffi_f_wl_client_get_object _cffi_d_wl_client_get_object
1423
#endif
1424
1425
static uint32_t * _cffi_d_wl_display_add_shm_format(struct wl_display * x0, uint32_t x1)
1426
{
1427
return wl_display_add_shm_format(x0, x1);
1428
}
1429
#ifndef PYPY_VERSION
1430
static PyObject *
1431
_cffi_f_wl_display_add_shm_format(PyObject *self, PyObject *args)
1432
{
1433
struct wl_display * x0;
1434
uint32_t x1;
1435
Py_ssize_t datasize;
1436
struct _cffi_freeme_s *large_args_free = NULL;
1437
uint32_t * result;
1438
PyObject *pyresult;
1439
PyObject *arg0;
1440
PyObject *arg1;
1441
1442
if (!PyArg_UnpackTuple(args, "wl_display_add_shm_format", 2, 2, &arg0, &arg1))
1443
return NULL;
1444
1445
datasize = _cffi_prepare_pointer_call_argument(
1446
_cffi_type(1), arg0, (char **)&x0);
1447
if (datasize != 0) {
1448
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1449
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1450
datasize, &large_args_free) < 0)
1451
return NULL;
1452
}
1453
1454
x1 = _cffi_to_c_int(arg1, uint32_t);
1455
if (x1 == (uint32_t)-1 && PyErr_Occurred())
1456
return NULL;
1457
1458
Py_BEGIN_ALLOW_THREADS
1459
_cffi_restore_errno();
1460
{ result = wl_display_add_shm_format(x0, x1); }
1461
_cffi_save_errno();
1462
Py_END_ALLOW_THREADS
1463
1464
(void)self; /* unused */
1465
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(278));
1466
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1467
return pyresult;
1468
}
1469
#else
1470
# define _cffi_f_wl_display_add_shm_format _cffi_d_wl_display_add_shm_format
1471
#endif
1472
1473
static int _cffi_d_wl_display_add_socket(struct wl_display * x0, char const * x1)
1474
{
1475
return wl_display_add_socket(x0, x1);
1476
}
1477
#ifndef PYPY_VERSION
1478
static PyObject *
1479
_cffi_f_wl_display_add_socket(PyObject *self, PyObject *args)
1480
{
1481
struct wl_display * x0;
1482
char const * x1;
1483
Py_ssize_t datasize;
1484
struct _cffi_freeme_s *large_args_free = NULL;
1485
int result;
1486
PyObject *pyresult;
1487
PyObject *arg0;
1488
PyObject *arg1;
1489
1490
if (!PyArg_UnpackTuple(args, "wl_display_add_socket", 2, 2, &arg0, &arg1))
1491
return NULL;
1492
1493
datasize = _cffi_prepare_pointer_call_argument(
1494
_cffi_type(1), arg0, (char **)&x0);
1495
if (datasize != 0) {
1496
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1497
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1498
datasize, &large_args_free) < 0)
1499
return NULL;
1500
}
1501
1502
datasize = _cffi_prepare_pointer_call_argument(
1503
_cffi_type(23), arg1, (char **)&x1);
1504
if (datasize != 0) {
1505
x1 = ((size_t)datasize) <= 640 ? (char const *)alloca((size_t)datasize) : NULL;
1506
if (_cffi_convert_array_argument(_cffi_type(23), arg1, (char **)&x1,
1507
datasize, &large_args_free) < 0)
1508
return NULL;
1509
}
1510
1511
Py_BEGIN_ALLOW_THREADS
1512
_cffi_restore_errno();
1513
{ result = wl_display_add_socket(x0, x1); }
1514
_cffi_save_errno();
1515
Py_END_ALLOW_THREADS
1516
1517
(void)self; /* unused */
1518
pyresult = _cffi_from_c_int(result, int);
1519
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1520
return pyresult;
1521
}
1522
#else
1523
# define _cffi_f_wl_display_add_socket _cffi_d_wl_display_add_socket
1524
#endif
1525
1526
static char const * _cffi_d_wl_display_add_socket_auto(struct wl_display * x0)
1527
{
1528
return wl_display_add_socket_auto(x0);
1529
}
1530
#ifndef PYPY_VERSION
1531
static PyObject *
1532
_cffi_f_wl_display_add_socket_auto(PyObject *self, PyObject *arg0)
1533
{
1534
struct wl_display * x0;
1535
Py_ssize_t datasize;
1536
struct _cffi_freeme_s *large_args_free = NULL;
1537
char const * result;
1538
PyObject *pyresult;
1539
1540
datasize = _cffi_prepare_pointer_call_argument(
1541
_cffi_type(1), arg0, (char **)&x0);
1542
if (datasize != 0) {
1543
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1544
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1545
datasize, &large_args_free) < 0)
1546
return NULL;
1547
}
1548
1549
Py_BEGIN_ALLOW_THREADS
1550
_cffi_restore_errno();
1551
{ result = wl_display_add_socket_auto(x0); }
1552
_cffi_save_errno();
1553
Py_END_ALLOW_THREADS
1554
1555
(void)self; /* unused */
1556
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(23));
1557
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1558
return pyresult;
1559
}
1560
#else
1561
# define _cffi_f_wl_display_add_socket_auto _cffi_d_wl_display_add_socket_auto
1562
#endif
1563
1564
static struct wl_display * _cffi_d_wl_display_connect(char const * x0)
1565
{
1566
return wl_display_connect(x0);
1567
}
1568
#ifndef PYPY_VERSION
1569
static PyObject *
1570
_cffi_f_wl_display_connect(PyObject *self, PyObject *arg0)
1571
{
1572
char const * x0;
1573
Py_ssize_t datasize;
1574
struct _cffi_freeme_s *large_args_free = NULL;
1575
struct wl_display * result;
1576
PyObject *pyresult;
1577
1578
datasize = _cffi_prepare_pointer_call_argument(
1579
_cffi_type(23), arg0, (char **)&x0);
1580
if (datasize != 0) {
1581
x0 = ((size_t)datasize) <= 640 ? (char const *)alloca((size_t)datasize) : NULL;
1582
if (_cffi_convert_array_argument(_cffi_type(23), arg0, (char **)&x0,
1583
datasize, &large_args_free) < 0)
1584
return NULL;
1585
}
1586
1587
Py_BEGIN_ALLOW_THREADS
1588
_cffi_restore_errno();
1589
{ result = wl_display_connect(x0); }
1590
_cffi_save_errno();
1591
Py_END_ALLOW_THREADS
1592
1593
(void)self; /* unused */
1594
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(1));
1595
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1596
return pyresult;
1597
}
1598
#else
1599
# define _cffi_f_wl_display_connect _cffi_d_wl_display_connect
1600
#endif
1601
1602
static struct wl_display * _cffi_d_wl_display_connect_to_fd(int x0)
1603
{
1604
return wl_display_connect_to_fd(x0);
1605
}
1606
#ifndef PYPY_VERSION
1607
static PyObject *
1608
_cffi_f_wl_display_connect_to_fd(PyObject *self, PyObject *arg0)
1609
{
1610
int x0;
1611
struct wl_display * result;
1612
PyObject *pyresult;
1613
1614
x0 = _cffi_to_c_int(arg0, int);
1615
if (x0 == (int)-1 && PyErr_Occurred())
1616
return NULL;
1617
1618
Py_BEGIN_ALLOW_THREADS
1619
_cffi_restore_errno();
1620
{ result = wl_display_connect_to_fd(x0); }
1621
_cffi_save_errno();
1622
Py_END_ALLOW_THREADS
1623
1624
(void)self; /* unused */
1625
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(1));
1626
return pyresult;
1627
}
1628
#else
1629
# define _cffi_f_wl_display_connect_to_fd _cffi_d_wl_display_connect_to_fd
1630
#endif
1631
1632
static struct wl_display * _cffi_d_wl_display_create(void)
1633
{
1634
return wl_display_create();
1635
}
1636
#ifndef PYPY_VERSION
1637
static PyObject *
1638
_cffi_f_wl_display_create(PyObject *self, PyObject *noarg)
1639
{
1640
struct wl_display * result;
1641
PyObject *pyresult;
1642
1643
Py_BEGIN_ALLOW_THREADS
1644
_cffi_restore_errno();
1645
{ result = wl_display_create(); }
1646
_cffi_save_errno();
1647
Py_END_ALLOW_THREADS
1648
1649
(void)self; /* unused */
1650
(void)noarg; /* unused */
1651
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(1));
1652
return pyresult;
1653
}
1654
#else
1655
# define _cffi_f_wl_display_create _cffi_d_wl_display_create
1656
#endif
1657
1658
static struct wl_event_queue * _cffi_d_wl_display_create_queue(struct wl_display * x0)
1659
{
1660
return wl_display_create_queue(x0);
1661
}
1662
#ifndef PYPY_VERSION
1663
static PyObject *
1664
_cffi_f_wl_display_create_queue(PyObject *self, PyObject *arg0)
1665
{
1666
struct wl_display * x0;
1667
Py_ssize_t datasize;
1668
struct _cffi_freeme_s *large_args_free = NULL;
1669
struct wl_event_queue * result;
1670
PyObject *pyresult;
1671
1672
datasize = _cffi_prepare_pointer_call_argument(
1673
_cffi_type(1), arg0, (char **)&x0);
1674
if (datasize != 0) {
1675
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1676
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1677
datasize, &large_args_free) < 0)
1678
return NULL;
1679
}
1680
1681
Py_BEGIN_ALLOW_THREADS
1682
_cffi_restore_errno();
1683
{ result = wl_display_create_queue(x0); }
1684
_cffi_save_errno();
1685
Py_END_ALLOW_THREADS
1686
1687
(void)self; /* unused */
1688
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(27));
1689
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1690
return pyresult;
1691
}
1692
#else
1693
# define _cffi_f_wl_display_create_queue _cffi_d_wl_display_create_queue
1694
#endif
1695
1696
static void _cffi_d_wl_display_destroy(struct wl_display * x0)
1697
{
1698
wl_display_destroy(x0);
1699
}
1700
#ifndef PYPY_VERSION
1701
static PyObject *
1702
_cffi_f_wl_display_destroy(PyObject *self, PyObject *arg0)
1703
{
1704
struct wl_display * x0;
1705
Py_ssize_t datasize;
1706
struct _cffi_freeme_s *large_args_free = NULL;
1707
1708
datasize = _cffi_prepare_pointer_call_argument(
1709
_cffi_type(1), arg0, (char **)&x0);
1710
if (datasize != 0) {
1711
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1712
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1713
datasize, &large_args_free) < 0)
1714
return NULL;
1715
}
1716
1717
Py_BEGIN_ALLOW_THREADS
1718
_cffi_restore_errno();
1719
{ wl_display_destroy(x0); }
1720
_cffi_save_errno();
1721
Py_END_ALLOW_THREADS
1722
1723
(void)self; /* unused */
1724
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1725
Py_INCREF(Py_None);
1726
return Py_None;
1727
}
1728
#else
1729
# define _cffi_f_wl_display_destroy _cffi_d_wl_display_destroy
1730
#endif
1731
1732
static void _cffi_d_wl_display_destroy_clients(struct wl_display * x0)
1733
{
1734
wl_display_destroy_clients(x0);
1735
}
1736
#ifndef PYPY_VERSION
1737
static PyObject *
1738
_cffi_f_wl_display_destroy_clients(PyObject *self, PyObject *arg0)
1739
{
1740
struct wl_display * x0;
1741
Py_ssize_t datasize;
1742
struct _cffi_freeme_s *large_args_free = NULL;
1743
1744
datasize = _cffi_prepare_pointer_call_argument(
1745
_cffi_type(1), arg0, (char **)&x0);
1746
if (datasize != 0) {
1747
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1748
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1749
datasize, &large_args_free) < 0)
1750
return NULL;
1751
}
1752
1753
Py_BEGIN_ALLOW_THREADS
1754
_cffi_restore_errno();
1755
{ wl_display_destroy_clients(x0); }
1756
_cffi_save_errno();
1757
Py_END_ALLOW_THREADS
1758
1759
(void)self; /* unused */
1760
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1761
Py_INCREF(Py_None);
1762
return Py_None;
1763
}
1764
#else
1765
# define _cffi_f_wl_display_destroy_clients _cffi_d_wl_display_destroy_clients
1766
#endif
1767
1768
static void _cffi_d_wl_display_disconnect(struct wl_display * x0)
1769
{
1770
wl_display_disconnect(x0);
1771
}
1772
#ifndef PYPY_VERSION
1773
static PyObject *
1774
_cffi_f_wl_display_disconnect(PyObject *self, PyObject *arg0)
1775
{
1776
struct wl_display * x0;
1777
Py_ssize_t datasize;
1778
struct _cffi_freeme_s *large_args_free = NULL;
1779
1780
datasize = _cffi_prepare_pointer_call_argument(
1781
_cffi_type(1), arg0, (char **)&x0);
1782
if (datasize != 0) {
1783
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1784
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1785
datasize, &large_args_free) < 0)
1786
return NULL;
1787
}
1788
1789
Py_BEGIN_ALLOW_THREADS
1790
_cffi_restore_errno();
1791
{ wl_display_disconnect(x0); }
1792
_cffi_save_errno();
1793
Py_END_ALLOW_THREADS
1794
1795
(void)self; /* unused */
1796
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1797
Py_INCREF(Py_None);
1798
return Py_None;
1799
}
1800
#else
1801
# define _cffi_f_wl_display_disconnect _cffi_d_wl_display_disconnect
1802
#endif
1803
1804
static int _cffi_d_wl_display_dispatch(struct wl_display * x0)
1805
{
1806
return wl_display_dispatch(x0);
1807
}
1808
#ifndef PYPY_VERSION
1809
static PyObject *
1810
_cffi_f_wl_display_dispatch(PyObject *self, PyObject *arg0)
1811
{
1812
struct wl_display * x0;
1813
Py_ssize_t datasize;
1814
struct _cffi_freeme_s *large_args_free = NULL;
1815
int result;
1816
PyObject *pyresult;
1817
1818
datasize = _cffi_prepare_pointer_call_argument(
1819
_cffi_type(1), arg0, (char **)&x0);
1820
if (datasize != 0) {
1821
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1822
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1823
datasize, &large_args_free) < 0)
1824
return NULL;
1825
}
1826
1827
Py_BEGIN_ALLOW_THREADS
1828
_cffi_restore_errno();
1829
{ result = wl_display_dispatch(x0); }
1830
_cffi_save_errno();
1831
Py_END_ALLOW_THREADS
1832
1833
(void)self; /* unused */
1834
pyresult = _cffi_from_c_int(result, int);
1835
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1836
return pyresult;
1837
}
1838
#else
1839
# define _cffi_f_wl_display_dispatch _cffi_d_wl_display_dispatch
1840
#endif
1841
1842
static int _cffi_d_wl_display_dispatch_pending(struct wl_display * x0)
1843
{
1844
return wl_display_dispatch_pending(x0);
1845
}
1846
#ifndef PYPY_VERSION
1847
static PyObject *
1848
_cffi_f_wl_display_dispatch_pending(PyObject *self, PyObject *arg0)
1849
{
1850
struct wl_display * x0;
1851
Py_ssize_t datasize;
1852
struct _cffi_freeme_s *large_args_free = NULL;
1853
int result;
1854
PyObject *pyresult;
1855
1856
datasize = _cffi_prepare_pointer_call_argument(
1857
_cffi_type(1), arg0, (char **)&x0);
1858
if (datasize != 0) {
1859
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1860
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1861
datasize, &large_args_free) < 0)
1862
return NULL;
1863
}
1864
1865
Py_BEGIN_ALLOW_THREADS
1866
_cffi_restore_errno();
1867
{ result = wl_display_dispatch_pending(x0); }
1868
_cffi_save_errno();
1869
Py_END_ALLOW_THREADS
1870
1871
(void)self; /* unused */
1872
pyresult = _cffi_from_c_int(result, int);
1873
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1874
return pyresult;
1875
}
1876
#else
1877
# define _cffi_f_wl_display_dispatch_pending _cffi_d_wl_display_dispatch_pending
1878
#endif
1879
1880
static int _cffi_d_wl_display_dispatch_queue(struct wl_display * x0, struct wl_event_queue * x1)
1881
{
1882
return wl_display_dispatch_queue(x0, x1);
1883
}
1884
#ifndef PYPY_VERSION
1885
static PyObject *
1886
_cffi_f_wl_display_dispatch_queue(PyObject *self, PyObject *args)
1887
{
1888
struct wl_display * x0;
1889
struct wl_event_queue * x1;
1890
Py_ssize_t datasize;
1891
struct _cffi_freeme_s *large_args_free = NULL;
1892
int result;
1893
PyObject *pyresult;
1894
PyObject *arg0;
1895
PyObject *arg1;
1896
1897
if (!PyArg_UnpackTuple(args, "wl_display_dispatch_queue", 2, 2, &arg0, &arg1))
1898
return NULL;
1899
1900
datasize = _cffi_prepare_pointer_call_argument(
1901
_cffi_type(1), arg0, (char **)&x0);
1902
if (datasize != 0) {
1903
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1904
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1905
datasize, &large_args_free) < 0)
1906
return NULL;
1907
}
1908
1909
datasize = _cffi_prepare_pointer_call_argument(
1910
_cffi_type(27), arg1, (char **)&x1);
1911
if (datasize != 0) {
1912
x1 = ((size_t)datasize) <= 640 ? (struct wl_event_queue *)alloca((size_t)datasize) : NULL;
1913
if (_cffi_convert_array_argument(_cffi_type(27), arg1, (char **)&x1,
1914
datasize, &large_args_free) < 0)
1915
return NULL;
1916
}
1917
1918
Py_BEGIN_ALLOW_THREADS
1919
_cffi_restore_errno();
1920
{ result = wl_display_dispatch_queue(x0, x1); }
1921
_cffi_save_errno();
1922
Py_END_ALLOW_THREADS
1923
1924
(void)self; /* unused */
1925
pyresult = _cffi_from_c_int(result, int);
1926
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1927
return pyresult;
1928
}
1929
#else
1930
# define _cffi_f_wl_display_dispatch_queue _cffi_d_wl_display_dispatch_queue
1931
#endif
1932
1933
static int _cffi_d_wl_display_dispatch_queue_pending(struct wl_display * x0, struct wl_event_queue * x1)
1934
{
1935
return wl_display_dispatch_queue_pending(x0, x1);
1936
}
1937
#ifndef PYPY_VERSION
1938
static PyObject *
1939
_cffi_f_wl_display_dispatch_queue_pending(PyObject *self, PyObject *args)
1940
{
1941
struct wl_display * x0;
1942
struct wl_event_queue * x1;
1943
Py_ssize_t datasize;
1944
struct _cffi_freeme_s *large_args_free = NULL;
1945
int result;
1946
PyObject *pyresult;
1947
PyObject *arg0;
1948
PyObject *arg1;
1949
1950
if (!PyArg_UnpackTuple(args, "wl_display_dispatch_queue_pending", 2, 2, &arg0, &arg1))
1951
return NULL;
1952
1953
datasize = _cffi_prepare_pointer_call_argument(
1954
_cffi_type(1), arg0, (char **)&x0);
1955
if (datasize != 0) {
1956
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
1957
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1958
datasize, &large_args_free) < 0)
1959
return NULL;
1960
}
1961
1962
datasize = _cffi_prepare_pointer_call_argument(
1963
_cffi_type(27), arg1, (char **)&x1);
1964
if (datasize != 0) {
1965
x1 = ((size_t)datasize) <= 640 ? (struct wl_event_queue *)alloca((size_t)datasize) : NULL;
1966
if (_cffi_convert_array_argument(_cffi_type(27), arg1, (char **)&x1,
1967
datasize, &large_args_free) < 0)
1968
return NULL;
1969
}
1970
1971
Py_BEGIN_ALLOW_THREADS
1972
_cffi_restore_errno();
1973
{ result = wl_display_dispatch_queue_pending(x0, x1); }
1974
_cffi_save_errno();
1975
Py_END_ALLOW_THREADS
1976
1977
(void)self; /* unused */
1978
pyresult = _cffi_from_c_int(result, int);
1979
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1980
return pyresult;
1981
}
1982
#else
1983
# define _cffi_f_wl_display_dispatch_queue_pending _cffi_d_wl_display_dispatch_queue_pending
1984
#endif
1985
1986
static int _cffi_d_wl_display_flush(struct wl_display * x0)
1987
{
1988
return wl_display_flush(x0);
1989
}
1990
#ifndef PYPY_VERSION
1991
static PyObject *
1992
_cffi_f_wl_display_flush(PyObject *self, PyObject *arg0)
1993
{
1994
struct wl_display * x0;
1995
Py_ssize_t datasize;
1996
struct _cffi_freeme_s *large_args_free = NULL;
1997
int result;
1998
PyObject *pyresult;
1999
2000
datasize = _cffi_prepare_pointer_call_argument(
2001
_cffi_type(1), arg0, (char **)&x0);
2002
if (datasize != 0) {
2003
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2004
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2005
datasize, &large_args_free) < 0)
2006
return NULL;
2007
}
2008
2009
Py_BEGIN_ALLOW_THREADS
2010
_cffi_restore_errno();
2011
{ result = wl_display_flush(x0); }
2012
_cffi_save_errno();
2013
Py_END_ALLOW_THREADS
2014
2015
(void)self; /* unused */
2016
pyresult = _cffi_from_c_int(result, int);
2017
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2018
return pyresult;
2019
}
2020
#else
2021
# define _cffi_f_wl_display_flush _cffi_d_wl_display_flush
2022
#endif
2023
2024
static void _cffi_d_wl_display_flush_clients(struct wl_display * x0)
2025
{
2026
wl_display_flush_clients(x0);
2027
}
2028
#ifndef PYPY_VERSION
2029
static PyObject *
2030
_cffi_f_wl_display_flush_clients(PyObject *self, PyObject *arg0)
2031
{
2032
struct wl_display * x0;
2033
Py_ssize_t datasize;
2034
struct _cffi_freeme_s *large_args_free = NULL;
2035
2036
datasize = _cffi_prepare_pointer_call_argument(
2037
_cffi_type(1), arg0, (char **)&x0);
2038
if (datasize != 0) {
2039
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2040
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2041
datasize, &large_args_free) < 0)
2042
return NULL;
2043
}
2044
2045
Py_BEGIN_ALLOW_THREADS
2046
_cffi_restore_errno();
2047
{ wl_display_flush_clients(x0); }
2048
_cffi_save_errno();
2049
Py_END_ALLOW_THREADS
2050
2051
(void)self; /* unused */
2052
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2053
Py_INCREF(Py_None);
2054
return Py_None;
2055
}
2056
#else
2057
# define _cffi_f_wl_display_flush_clients _cffi_d_wl_display_flush_clients
2058
#endif
2059
2060
static int _cffi_d_wl_display_get_error(struct wl_display * x0)
2061
{
2062
return wl_display_get_error(x0);
2063
}
2064
#ifndef PYPY_VERSION
2065
static PyObject *
2066
_cffi_f_wl_display_get_error(PyObject *self, PyObject *arg0)
2067
{
2068
struct wl_display * x0;
2069
Py_ssize_t datasize;
2070
struct _cffi_freeme_s *large_args_free = NULL;
2071
int result;
2072
PyObject *pyresult;
2073
2074
datasize = _cffi_prepare_pointer_call_argument(
2075
_cffi_type(1), arg0, (char **)&x0);
2076
if (datasize != 0) {
2077
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2078
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2079
datasize, &large_args_free) < 0)
2080
return NULL;
2081
}
2082
2083
Py_BEGIN_ALLOW_THREADS
2084
_cffi_restore_errno();
2085
{ result = wl_display_get_error(x0); }
2086
_cffi_save_errno();
2087
Py_END_ALLOW_THREADS
2088
2089
(void)self; /* unused */
2090
pyresult = _cffi_from_c_int(result, int);
2091
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2092
return pyresult;
2093
}
2094
#else
2095
# define _cffi_f_wl_display_get_error _cffi_d_wl_display_get_error
2096
#endif
2097
2098
static struct wl_event_loop * _cffi_d_wl_display_get_event_loop(struct wl_display * x0)
2099
{
2100
return wl_display_get_event_loop(x0);
2101
}
2102
#ifndef PYPY_VERSION
2103
static PyObject *
2104
_cffi_f_wl_display_get_event_loop(PyObject *self, PyObject *arg0)
2105
{
2106
struct wl_display * x0;
2107
Py_ssize_t datasize;
2108
struct _cffi_freeme_s *large_args_free = NULL;
2109
struct wl_event_loop * result;
2110
PyObject *pyresult;
2111
2112
datasize = _cffi_prepare_pointer_call_argument(
2113
_cffi_type(1), arg0, (char **)&x0);
2114
if (datasize != 0) {
2115
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2116
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2117
datasize, &large_args_free) < 0)
2118
return NULL;
2119
}
2120
2121
Py_BEGIN_ALLOW_THREADS
2122
_cffi_restore_errno();
2123
{ result = wl_display_get_event_loop(x0); }
2124
_cffi_save_errno();
2125
Py_END_ALLOW_THREADS
2126
2127
(void)self; /* unused */
2128
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(30));
2129
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2130
return pyresult;
2131
}
2132
#else
2133
# define _cffi_f_wl_display_get_event_loop _cffi_d_wl_display_get_event_loop
2134
#endif
2135
2136
static int _cffi_d_wl_display_get_fd(struct wl_display * x0)
2137
{
2138
return wl_display_get_fd(x0);
2139
}
2140
#ifndef PYPY_VERSION
2141
static PyObject *
2142
_cffi_f_wl_display_get_fd(PyObject *self, PyObject *arg0)
2143
{
2144
struct wl_display * x0;
2145
Py_ssize_t datasize;
2146
struct _cffi_freeme_s *large_args_free = NULL;
2147
int result;
2148
PyObject *pyresult;
2149
2150
datasize = _cffi_prepare_pointer_call_argument(
2151
_cffi_type(1), arg0, (char **)&x0);
2152
if (datasize != 0) {
2153
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2154
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2155
datasize, &large_args_free) < 0)
2156
return NULL;
2157
}
2158
2159
Py_BEGIN_ALLOW_THREADS
2160
_cffi_restore_errno();
2161
{ result = wl_display_get_fd(x0); }
2162
_cffi_save_errno();
2163
Py_END_ALLOW_THREADS
2164
2165
(void)self; /* unused */
2166
pyresult = _cffi_from_c_int(result, int);
2167
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2168
return pyresult;
2169
}
2170
#else
2171
# define _cffi_f_wl_display_get_fd _cffi_d_wl_display_get_fd
2172
#endif
2173
2174
static uint32_t _cffi_d_wl_display_get_serial(struct wl_display * x0)
2175
{
2176
return wl_display_get_serial(x0);
2177
}
2178
#ifndef PYPY_VERSION
2179
static PyObject *
2180
_cffi_f_wl_display_get_serial(PyObject *self, PyObject *arg0)
2181
{
2182
struct wl_display * x0;
2183
Py_ssize_t datasize;
2184
struct _cffi_freeme_s *large_args_free = NULL;
2185
uint32_t result;
2186
PyObject *pyresult;
2187
2188
datasize = _cffi_prepare_pointer_call_argument(
2189
_cffi_type(1), arg0, (char **)&x0);
2190
if (datasize != 0) {
2191
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2192
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2193
datasize, &large_args_free) < 0)
2194
return NULL;
2195
}
2196
2197
Py_BEGIN_ALLOW_THREADS
2198
_cffi_restore_errno();
2199
{ result = wl_display_get_serial(x0); }
2200
_cffi_save_errno();
2201
Py_END_ALLOW_THREADS
2202
2203
(void)self; /* unused */
2204
pyresult = _cffi_from_c_int(result, uint32_t);
2205
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2206
return pyresult;
2207
}
2208
#else
2209
# define _cffi_f_wl_display_get_serial _cffi_d_wl_display_get_serial
2210
#endif
2211
2212
static int _cffi_d_wl_display_init_shm(struct wl_display * x0)
2213
{
2214
return wl_display_init_shm(x0);
2215
}
2216
#ifndef PYPY_VERSION
2217
static PyObject *
2218
_cffi_f_wl_display_init_shm(PyObject *self, PyObject *arg0)
2219
{
2220
struct wl_display * x0;
2221
Py_ssize_t datasize;
2222
struct _cffi_freeme_s *large_args_free = NULL;
2223
int result;
2224
PyObject *pyresult;
2225
2226
datasize = _cffi_prepare_pointer_call_argument(
2227
_cffi_type(1), arg0, (char **)&x0);
2228
if (datasize != 0) {
2229
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2230
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2231
datasize, &large_args_free) < 0)
2232
return NULL;
2233
}
2234
2235
Py_BEGIN_ALLOW_THREADS
2236
_cffi_restore_errno();
2237
{ result = wl_display_init_shm(x0); }
2238
_cffi_save_errno();
2239
Py_END_ALLOW_THREADS
2240
2241
(void)self; /* unused */
2242
pyresult = _cffi_from_c_int(result, int);
2243
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2244
return pyresult;
2245
}
2246
#else
2247
# define _cffi_f_wl_display_init_shm _cffi_d_wl_display_init_shm
2248
#endif
2249
2250
static uint32_t _cffi_d_wl_display_next_serial(struct wl_display * x0)
2251
{
2252
return wl_display_next_serial(x0);
2253
}
2254
#ifndef PYPY_VERSION
2255
static PyObject *
2256
_cffi_f_wl_display_next_serial(PyObject *self, PyObject *arg0)
2257
{
2258
struct wl_display * x0;
2259
Py_ssize_t datasize;
2260
struct _cffi_freeme_s *large_args_free = NULL;
2261
uint32_t result;
2262
PyObject *pyresult;
2263
2264
datasize = _cffi_prepare_pointer_call_argument(
2265
_cffi_type(1), arg0, (char **)&x0);
2266
if (datasize != 0) {
2267
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2268
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2269
datasize, &large_args_free) < 0)
2270
return NULL;
2271
}
2272
2273
Py_BEGIN_ALLOW_THREADS
2274
_cffi_restore_errno();
2275
{ result = wl_display_next_serial(x0); }
2276
_cffi_save_errno();
2277
Py_END_ALLOW_THREADS
2278
2279
(void)self; /* unused */
2280
pyresult = _cffi_from_c_int(result, uint32_t);
2281
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2282
return pyresult;
2283
}
2284
#else
2285
# define _cffi_f_wl_display_next_serial _cffi_d_wl_display_next_serial
2286
#endif
2287
2288
static int _cffi_d_wl_display_prepare_read(struct wl_display * x0)
2289
{
2290
return wl_display_prepare_read(x0);
2291
}
2292
#ifndef PYPY_VERSION
2293
static PyObject *
2294
_cffi_f_wl_display_prepare_read(PyObject *self, PyObject *arg0)
2295
{
2296
struct wl_display * x0;
2297
Py_ssize_t datasize;
2298
struct _cffi_freeme_s *large_args_free = NULL;
2299
int result;
2300
PyObject *pyresult;
2301
2302
datasize = _cffi_prepare_pointer_call_argument(
2303
_cffi_type(1), arg0, (char **)&x0);
2304
if (datasize != 0) {
2305
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2306
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2307
datasize, &large_args_free) < 0)
2308
return NULL;
2309
}
2310
2311
Py_BEGIN_ALLOW_THREADS
2312
_cffi_restore_errno();
2313
{ result = wl_display_prepare_read(x0); }
2314
_cffi_save_errno();
2315
Py_END_ALLOW_THREADS
2316
2317
(void)self; /* unused */
2318
pyresult = _cffi_from_c_int(result, int);
2319
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2320
return pyresult;
2321
}
2322
#else
2323
# define _cffi_f_wl_display_prepare_read _cffi_d_wl_display_prepare_read
2324
#endif
2325
2326
static int _cffi_d_wl_display_prepare_read_queue(struct wl_display * x0, struct wl_event_queue * x1)
2327
{
2328
return wl_display_prepare_read_queue(x0, x1);
2329
}
2330
#ifndef PYPY_VERSION
2331
static PyObject *
2332
_cffi_f_wl_display_prepare_read_queue(PyObject *self, PyObject *args)
2333
{
2334
struct wl_display * x0;
2335
struct wl_event_queue * x1;
2336
Py_ssize_t datasize;
2337
struct _cffi_freeme_s *large_args_free = NULL;
2338
int result;
2339
PyObject *pyresult;
2340
PyObject *arg0;
2341
PyObject *arg1;
2342
2343
if (!PyArg_UnpackTuple(args, "wl_display_prepare_read_queue", 2, 2, &arg0, &arg1))
2344
return NULL;
2345
2346
datasize = _cffi_prepare_pointer_call_argument(
2347
_cffi_type(1), arg0, (char **)&x0);
2348
if (datasize != 0) {
2349
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2350
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2351
datasize, &large_args_free) < 0)
2352
return NULL;
2353
}
2354
2355
datasize = _cffi_prepare_pointer_call_argument(
2356
_cffi_type(27), arg1, (char **)&x1);
2357
if (datasize != 0) {
2358
x1 = ((size_t)datasize) <= 640 ? (struct wl_event_queue *)alloca((size_t)datasize) : NULL;
2359
if (_cffi_convert_array_argument(_cffi_type(27), arg1, (char **)&x1,
2360
datasize, &large_args_free) < 0)
2361
return NULL;
2362
}
2363
2364
Py_BEGIN_ALLOW_THREADS
2365
_cffi_restore_errno();
2366
{ result = wl_display_prepare_read_queue(x0, x1); }
2367
_cffi_save_errno();
2368
Py_END_ALLOW_THREADS
2369
2370
(void)self; /* unused */
2371
pyresult = _cffi_from_c_int(result, int);
2372
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2373
return pyresult;
2374
}
2375
#else
2376
# define _cffi_f_wl_display_prepare_read_queue _cffi_d_wl_display_prepare_read_queue
2377
#endif
2378
2379
static int _cffi_d_wl_display_read_events(struct wl_display * x0)
2380
{
2381
return wl_display_read_events(x0);
2382
}
2383
#ifndef PYPY_VERSION
2384
static PyObject *
2385
_cffi_f_wl_display_read_events(PyObject *self, PyObject *arg0)
2386
{
2387
struct wl_display * x0;
2388
Py_ssize_t datasize;
2389
struct _cffi_freeme_s *large_args_free = NULL;
2390
int result;
2391
PyObject *pyresult;
2392
2393
datasize = _cffi_prepare_pointer_call_argument(
2394
_cffi_type(1), arg0, (char **)&x0);
2395
if (datasize != 0) {
2396
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2397
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2398
datasize, &large_args_free) < 0)
2399
return NULL;
2400
}
2401
2402
Py_BEGIN_ALLOW_THREADS
2403
_cffi_restore_errno();
2404
{ result = wl_display_read_events(x0); }
2405
_cffi_save_errno();
2406
Py_END_ALLOW_THREADS
2407
2408
(void)self; /* unused */
2409
pyresult = _cffi_from_c_int(result, int);
2410
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2411
return pyresult;
2412
}
2413
#else
2414
# define _cffi_f_wl_display_read_events _cffi_d_wl_display_read_events
2415
#endif
2416
2417
static int _cffi_d_wl_display_roundtrip(struct wl_display * x0)
2418
{
2419
return wl_display_roundtrip(x0);
2420
}
2421
#ifndef PYPY_VERSION
2422
static PyObject *
2423
_cffi_f_wl_display_roundtrip(PyObject *self, PyObject *arg0)
2424
{
2425
struct wl_display * x0;
2426
Py_ssize_t datasize;
2427
struct _cffi_freeme_s *large_args_free = NULL;
2428
int result;
2429
PyObject *pyresult;
2430
2431
datasize = _cffi_prepare_pointer_call_argument(
2432
_cffi_type(1), arg0, (char **)&x0);
2433
if (datasize != 0) {
2434
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2435
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2436
datasize, &large_args_free) < 0)
2437
return NULL;
2438
}
2439
2440
Py_BEGIN_ALLOW_THREADS
2441
_cffi_restore_errno();
2442
{ result = wl_display_roundtrip(x0); }
2443
_cffi_save_errno();
2444
Py_END_ALLOW_THREADS
2445
2446
(void)self; /* unused */
2447
pyresult = _cffi_from_c_int(result, int);
2448
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2449
return pyresult;
2450
}
2451
#else
2452
# define _cffi_f_wl_display_roundtrip _cffi_d_wl_display_roundtrip
2453
#endif
2454
2455
static int _cffi_d_wl_display_roundtrip_queue(struct wl_display * x0, struct wl_event_queue * x1)
2456
{
2457
return wl_display_roundtrip_queue(x0, x1);
2458
}
2459
#ifndef PYPY_VERSION
2460
static PyObject *
2461
_cffi_f_wl_display_roundtrip_queue(PyObject *self, PyObject *args)
2462
{
2463
struct wl_display * x0;
2464
struct wl_event_queue * x1;
2465
Py_ssize_t datasize;
2466
struct _cffi_freeme_s *large_args_free = NULL;
2467
int result;
2468
PyObject *pyresult;
2469
PyObject *arg0;
2470
PyObject *arg1;
2471
2472
if (!PyArg_UnpackTuple(args, "wl_display_roundtrip_queue", 2, 2, &arg0, &arg1))
2473
return NULL;
2474
2475
datasize = _cffi_prepare_pointer_call_argument(
2476
_cffi_type(1), arg0, (char **)&x0);
2477
if (datasize != 0) {
2478
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2479
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2480
datasize, &large_args_free) < 0)
2481
return NULL;
2482
}
2483
2484
datasize = _cffi_prepare_pointer_call_argument(
2485
_cffi_type(27), arg1, (char **)&x1);
2486
if (datasize != 0) {
2487
x1 = ((size_t)datasize) <= 640 ? (struct wl_event_queue *)alloca((size_t)datasize) : NULL;
2488
if (_cffi_convert_array_argument(_cffi_type(27), arg1, (char **)&x1,
2489
datasize, &large_args_free) < 0)
2490
return NULL;
2491
}
2492
2493
Py_BEGIN_ALLOW_THREADS
2494
_cffi_restore_errno();
2495
{ result = wl_display_roundtrip_queue(x0, x1); }
2496
_cffi_save_errno();
2497
Py_END_ALLOW_THREADS
2498
2499
(void)self; /* unused */
2500
pyresult = _cffi_from_c_int(result, int);
2501
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2502
return pyresult;
2503
}
2504
#else
2505
# define _cffi_f_wl_display_roundtrip_queue _cffi_d_wl_display_roundtrip_queue
2506
#endif
2507
2508
static void _cffi_d_wl_display_run(struct wl_display * x0)
2509
{
2510
wl_display_run(x0);
2511
}
2512
#ifndef PYPY_VERSION
2513
static PyObject *
2514
_cffi_f_wl_display_run(PyObject *self, PyObject *arg0)
2515
{
2516
struct wl_display * x0;
2517
Py_ssize_t datasize;
2518
struct _cffi_freeme_s *large_args_free = NULL;
2519
2520
datasize = _cffi_prepare_pointer_call_argument(
2521
_cffi_type(1), arg0, (char **)&x0);
2522
if (datasize != 0) {
2523
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2524
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2525
datasize, &large_args_free) < 0)
2526
return NULL;
2527
}
2528
2529
Py_BEGIN_ALLOW_THREADS
2530
_cffi_restore_errno();
2531
{ wl_display_run(x0); }
2532
_cffi_save_errno();
2533
Py_END_ALLOW_THREADS
2534
2535
(void)self; /* unused */
2536
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2537
Py_INCREF(Py_None);
2538
return Py_None;
2539
}
2540
#else
2541
# define _cffi_f_wl_display_run _cffi_d_wl_display_run
2542
#endif
2543
2544
static void _cffi_d_wl_display_terminate(struct wl_display * x0)
2545
{
2546
wl_display_terminate(x0);
2547
}
2548
#ifndef PYPY_VERSION
2549
static PyObject *
2550
_cffi_f_wl_display_terminate(PyObject *self, PyObject *arg0)
2551
{
2552
struct wl_display * x0;
2553
Py_ssize_t datasize;
2554
struct _cffi_freeme_s *large_args_free = NULL;
2555
2556
datasize = _cffi_prepare_pointer_call_argument(
2557
_cffi_type(1), arg0, (char **)&x0);
2558
if (datasize != 0) {
2559
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
2560
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
2561
datasize, &large_args_free) < 0)
2562
return NULL;
2563
}
2564
2565
Py_BEGIN_ALLOW_THREADS
2566
_cffi_restore_errno();
2567
{ wl_display_terminate(x0); }
2568
_cffi_save_errno();
2569
Py_END_ALLOW_THREADS
2570
2571
(void)self; /* unused */
2572
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2573
Py_INCREF(Py_None);
2574
return Py_None;
2575
}
2576
#else
2577
# define _cffi_f_wl_display_terminate _cffi_d_wl_display_terminate
2578
#endif
2579
2580
static void _cffi_d_wl_event_loop_add_destroy_listener(struct wl_event_loop * x0, struct wl_listener * x1)
2581
{
2582
wl_event_loop_add_destroy_listener(x0, x1);
2583
}
2584
#ifndef PYPY_VERSION
2585
static PyObject *
2586
_cffi_f_wl_event_loop_add_destroy_listener(PyObject *self, PyObject *args)
2587
{
2588
struct wl_event_loop * x0;
2589
struct wl_listener * x1;
2590
Py_ssize_t datasize;
2591
struct _cffi_freeme_s *large_args_free = NULL;
2592
PyObject *arg0;
2593
PyObject *arg1;
2594
2595
if (!PyArg_UnpackTuple(args, "wl_event_loop_add_destroy_listener", 2, 2, &arg0, &arg1))
2596
return NULL;
2597
2598
datasize = _cffi_prepare_pointer_call_argument(
2599
_cffi_type(30), arg0, (char **)&x0);
2600
if (datasize != 0) {
2601
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2602
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2603
datasize, &large_args_free) < 0)
2604
return NULL;
2605
}
2606
2607
datasize = _cffi_prepare_pointer_call_argument(
2608
_cffi_type(175), arg1, (char **)&x1);
2609
if (datasize != 0) {
2610
x1 = ((size_t)datasize) <= 640 ? (struct wl_listener *)alloca((size_t)datasize) : NULL;
2611
if (_cffi_convert_array_argument(_cffi_type(175), arg1, (char **)&x1,
2612
datasize, &large_args_free) < 0)
2613
return NULL;
2614
}
2615
2616
Py_BEGIN_ALLOW_THREADS
2617
_cffi_restore_errno();
2618
{ wl_event_loop_add_destroy_listener(x0, x1); }
2619
_cffi_save_errno();
2620
Py_END_ALLOW_THREADS
2621
2622
(void)self; /* unused */
2623
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2624
Py_INCREF(Py_None);
2625
return Py_None;
2626
}
2627
#else
2628
# define _cffi_f_wl_event_loop_add_destroy_listener _cffi_d_wl_event_loop_add_destroy_listener
2629
#endif
2630
2631
static struct wl_event_source * _cffi_d_wl_event_loop_add_fd(struct wl_event_loop * x0, int x1, uint32_t x2, int(* x3)(int, uint32_t, void *), void * x4)
2632
{
2633
return wl_event_loop_add_fd(x0, x1, x2, x3, x4);
2634
}
2635
#ifndef PYPY_VERSION
2636
static PyObject *
2637
_cffi_f_wl_event_loop_add_fd(PyObject *self, PyObject *args)
2638
{
2639
struct wl_event_loop * x0;
2640
int x1;
2641
uint32_t x2;
2642
int(* x3)(int, uint32_t, void *);
2643
void * x4;
2644
Py_ssize_t datasize;
2645
struct _cffi_freeme_s *large_args_free = NULL;
2646
struct wl_event_source * result;
2647
PyObject *pyresult;
2648
PyObject *arg0;
2649
PyObject *arg1;
2650
PyObject *arg2;
2651
PyObject *arg3;
2652
PyObject *arg4;
2653
2654
if (!PyArg_UnpackTuple(args, "wl_event_loop_add_fd", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
2655
return NULL;
2656
2657
datasize = _cffi_prepare_pointer_call_argument(
2658
_cffi_type(30), arg0, (char **)&x0);
2659
if (datasize != 0) {
2660
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2661
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2662
datasize, &large_args_free) < 0)
2663
return NULL;
2664
}
2665
2666
x1 = _cffi_to_c_int(arg1, int);
2667
if (x1 == (int)-1 && PyErr_Occurred())
2668
return NULL;
2669
2670
x2 = _cffi_to_c_int(arg2, uint32_t);
2671
if (x2 == (uint32_t)-1 && PyErr_Occurred())
2672
return NULL;
2673
2674
x3 = (int(*)(int, uint32_t, void *))_cffi_to_c_pointer(arg3, _cffi_type(113));
2675
if (x3 == (int(*)(int, uint32_t, void *))NULL && PyErr_Occurred())
2676
return NULL;
2677
2678
datasize = _cffi_prepare_pointer_call_argument(
2679
_cffi_type(12), arg4, (char **)&x4);
2680
if (datasize != 0) {
2681
x4 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
2682
if (_cffi_convert_array_argument(_cffi_type(12), arg4, (char **)&x4,
2683
datasize, &large_args_free) < 0)
2684
return NULL;
2685
}
2686
2687
Py_BEGIN_ALLOW_THREADS
2688
_cffi_restore_errno();
2689
{ result = wl_event_loop_add_fd(x0, x1, x2, x3, x4); }
2690
_cffi_save_errno();
2691
Py_END_ALLOW_THREADS
2692
2693
(void)self; /* unused */
2694
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(37));
2695
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2696
return pyresult;
2697
}
2698
#else
2699
# define _cffi_f_wl_event_loop_add_fd _cffi_d_wl_event_loop_add_fd
2700
#endif
2701
2702
static struct wl_event_source * _cffi_d_wl_event_loop_add_idle(struct wl_event_loop * x0, void(* x1)(void *), void * x2)
2703
{
2704
return wl_event_loop_add_idle(x0, x1, x2);
2705
}
2706
#ifndef PYPY_VERSION
2707
static PyObject *
2708
_cffi_f_wl_event_loop_add_idle(PyObject *self, PyObject *args)
2709
{
2710
struct wl_event_loop * x0;
2711
void(* x1)(void *);
2712
void * x2;
2713
Py_ssize_t datasize;
2714
struct _cffi_freeme_s *large_args_free = NULL;
2715
struct wl_event_source * result;
2716
PyObject *pyresult;
2717
PyObject *arg0;
2718
PyObject *arg1;
2719
PyObject *arg2;
2720
2721
if (!PyArg_UnpackTuple(args, "wl_event_loop_add_idle", 3, 3, &arg0, &arg1, &arg2))
2722
return NULL;
2723
2724
datasize = _cffi_prepare_pointer_call_argument(
2725
_cffi_type(30), arg0, (char **)&x0);
2726
if (datasize != 0) {
2727
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2728
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2729
datasize, &large_args_free) < 0)
2730
return NULL;
2731
}
2732
2733
x1 = (void(*)(void *))_cffi_to_c_pointer(arg1, _cffi_type(118));
2734
if (x1 == (void(*)(void *))NULL && PyErr_Occurred())
2735
return NULL;
2736
2737
datasize = _cffi_prepare_pointer_call_argument(
2738
_cffi_type(12), arg2, (char **)&x2);
2739
if (datasize != 0) {
2740
x2 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
2741
if (_cffi_convert_array_argument(_cffi_type(12), arg2, (char **)&x2,
2742
datasize, &large_args_free) < 0)
2743
return NULL;
2744
}
2745
2746
Py_BEGIN_ALLOW_THREADS
2747
_cffi_restore_errno();
2748
{ result = wl_event_loop_add_idle(x0, x1, x2); }
2749
_cffi_save_errno();
2750
Py_END_ALLOW_THREADS
2751
2752
(void)self; /* unused */
2753
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(37));
2754
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2755
return pyresult;
2756
}
2757
#else
2758
# define _cffi_f_wl_event_loop_add_idle _cffi_d_wl_event_loop_add_idle
2759
#endif
2760
2761
static struct wl_event_source * _cffi_d_wl_event_loop_add_signal(struct wl_event_loop * x0, int x1, int(* x2)(int, void *), void * x3)
2762
{
2763
return wl_event_loop_add_signal(x0, x1, x2, x3);
2764
}
2765
#ifndef PYPY_VERSION
2766
static PyObject *
2767
_cffi_f_wl_event_loop_add_signal(PyObject *self, PyObject *args)
2768
{
2769
struct wl_event_loop * x0;
2770
int x1;
2771
int(* x2)(int, void *);
2772
void * x3;
2773
Py_ssize_t datasize;
2774
struct _cffi_freeme_s *large_args_free = NULL;
2775
struct wl_event_source * result;
2776
PyObject *pyresult;
2777
PyObject *arg0;
2778
PyObject *arg1;
2779
PyObject *arg2;
2780
PyObject *arg3;
2781
2782
if (!PyArg_UnpackTuple(args, "wl_event_loop_add_signal", 4, 4, &arg0, &arg1, &arg2, &arg3))
2783
return NULL;
2784
2785
datasize = _cffi_prepare_pointer_call_argument(
2786
_cffi_type(30), arg0, (char **)&x0);
2787
if (datasize != 0) {
2788
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2789
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2790
datasize, &large_args_free) < 0)
2791
return NULL;
2792
}
2793
2794
x1 = _cffi_to_c_int(arg1, int);
2795
if (x1 == (int)-1 && PyErr_Occurred())
2796
return NULL;
2797
2798
x2 = (int(*)(int, void *))_cffi_to_c_pointer(arg2, _cffi_type(106));
2799
if (x2 == (int(*)(int, void *))NULL && PyErr_Occurred())
2800
return NULL;
2801
2802
datasize = _cffi_prepare_pointer_call_argument(
2803
_cffi_type(12), arg3, (char **)&x3);
2804
if (datasize != 0) {
2805
x3 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
2806
if (_cffi_convert_array_argument(_cffi_type(12), arg3, (char **)&x3,
2807
datasize, &large_args_free) < 0)
2808
return NULL;
2809
}
2810
2811
Py_BEGIN_ALLOW_THREADS
2812
_cffi_restore_errno();
2813
{ result = wl_event_loop_add_signal(x0, x1, x2, x3); }
2814
_cffi_save_errno();
2815
Py_END_ALLOW_THREADS
2816
2817
(void)self; /* unused */
2818
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(37));
2819
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2820
return pyresult;
2821
}
2822
#else
2823
# define _cffi_f_wl_event_loop_add_signal _cffi_d_wl_event_loop_add_signal
2824
#endif
2825
2826
static struct wl_event_source * _cffi_d_wl_event_loop_add_timer(struct wl_event_loop * x0, int(* x1)(void *), void * x2)
2827
{
2828
return wl_event_loop_add_timer(x0, x1, x2);
2829
}
2830
#ifndef PYPY_VERSION
2831
static PyObject *
2832
_cffi_f_wl_event_loop_add_timer(PyObject *self, PyObject *args)
2833
{
2834
struct wl_event_loop * x0;
2835
int(* x1)(void *);
2836
void * x2;
2837
Py_ssize_t datasize;
2838
struct _cffi_freeme_s *large_args_free = NULL;
2839
struct wl_event_source * result;
2840
PyObject *pyresult;
2841
PyObject *arg0;
2842
PyObject *arg1;
2843
PyObject *arg2;
2844
2845
if (!PyArg_UnpackTuple(args, "wl_event_loop_add_timer", 3, 3, &arg0, &arg1, &arg2))
2846
return NULL;
2847
2848
datasize = _cffi_prepare_pointer_call_argument(
2849
_cffi_type(30), arg0, (char **)&x0);
2850
if (datasize != 0) {
2851
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2852
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2853
datasize, &large_args_free) < 0)
2854
return NULL;
2855
}
2856
2857
x1 = (int(*)(void *))_cffi_to_c_pointer(arg1, _cffi_type(100));
2858
if (x1 == (int(*)(void *))NULL && PyErr_Occurred())
2859
return NULL;
2860
2861
datasize = _cffi_prepare_pointer_call_argument(
2862
_cffi_type(12), arg2, (char **)&x2);
2863
if (datasize != 0) {
2864
x2 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
2865
if (_cffi_convert_array_argument(_cffi_type(12), arg2, (char **)&x2,
2866
datasize, &large_args_free) < 0)
2867
return NULL;
2868
}
2869
2870
Py_BEGIN_ALLOW_THREADS
2871
_cffi_restore_errno();
2872
{ result = wl_event_loop_add_timer(x0, x1, x2); }
2873
_cffi_save_errno();
2874
Py_END_ALLOW_THREADS
2875
2876
(void)self; /* unused */
2877
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(37));
2878
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2879
return pyresult;
2880
}
2881
#else
2882
# define _cffi_f_wl_event_loop_add_timer _cffi_d_wl_event_loop_add_timer
2883
#endif
2884
2885
static struct wl_event_loop * _cffi_d_wl_event_loop_create(void)
2886
{
2887
return wl_event_loop_create();
2888
}
2889
#ifndef PYPY_VERSION
2890
static PyObject *
2891
_cffi_f_wl_event_loop_create(PyObject *self, PyObject *noarg)
2892
{
2893
struct wl_event_loop * result;
2894
PyObject *pyresult;
2895
2896
Py_BEGIN_ALLOW_THREADS
2897
_cffi_restore_errno();
2898
{ result = wl_event_loop_create(); }
2899
_cffi_save_errno();
2900
Py_END_ALLOW_THREADS
2901
2902
(void)self; /* unused */
2903
(void)noarg; /* unused */
2904
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(30));
2905
return pyresult;
2906
}
2907
#else
2908
# define _cffi_f_wl_event_loop_create _cffi_d_wl_event_loop_create
2909
#endif
2910
2911
static void _cffi_d_wl_event_loop_destroy(struct wl_event_loop * x0)
2912
{
2913
wl_event_loop_destroy(x0);
2914
}
2915
#ifndef PYPY_VERSION
2916
static PyObject *
2917
_cffi_f_wl_event_loop_destroy(PyObject *self, PyObject *arg0)
2918
{
2919
struct wl_event_loop * x0;
2920
Py_ssize_t datasize;
2921
struct _cffi_freeme_s *large_args_free = NULL;
2922
2923
datasize = _cffi_prepare_pointer_call_argument(
2924
_cffi_type(30), arg0, (char **)&x0);
2925
if (datasize != 0) {
2926
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2927
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2928
datasize, &large_args_free) < 0)
2929
return NULL;
2930
}
2931
2932
Py_BEGIN_ALLOW_THREADS
2933
_cffi_restore_errno();
2934
{ wl_event_loop_destroy(x0); }
2935
_cffi_save_errno();
2936
Py_END_ALLOW_THREADS
2937
2938
(void)self; /* unused */
2939
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2940
Py_INCREF(Py_None);
2941
return Py_None;
2942
}
2943
#else
2944
# define _cffi_f_wl_event_loop_destroy _cffi_d_wl_event_loop_destroy
2945
#endif
2946
2947
static int _cffi_d_wl_event_loop_dispatch(struct wl_event_loop * x0, int x1)
2948
{
2949
return wl_event_loop_dispatch(x0, x1);
2950
}
2951
#ifndef PYPY_VERSION
2952
static PyObject *
2953
_cffi_f_wl_event_loop_dispatch(PyObject *self, PyObject *args)
2954
{
2955
struct wl_event_loop * x0;
2956
int x1;
2957
Py_ssize_t datasize;
2958
struct _cffi_freeme_s *large_args_free = NULL;
2959
int result;
2960
PyObject *pyresult;
2961
PyObject *arg0;
2962
PyObject *arg1;
2963
2964
if (!PyArg_UnpackTuple(args, "wl_event_loop_dispatch", 2, 2, &arg0, &arg1))
2965
return NULL;
2966
2967
datasize = _cffi_prepare_pointer_call_argument(
2968
_cffi_type(30), arg0, (char **)&x0);
2969
if (datasize != 0) {
2970
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
2971
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
2972
datasize, &large_args_free) < 0)
2973
return NULL;
2974
}
2975
2976
x1 = _cffi_to_c_int(arg1, int);
2977
if (x1 == (int)-1 && PyErr_Occurred())
2978
return NULL;
2979
2980
Py_BEGIN_ALLOW_THREADS
2981
_cffi_restore_errno();
2982
{ result = wl_event_loop_dispatch(x0, x1); }
2983
_cffi_save_errno();
2984
Py_END_ALLOW_THREADS
2985
2986
(void)self; /* unused */
2987
pyresult = _cffi_from_c_int(result, int);
2988
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
2989
return pyresult;
2990
}
2991
#else
2992
# define _cffi_f_wl_event_loop_dispatch _cffi_d_wl_event_loop_dispatch
2993
#endif
2994
2995
static void _cffi_d_wl_event_loop_dispatch_idle(struct wl_event_loop * x0)
2996
{
2997
wl_event_loop_dispatch_idle(x0);
2998
}
2999
#ifndef PYPY_VERSION
3000
static PyObject *
3001
_cffi_f_wl_event_loop_dispatch_idle(PyObject *self, PyObject *arg0)
3002
{
3003
struct wl_event_loop * x0;
3004
Py_ssize_t datasize;
3005
struct _cffi_freeme_s *large_args_free = NULL;
3006
3007
datasize = _cffi_prepare_pointer_call_argument(
3008
_cffi_type(30), arg0, (char **)&x0);
3009
if (datasize != 0) {
3010
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
3011
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
3012
datasize, &large_args_free) < 0)
3013
return NULL;
3014
}
3015
3016
Py_BEGIN_ALLOW_THREADS
3017
_cffi_restore_errno();
3018
{ wl_event_loop_dispatch_idle(x0); }
3019
_cffi_save_errno();
3020
Py_END_ALLOW_THREADS
3021
3022
(void)self; /* unused */
3023
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3024
Py_INCREF(Py_None);
3025
return Py_None;
3026
}
3027
#else
3028
# define _cffi_f_wl_event_loop_dispatch_idle _cffi_d_wl_event_loop_dispatch_idle
3029
#endif
3030
3031
static int _cffi_d_wl_event_loop_get_fd(struct wl_event_loop * x0)
3032
{
3033
return wl_event_loop_get_fd(x0);
3034
}
3035
#ifndef PYPY_VERSION
3036
static PyObject *
3037
_cffi_f_wl_event_loop_get_fd(PyObject *self, PyObject *arg0)
3038
{
3039
struct wl_event_loop * x0;
3040
Py_ssize_t datasize;
3041
struct _cffi_freeme_s *large_args_free = NULL;
3042
int result;
3043
PyObject *pyresult;
3044
3045
datasize = _cffi_prepare_pointer_call_argument(
3046
_cffi_type(30), arg0, (char **)&x0);
3047
if (datasize != 0) {
3048
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_loop *)alloca((size_t)datasize) : NULL;
3049
if (_cffi_convert_array_argument(_cffi_type(30), arg0, (char **)&x0,
3050
datasize, &large_args_free) < 0)
3051
return NULL;
3052
}
3053
3054
Py_BEGIN_ALLOW_THREADS
3055
_cffi_restore_errno();
3056
{ result = wl_event_loop_get_fd(x0); }
3057
_cffi_save_errno();
3058
Py_END_ALLOW_THREADS
3059
3060
(void)self; /* unused */
3061
pyresult = _cffi_from_c_int(result, int);
3062
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3063
return pyresult;
3064
}
3065
#else
3066
# define _cffi_f_wl_event_loop_get_fd _cffi_d_wl_event_loop_get_fd
3067
#endif
3068
3069
static void _cffi_d_wl_event_queue_destroy(struct wl_event_queue * x0)
3070
{
3071
wl_event_queue_destroy(x0);
3072
}
3073
#ifndef PYPY_VERSION
3074
static PyObject *
3075
_cffi_f_wl_event_queue_destroy(PyObject *self, PyObject *arg0)
3076
{
3077
struct wl_event_queue * x0;
3078
Py_ssize_t datasize;
3079
struct _cffi_freeme_s *large_args_free = NULL;
3080
3081
datasize = _cffi_prepare_pointer_call_argument(
3082
_cffi_type(27), arg0, (char **)&x0);
3083
if (datasize != 0) {
3084
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_queue *)alloca((size_t)datasize) : NULL;
3085
if (_cffi_convert_array_argument(_cffi_type(27), arg0, (char **)&x0,
3086
datasize, &large_args_free) < 0)
3087
return NULL;
3088
}
3089
3090
Py_BEGIN_ALLOW_THREADS
3091
_cffi_restore_errno();
3092
{ wl_event_queue_destroy(x0); }
3093
_cffi_save_errno();
3094
Py_END_ALLOW_THREADS
3095
3096
(void)self; /* unused */
3097
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3098
Py_INCREF(Py_None);
3099
return Py_None;
3100
}
3101
#else
3102
# define _cffi_f_wl_event_queue_destroy _cffi_d_wl_event_queue_destroy
3103
#endif
3104
3105
static void _cffi_d_wl_event_source_check(struct wl_event_source * x0)
3106
{
3107
wl_event_source_check(x0);
3108
}
3109
#ifndef PYPY_VERSION
3110
static PyObject *
3111
_cffi_f_wl_event_source_check(PyObject *self, PyObject *arg0)
3112
{
3113
struct wl_event_source * x0;
3114
Py_ssize_t datasize;
3115
struct _cffi_freeme_s *large_args_free = NULL;
3116
3117
datasize = _cffi_prepare_pointer_call_argument(
3118
_cffi_type(37), arg0, (char **)&x0);
3119
if (datasize != 0) {
3120
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_source *)alloca((size_t)datasize) : NULL;
3121
if (_cffi_convert_array_argument(_cffi_type(37), arg0, (char **)&x0,
3122
datasize, &large_args_free) < 0)
3123
return NULL;
3124
}
3125
3126
Py_BEGIN_ALLOW_THREADS
3127
_cffi_restore_errno();
3128
{ wl_event_source_check(x0); }
3129
_cffi_save_errno();
3130
Py_END_ALLOW_THREADS
3131
3132
(void)self; /* unused */
3133
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3134
Py_INCREF(Py_None);
3135
return Py_None;
3136
}
3137
#else
3138
# define _cffi_f_wl_event_source_check _cffi_d_wl_event_source_check
3139
#endif
3140
3141
static int _cffi_d_wl_event_source_fd_update(struct wl_event_source * x0, uint32_t x1)
3142
{
3143
return wl_event_source_fd_update(x0, x1);
3144
}
3145
#ifndef PYPY_VERSION
3146
static PyObject *
3147
_cffi_f_wl_event_source_fd_update(PyObject *self, PyObject *args)
3148
{
3149
struct wl_event_source * x0;
3150
uint32_t x1;
3151
Py_ssize_t datasize;
3152
struct _cffi_freeme_s *large_args_free = NULL;
3153
int result;
3154
PyObject *pyresult;
3155
PyObject *arg0;
3156
PyObject *arg1;
3157
3158
if (!PyArg_UnpackTuple(args, "wl_event_source_fd_update", 2, 2, &arg0, &arg1))
3159
return NULL;
3160
3161
datasize = _cffi_prepare_pointer_call_argument(
3162
_cffi_type(37), arg0, (char **)&x0);
3163
if (datasize != 0) {
3164
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_source *)alloca((size_t)datasize) : NULL;
3165
if (_cffi_convert_array_argument(_cffi_type(37), arg0, (char **)&x0,
3166
datasize, &large_args_free) < 0)
3167
return NULL;
3168
}
3169
3170
x1 = _cffi_to_c_int(arg1, uint32_t);
3171
if (x1 == (uint32_t)-1 && PyErr_Occurred())
3172
return NULL;
3173
3174
Py_BEGIN_ALLOW_THREADS
3175
_cffi_restore_errno();
3176
{ result = wl_event_source_fd_update(x0, x1); }
3177
_cffi_save_errno();
3178
Py_END_ALLOW_THREADS
3179
3180
(void)self; /* unused */
3181
pyresult = _cffi_from_c_int(result, int);
3182
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3183
return pyresult;
3184
}
3185
#else
3186
# define _cffi_f_wl_event_source_fd_update _cffi_d_wl_event_source_fd_update
3187
#endif
3188
3189
static int _cffi_d_wl_event_source_remove(struct wl_event_source * x0)
3190
{
3191
return wl_event_source_remove(x0);
3192
}
3193
#ifndef PYPY_VERSION
3194
static PyObject *
3195
_cffi_f_wl_event_source_remove(PyObject *self, PyObject *arg0)
3196
{
3197
struct wl_event_source * x0;
3198
Py_ssize_t datasize;
3199
struct _cffi_freeme_s *large_args_free = NULL;
3200
int result;
3201
PyObject *pyresult;
3202
3203
datasize = _cffi_prepare_pointer_call_argument(
3204
_cffi_type(37), arg0, (char **)&x0);
3205
if (datasize != 0) {
3206
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_source *)alloca((size_t)datasize) : NULL;
3207
if (_cffi_convert_array_argument(_cffi_type(37), arg0, (char **)&x0,
3208
datasize, &large_args_free) < 0)
3209
return NULL;
3210
}
3211
3212
Py_BEGIN_ALLOW_THREADS
3213
_cffi_restore_errno();
3214
{ result = wl_event_source_remove(x0); }
3215
_cffi_save_errno();
3216
Py_END_ALLOW_THREADS
3217
3218
(void)self; /* unused */
3219
pyresult = _cffi_from_c_int(result, int);
3220
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3221
return pyresult;
3222
}
3223
#else
3224
# define _cffi_f_wl_event_source_remove _cffi_d_wl_event_source_remove
3225
#endif
3226
3227
static int _cffi_d_wl_event_source_timer_update(struct wl_event_source * x0, int x1)
3228
{
3229
return wl_event_source_timer_update(x0, x1);
3230
}
3231
#ifndef PYPY_VERSION
3232
static PyObject *
3233
_cffi_f_wl_event_source_timer_update(PyObject *self, PyObject *args)
3234
{
3235
struct wl_event_source * x0;
3236
int x1;
3237
Py_ssize_t datasize;
3238
struct _cffi_freeme_s *large_args_free = NULL;
3239
int result;
3240
PyObject *pyresult;
3241
PyObject *arg0;
3242
PyObject *arg1;
3243
3244
if (!PyArg_UnpackTuple(args, "wl_event_source_timer_update", 2, 2, &arg0, &arg1))
3245
return NULL;
3246
3247
datasize = _cffi_prepare_pointer_call_argument(
3248
_cffi_type(37), arg0, (char **)&x0);
3249
if (datasize != 0) {
3250
x0 = ((size_t)datasize) <= 640 ? (struct wl_event_source *)alloca((size_t)datasize) : NULL;
3251
if (_cffi_convert_array_argument(_cffi_type(37), arg0, (char **)&x0,
3252
datasize, &large_args_free) < 0)
3253
return NULL;
3254
}
3255
3256
x1 = _cffi_to_c_int(arg1, int);
3257
if (x1 == (int)-1 && PyErr_Occurred())
3258
return NULL;
3259
3260
Py_BEGIN_ALLOW_THREADS
3261
_cffi_restore_errno();
3262
{ result = wl_event_source_timer_update(x0, x1); }
3263
_cffi_save_errno();
3264
Py_END_ALLOW_THREADS
3265
3266
(void)self; /* unused */
3267
pyresult = _cffi_from_c_int(result, int);
3268
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3269
return pyresult;
3270
}
3271
#else
3272
# define _cffi_f_wl_event_source_timer_update _cffi_d_wl_event_source_timer_update
3273
#endif
3274
3275
static int32_t _cffi_d_wl_fixed_from_double(double x0)
3276
{
3277
return wl_fixed_from_double(x0);
3278
}
3279
#ifndef PYPY_VERSION
3280
static PyObject *
3281
_cffi_f_wl_fixed_from_double(PyObject *self, PyObject *arg0)
3282
{
3283
double x0;
3284
int32_t result;
3285
PyObject *pyresult;
3286
3287
x0 = (double)_cffi_to_c_double(arg0);
3288
if (x0 == (double)-1 && PyErr_Occurred())
3289
return NULL;
3290
3291
Py_BEGIN_ALLOW_THREADS
3292
_cffi_restore_errno();
3293
{ result = wl_fixed_from_double(x0); }
3294
_cffi_save_errno();
3295
Py_END_ALLOW_THREADS
3296
3297
(void)self; /* unused */
3298
pyresult = _cffi_from_c_int(result, int32_t);
3299
return pyresult;
3300
}
3301
#else
3302
# define _cffi_f_wl_fixed_from_double _cffi_d_wl_fixed_from_double
3303
#endif
3304
3305
static int32_t _cffi_d_wl_fixed_from_int(int x0)
3306
{
3307
return wl_fixed_from_int(x0);
3308
}
3309
#ifndef PYPY_VERSION
3310
static PyObject *
3311
_cffi_f_wl_fixed_from_int(PyObject *self, PyObject *arg0)
3312
{
3313
int x0;
3314
int32_t result;
3315
PyObject *pyresult;
3316
3317
x0 = _cffi_to_c_int(arg0, int);
3318
if (x0 == (int)-1 && PyErr_Occurred())
3319
return NULL;
3320
3321
Py_BEGIN_ALLOW_THREADS
3322
_cffi_restore_errno();
3323
{ result = wl_fixed_from_int(x0); }
3324
_cffi_save_errno();
3325
Py_END_ALLOW_THREADS
3326
3327
(void)self; /* unused */
3328
pyresult = _cffi_from_c_int(result, int32_t);
3329
return pyresult;
3330
}
3331
#else
3332
# define _cffi_f_wl_fixed_from_int _cffi_d_wl_fixed_from_int
3333
#endif
3334
3335
static double _cffi_d_wl_fixed_to_double(int32_t x0)
3336
{
3337
return wl_fixed_to_double(x0);
3338
}
3339
#ifndef PYPY_VERSION
3340
static PyObject *
3341
_cffi_f_wl_fixed_to_double(PyObject *self, PyObject *arg0)
3342
{
3343
int32_t x0;
3344
double result;
3345
PyObject *pyresult;
3346
3347
x0 = _cffi_to_c_int(arg0, int32_t);
3348
if (x0 == (int32_t)-1 && PyErr_Occurred())
3349
return NULL;
3350
3351
Py_BEGIN_ALLOW_THREADS
3352
_cffi_restore_errno();
3353
{ result = wl_fixed_to_double(x0); }
3354
_cffi_save_errno();
3355
Py_END_ALLOW_THREADS
3356
3357
(void)self; /* unused */
3358
pyresult = _cffi_from_c_double(result);
3359
return pyresult;
3360
}
3361
#else
3362
# define _cffi_f_wl_fixed_to_double _cffi_d_wl_fixed_to_double
3363
#endif
3364
3365
static struct wl_global * _cffi_d_wl_global_create(struct wl_display * x0, struct wl_interface const * x1, int x2, void * x3, void(* x4)(struct wl_client *, void *, uint32_t, uint32_t))
3366
{
3367
return wl_global_create(x0, x1, x2, x3, x4);
3368
}
3369
#ifndef PYPY_VERSION
3370
static PyObject *
3371
_cffi_f_wl_global_create(PyObject *self, PyObject *args)
3372
{
3373
struct wl_display * x0;
3374
struct wl_interface const * x1;
3375
int x2;
3376
void * x3;
3377
void(* x4)(struct wl_client *, void *, uint32_t, uint32_t);
3378
Py_ssize_t datasize;
3379
struct _cffi_freeme_s *large_args_free = NULL;
3380
struct wl_global * result;
3381
PyObject *pyresult;
3382
PyObject *arg0;
3383
PyObject *arg1;
3384
PyObject *arg2;
3385
PyObject *arg3;
3386
PyObject *arg4;
3387
3388
if (!PyArg_UnpackTuple(args, "wl_global_create", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
3389
return NULL;
3390
3391
datasize = _cffi_prepare_pointer_call_argument(
3392
_cffi_type(1), arg0, (char **)&x0);
3393
if (datasize != 0) {
3394
x0 = ((size_t)datasize) <= 640 ? (struct wl_display *)alloca((size_t)datasize) : NULL;
3395
if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
3396
datasize, &large_args_free) < 0)
3397
return NULL;
3398
}
3399
3400
datasize = _cffi_prepare_pointer_call_argument(
3401
_cffi_type(123), arg1, (char **)&x1);
3402
if (datasize != 0) {
3403
x1 = ((size_t)datasize) <= 640 ? (struct wl_interface const *)alloca((size_t)datasize) : NULL;
3404
if (_cffi_convert_array_argument(_cffi_type(123), arg1, (char **)&x1,
3405
datasize, &large_args_free) < 0)
3406
return NULL;
3407
}
3408
3409
x2 = _cffi_to_c_int(arg2, int);
3410
if (x2 == (int)-1 && PyErr_Occurred())
3411
return NULL;
3412
3413
datasize = _cffi_prepare_pointer_call_argument(
3414
_cffi_type(12), arg3, (char **)&x3);
3415
if (datasize != 0) {
3416
x3 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
3417
if (_cffi_convert_array_argument(_cffi_type(12), arg3, (char **)&x3,
3418
datasize, &large_args_free) < 0)
3419
return NULL;
3420
}
3421
3422
x4 = (void(*)(struct wl_client *, void *, uint32_t, uint32_t))_cffi_to_c_pointer(arg4, _cffi_type(126));
3423
if (x4 == (void(*)(struct wl_client *, void *, uint32_t, uint32_t))NULL && PyErr_Occurred())
3424
return NULL;
3425
3426
Py_BEGIN_ALLOW_THREADS
3427
_cffi_restore_errno();
3428
{ result = wl_global_create(x0, x1, x2, x3, x4); }
3429
_cffi_save_errno();
3430
Py_END_ALLOW_THREADS
3431
3432
(void)self; /* unused */
3433
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(200));
3434
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3435
return pyresult;
3436
}
3437
#else
3438
# define _cffi_f_wl_global_create _cffi_d_wl_global_create
3439
#endif
3440
3441
static void _cffi_d_wl_global_destroy(struct wl_global * x0)
3442
{
3443
wl_global_destroy(x0);
3444
}
3445
#ifndef PYPY_VERSION
3446
static PyObject *
3447
_cffi_f_wl_global_destroy(PyObject *self, PyObject *arg0)
3448
{
3449
struct wl_global * x0;
3450
Py_ssize_t datasize;
3451
struct _cffi_freeme_s *large_args_free = NULL;
3452
3453
datasize = _cffi_prepare_pointer_call_argument(
3454
_cffi_type(200), arg0, (char **)&x0);
3455
if (datasize != 0) {
3456
x0 = ((size_t)datasize) <= 640 ? (struct wl_global *)alloca((size_t)datasize) : NULL;
3457
if (_cffi_convert_array_argument(_cffi_type(200), arg0, (char **)&x0,
3458
datasize, &large_args_free) < 0)
3459
return NULL;
3460
}
3461
3462
Py_BEGIN_ALLOW_THREADS
3463
_cffi_restore_errno();
3464
{ wl_global_destroy(x0); }
3465
_cffi_save_errno();
3466
Py_END_ALLOW_THREADS
3467
3468
(void)self; /* unused */
3469
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3470
Py_INCREF(Py_None);
3471
return Py_None;
3472
}
3473
#else
3474
# define _cffi_f_wl_global_destroy _cffi_d_wl_global_destroy
3475
#endif
3476
3477
static int _cffi_d_wl_list_empty(struct wl_list const * x0)
3478
{
3479
return wl_list_empty(x0);
3480
}
3481
#ifndef PYPY_VERSION
3482
static PyObject *
3483
_cffi_f_wl_list_empty(PyObject *self, PyObject *arg0)
3484
{
3485
struct wl_list const * x0;
3486
Py_ssize_t datasize;
3487
struct _cffi_freeme_s *large_args_free = NULL;
3488
int result;
3489
PyObject *pyresult;
3490
3491
datasize = _cffi_prepare_pointer_call_argument(
3492
_cffi_type(48), arg0, (char **)&x0);
3493
if (datasize != 0) {
3494
x0 = ((size_t)datasize) <= 640 ? (struct wl_list const *)alloca((size_t)datasize) : NULL;
3495
if (_cffi_convert_array_argument(_cffi_type(48), arg0, (char **)&x0,
3496
datasize, &large_args_free) < 0)
3497
return NULL;
3498
}
3499
3500
Py_BEGIN_ALLOW_THREADS
3501
_cffi_restore_errno();
3502
{ result = wl_list_empty(x0); }
3503
_cffi_save_errno();
3504
Py_END_ALLOW_THREADS
3505
3506
(void)self; /* unused */
3507
pyresult = _cffi_from_c_int(result, int);
3508
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3509
return pyresult;
3510
}
3511
#else
3512
# define _cffi_f_wl_list_empty _cffi_d_wl_list_empty
3513
#endif
3514
3515
static void _cffi_d_wl_list_remove(struct wl_list * x0)
3516
{
3517
wl_list_remove(x0);
3518
}
3519
#ifndef PYPY_VERSION
3520
static PyObject *
3521
_cffi_f_wl_list_remove(PyObject *self, PyObject *arg0)
3522
{
3523
struct wl_list * x0;
3524
Py_ssize_t datasize;
3525
struct _cffi_freeme_s *large_args_free = NULL;
3526
3527
datasize = _cffi_prepare_pointer_call_argument(
3528
_cffi_type(203), arg0, (char **)&x0);
3529
if (datasize != 0) {
3530
x0 = ((size_t)datasize) <= 640 ? (struct wl_list *)alloca((size_t)datasize) : NULL;
3531
if (_cffi_convert_array_argument(_cffi_type(203), arg0, (char **)&x0,
3532
datasize, &large_args_free) < 0)
3533
return NULL;
3534
}
3535
3536
Py_BEGIN_ALLOW_THREADS
3537
_cffi_restore_errno();
3538
{ wl_list_remove(x0); }
3539
_cffi_save_errno();
3540
Py_END_ALLOW_THREADS
3541
3542
(void)self; /* unused */
3543
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3544
Py_INCREF(Py_None);
3545
return Py_None;
3546
}
3547
#else
3548
# define _cffi_f_wl_list_remove _cffi_d_wl_list_remove
3549
#endif
3550
3551
static int _cffi_d_wl_proxy_add_dispatcher(struct wl_proxy * x0, int(* x1)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *), void const * x2, void * x3)
3552
{
3553
return wl_proxy_add_dispatcher(x0, x1, x2, x3);
3554
}
3555
#ifndef PYPY_VERSION
3556
static PyObject *
3557
_cffi_f_wl_proxy_add_dispatcher(PyObject *self, PyObject *args)
3558
{
3559
struct wl_proxy * x0;
3560
int(* x1)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *);
3561
void const * x2;
3562
void * x3;
3563
Py_ssize_t datasize;
3564
struct _cffi_freeme_s *large_args_free = NULL;
3565
int result;
3566
PyObject *pyresult;
3567
PyObject *arg0;
3568
PyObject *arg1;
3569
PyObject *arg2;
3570
PyObject *arg3;
3571
3572
if (!PyArg_UnpackTuple(args, "wl_proxy_add_dispatcher", 4, 4, &arg0, &arg1, &arg2, &arg3))
3573
return NULL;
3574
3575
datasize = _cffi_prepare_pointer_call_argument(
3576
_cffi_type(51), arg0, (char **)&x0);
3577
if (datasize != 0) {
3578
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3579
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3580
datasize, &large_args_free) < 0)
3581
return NULL;
3582
}
3583
3584
x1 = (int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *))_cffi_to_c_pointer(arg1, _cffi_type(52));
3585
if (x1 == (int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *))NULL && PyErr_Occurred())
3586
return NULL;
3587
3588
datasize = _cffi_prepare_pointer_call_argument(
3589
_cffi_type(53), arg2, (char **)&x2);
3590
if (datasize != 0) {
3591
x2 = ((size_t)datasize) <= 640 ? (void const *)alloca((size_t)datasize) : NULL;
3592
if (_cffi_convert_array_argument(_cffi_type(53), arg2, (char **)&x2,
3593
datasize, &large_args_free) < 0)
3594
return NULL;
3595
}
3596
3597
datasize = _cffi_prepare_pointer_call_argument(
3598
_cffi_type(12), arg3, (char **)&x3);
3599
if (datasize != 0) {
3600
x3 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
3601
if (_cffi_convert_array_argument(_cffi_type(12), arg3, (char **)&x3,
3602
datasize, &large_args_free) < 0)
3603
return NULL;
3604
}
3605
3606
Py_BEGIN_ALLOW_THREADS
3607
_cffi_restore_errno();
3608
{ result = wl_proxy_add_dispatcher(x0, x1, x2, x3); }
3609
_cffi_save_errno();
3610
Py_END_ALLOW_THREADS
3611
3612
(void)self; /* unused */
3613
pyresult = _cffi_from_c_int(result, int);
3614
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3615
return pyresult;
3616
}
3617
#else
3618
# define _cffi_f_wl_proxy_add_dispatcher _cffi_d_wl_proxy_add_dispatcher
3619
#endif
3620
3621
static struct wl_proxy * _cffi_d_wl_proxy_create(struct wl_proxy * x0, struct wl_interface const * x1)
3622
{
3623
return wl_proxy_create(x0, x1);
3624
}
3625
#ifndef PYPY_VERSION
3626
static PyObject *
3627
_cffi_f_wl_proxy_create(PyObject *self, PyObject *args)
3628
{
3629
struct wl_proxy * x0;
3630
struct wl_interface const * x1;
3631
Py_ssize_t datasize;
3632
struct _cffi_freeme_s *large_args_free = NULL;
3633
struct wl_proxy * result;
3634
PyObject *pyresult;
3635
PyObject *arg0;
3636
PyObject *arg1;
3637
3638
if (!PyArg_UnpackTuple(args, "wl_proxy_create", 2, 2, &arg0, &arg1))
3639
return NULL;
3640
3641
datasize = _cffi_prepare_pointer_call_argument(
3642
_cffi_type(51), arg0, (char **)&x0);
3643
if (datasize != 0) {
3644
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3645
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3646
datasize, &large_args_free) < 0)
3647
return NULL;
3648
}
3649
3650
datasize = _cffi_prepare_pointer_call_argument(
3651
_cffi_type(123), arg1, (char **)&x1);
3652
if (datasize != 0) {
3653
x1 = ((size_t)datasize) <= 640 ? (struct wl_interface const *)alloca((size_t)datasize) : NULL;
3654
if (_cffi_convert_array_argument(_cffi_type(123), arg1, (char **)&x1,
3655
datasize, &large_args_free) < 0)
3656
return NULL;
3657
}
3658
3659
Py_BEGIN_ALLOW_THREADS
3660
_cffi_restore_errno();
3661
{ result = wl_proxy_create(x0, x1); }
3662
_cffi_save_errno();
3663
Py_END_ALLOW_THREADS
3664
3665
(void)self; /* unused */
3666
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(51));
3667
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3668
return pyresult;
3669
}
3670
#else
3671
# define _cffi_f_wl_proxy_create _cffi_d_wl_proxy_create
3672
#endif
3673
3674
static void _cffi_d_wl_proxy_destroy(struct wl_proxy * x0)
3675
{
3676
wl_proxy_destroy(x0);
3677
}
3678
#ifndef PYPY_VERSION
3679
static PyObject *
3680
_cffi_f_wl_proxy_destroy(PyObject *self, PyObject *arg0)
3681
{
3682
struct wl_proxy * x0;
3683
Py_ssize_t datasize;
3684
struct _cffi_freeme_s *large_args_free = NULL;
3685
3686
datasize = _cffi_prepare_pointer_call_argument(
3687
_cffi_type(51), arg0, (char **)&x0);
3688
if (datasize != 0) {
3689
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3690
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3691
datasize, &large_args_free) < 0)
3692
return NULL;
3693
}
3694
3695
Py_BEGIN_ALLOW_THREADS
3696
_cffi_restore_errno();
3697
{ wl_proxy_destroy(x0); }
3698
_cffi_save_errno();
3699
Py_END_ALLOW_THREADS
3700
3701
(void)self; /* unused */
3702
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3703
Py_INCREF(Py_None);
3704
return Py_None;
3705
}
3706
#else
3707
# define _cffi_f_wl_proxy_destroy _cffi_d_wl_proxy_destroy
3708
#endif
3709
3710
static void * _cffi_d_wl_proxy_get_user_data(struct wl_proxy * x0)
3711
{
3712
return wl_proxy_get_user_data(x0);
3713
}
3714
#ifndef PYPY_VERSION
3715
static PyObject *
3716
_cffi_f_wl_proxy_get_user_data(PyObject *self, PyObject *arg0)
3717
{
3718
struct wl_proxy * x0;
3719
Py_ssize_t datasize;
3720
struct _cffi_freeme_s *large_args_free = NULL;
3721
void * result;
3722
PyObject *pyresult;
3723
3724
datasize = _cffi_prepare_pointer_call_argument(
3725
_cffi_type(51), arg0, (char **)&x0);
3726
if (datasize != 0) {
3727
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3728
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3729
datasize, &large_args_free) < 0)
3730
return NULL;
3731
}
3732
3733
Py_BEGIN_ALLOW_THREADS
3734
_cffi_restore_errno();
3735
{ result = wl_proxy_get_user_data(x0); }
3736
_cffi_save_errno();
3737
Py_END_ALLOW_THREADS
3738
3739
(void)self; /* unused */
3740
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(12));
3741
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3742
return pyresult;
3743
}
3744
#else
3745
# define _cffi_f_wl_proxy_get_user_data _cffi_d_wl_proxy_get_user_data
3746
#endif
3747
3748
static void _cffi_d_wl_proxy_marshal_array(struct wl_proxy * x0, uint32_t x1, union wl_argument * x2)
3749
{
3750
wl_proxy_marshal_array(x0, x1, x2);
3751
}
3752
#ifndef PYPY_VERSION
3753
static PyObject *
3754
_cffi_f_wl_proxy_marshal_array(PyObject *self, PyObject *args)
3755
{
3756
struct wl_proxy * x0;
3757
uint32_t x1;
3758
union wl_argument * x2;
3759
Py_ssize_t datasize;
3760
struct _cffi_freeme_s *large_args_free = NULL;
3761
PyObject *arg0;
3762
PyObject *arg1;
3763
PyObject *arg2;
3764
3765
if (!PyArg_UnpackTuple(args, "wl_proxy_marshal_array", 3, 3, &arg0, &arg1, &arg2))
3766
return NULL;
3767
3768
datasize = _cffi_prepare_pointer_call_argument(
3769
_cffi_type(51), arg0, (char **)&x0);
3770
if (datasize != 0) {
3771
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3772
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3773
datasize, &large_args_free) < 0)
3774
return NULL;
3775
}
3776
3777
x1 = _cffi_to_c_int(arg1, uint32_t);
3778
if (x1 == (uint32_t)-1 && PyErr_Occurred())
3779
return NULL;
3780
3781
datasize = _cffi_prepare_pointer_call_argument(
3782
_cffi_type(67), arg2, (char **)&x2);
3783
if (datasize != 0) {
3784
x2 = ((size_t)datasize) <= 640 ? (union wl_argument *)alloca((size_t)datasize) : NULL;
3785
if (_cffi_convert_array_argument(_cffi_type(67), arg2, (char **)&x2,
3786
datasize, &large_args_free) < 0)
3787
return NULL;
3788
}
3789
3790
Py_BEGIN_ALLOW_THREADS
3791
_cffi_restore_errno();
3792
{ wl_proxy_marshal_array(x0, x1, x2); }
3793
_cffi_save_errno();
3794
Py_END_ALLOW_THREADS
3795
3796
(void)self; /* unused */
3797
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3798
Py_INCREF(Py_None);
3799
return Py_None;
3800
}
3801
#else
3802
# define _cffi_f_wl_proxy_marshal_array _cffi_d_wl_proxy_marshal_array
3803
#endif
3804
3805
static struct wl_proxy * _cffi_d_wl_proxy_marshal_array_constructor(struct wl_proxy * x0, uint32_t x1, union wl_argument * x2, struct wl_interface const * x3)
3806
{
3807
return wl_proxy_marshal_array_constructor(x0, x1, x2, x3);
3808
}
3809
#ifndef PYPY_VERSION
3810
static PyObject *
3811
_cffi_f_wl_proxy_marshal_array_constructor(PyObject *self, PyObject *args)
3812
{
3813
struct wl_proxy * x0;
3814
uint32_t x1;
3815
union wl_argument * x2;
3816
struct wl_interface const * x3;
3817
Py_ssize_t datasize;
3818
struct _cffi_freeme_s *large_args_free = NULL;
3819
struct wl_proxy * result;
3820
PyObject *pyresult;
3821
PyObject *arg0;
3822
PyObject *arg1;
3823
PyObject *arg2;
3824
PyObject *arg3;
3825
3826
if (!PyArg_UnpackTuple(args, "wl_proxy_marshal_array_constructor", 4, 4, &arg0, &arg1, &arg2, &arg3))
3827
return NULL;
3828
3829
datasize = _cffi_prepare_pointer_call_argument(
3830
_cffi_type(51), arg0, (char **)&x0);
3831
if (datasize != 0) {
3832
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3833
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3834
datasize, &large_args_free) < 0)
3835
return NULL;
3836
}
3837
3838
x1 = _cffi_to_c_int(arg1, uint32_t);
3839
if (x1 == (uint32_t)-1 && PyErr_Occurred())
3840
return NULL;
3841
3842
datasize = _cffi_prepare_pointer_call_argument(
3843
_cffi_type(67), arg2, (char **)&x2);
3844
if (datasize != 0) {
3845
x2 = ((size_t)datasize) <= 640 ? (union wl_argument *)alloca((size_t)datasize) : NULL;
3846
if (_cffi_convert_array_argument(_cffi_type(67), arg2, (char **)&x2,
3847
datasize, &large_args_free) < 0)
3848
return NULL;
3849
}
3850
3851
datasize = _cffi_prepare_pointer_call_argument(
3852
_cffi_type(123), arg3, (char **)&x3);
3853
if (datasize != 0) {
3854
x3 = ((size_t)datasize) <= 640 ? (struct wl_interface const *)alloca((size_t)datasize) : NULL;
3855
if (_cffi_convert_array_argument(_cffi_type(123), arg3, (char **)&x3,
3856
datasize, &large_args_free) < 0)
3857
return NULL;
3858
}
3859
3860
Py_BEGIN_ALLOW_THREADS
3861
_cffi_restore_errno();
3862
{ result = wl_proxy_marshal_array_constructor(x0, x1, x2, x3); }
3863
_cffi_save_errno();
3864
Py_END_ALLOW_THREADS
3865
3866
(void)self; /* unused */
3867
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(51));
3868
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3869
return pyresult;
3870
}
3871
#else
3872
# define _cffi_f_wl_proxy_marshal_array_constructor _cffi_d_wl_proxy_marshal_array_constructor
3873
#endif
3874
3875
static void _cffi_d_wl_proxy_set_user_data(struct wl_proxy * x0, void * x1)
3876
{
3877
wl_proxy_set_user_data(x0, x1);
3878
}
3879
#ifndef PYPY_VERSION
3880
static PyObject *
3881
_cffi_f_wl_proxy_set_user_data(PyObject *self, PyObject *args)
3882
{
3883
struct wl_proxy * x0;
3884
void * x1;
3885
Py_ssize_t datasize;
3886
struct _cffi_freeme_s *large_args_free = NULL;
3887
PyObject *arg0;
3888
PyObject *arg1;
3889
3890
if (!PyArg_UnpackTuple(args, "wl_proxy_set_user_data", 2, 2, &arg0, &arg1))
3891
return NULL;
3892
3893
datasize = _cffi_prepare_pointer_call_argument(
3894
_cffi_type(51), arg0, (char **)&x0);
3895
if (datasize != 0) {
3896
x0 = ((size_t)datasize) <= 640 ? (struct wl_proxy *)alloca((size_t)datasize) : NULL;
3897
if (_cffi_convert_array_argument(_cffi_type(51), arg0, (char **)&x0,
3898
datasize, &large_args_free) < 0)
3899
return NULL;
3900
}
3901
3902
datasize = _cffi_prepare_pointer_call_argument(
3903
_cffi_type(12), arg1, (char **)&x1);
3904
if (datasize != 0) {
3905
x1 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
3906
if (_cffi_convert_array_argument(_cffi_type(12), arg1, (char **)&x1,
3907
datasize, &large_args_free) < 0)
3908
return NULL;
3909
}
3910
3911
Py_BEGIN_ALLOW_THREADS
3912
_cffi_restore_errno();
3913
{ wl_proxy_set_user_data(x0, x1); }
3914
_cffi_save_errno();
3915
Py_END_ALLOW_THREADS
3916
3917
(void)self; /* unused */
3918
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3919
Py_INCREF(Py_None);
3920
return Py_None;
3921
}
3922
#else
3923
# define _cffi_f_wl_proxy_set_user_data _cffi_d_wl_proxy_set_user_data
3924
#endif
3925
3926
static void _cffi_d_wl_resource_add_destroy_listener(struct wl_resource * x0, struct wl_listener * x1)
3927
{
3928
wl_resource_add_destroy_listener(x0, x1);
3929
}
3930
#ifndef PYPY_VERSION
3931
static PyObject *
3932
_cffi_f_wl_resource_add_destroy_listener(PyObject *self, PyObject *args)
3933
{
3934
struct wl_resource * x0;
3935
struct wl_listener * x1;
3936
Py_ssize_t datasize;
3937
struct _cffi_freeme_s *large_args_free = NULL;
3938
PyObject *arg0;
3939
PyObject *arg1;
3940
3941
if (!PyArg_UnpackTuple(args, "wl_resource_add_destroy_listener", 2, 2, &arg0, &arg1))
3942
return NULL;
3943
3944
datasize = _cffi_prepare_pointer_call_argument(
3945
_cffi_type(57), arg0, (char **)&x0);
3946
if (datasize != 0) {
3947
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
3948
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
3949
datasize, &large_args_free) < 0)
3950
return NULL;
3951
}
3952
3953
datasize = _cffi_prepare_pointer_call_argument(
3954
_cffi_type(175), arg1, (char **)&x1);
3955
if (datasize != 0) {
3956
x1 = ((size_t)datasize) <= 640 ? (struct wl_listener *)alloca((size_t)datasize) : NULL;
3957
if (_cffi_convert_array_argument(_cffi_type(175), arg1, (char **)&x1,
3958
datasize, &large_args_free) < 0)
3959
return NULL;
3960
}
3961
3962
Py_BEGIN_ALLOW_THREADS
3963
_cffi_restore_errno();
3964
{ wl_resource_add_destroy_listener(x0, x1); }
3965
_cffi_save_errno();
3966
Py_END_ALLOW_THREADS
3967
3968
(void)self; /* unused */
3969
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
3970
Py_INCREF(Py_None);
3971
return Py_None;
3972
}
3973
#else
3974
# define _cffi_f_wl_resource_add_destroy_listener _cffi_d_wl_resource_add_destroy_listener
3975
#endif
3976
3977
static struct wl_resource * _cffi_d_wl_resource_create(struct wl_client * x0, struct wl_interface const * x1, int x2, uint32_t x3)
3978
{
3979
return wl_resource_create(x0, x1, x2, x3);
3980
}
3981
#ifndef PYPY_VERSION
3982
static PyObject *
3983
_cffi_f_wl_resource_create(PyObject *self, PyObject *args)
3984
{
3985
struct wl_client * x0;
3986
struct wl_interface const * x1;
3987
int x2;
3988
uint32_t x3;
3989
Py_ssize_t datasize;
3990
struct _cffi_freeme_s *large_args_free = NULL;
3991
struct wl_resource * result;
3992
PyObject *pyresult;
3993
PyObject *arg0;
3994
PyObject *arg1;
3995
PyObject *arg2;
3996
PyObject *arg3;
3997
3998
if (!PyArg_UnpackTuple(args, "wl_resource_create", 4, 4, &arg0, &arg1, &arg2, &arg3))
3999
return NULL;
4000
4001
datasize = _cffi_prepare_pointer_call_argument(
4002
_cffi_type(139), arg0, (char **)&x0);
4003
if (datasize != 0) {
4004
x0 = ((size_t)datasize) <= 640 ? (struct wl_client *)alloca((size_t)datasize) : NULL;
4005
if (_cffi_convert_array_argument(_cffi_type(139), arg0, (char **)&x0,
4006
datasize, &large_args_free) < 0)
4007
return NULL;
4008
}
4009
4010
datasize = _cffi_prepare_pointer_call_argument(
4011
_cffi_type(123), arg1, (char **)&x1);
4012
if (datasize != 0) {
4013
x1 = ((size_t)datasize) <= 640 ? (struct wl_interface const *)alloca((size_t)datasize) : NULL;
4014
if (_cffi_convert_array_argument(_cffi_type(123), arg1, (char **)&x1,
4015
datasize, &large_args_free) < 0)
4016
return NULL;
4017
}
4018
4019
x2 = _cffi_to_c_int(arg2, int);
4020
if (x2 == (int)-1 && PyErr_Occurred())
4021
return NULL;
4022
4023
x3 = _cffi_to_c_int(arg3, uint32_t);
4024
if (x3 == (uint32_t)-1 && PyErr_Occurred())
4025
return NULL;
4026
4027
Py_BEGIN_ALLOW_THREADS
4028
_cffi_restore_errno();
4029
{ result = wl_resource_create(x0, x1, x2, x3); }
4030
_cffi_save_errno();
4031
Py_END_ALLOW_THREADS
4032
4033
(void)self; /* unused */
4034
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(57));
4035
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4036
return pyresult;
4037
}
4038
#else
4039
# define _cffi_f_wl_resource_create _cffi_d_wl_resource_create
4040
#endif
4041
4042
static void _cffi_d_wl_resource_destroy(struct wl_resource * x0)
4043
{
4044
wl_resource_destroy(x0);
4045
}
4046
#ifndef PYPY_VERSION
4047
static PyObject *
4048
_cffi_f_wl_resource_destroy(PyObject *self, PyObject *arg0)
4049
{
4050
struct wl_resource * x0;
4051
Py_ssize_t datasize;
4052
struct _cffi_freeme_s *large_args_free = NULL;
4053
4054
datasize = _cffi_prepare_pointer_call_argument(
4055
_cffi_type(57), arg0, (char **)&x0);
4056
if (datasize != 0) {
4057
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4058
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4059
datasize, &large_args_free) < 0)
4060
return NULL;
4061
}
4062
4063
Py_BEGIN_ALLOW_THREADS
4064
_cffi_restore_errno();
4065
{ wl_resource_destroy(x0); }
4066
_cffi_save_errno();
4067
Py_END_ALLOW_THREADS
4068
4069
(void)self; /* unused */
4070
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4071
Py_INCREF(Py_None);
4072
return Py_None;
4073
}
4074
#else
4075
# define _cffi_f_wl_resource_destroy _cffi_d_wl_resource_destroy
4076
#endif
4077
4078
static struct wl_client * _cffi_d_wl_resource_get_client(struct wl_resource * x0)
4079
{
4080
return wl_resource_get_client(x0);
4081
}
4082
#ifndef PYPY_VERSION
4083
static PyObject *
4084
_cffi_f_wl_resource_get_client(PyObject *self, PyObject *arg0)
4085
{
4086
struct wl_resource * x0;
4087
Py_ssize_t datasize;
4088
struct _cffi_freeme_s *large_args_free = NULL;
4089
struct wl_client * result;
4090
PyObject *pyresult;
4091
4092
datasize = _cffi_prepare_pointer_call_argument(
4093
_cffi_type(57), arg0, (char **)&x0);
4094
if (datasize != 0) {
4095
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4096
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4097
datasize, &large_args_free) < 0)
4098
return NULL;
4099
}
4100
4101
Py_BEGIN_ALLOW_THREADS
4102
_cffi_restore_errno();
4103
{ result = wl_resource_get_client(x0); }
4104
_cffi_save_errno();
4105
Py_END_ALLOW_THREADS
4106
4107
(void)self; /* unused */
4108
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(139));
4109
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4110
return pyresult;
4111
}
4112
#else
4113
# define _cffi_f_wl_resource_get_client _cffi_d_wl_resource_get_client
4114
#endif
4115
4116
static uint32_t _cffi_d_wl_resource_get_id(struct wl_resource * x0)
4117
{
4118
return wl_resource_get_id(x0);
4119
}
4120
#ifndef PYPY_VERSION
4121
static PyObject *
4122
_cffi_f_wl_resource_get_id(PyObject *self, PyObject *arg0)
4123
{
4124
struct wl_resource * x0;
4125
Py_ssize_t datasize;
4126
struct _cffi_freeme_s *large_args_free = NULL;
4127
uint32_t result;
4128
PyObject *pyresult;
4129
4130
datasize = _cffi_prepare_pointer_call_argument(
4131
_cffi_type(57), arg0, (char **)&x0);
4132
if (datasize != 0) {
4133
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4134
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4135
datasize, &large_args_free) < 0)
4136
return NULL;
4137
}
4138
4139
Py_BEGIN_ALLOW_THREADS
4140
_cffi_restore_errno();
4141
{ result = wl_resource_get_id(x0); }
4142
_cffi_save_errno();
4143
Py_END_ALLOW_THREADS
4144
4145
(void)self; /* unused */
4146
pyresult = _cffi_from_c_int(result, uint32_t);
4147
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4148
return pyresult;
4149
}
4150
#else
4151
# define _cffi_f_wl_resource_get_id _cffi_d_wl_resource_get_id
4152
#endif
4153
4154
static void * _cffi_d_wl_resource_get_user_data(struct wl_resource * x0)
4155
{
4156
return wl_resource_get_user_data(x0);
4157
}
4158
#ifndef PYPY_VERSION
4159
static PyObject *
4160
_cffi_f_wl_resource_get_user_data(PyObject *self, PyObject *arg0)
4161
{
4162
struct wl_resource * x0;
4163
Py_ssize_t datasize;
4164
struct _cffi_freeme_s *large_args_free = NULL;
4165
void * result;
4166
PyObject *pyresult;
4167
4168
datasize = _cffi_prepare_pointer_call_argument(
4169
_cffi_type(57), arg0, (char **)&x0);
4170
if (datasize != 0) {
4171
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4172
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4173
datasize, &large_args_free) < 0)
4174
return NULL;
4175
}
4176
4177
Py_BEGIN_ALLOW_THREADS
4178
_cffi_restore_errno();
4179
{ result = wl_resource_get_user_data(x0); }
4180
_cffi_save_errno();
4181
Py_END_ALLOW_THREADS
4182
4183
(void)self; /* unused */
4184
pyresult = _cffi_from_c_pointer((char *)result, _cffi_type(12));
4185
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4186
return pyresult;
4187
}
4188
#else
4189
# define _cffi_f_wl_resource_get_user_data _cffi_d_wl_resource_get_user_data
4190
#endif
4191
4192
static int _cffi_d_wl_resource_get_version(struct wl_resource * x0)
4193
{
4194
return wl_resource_get_version(x0);
4195
}
4196
#ifndef PYPY_VERSION
4197
static PyObject *
4198
_cffi_f_wl_resource_get_version(PyObject *self, PyObject *arg0)
4199
{
4200
struct wl_resource * x0;
4201
Py_ssize_t datasize;
4202
struct _cffi_freeme_s *large_args_free = NULL;
4203
int result;
4204
PyObject *pyresult;
4205
4206
datasize = _cffi_prepare_pointer_call_argument(
4207
_cffi_type(57), arg0, (char **)&x0);
4208
if (datasize != 0) {
4209
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4210
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4211
datasize, &large_args_free) < 0)
4212
return NULL;
4213
}
4214
4215
Py_BEGIN_ALLOW_THREADS
4216
_cffi_restore_errno();
4217
{ result = wl_resource_get_version(x0); }
4218
_cffi_save_errno();
4219
Py_END_ALLOW_THREADS
4220
4221
(void)self; /* unused */
4222
pyresult = _cffi_from_c_int(result, int);
4223
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4224
return pyresult;
4225
}
4226
#else
4227
# define _cffi_f_wl_resource_get_version _cffi_d_wl_resource_get_version
4228
#endif
4229
4230
static void _cffi_const_wl_resource_post_error(char *o)
4231
{
4232
*(void(* *)(struct wl_resource *, uint32_t, char const *, ...))o = wl_resource_post_error;
4233
}
4234
4235
static void _cffi_d_wl_resource_post_event_array(struct wl_resource * x0, uint32_t x1, union wl_argument * x2)
4236
{
4237
wl_resource_post_event_array(x0, x1, x2);
4238
}
4239
#ifndef PYPY_VERSION
4240
static PyObject *
4241
_cffi_f_wl_resource_post_event_array(PyObject *self, PyObject *args)
4242
{
4243
struct wl_resource * x0;
4244
uint32_t x1;
4245
union wl_argument * x2;
4246
Py_ssize_t datasize;
4247
struct _cffi_freeme_s *large_args_free = NULL;
4248
PyObject *arg0;
4249
PyObject *arg1;
4250
PyObject *arg2;
4251
4252
if (!PyArg_UnpackTuple(args, "wl_resource_post_event_array", 3, 3, &arg0, &arg1, &arg2))
4253
return NULL;
4254
4255
datasize = _cffi_prepare_pointer_call_argument(
4256
_cffi_type(57), arg0, (char **)&x0);
4257
if (datasize != 0) {
4258
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4259
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4260
datasize, &large_args_free) < 0)
4261
return NULL;
4262
}
4263
4264
x1 = _cffi_to_c_int(arg1, uint32_t);
4265
if (x1 == (uint32_t)-1 && PyErr_Occurred())
4266
return NULL;
4267
4268
datasize = _cffi_prepare_pointer_call_argument(
4269
_cffi_type(67), arg2, (char **)&x2);
4270
if (datasize != 0) {
4271
x2 = ((size_t)datasize) <= 640 ? (union wl_argument *)alloca((size_t)datasize) : NULL;
4272
if (_cffi_convert_array_argument(_cffi_type(67), arg2, (char **)&x2,
4273
datasize, &large_args_free) < 0)
4274
return NULL;
4275
}
4276
4277
Py_BEGIN_ALLOW_THREADS
4278
_cffi_restore_errno();
4279
{ wl_resource_post_event_array(x0, x1, x2); }
4280
_cffi_save_errno();
4281
Py_END_ALLOW_THREADS
4282
4283
(void)self; /* unused */
4284
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4285
Py_INCREF(Py_None);
4286
return Py_None;
4287
}
4288
#else
4289
# define _cffi_f_wl_resource_post_event_array _cffi_d_wl_resource_post_event_array
4290
#endif
4291
4292
static void _cffi_d_wl_resource_set_dispatcher(struct wl_resource * x0, int(* x1)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *), void const * x2, void * x3, void(* x4)(struct wl_resource *))
4293
{
4294
wl_resource_set_dispatcher(x0, x1, x2, x3, x4);
4295
}
4296
#ifndef PYPY_VERSION
4297
static PyObject *
4298
_cffi_f_wl_resource_set_dispatcher(PyObject *self, PyObject *args)
4299
{
4300
struct wl_resource * x0;
4301
int(* x1)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *);
4302
void const * x2;
4303
void * x3;
4304
void(* x4)(struct wl_resource *);
4305
Py_ssize_t datasize;
4306
struct _cffi_freeme_s *large_args_free = NULL;
4307
PyObject *arg0;
4308
PyObject *arg1;
4309
PyObject *arg2;
4310
PyObject *arg3;
4311
PyObject *arg4;
4312
4313
if (!PyArg_UnpackTuple(args, "wl_resource_set_dispatcher", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
4314
return NULL;
4315
4316
datasize = _cffi_prepare_pointer_call_argument(
4317
_cffi_type(57), arg0, (char **)&x0);
4318
if (datasize != 0) {
4319
x0 = ((size_t)datasize) <= 640 ? (struct wl_resource *)alloca((size_t)datasize) : NULL;
4320
if (_cffi_convert_array_argument(_cffi_type(57), arg0, (char **)&x0,
4321
datasize, &large_args_free) < 0)
4322
return NULL;
4323
}
4324
4325
x1 = (int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *))_cffi_to_c_pointer(arg1, _cffi_type(52));
4326
if (x1 == (int(*)(void const *, void *, uint32_t, struct wl_message const *, union wl_argument *))NULL && PyErr_Occurred())
4327
return NULL;
4328
4329
datasize = _cffi_prepare_pointer_call_argument(
4330
_cffi_type(53), arg2, (char **)&x2);
4331
if (datasize != 0) {
4332
x2 = ((size_t)datasize) <= 640 ? (void const *)alloca((size_t)datasize) : NULL;
4333
if (_cffi_convert_array_argument(_cffi_type(53), arg2, (char **)&x2,
4334
datasize, &large_args_free) < 0)
4335
return NULL;
4336
}
4337
4338
datasize = _cffi_prepare_pointer_call_argument(
4339
_cffi_type(12), arg3, (char **)&x3);
4340
if (datasize != 0) {
4341
x3 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
4342
if (_cffi_convert_array_argument(_cffi_type(12), arg3, (char **)&x3,
4343
datasize, &large_args_free) < 0)
4344
return NULL;
4345
}
4346
4347
x4 = (void(*)(struct wl_resource *))_cffi_to_c_pointer(arg4, _cffi_type(229));
4348
if (x4 == (void(*)(struct wl_resource *))NULL && PyErr_Occurred())
4349
return NULL;
4350
4351
Py_BEGIN_ALLOW_THREADS
4352
_cffi_restore_errno();
4353
{ wl_resource_set_dispatcher(x0, x1, x2, x3, x4); }
4354
_cffi_save_errno();
4355
Py_END_ALLOW_THREADS
4356
4357
(void)self; /* unused */
4358
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4359
Py_INCREF(Py_None);
4360
return Py_None;
4361
}
4362
#else
4363
# define _cffi_f_wl_resource_set_dispatcher _cffi_d_wl_resource_set_dispatcher
4364
#endif
4365
4366
static void _cffi_d_wl_signal_add(struct wl_signal * x0, struct wl_listener * x1)
4367
{
4368
wl_signal_add(x0, x1);
4369
}
4370
#ifndef PYPY_VERSION
4371
static PyObject *
4372
_cffi_f_wl_signal_add(PyObject *self, PyObject *args)
4373
{
4374
struct wl_signal * x0;
4375
struct wl_listener * x1;
4376
Py_ssize_t datasize;
4377
struct _cffi_freeme_s *large_args_free = NULL;
4378
PyObject *arg0;
4379
PyObject *arg1;
4380
4381
if (!PyArg_UnpackTuple(args, "wl_signal_add", 2, 2, &arg0, &arg1))
4382
return NULL;
4383
4384
datasize = _cffi_prepare_pointer_call_argument(
4385
_cffi_type(246), arg0, (char **)&x0);
4386
if (datasize != 0) {
4387
x0 = ((size_t)datasize) <= 640 ? (struct wl_signal *)alloca((size_t)datasize) : NULL;
4388
if (_cffi_convert_array_argument(_cffi_type(246), arg0, (char **)&x0,
4389
datasize, &large_args_free) < 0)
4390
return NULL;
4391
}
4392
4393
datasize = _cffi_prepare_pointer_call_argument(
4394
_cffi_type(175), arg1, (char **)&x1);
4395
if (datasize != 0) {
4396
x1 = ((size_t)datasize) <= 640 ? (struct wl_listener *)alloca((size_t)datasize) : NULL;
4397
if (_cffi_convert_array_argument(_cffi_type(175), arg1, (char **)&x1,
4398
datasize, &large_args_free) < 0)
4399
return NULL;
4400
}
4401
4402
Py_BEGIN_ALLOW_THREADS
4403
_cffi_restore_errno();
4404
{ wl_signal_add(x0, x1); }
4405
_cffi_save_errno();
4406
Py_END_ALLOW_THREADS
4407
4408
(void)self; /* unused */
4409
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4410
Py_INCREF(Py_None);
4411
return Py_None;
4412
}
4413
#else
4414
# define _cffi_f_wl_signal_add _cffi_d_wl_signal_add
4415
#endif
4416
4417
static void _cffi_d_wl_signal_emit(struct wl_signal * x0, void * x1)
4418
{
4419
wl_signal_emit(x0, x1);
4420
}
4421
#ifndef PYPY_VERSION
4422
static PyObject *
4423
_cffi_f_wl_signal_emit(PyObject *self, PyObject *args)
4424
{
4425
struct wl_signal * x0;
4426
void * x1;
4427
Py_ssize_t datasize;
4428
struct _cffi_freeme_s *large_args_free = NULL;
4429
PyObject *arg0;
4430
PyObject *arg1;
4431
4432
if (!PyArg_UnpackTuple(args, "wl_signal_emit", 2, 2, &arg0, &arg1))
4433
return NULL;
4434
4435
datasize = _cffi_prepare_pointer_call_argument(
4436
_cffi_type(246), arg0, (char **)&x0);
4437
if (datasize != 0) {
4438
x0 = ((size_t)datasize) <= 640 ? (struct wl_signal *)alloca((size_t)datasize) : NULL;
4439
if (_cffi_convert_array_argument(_cffi_type(246), arg0, (char **)&x0,
4440
datasize, &large_args_free) < 0)
4441
return NULL;
4442
}
4443
4444
datasize = _cffi_prepare_pointer_call_argument(
4445
_cffi_type(12), arg1, (char **)&x1);
4446
if (datasize != 0) {
4447
x1 = ((size_t)datasize) <= 640 ? (void *)alloca((size_t)datasize) : NULL;
4448
if (_cffi_convert_array_argument(_cffi_type(12), arg1, (char **)&x1,
4449
datasize, &large_args_free) < 0)
4450
return NULL;
4451
}
4452
4453
Py_BEGIN_ALLOW_THREADS
4454
_cffi_restore_errno();
4455
{ wl_signal_emit(x0, x1); }
4456
_cffi_save_errno();
4457
Py_END_ALLOW_THREADS
4458
4459
(void)self; /* unused */
4460
if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
4461
Py_INCREF(Py_None);
4462
return Py_None;
4463
}
4464
#else
4465
# define _cffi_f_wl_signal_emit _cffi_d_wl_signal_emit
4466
#endif
4467
4468
static int _cffi_const_WAYLAND_VERSION_MAJOR(unsigned long long *o)
4469
{
4470
int n = (WAYLAND_VERSION_MAJOR) <= 0;
4471
*o = (unsigned long long)((WAYLAND_VERSION_MAJOR) | 0); /* check that WAYLAND_VERSION_MAJOR is an integer */
4472
return n;
4473
}
4474
4475
static int _cffi_const_WAYLAND_VERSION_MICRO(unsigned long long *o)
4476
{
4477
int n = (WAYLAND_VERSION_MICRO) <= 0;
4478
*o = (unsigned long long)((WAYLAND_VERSION_MICRO) | 0); /* check that WAYLAND_VERSION_MICRO is an integer */
4479
return n;
4480
}
4481
4482
static int _cffi_const_WAYLAND_VERSION_MINOR(unsigned long long *o)
4483
{
4484
int n = (WAYLAND_VERSION_MINOR) <= 0;
4485
*o = (unsigned long long)((WAYLAND_VERSION_MINOR) | 0); /* check that WAYLAND_VERSION_MINOR is an integer */
4486
return n;
4487
}
4488
4489
_CFFI_UNUSED_FN
4490
static void _cffi_checkfld_struct_wl_array(struct wl_array *p)
4491
{
4492
/* only to generate compile-time warnings or errors */
4493
(void)p;
4494
(void)((p->size) | 0); /* check that 'struct wl_array.size' is an integer */
4495
(void)((p->alloc) | 0); /* check that 'struct wl_array.alloc' is an integer */
4496
{ void * *tmp = &p->data; (void)tmp; }
4497
}
4498
struct _cffi_align_struct_wl_array { char x; struct wl_array y; };
4499
4500
_CFFI_UNUSED_FN
4501
static void _cffi_checkfld_struct_wl_interface(struct wl_interface *p)
4502
{
4503
/* only to generate compile-time warnings or errors */
4504
(void)p;
4505
{ char const * *tmp = &p->name; (void)tmp; }
4506
(void)((p->version) | 0); /* check that 'struct wl_interface.version' is an integer */
4507
(void)((p->method_count) | 0); /* check that 'struct wl_interface.method_count' is an integer */
4508
{ struct wl_message const * *tmp = &p->methods; (void)tmp; }
4509
(void)((p->event_count) | 0); /* check that 'struct wl_interface.event_count' is an integer */
4510
{ struct wl_message const * *tmp = &p->events; (void)tmp; }
4511
}
4512
struct _cffi_align_struct_wl_interface { char x; struct wl_interface y; };
4513
4514
_CFFI_UNUSED_FN
4515
static void _cffi_checkfld_struct_wl_list(struct wl_list *p)
4516
{
4517
/* only to generate compile-time warnings or errors */
4518
(void)p;
4519
{ struct wl_list * *tmp = &p->prev; (void)tmp; }
4520
{ struct wl_list * *tmp = &p->next; (void)tmp; }
4521
}
4522
struct _cffi_align_struct_wl_list { char x; struct wl_list y; };
4523
4524
_CFFI_UNUSED_FN
4525
static void _cffi_checkfld_struct_wl_listener(struct wl_listener *p)
4526
{
4527
/* only to generate compile-time warnings or errors */
4528
(void)p;
4529
{ struct wl_list *tmp = &p->link; (void)tmp; }
4530
{ void(* *tmp)(struct wl_listener *, void *) = &p->notify; (void)tmp; }
4531
}
4532
struct _cffi_align_struct_wl_listener { char x; struct wl_listener y; };
4533
4534
_CFFI_UNUSED_FN
4535
static void _cffi_checkfld_struct_wl_listener_container(struct wl_listener_container *p)
4536
{
4537
/* only to generate compile-time warnings or errors */
4538
(void)p;
4539
{ void * *tmp = &p->handle; (void)tmp; }
4540
{ struct wl_listener *tmp = &p->destroy_listener; (void)tmp; }
4541
}
4542
struct _cffi_align_struct_wl_listener_container { char x; struct wl_listener_container y; };
4543
4544
_CFFI_UNUSED_FN
4545
static void _cffi_checkfld_struct_wl_message(struct wl_message *p)
4546
{
4547
/* only to generate compile-time warnings or errors */
4548
(void)p;
4549
{ char const * *tmp = &p->name; (void)tmp; }
4550
{ char const * *tmp = &p->signature; (void)tmp; }
4551
{ struct wl_interface const * * *tmp = &p->types; (void)tmp; }
4552
}
4553
struct _cffi_align_struct_wl_message { char x; struct wl_message y; };
4554
4555
_CFFI_UNUSED_FN
4556
static void _cffi_checkfld_struct_wl_signal(struct wl_signal *p)
4557
{
4558
/* only to generate compile-time warnings or errors */
4559
(void)p;
4560
{ struct wl_list *tmp = &p->listener_list; (void)tmp; }
4561
}
4562
struct _cffi_align_struct_wl_signal { char x; struct wl_signal y; };
4563
4564
_CFFI_UNUSED_FN
4565
static void _cffi_checkfld_union_wl_argument(union wl_argument *p)
4566
{
4567
/* only to generate compile-time warnings or errors */
4568
(void)p;
4569
(void)((p->i) | 0); /* check that 'union wl_argument.i' is an integer */
4570
(void)((p->u) | 0); /* check that 'union wl_argument.u' is an integer */
4571
(void)((p->f) | 0); /* check that 'union wl_argument.f' is an integer */
4572
{ char const * *tmp = &p->s; (void)tmp; }
4573
{ struct wl_object * *tmp = &p->o; (void)tmp; }
4574
(void)((p->n) | 0); /* check that 'union wl_argument.n' is an integer */
4575
{ struct wl_array * *tmp = &p->a; (void)tmp; }
4576
(void)((p->h) | 0); /* check that 'union wl_argument.h' is an integer */
4577
}
4578
struct _cffi_align_union_wl_argument { char x; union wl_argument y; };
4579
4580
static const struct _cffi_global_s _cffi_globals[] = {
4581
{ "WAYLAND_VERSION_MAJOR", (void *)_cffi_const_WAYLAND_VERSION_MAJOR, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
4582
{ "WAYLAND_VERSION_MICRO", (void *)_cffi_const_WAYLAND_VERSION_MICRO, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
4583
{ "WAYLAND_VERSION_MINOR", (void *)_cffi_const_WAYLAND_VERSION_MINOR, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
4584
{ "WL_EVENT_ERROR", (void *)_cffi_const_WL_EVENT_ERROR, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
4585
{ "WL_EVENT_HANGUP", (void *)_cffi_const_WL_EVENT_HANGUP, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
4586
{ "WL_EVENT_READABLE", (void *)_cffi_const_WL_EVENT_READABLE, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
4587
{ "WL_EVENT_WRITABLE", (void *)_cffi_const_WL_EVENT_WRITABLE, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
4588
{ "dispatcher_func", (void *)&_cffi_externpy__dispatcher_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 52), (void *)dispatcher_func },
4589
{ "event_loop_fd_func", (void *)&_cffi_externpy__event_loop_fd_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 113), (void *)event_loop_fd_func },
4590
{ "event_loop_idle_func", (void *)&_cffi_externpy__event_loop_idle_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 118), (void *)event_loop_idle_func },
4591
{ "event_loop_signal_func", (void *)&_cffi_externpy__event_loop_signal_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 106), (void *)event_loop_signal_func },
4592
{ "event_loop_timer_func", (void *)&_cffi_externpy__event_loop_timer_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 100), (void *)event_loop_timer_func },
4593
{ "global_bind_func", (void *)&_cffi_externpy__global_bind_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 126), (void *)global_bind_func },
4594
{ "notify_func", (void *)&_cffi_externpy__notify_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 281), (void *)notify_func },
4595
{ "os_create_anonymous_file", (void *)_cffi_f_os_create_anonymous_file, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 6), (void *)_cffi_d_os_create_anonymous_file },
4596
{ "resource_destroy_func", (void *)&_cffi_externpy__resource_destroy_func, _CFFI_OP(_CFFI_OP_EXTERN_PYTHON, 229), (void *)resource_destroy_func },
4597
{ "wl_client_add_destroy_listener", (void *)_cffi_f_wl_client_add_destroy_listener, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 173), (void *)_cffi_d_wl_client_add_destroy_listener },
4598
{ "wl_client_create", (void *)_cffi_f_wl_client_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 75), (void *)_cffi_d_wl_client_create },
4599
{ "wl_client_destroy", (void *)_cffi_f_wl_client_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 164), (void *)_cffi_d_wl_client_destroy },
4600
{ "wl_client_flush", (void *)_cffi_f_wl_client_flush, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 164), (void *)_cffi_d_wl_client_flush },
4601
{ "wl_client_get_credentials", (void *)_cffi_f_wl_client_get_credentials, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 167), (void *)_cffi_d_wl_client_get_credentials },
4602
{ "wl_client_get_object", (void *)_cffi_f_wl_client_get_object, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 144), (void *)_cffi_d_wl_client_get_object },
4603
{ "wl_display_add_shm_format", (void *)_cffi_f_wl_display_add_shm_format, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 148), (void *)_cffi_d_wl_display_add_shm_format },
4604
{ "wl_display_add_socket", (void *)_cffi_f_wl_display_add_socket, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 21), (void *)_cffi_d_wl_display_add_socket },
4605
{ "wl_display_add_socket_auto", (void *)_cffi_f_wl_display_add_socket_auto, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 0), (void *)_cffi_d_wl_display_add_socket_auto },
4606
{ "wl_display_connect", (void *)_cffi_f_wl_display_connect, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 82), (void *)_cffi_d_wl_display_connect },
4607
{ "wl_display_connect_to_fd", (void *)_cffi_f_wl_display_connect_to_fd, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 85), (void *)_cffi_d_wl_display_connect_to_fd },
4608
{ "wl_display_create", (void *)_cffi_f_wl_display_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 88), (void *)_cffi_d_wl_display_create },
4609
{ "wl_display_create_queue", (void *)_cffi_f_wl_display_create_queue, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 95), (void *)_cffi_d_wl_display_create_queue },
4610
{ "wl_display_destroy", (void *)_cffi_f_wl_display_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_destroy },
4611
{ "wl_display_destroy_clients", (void *)_cffi_f_wl_display_destroy_clients, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_destroy_clients },
4612
{ "wl_display_disconnect", (void *)_cffi_f_wl_display_disconnect, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_disconnect },
4613
{ "wl_display_dispatch", (void *)_cffi_f_wl_display_dispatch, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_dispatch },
4614
{ "wl_display_dispatch_pending", (void *)_cffi_f_wl_display_dispatch_pending, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_dispatch_pending },
4615
{ "wl_display_dispatch_queue", (void *)_cffi_f_wl_display_dispatch_queue, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 25), (void *)_cffi_d_wl_display_dispatch_queue },
4616
{ "wl_display_dispatch_queue_pending", (void *)_cffi_f_wl_display_dispatch_queue_pending, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 25), (void *)_cffi_d_wl_display_dispatch_queue_pending },
4617
{ "wl_display_flush", (void *)_cffi_f_wl_display_flush, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_flush },
4618
{ "wl_display_flush_clients", (void *)_cffi_f_wl_display_flush_clients, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_flush_clients },
4619
{ "wl_display_get_error", (void *)_cffi_f_wl_display_get_error, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_get_error },
4620
{ "wl_display_get_event_loop", (void *)_cffi_f_wl_display_get_event_loop, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 90), (void *)_cffi_d_wl_display_get_event_loop },
4621
{ "wl_display_get_fd", (void *)_cffi_f_wl_display_get_fd, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_get_fd },
4622
{ "wl_display_get_serial", (void *)_cffi_f_wl_display_get_serial, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 152), (void *)_cffi_d_wl_display_get_serial },
4623
{ "wl_display_init_shm", (void *)_cffi_f_wl_display_init_shm, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_init_shm },
4624
{ "wl_display_next_serial", (void *)_cffi_f_wl_display_next_serial, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 152), (void *)_cffi_d_wl_display_next_serial },
4625
{ "wl_display_prepare_read", (void *)_cffi_f_wl_display_prepare_read, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_prepare_read },
4626
{ "wl_display_prepare_read_queue", (void *)_cffi_f_wl_display_prepare_read_queue, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 25), (void *)_cffi_d_wl_display_prepare_read_queue },
4627
{ "wl_display_read_events", (void *)_cffi_f_wl_display_read_events, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_read_events },
4628
{ "wl_display_roundtrip", (void *)_cffi_f_wl_display_roundtrip, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 18), (void *)_cffi_d_wl_display_roundtrip },
4629
{ "wl_display_roundtrip_queue", (void *)_cffi_f_wl_display_roundtrip_queue, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 25), (void *)_cffi_d_wl_display_roundtrip_queue },
4630
{ "wl_display_run", (void *)_cffi_f_wl_display_run, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_run },
4631
{ "wl_display_terminate", (void *)_cffi_f_wl_display_terminate, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 183), (void *)_cffi_d_wl_display_terminate },
4632
{ "wl_event_loop_add_destroy_listener", (void *)_cffi_f_wl_event_loop_add_destroy_listener, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 189), (void *)_cffi_d_wl_event_loop_add_destroy_listener },
4633
{ "wl_event_loop_add_fd", (void *)_cffi_f_wl_event_loop_add_fd, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 109), (void *)_cffi_d_wl_event_loop_add_fd },
4634
{ "wl_event_loop_add_idle", (void *)_cffi_f_wl_event_loop_add_idle, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 116), (void *)_cffi_d_wl_event_loop_add_idle },
4635
{ "wl_event_loop_add_signal", (void *)_cffi_f_wl_event_loop_add_signal, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 103), (void *)_cffi_d_wl_event_loop_add_signal },
4636
{ "wl_event_loop_add_timer", (void *)_cffi_f_wl_event_loop_add_timer, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 98), (void *)_cffi_d_wl_event_loop_add_timer },
4637
{ "wl_event_loop_create", (void *)_cffi_f_wl_event_loop_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 93), (void *)_cffi_d_wl_event_loop_create },
4638
{ "wl_event_loop_destroy", (void *)_cffi_f_wl_event_loop_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 186), (void *)_cffi_d_wl_event_loop_destroy },
4639
{ "wl_event_loop_dispatch", (void *)_cffi_f_wl_event_loop_dispatch, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 32), (void *)_cffi_d_wl_event_loop_dispatch },
4640
{ "wl_event_loop_dispatch_idle", (void *)_cffi_f_wl_event_loop_dispatch_idle, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 186), (void *)_cffi_d_wl_event_loop_dispatch_idle },
4641
{ "wl_event_loop_get_fd", (void *)_cffi_f_wl_event_loop_get_fd, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 29), (void *)_cffi_d_wl_event_loop_get_fd },
4642
{ "wl_event_queue_destroy", (void *)_cffi_f_wl_event_queue_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 193), (void *)_cffi_d_wl_event_queue_destroy },
4643
{ "wl_event_source_check", (void *)_cffi_f_wl_event_source_check, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 196), (void *)_cffi_d_wl_event_source_check },
4644
{ "wl_event_source_fd_update", (void *)_cffi_f_wl_event_source_fd_update, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 43), (void *)_cffi_d_wl_event_source_fd_update },
4645
{ "wl_event_source_remove", (void *)_cffi_f_wl_event_source_remove, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 36), (void *)_cffi_d_wl_event_source_remove },
4646
{ "wl_event_source_timer_update", (void *)_cffi_f_wl_event_source_timer_update, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 39), (void *)_cffi_d_wl_event_source_timer_update },
4647
{ "wl_fixed_from_double", (void *)_cffi_f_wl_fixed_from_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 69), (void *)_cffi_d_wl_fixed_from_double },
4648
{ "wl_fixed_from_int", (void *)_cffi_f_wl_fixed_from_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 72), (void *)_cffi_d_wl_fixed_from_int },
4649
{ "wl_fixed_to_double", (void *)_cffi_f_wl_fixed_to_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 3), (void *)_cffi_d_wl_fixed_to_double },
4650
{ "wl_global_create", (void *)_cffi_f_wl_global_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 121), (void *)_cffi_d_wl_global_create },
4651
{ "wl_global_destroy", (void *)_cffi_f_wl_global_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 199), (void *)_cffi_d_wl_global_destroy },
4652
{ "wl_list_empty", (void *)_cffi_f_wl_list_empty, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 47), (void *)_cffi_d_wl_list_empty },
4653
{ "wl_list_remove", (void *)_cffi_f_wl_list_remove, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 202), (void *)_cffi_d_wl_list_remove },
4654
{ "wl_proxy_add_dispatcher", (void *)_cffi_f_wl_proxy_add_dispatcher, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 50), (void *)_cffi_d_wl_proxy_add_dispatcher },
4655
{ "wl_proxy_create", (void *)_cffi_f_wl_proxy_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 128), (void *)_cffi_d_wl_proxy_create },
4656
{ "wl_proxy_destroy", (void *)_cffi_f_wl_proxy_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 209), (void *)_cffi_d_wl_proxy_destroy },
4657
{ "wl_proxy_get_user_data", (void *)_cffi_f_wl_proxy_get_user_data, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 158), (void *)_cffi_d_wl_proxy_get_user_data },
4658
{ "wl_proxy_marshal_array", (void *)_cffi_f_wl_proxy_marshal_array, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 212), (void *)_cffi_d_wl_proxy_marshal_array },
4659
{ "wl_proxy_marshal_array_constructor", (void *)_cffi_f_wl_proxy_marshal_array_constructor, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 132), (void *)_cffi_d_wl_proxy_marshal_array_constructor },
4660
{ "wl_proxy_set_user_data", (void *)_cffi_f_wl_proxy_set_user_data, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 217), (void *)_cffi_d_wl_proxy_set_user_data },
4661
{ "wl_resource_add_destroy_listener", (void *)_cffi_f_wl_resource_add_destroy_listener, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 231), (void *)_cffi_d_wl_resource_add_destroy_listener },
4662
{ "wl_resource_create", (void *)_cffi_f_wl_resource_create, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 138), (void *)_cffi_d_wl_resource_create },
4663
{ "wl_resource_destroy", (void *)_cffi_f_wl_resource_destroy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 221), (void *)_cffi_d_wl_resource_destroy },
4664
{ "wl_resource_get_client", (void *)_cffi_f_wl_resource_get_client, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 79), (void *)_cffi_d_wl_resource_get_client },
4665
{ "wl_resource_get_id", (void *)_cffi_f_wl_resource_get_id, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 155), (void *)_cffi_d_wl_resource_get_id },
4666
{ "wl_resource_get_user_data", (void *)_cffi_f_wl_resource_get_user_data, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 161), (void *)_cffi_d_wl_resource_get_user_data },
4667
{ "wl_resource_get_version", (void *)_cffi_f_wl_resource_get_version, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_wl_resource_get_version },
4668
{ "wl_resource_post_error", (void *)_cffi_const_wl_resource_post_error, _CFFI_OP(_CFFI_OP_CONSTANT, 282), (void *)0 },
4669
{ "wl_resource_post_event_array", (void *)_cffi_f_wl_resource_post_event_array, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 240), (void *)_cffi_d_wl_resource_post_event_array },
4670
{ "wl_resource_set_dispatcher", (void *)_cffi_f_wl_resource_set_dispatcher, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 224), (void *)_cffi_d_wl_resource_set_dispatcher },
4671
{ "wl_signal_add", (void *)_cffi_f_wl_signal_add, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 245), (void *)_cffi_d_wl_signal_add },
4672
{ "wl_signal_emit", (void *)_cffi_f_wl_signal_emit, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 249), (void *)_cffi_d_wl_signal_emit },
4673
};
4674
4675
static const struct _cffi_field_s _cffi_fields[] = {
4676
{ "size", offsetof(struct wl_array, size),
4677
sizeof(((struct wl_array *)0)->size),
4678
_CFFI_OP(_CFFI_OP_NOOP, 258) },
4679
{ "alloc", offsetof(struct wl_array, alloc),
4680
sizeof(((struct wl_array *)0)->alloc),
4681
_CFFI_OP(_CFFI_OP_NOOP, 258) },
4682
{ "data", offsetof(struct wl_array, data),
4683
sizeof(((struct wl_array *)0)->data),
4684
_CFFI_OP(_CFFI_OP_NOOP, 12) },
4685
{ "name", offsetof(struct wl_interface, name),
4686
sizeof(((struct wl_interface *)0)->name),
4687
_CFFI_OP(_CFFI_OP_NOOP, 23) },
4688
{ "version", offsetof(struct wl_interface, version),
4689
sizeof(((struct wl_interface *)0)->version),
4690
_CFFI_OP(_CFFI_OP_NOOP, 7) },
4691
{ "method_count", offsetof(struct wl_interface, method_count),
4692
sizeof(((struct wl_interface *)0)->method_count),
4693
_CFFI_OP(_CFFI_OP_NOOP, 7) },
4694
{ "methods", offsetof(struct wl_interface, methods),
4695
sizeof(((struct wl_interface *)0)->methods),
4696
_CFFI_OP(_CFFI_OP_NOOP, 66) },
4697
{ "event_count", offsetof(struct wl_interface, event_count),
4698
sizeof(((struct wl_interface *)0)->event_count),
4699
_CFFI_OP(_CFFI_OP_NOOP, 7) },
4700
{ "events", offsetof(struct wl_interface, events),
4701
sizeof(((struct wl_interface *)0)->events),
4702
_CFFI_OP(_CFFI_OP_NOOP, 66) },
4703
{ "prev", offsetof(struct wl_list, prev),
4704
sizeof(((struct wl_list *)0)->prev),
4705
_CFFI_OP(_CFFI_OP_NOOP, 203) },
4706
{ "next", offsetof(struct wl_list, next),
4707
sizeof(((struct wl_list *)0)->next),
4708
_CFFI_OP(_CFFI_OP_NOOP, 203) },
4709
{ "link", offsetof(struct wl_listener, link),
4710
sizeof(((struct wl_listener *)0)->link),
4711
_CFFI_OP(_CFFI_OP_NOOP, 269) },
4712
{ "notify", offsetof(struct wl_listener, notify),
4713
sizeof(((struct wl_listener *)0)->notify),
4714
_CFFI_OP(_CFFI_OP_NOOP, 281) },
4715
{ "handle", offsetof(struct wl_listener_container, handle),
4716
sizeof(((struct wl_listener_container *)0)->handle),
4717
_CFFI_OP(_CFFI_OP_NOOP, 12) },
4718
{ "destroy_listener", offsetof(struct wl_listener_container, destroy_listener),
4719
sizeof(((struct wl_listener_container *)0)->destroy_listener),
4720
_CFFI_OP(_CFFI_OP_NOOP, 270) },
4721
{ "name", offsetof(struct wl_message, name),
4722
sizeof(((struct wl_message *)0)->name),
4723
_CFFI_OP(_CFFI_OP_NOOP, 23) },
4724
{ "signature", offsetof(struct wl_message, signature),
4725
sizeof(((struct wl_message *)0)->signature),
4726
_CFFI_OP(_CFFI_OP_NOOP, 23) },
4727
{ "types", offsetof(struct wl_message, types),
4728
sizeof(((struct wl_message *)0)->types),
4729
_CFFI_OP(_CFFI_OP_NOOP, 267) },
4730
{ "listener_list", offsetof(struct wl_signal, listener_list),
4731
sizeof(((struct wl_signal *)0)->listener_list),
4732
_CFFI_OP(_CFFI_OP_NOOP, 269) },
4733
{ "i", offsetof(union wl_argument, i),
4734
sizeof(((union wl_argument *)0)->i),
4735
_CFFI_OP(_CFFI_OP_NOOP, 4) },
4736
{ "u", offsetof(union wl_argument, u),
4737
sizeof(((union wl_argument *)0)->u),
4738
_CFFI_OP(_CFFI_OP_NOOP, 11) },
4739
{ "f", offsetof(union wl_argument, f),
4740
sizeof(((union wl_argument *)0)->f),
4741
_CFFI_OP(_CFFI_OP_NOOP, 4) },
4742
{ "s", offsetof(union wl_argument, s),
4743
sizeof(((union wl_argument *)0)->s),
4744
_CFFI_OP(_CFFI_OP_NOOP, 23) },
4745
{ "o", offsetof(union wl_argument, o),
4746
sizeof(((union wl_argument *)0)->o),
4747
_CFFI_OP(_CFFI_OP_NOOP, 273) },
4748
{ "n", offsetof(union wl_argument, n),
4749
sizeof(((union wl_argument *)0)->n),
4750
_CFFI_OP(_CFFI_OP_NOOP, 11) },
4751
{ "a", offsetof(union wl_argument, a),
4752
sizeof(((union wl_argument *)0)->a),
4753
_CFFI_OP(_CFFI_OP_NOOP, 259) },
4754
{ "h", offsetof(union wl_argument, h),
4755
sizeof(((union wl_argument *)0)->h),
4756
_CFFI_OP(_CFFI_OP_NOOP, 4) },
4757
};
4758
4759
static const struct _cffi_struct_union_s _cffi_struct_unions[] = {
4760
{ "wl_argument", 279, _CFFI_F_UNION|_CFFI_F_CHECK_FIELDS,
4761
sizeof(union wl_argument), offsetof(struct _cffi_align_union_wl_argument, y), 19, 8 },
4762
{ "wl_array", 260, _CFFI_F_CHECK_FIELDS,
4763
sizeof(struct wl_array), offsetof(struct _cffi_align_struct_wl_array, y), 0, 3 },
4764
{ "wl_client", 261, _CFFI_F_OPAQUE,
4765
(size_t)-1, -1, -1, 0 /* opaque */ },
4766
{ "wl_display", 262, _CFFI_F_OPAQUE,
4767
(size_t)-1, -1, -1, 0 /* opaque */ },
4768
{ "wl_event_loop", 263, _CFFI_F_OPAQUE,
4769
(size_t)-1, -1, -1, 0 /* opaque */ },
4770
{ "wl_event_queue", 264, _CFFI_F_OPAQUE,
4771
(size_t)-1, -1, -1, 0 /* opaque */ },
4772
{ "wl_event_source", 265, _CFFI_F_OPAQUE,
4773
(size_t)-1, -1, -1, 0 /* opaque */ },
4774
{ "wl_global", 266, _CFFI_F_OPAQUE,
4775
(size_t)-1, -1, -1, 0 /* opaque */ },
4776
{ "wl_interface", 268, _CFFI_F_CHECK_FIELDS,
4777
sizeof(struct wl_interface), offsetof(struct _cffi_align_struct_wl_interface, y), 3, 6 },
4778
{ "wl_list", 269, _CFFI_F_CHECK_FIELDS,
4779
sizeof(struct wl_list), offsetof(struct _cffi_align_struct_wl_list, y), 9, 2 },
4780
{ "wl_listener", 270, _CFFI_F_CHECK_FIELDS,
4781
sizeof(struct wl_listener), offsetof(struct _cffi_align_struct_wl_listener, y), 11, 2 },
4782
{ "wl_listener_container", 271, _CFFI_F_CHECK_FIELDS,
4783
sizeof(struct wl_listener_container), offsetof(struct _cffi_align_struct_wl_listener_container, y), 13, 2 },
4784
{ "wl_message", 272, _CFFI_F_CHECK_FIELDS,
4785
sizeof(struct wl_message), offsetof(struct _cffi_align_struct_wl_message, y), 15, 3 },
4786
{ "wl_object", 274, _CFFI_F_OPAQUE,
4787
(size_t)-1, -1, -1, 0 /* opaque */ },
4788
{ "wl_proxy", 275, _CFFI_F_OPAQUE,
4789
(size_t)-1, -1, -1, 0 /* opaque */ },
4790
{ "wl_resource", 276, _CFFI_F_OPAQUE,
4791
(size_t)-1, -1, -1, 0 /* opaque */ },
4792
{ "wl_signal", 277, _CFFI_F_CHECK_FIELDS,
4793
sizeof(struct wl_signal), offsetof(struct _cffi_align_struct_wl_signal, y), 18, 1 },
4794
};
4795
4796
static const struct _cffi_enum_s _cffi_enums[] = {
4797
{ "$1", 257, _cffi_prim_int(4, 0),
4798
"WL_EVENT_READABLE,WL_EVENT_WRITABLE,WL_EVENT_HANGUP,WL_EVENT_ERROR" },
4799
};
4800
4801
static const struct _cffi_typename_s _cffi_typenames[] = {
4802
{ "gid_t", 280 },
4803
{ "pid_t", 7 },
4804
{ "uid_t", 280 },
4805
{ "wl_dispatcher_func_t", 52 },
4806
{ "wl_event_loop_fd_func_t", 113 },
4807
{ "wl_event_loop_idle_func_t", 118 },
4808
{ "wl_event_loop_signal_func_t", 106 },
4809
{ "wl_event_loop_timer_func_t", 100 },
4810
{ "wl_fixed_t", 4 },
4811
{ "wl_global_bind_func_t", 126 },
4812
{ "wl_notify_func_t", 281 },
4813
{ "wl_resource_destroy_func_t", 229 },
4814
};
4815
4816
static const struct _cffi_type_context_s _cffi_type_context = {
4817
_cffi_types,
4818
_cffi_globals,
4819
_cffi_fields,
4820
_cffi_struct_unions,
4821
_cffi_enums,
4822
_cffi_typenames,
4823
92, /* num_globals */
4824
17, /* num_struct_unions */
4825
1, /* num_enums */
4826
12, /* num_typenames */
4827
NULL, /* no includes */
4828
284, /* num_types */
4829
1, /* flags */
4830
};
4831
4832
#ifdef __GNUC__
4833
# pragma GCC visibility push(default) /* for -fvisibility= */
4834
#endif
4835
4836
#ifdef PYPY_VERSION
4837
PyMODINIT_FUNC
4838
_cffi_pypyinit__ffi(const void *p[])
4839
{
4840
if (((intptr_t)p[0]) >= 0x0A03) {
4841
_cffi_call_python_org = (void(*)(struct _cffi_externpy_s *, char *))p[1];
4842
}
4843
p[0] = (const void *)0x2601;
4844
p[1] = &_cffi_type_context;
4845
#if PY_MAJOR_VERSION >= 3
4846
return NULL;
4847
#endif
4848
}
4849
# ifdef _MSC_VER
4850
PyMODINIT_FUNC
4851
# if PY_MAJOR_VERSION >= 3
4852
PyInit__ffi(void) { return NULL; }
4853
# else
4854
init_ffi(void) { }
4855
# endif
4856
# endif
4857
#elif PY_MAJOR_VERSION >= 3
4858
PyMODINIT_FUNC
4859
PyInit__ffi(void)
4860
{
4861
return _cffi_init("pywayland._ffi", 0x2601, &_cffi_type_context);
4862
}
4863
#else
4864
PyMODINIT_FUNC
4865
init_ffi(void)
4866
{
4867
_cffi_init("pywayland._ffi", 0x2601, &_cffi_type_context);
4868
}
4869
#endif
4870
4871
#ifdef __GNUC__
4872
# pragma GCC visibility pop
4873
#endif
4874