pydae 0.56.4__py3-none-any.whl → 0.57__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1280 @@
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
+ void f_ini_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
574
+
575
+ data[0] = -x[0] + u[4];
576
+ data[1] = -p[8]*x[1] - y[4] + 1;
577
+
578
+ }
579
+
580
+ void g_ini_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
581
+
582
+ data[0] = y[0] - u[4];
583
+ data[1] = y[1] - u[5];
584
+ data[2] = -u[2]/p[0] + y[0]*y[2]*(p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3])) + pow(y[2], 2)*p[1];
585
+ data[3] = -u[3]/p[0] + y[0]*y[2]*(p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3])) + pow(y[2], 2)*(-p[2] - 1.0/2.0*p[3]);
586
+ data[4] = 1.0 - y[4];
587
+ data[5] = pow(y[0], 2)*p[1] - y[0]*y[2]*(p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3])) + y[5];
588
+ data[6] = -pow(y[0], 2)*p[2] - 1.0/2.0*pow(y[0], 2)*p[3] - y[0]*y[2]*(-p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3])) + y[6];
589
+ data[7] = -y[0]*y[2]*(-p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3])) + pow(y[2], 2)*p[1] + y[7];
590
+ data[8] = -y[0]*y[2]*(-p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3])) - pow(y[2], 2)*p[2] - 1.0/2.0*pow(y[2], 2)*p[3] + y[8];
591
+ data[9] = p[7]*x[1] + p[6]*(1 - y[4]) - y[9];
592
+
593
+ }
594
+
595
+ void h_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
596
+
597
+ data[0] = p[0]*y[5];
598
+ data[1] = p[0]*y[6];
599
+ data[2] = p[0]*y[7];
600
+ data[3] = p[0]*y[8];
601
+ data[4] = 1.4433756729740647e-6*p[0]*sqrt(pow(y[5], 2) + pow(y[6], 2))/y[0];
602
+ data[5] = 1.4433756729740647e-6*p[0]*sqrt(pow(y[7], 2) + pow(y[8], 2))/y[2];
603
+ data[6] = y[0];
604
+ data[7] = y[2];
605
+ data[8] = x[0];
606
+
607
+ }
608
+
609
+ void de_jac_ini_up_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
610
+
611
+ data[13] = -p[8];
612
+ data[133] = p[7];
613
+ data[138] = -p[6];
614
+
615
+ }
616
+
617
+ void de_jac_ini_xy_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
618
+
619
+ data[50] = y[2]*(p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3]));
620
+ data[51] = y[0]*y[2]*(p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
621
+ data[52] = y[0]*(p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3])) + 2*y[2]*p[1];
622
+ data[53] = y[0]*y[2]*(-p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3]));
623
+ data[62] = y[2]*(p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
624
+ data[63] = y[0]*y[2]*(-p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
625
+ data[64] = y[0]*(p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3])) + 2*y[2]*(-p[2] - 1.0/2.0*p[3]);
626
+ data[65] = y[0]*y[2]*(p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3]));
627
+ data[86] = 2*y[0]*p[1] - y[2]*(p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
628
+ data[87] = -y[0]*y[2]*(p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3]));
629
+ data[88] = -y[0]*(p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
630
+ data[89] = -y[0]*y[2]*(-p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
631
+ data[98] = -2*y[0]*p[2] - y[0]*p[3] - y[2]*(-p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
632
+ data[99] = -y[0]*y[2]*(p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
633
+ data[100] = -y[0]*(-p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
634
+ data[101] = -y[0]*y[2]*(-p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3]));
635
+ data[110] = -y[2]*(-p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
636
+ data[111] = -y[0]*y[2]*(-p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3]));
637
+ data[112] = -y[0]*(-p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3])) + 2*y[2]*p[1];
638
+ data[113] = -y[0]*y[2]*(p[2]*cos(y[1] - y[3]) + p[1]*sin(y[1] - y[3]));
639
+ data[122] = -y[2]*(-p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3]));
640
+ data[123] = -y[0]*y[2]*(p[2]*sin(y[1] - y[3]) - p[1]*cos(y[1] - y[3]));
641
+ data[124] = -y[0]*(-p[2]*cos(y[1] - y[3]) - p[1]*sin(y[1] - y[3])) - 2*y[2]*p[2] - y[2]*p[3];
642
+ data[125] = -y[0]*y[2]*(-p[2]*sin(y[1] - y[3]) + p[1]*cos(y[1] - y[3]));
643
+
644
+ }
645
+
646
+ void de_jac_ini_num_eval(double *data,double *x,double *y,double *u,double *p,double Dt){
647
+
648
+ data[0] = -1;
649
+ data[18] = -1;
650
+ data[26] = 1;
651
+ data[39] = 1;
652
+ data[78] = -1;
653
+ data[91] = 1;
654
+ data[104] = 1;
655
+ data[117] = 1;
656
+ data[130] = 1;
657
+ data[143] = -1;
658
+
659
+ }
660
+
661
+
662
+
663
+ /************************************************************/
664
+
665
+ static void *_cffi_types[] = {
666
+ /* 0 */ _CFFI_OP(_CFFI_OP_FUNCTION, 8), // void()(double *, double *, double *, double *, double *, double)
667
+ /* 1 */ _CFFI_OP(_CFFI_OP_POINTER, 6), // double *
668
+ /* 2 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
669
+ /* 3 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
670
+ /* 4 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
671
+ /* 5 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
672
+ /* 6 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 14), // double
673
+ /* 7 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
674
+ /* 8 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 0), // void
675
+ };
676
+
677
+ static void _cffi_d_de_jac_ini_num_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
678
+ {
679
+ de_jac_ini_num_eval(x0, x1, x2, x3, x4, x5);
680
+ }
681
+ #ifndef PYPY_VERSION
682
+ static PyObject *
683
+ _cffi_f_de_jac_ini_num_eval(PyObject *self, PyObject *args)
684
+ {
685
+ double * x0;
686
+ double * x1;
687
+ double * x2;
688
+ double * x3;
689
+ double * x4;
690
+ double x5;
691
+ Py_ssize_t datasize;
692
+ struct _cffi_freeme_s *large_args_free = NULL;
693
+ PyObject *arg0;
694
+ PyObject *arg1;
695
+ PyObject *arg2;
696
+ PyObject *arg3;
697
+ PyObject *arg4;
698
+ PyObject *arg5;
699
+
700
+ if (!PyArg_UnpackTuple(args, "de_jac_ini_num_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
701
+ return NULL;
702
+
703
+ datasize = _cffi_prepare_pointer_call_argument(
704
+ _cffi_type(1), arg0, (char **)&x0);
705
+ if (datasize != 0) {
706
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
707
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
708
+ datasize, &large_args_free) < 0)
709
+ return NULL;
710
+ }
711
+
712
+ datasize = _cffi_prepare_pointer_call_argument(
713
+ _cffi_type(1), arg1, (char **)&x1);
714
+ if (datasize != 0) {
715
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
716
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
717
+ datasize, &large_args_free) < 0)
718
+ return NULL;
719
+ }
720
+
721
+ datasize = _cffi_prepare_pointer_call_argument(
722
+ _cffi_type(1), arg2, (char **)&x2);
723
+ if (datasize != 0) {
724
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
725
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
726
+ datasize, &large_args_free) < 0)
727
+ return NULL;
728
+ }
729
+
730
+ datasize = _cffi_prepare_pointer_call_argument(
731
+ _cffi_type(1), arg3, (char **)&x3);
732
+ if (datasize != 0) {
733
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
734
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
735
+ datasize, &large_args_free) < 0)
736
+ return NULL;
737
+ }
738
+
739
+ datasize = _cffi_prepare_pointer_call_argument(
740
+ _cffi_type(1), arg4, (char **)&x4);
741
+ if (datasize != 0) {
742
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
743
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
744
+ datasize, &large_args_free) < 0)
745
+ return NULL;
746
+ }
747
+
748
+ x5 = (double)_cffi_to_c_double(arg5);
749
+ if (x5 == (double)-1 && PyErr_Occurred())
750
+ return NULL;
751
+
752
+ Py_BEGIN_ALLOW_THREADS
753
+ _cffi_restore_errno();
754
+ { de_jac_ini_num_eval(x0, x1, x2, x3, x4, x5); }
755
+ _cffi_save_errno();
756
+ Py_END_ALLOW_THREADS
757
+
758
+ (void)self; /* unused */
759
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
760
+ Py_INCREF(Py_None);
761
+ return Py_None;
762
+ }
763
+ #else
764
+ # define _cffi_f_de_jac_ini_num_eval _cffi_d_de_jac_ini_num_eval
765
+ #endif
766
+
767
+ static void _cffi_d_de_jac_ini_up_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
768
+ {
769
+ de_jac_ini_up_eval(x0, x1, x2, x3, x4, x5);
770
+ }
771
+ #ifndef PYPY_VERSION
772
+ static PyObject *
773
+ _cffi_f_de_jac_ini_up_eval(PyObject *self, PyObject *args)
774
+ {
775
+ double * x0;
776
+ double * x1;
777
+ double * x2;
778
+ double * x3;
779
+ double * x4;
780
+ double x5;
781
+ Py_ssize_t datasize;
782
+ struct _cffi_freeme_s *large_args_free = NULL;
783
+ PyObject *arg0;
784
+ PyObject *arg1;
785
+ PyObject *arg2;
786
+ PyObject *arg3;
787
+ PyObject *arg4;
788
+ PyObject *arg5;
789
+
790
+ if (!PyArg_UnpackTuple(args, "de_jac_ini_up_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
791
+ return NULL;
792
+
793
+ datasize = _cffi_prepare_pointer_call_argument(
794
+ _cffi_type(1), arg0, (char **)&x0);
795
+ if (datasize != 0) {
796
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
797
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
798
+ datasize, &large_args_free) < 0)
799
+ return NULL;
800
+ }
801
+
802
+ datasize = _cffi_prepare_pointer_call_argument(
803
+ _cffi_type(1), arg1, (char **)&x1);
804
+ if (datasize != 0) {
805
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
806
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
807
+ datasize, &large_args_free) < 0)
808
+ return NULL;
809
+ }
810
+
811
+ datasize = _cffi_prepare_pointer_call_argument(
812
+ _cffi_type(1), arg2, (char **)&x2);
813
+ if (datasize != 0) {
814
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
815
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
816
+ datasize, &large_args_free) < 0)
817
+ return NULL;
818
+ }
819
+
820
+ datasize = _cffi_prepare_pointer_call_argument(
821
+ _cffi_type(1), arg3, (char **)&x3);
822
+ if (datasize != 0) {
823
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
824
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
825
+ datasize, &large_args_free) < 0)
826
+ return NULL;
827
+ }
828
+
829
+ datasize = _cffi_prepare_pointer_call_argument(
830
+ _cffi_type(1), arg4, (char **)&x4);
831
+ if (datasize != 0) {
832
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
833
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
834
+ datasize, &large_args_free) < 0)
835
+ return NULL;
836
+ }
837
+
838
+ x5 = (double)_cffi_to_c_double(arg5);
839
+ if (x5 == (double)-1 && PyErr_Occurred())
840
+ return NULL;
841
+
842
+ Py_BEGIN_ALLOW_THREADS
843
+ _cffi_restore_errno();
844
+ { de_jac_ini_up_eval(x0, x1, x2, x3, x4, x5); }
845
+ _cffi_save_errno();
846
+ Py_END_ALLOW_THREADS
847
+
848
+ (void)self; /* unused */
849
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
850
+ Py_INCREF(Py_None);
851
+ return Py_None;
852
+ }
853
+ #else
854
+ # define _cffi_f_de_jac_ini_up_eval _cffi_d_de_jac_ini_up_eval
855
+ #endif
856
+
857
+ static void _cffi_d_de_jac_ini_xy_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
858
+ {
859
+ de_jac_ini_xy_eval(x0, x1, x2, x3, x4, x5);
860
+ }
861
+ #ifndef PYPY_VERSION
862
+ static PyObject *
863
+ _cffi_f_de_jac_ini_xy_eval(PyObject *self, PyObject *args)
864
+ {
865
+ double * x0;
866
+ double * x1;
867
+ double * x2;
868
+ double * x3;
869
+ double * x4;
870
+ double x5;
871
+ Py_ssize_t datasize;
872
+ struct _cffi_freeme_s *large_args_free = NULL;
873
+ PyObject *arg0;
874
+ PyObject *arg1;
875
+ PyObject *arg2;
876
+ PyObject *arg3;
877
+ PyObject *arg4;
878
+ PyObject *arg5;
879
+
880
+ if (!PyArg_UnpackTuple(args, "de_jac_ini_xy_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
881
+ return NULL;
882
+
883
+ datasize = _cffi_prepare_pointer_call_argument(
884
+ _cffi_type(1), arg0, (char **)&x0);
885
+ if (datasize != 0) {
886
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
887
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
888
+ datasize, &large_args_free) < 0)
889
+ return NULL;
890
+ }
891
+
892
+ datasize = _cffi_prepare_pointer_call_argument(
893
+ _cffi_type(1), arg1, (char **)&x1);
894
+ if (datasize != 0) {
895
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
896
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
897
+ datasize, &large_args_free) < 0)
898
+ return NULL;
899
+ }
900
+
901
+ datasize = _cffi_prepare_pointer_call_argument(
902
+ _cffi_type(1), arg2, (char **)&x2);
903
+ if (datasize != 0) {
904
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
905
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
906
+ datasize, &large_args_free) < 0)
907
+ return NULL;
908
+ }
909
+
910
+ datasize = _cffi_prepare_pointer_call_argument(
911
+ _cffi_type(1), arg3, (char **)&x3);
912
+ if (datasize != 0) {
913
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
914
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
915
+ datasize, &large_args_free) < 0)
916
+ return NULL;
917
+ }
918
+
919
+ datasize = _cffi_prepare_pointer_call_argument(
920
+ _cffi_type(1), arg4, (char **)&x4);
921
+ if (datasize != 0) {
922
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
923
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
924
+ datasize, &large_args_free) < 0)
925
+ return NULL;
926
+ }
927
+
928
+ x5 = (double)_cffi_to_c_double(arg5);
929
+ if (x5 == (double)-1 && PyErr_Occurred())
930
+ return NULL;
931
+
932
+ Py_BEGIN_ALLOW_THREADS
933
+ _cffi_restore_errno();
934
+ { de_jac_ini_xy_eval(x0, x1, x2, x3, x4, x5); }
935
+ _cffi_save_errno();
936
+ Py_END_ALLOW_THREADS
937
+
938
+ (void)self; /* unused */
939
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
940
+ Py_INCREF(Py_None);
941
+ return Py_None;
942
+ }
943
+ #else
944
+ # define _cffi_f_de_jac_ini_xy_eval _cffi_d_de_jac_ini_xy_eval
945
+ #endif
946
+
947
+ static void _cffi_d_f_ini_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
948
+ {
949
+ f_ini_eval(x0, x1, x2, x3, x4, x5);
950
+ }
951
+ #ifndef PYPY_VERSION
952
+ static PyObject *
953
+ _cffi_f_f_ini_eval(PyObject *self, PyObject *args)
954
+ {
955
+ double * x0;
956
+ double * x1;
957
+ double * x2;
958
+ double * x3;
959
+ double * x4;
960
+ double x5;
961
+ Py_ssize_t datasize;
962
+ struct _cffi_freeme_s *large_args_free = NULL;
963
+ PyObject *arg0;
964
+ PyObject *arg1;
965
+ PyObject *arg2;
966
+ PyObject *arg3;
967
+ PyObject *arg4;
968
+ PyObject *arg5;
969
+
970
+ if (!PyArg_UnpackTuple(args, "f_ini_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
971
+ return NULL;
972
+
973
+ datasize = _cffi_prepare_pointer_call_argument(
974
+ _cffi_type(1), arg0, (char **)&x0);
975
+ if (datasize != 0) {
976
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
977
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
978
+ datasize, &large_args_free) < 0)
979
+ return NULL;
980
+ }
981
+
982
+ datasize = _cffi_prepare_pointer_call_argument(
983
+ _cffi_type(1), arg1, (char **)&x1);
984
+ if (datasize != 0) {
985
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
986
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
987
+ datasize, &large_args_free) < 0)
988
+ return NULL;
989
+ }
990
+
991
+ datasize = _cffi_prepare_pointer_call_argument(
992
+ _cffi_type(1), arg2, (char **)&x2);
993
+ if (datasize != 0) {
994
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
995
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
996
+ datasize, &large_args_free) < 0)
997
+ return NULL;
998
+ }
999
+
1000
+ datasize = _cffi_prepare_pointer_call_argument(
1001
+ _cffi_type(1), arg3, (char **)&x3);
1002
+ if (datasize != 0) {
1003
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1004
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
1005
+ datasize, &large_args_free) < 0)
1006
+ return NULL;
1007
+ }
1008
+
1009
+ datasize = _cffi_prepare_pointer_call_argument(
1010
+ _cffi_type(1), arg4, (char **)&x4);
1011
+ if (datasize != 0) {
1012
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1013
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
1014
+ datasize, &large_args_free) < 0)
1015
+ return NULL;
1016
+ }
1017
+
1018
+ x5 = (double)_cffi_to_c_double(arg5);
1019
+ if (x5 == (double)-1 && PyErr_Occurred())
1020
+ return NULL;
1021
+
1022
+ Py_BEGIN_ALLOW_THREADS
1023
+ _cffi_restore_errno();
1024
+ { f_ini_eval(x0, x1, x2, x3, x4, x5); }
1025
+ _cffi_save_errno();
1026
+ Py_END_ALLOW_THREADS
1027
+
1028
+ (void)self; /* unused */
1029
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1030
+ Py_INCREF(Py_None);
1031
+ return Py_None;
1032
+ }
1033
+ #else
1034
+ # define _cffi_f_f_ini_eval _cffi_d_f_ini_eval
1035
+ #endif
1036
+
1037
+ static void _cffi_d_g_ini_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
1038
+ {
1039
+ g_ini_eval(x0, x1, x2, x3, x4, x5);
1040
+ }
1041
+ #ifndef PYPY_VERSION
1042
+ static PyObject *
1043
+ _cffi_f_g_ini_eval(PyObject *self, PyObject *args)
1044
+ {
1045
+ double * x0;
1046
+ double * x1;
1047
+ double * x2;
1048
+ double * x3;
1049
+ double * x4;
1050
+ double x5;
1051
+ Py_ssize_t datasize;
1052
+ struct _cffi_freeme_s *large_args_free = NULL;
1053
+ PyObject *arg0;
1054
+ PyObject *arg1;
1055
+ PyObject *arg2;
1056
+ PyObject *arg3;
1057
+ PyObject *arg4;
1058
+ PyObject *arg5;
1059
+
1060
+ if (!PyArg_UnpackTuple(args, "g_ini_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
1061
+ return NULL;
1062
+
1063
+ datasize = _cffi_prepare_pointer_call_argument(
1064
+ _cffi_type(1), arg0, (char **)&x0);
1065
+ if (datasize != 0) {
1066
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1067
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1068
+ datasize, &large_args_free) < 0)
1069
+ return NULL;
1070
+ }
1071
+
1072
+ datasize = _cffi_prepare_pointer_call_argument(
1073
+ _cffi_type(1), arg1, (char **)&x1);
1074
+ if (datasize != 0) {
1075
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1076
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
1077
+ datasize, &large_args_free) < 0)
1078
+ return NULL;
1079
+ }
1080
+
1081
+ datasize = _cffi_prepare_pointer_call_argument(
1082
+ _cffi_type(1), arg2, (char **)&x2);
1083
+ if (datasize != 0) {
1084
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1085
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
1086
+ datasize, &large_args_free) < 0)
1087
+ return NULL;
1088
+ }
1089
+
1090
+ datasize = _cffi_prepare_pointer_call_argument(
1091
+ _cffi_type(1), arg3, (char **)&x3);
1092
+ if (datasize != 0) {
1093
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1094
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
1095
+ datasize, &large_args_free) < 0)
1096
+ return NULL;
1097
+ }
1098
+
1099
+ datasize = _cffi_prepare_pointer_call_argument(
1100
+ _cffi_type(1), arg4, (char **)&x4);
1101
+ if (datasize != 0) {
1102
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1103
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
1104
+ datasize, &large_args_free) < 0)
1105
+ return NULL;
1106
+ }
1107
+
1108
+ x5 = (double)_cffi_to_c_double(arg5);
1109
+ if (x5 == (double)-1 && PyErr_Occurred())
1110
+ return NULL;
1111
+
1112
+ Py_BEGIN_ALLOW_THREADS
1113
+ _cffi_restore_errno();
1114
+ { g_ini_eval(x0, x1, x2, x3, x4, x5); }
1115
+ _cffi_save_errno();
1116
+ Py_END_ALLOW_THREADS
1117
+
1118
+ (void)self; /* unused */
1119
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1120
+ Py_INCREF(Py_None);
1121
+ return Py_None;
1122
+ }
1123
+ #else
1124
+ # define _cffi_f_g_ini_eval _cffi_d_g_ini_eval
1125
+ #endif
1126
+
1127
+ static void _cffi_d_h_eval(double * x0, double * x1, double * x2, double * x3, double * x4, double x5)
1128
+ {
1129
+ h_eval(x0, x1, x2, x3, x4, x5);
1130
+ }
1131
+ #ifndef PYPY_VERSION
1132
+ static PyObject *
1133
+ _cffi_f_h_eval(PyObject *self, PyObject *args)
1134
+ {
1135
+ double * x0;
1136
+ double * x1;
1137
+ double * x2;
1138
+ double * x3;
1139
+ double * x4;
1140
+ double x5;
1141
+ Py_ssize_t datasize;
1142
+ struct _cffi_freeme_s *large_args_free = NULL;
1143
+ PyObject *arg0;
1144
+ PyObject *arg1;
1145
+ PyObject *arg2;
1146
+ PyObject *arg3;
1147
+ PyObject *arg4;
1148
+ PyObject *arg5;
1149
+
1150
+ if (!PyArg_UnpackTuple(args, "h_eval", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
1151
+ return NULL;
1152
+
1153
+ datasize = _cffi_prepare_pointer_call_argument(
1154
+ _cffi_type(1), arg0, (char **)&x0);
1155
+ if (datasize != 0) {
1156
+ x0 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1157
+ if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
1158
+ datasize, &large_args_free) < 0)
1159
+ return NULL;
1160
+ }
1161
+
1162
+ datasize = _cffi_prepare_pointer_call_argument(
1163
+ _cffi_type(1), arg1, (char **)&x1);
1164
+ if (datasize != 0) {
1165
+ x1 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1166
+ if (_cffi_convert_array_argument(_cffi_type(1), arg1, (char **)&x1,
1167
+ datasize, &large_args_free) < 0)
1168
+ return NULL;
1169
+ }
1170
+
1171
+ datasize = _cffi_prepare_pointer_call_argument(
1172
+ _cffi_type(1), arg2, (char **)&x2);
1173
+ if (datasize != 0) {
1174
+ x2 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1175
+ if (_cffi_convert_array_argument(_cffi_type(1), arg2, (char **)&x2,
1176
+ datasize, &large_args_free) < 0)
1177
+ return NULL;
1178
+ }
1179
+
1180
+ datasize = _cffi_prepare_pointer_call_argument(
1181
+ _cffi_type(1), arg3, (char **)&x3);
1182
+ if (datasize != 0) {
1183
+ x3 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1184
+ if (_cffi_convert_array_argument(_cffi_type(1), arg3, (char **)&x3,
1185
+ datasize, &large_args_free) < 0)
1186
+ return NULL;
1187
+ }
1188
+
1189
+ datasize = _cffi_prepare_pointer_call_argument(
1190
+ _cffi_type(1), arg4, (char **)&x4);
1191
+ if (datasize != 0) {
1192
+ x4 = ((size_t)datasize) <= 640 ? (double *)alloca((size_t)datasize) : NULL;
1193
+ if (_cffi_convert_array_argument(_cffi_type(1), arg4, (char **)&x4,
1194
+ datasize, &large_args_free) < 0)
1195
+ return NULL;
1196
+ }
1197
+
1198
+ x5 = (double)_cffi_to_c_double(arg5);
1199
+ if (x5 == (double)-1 && PyErr_Occurred())
1200
+ return NULL;
1201
+
1202
+ Py_BEGIN_ALLOW_THREADS
1203
+ _cffi_restore_errno();
1204
+ { h_eval(x0, x1, x2, x3, x4, x5); }
1205
+ _cffi_save_errno();
1206
+ Py_END_ALLOW_THREADS
1207
+
1208
+ (void)self; /* unused */
1209
+ if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
1210
+ Py_INCREF(Py_None);
1211
+ return Py_None;
1212
+ }
1213
+ #else
1214
+ # define _cffi_f_h_eval _cffi_d_h_eval
1215
+ #endif
1216
+
1217
+ static const struct _cffi_global_s _cffi_globals[] = {
1218
+ { "de_jac_ini_num_eval", (void *)_cffi_f_de_jac_ini_num_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_de_jac_ini_num_eval },
1219
+ { "de_jac_ini_up_eval", (void *)_cffi_f_de_jac_ini_up_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_de_jac_ini_up_eval },
1220
+ { "de_jac_ini_xy_eval", (void *)_cffi_f_de_jac_ini_xy_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_de_jac_ini_xy_eval },
1221
+ { "f_ini_eval", (void *)_cffi_f_f_ini_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_f_ini_eval },
1222
+ { "g_ini_eval", (void *)_cffi_f_g_ini_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_g_ini_eval },
1223
+ { "h_eval", (void *)_cffi_f_h_eval, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_h_eval },
1224
+ };
1225
+
1226
+ static const struct _cffi_type_context_s _cffi_type_context = {
1227
+ _cffi_types,
1228
+ _cffi_globals,
1229
+ NULL, /* no fields */
1230
+ NULL, /* no struct_unions */
1231
+ NULL, /* no enums */
1232
+ NULL, /* no typenames */
1233
+ 6, /* num_globals */
1234
+ 0, /* num_struct_unions */
1235
+ 0, /* num_enums */
1236
+ 0, /* num_typenames */
1237
+ NULL, /* no includes */
1238
+ 9, /* num_types */
1239
+ 0, /* flags */
1240
+ };
1241
+
1242
+ #ifdef __GNUC__
1243
+ # pragma GCC visibility push(default) /* for -fvisibility= */
1244
+ #endif
1245
+
1246
+ #ifdef PYPY_VERSION
1247
+ PyMODINIT_FUNC
1248
+ _cffi_pypyinit_temp_ini_cffi(const void *p[])
1249
+ {
1250
+ p[0] = (const void *)0x2601;
1251
+ p[1] = &_cffi_type_context;
1252
+ #if PY_MAJOR_VERSION >= 3
1253
+ return NULL;
1254
+ #endif
1255
+ }
1256
+ # ifdef _MSC_VER
1257
+ PyMODINIT_FUNC
1258
+ # if PY_MAJOR_VERSION >= 3
1259
+ PyInit_temp_ini_cffi(void) { return NULL; }
1260
+ # else
1261
+ inittemp_ini_cffi(void) { }
1262
+ # endif
1263
+ # endif
1264
+ #elif PY_MAJOR_VERSION >= 3
1265
+ PyMODINIT_FUNC
1266
+ PyInit_temp_ini_cffi(void)
1267
+ {
1268
+ return _cffi_init("temp_ini_cffi", 0x2601, &_cffi_type_context);
1269
+ }
1270
+ #else
1271
+ PyMODINIT_FUNC
1272
+ inittemp_ini_cffi(void)
1273
+ {
1274
+ _cffi_init("temp_ini_cffi", 0x2601, &_cffi_type_context);
1275
+ }
1276
+ #endif
1277
+
1278
+ #ifdef __GNUC__
1279
+ # pragma GCC visibility pop
1280
+ #endif