Repository URL to install this package:
Version:
1.10.0 ▾
|
#define _CFFI_
#include <Python.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
/* This part is from file 'cffi/parse_c_type.h'. It is copied at the
beginning of C sources generated by CFFI's ffi.set_source(). */
typedef void *_cffi_opcode_t;
#define _CFFI_OP(opcode, arg) (_cffi_opcode_t)(opcode | (((uintptr_t)(arg)) << 8))
#define _CFFI_GETOP(cffi_opcode) ((unsigned char)(uintptr_t)cffi_opcode)
#define _CFFI_GETARG(cffi_opcode) (((intptr_t)cffi_opcode) >> 8)
#define _CFFI_OP_PRIMITIVE 1
#define _CFFI_OP_POINTER 3
#define _CFFI_OP_ARRAY 5
#define _CFFI_OP_OPEN_ARRAY 7
#define _CFFI_OP_STRUCT_UNION 9
#define _CFFI_OP_ENUM 11
#define _CFFI_OP_FUNCTION 13
#define _CFFI_OP_FUNCTION_END 15
#define _CFFI_OP_NOOP 17
#define _CFFI_OP_BITFIELD 19
#define _CFFI_OP_TYPENAME 21
#define _CFFI_OP_CPYTHON_BLTN_V 23 // varargs
#define _CFFI_OP_CPYTHON_BLTN_N 25 // noargs
#define _CFFI_OP_CPYTHON_BLTN_O 27 // O (i.e. a single arg)
#define _CFFI_OP_CONSTANT 29
#define _CFFI_OP_CONSTANT_INT 31
#define _CFFI_OP_GLOBAL_VAR 33
#define _CFFI_OP_DLOPEN_FUNC 35
#define _CFFI_OP_DLOPEN_CONST 37
#define _CFFI_OP_GLOBAL_VAR_F 39
#define _CFFI_OP_EXTERN_PYTHON 41
#define _CFFI_PRIM_VOID 0
#define _CFFI_PRIM_BOOL 1
#define _CFFI_PRIM_CHAR 2
#define _CFFI_PRIM_SCHAR 3
#define _CFFI_PRIM_UCHAR 4
#define _CFFI_PRIM_SHORT 5
#define _CFFI_PRIM_USHORT 6
#define _CFFI_PRIM_INT 7
#define _CFFI_PRIM_UINT 8
#define _CFFI_PRIM_LONG 9
#define _CFFI_PRIM_ULONG 10
#define _CFFI_PRIM_LONGLONG 11
#define _CFFI_PRIM_ULONGLONG 12
#define _CFFI_PRIM_FLOAT 13
#define _CFFI_PRIM_DOUBLE 14
#define _CFFI_PRIM_LONGDOUBLE 15
#define _CFFI_PRIM_WCHAR 16
#define _CFFI_PRIM_INT8 17
#define _CFFI_PRIM_UINT8 18
#define _CFFI_PRIM_INT16 19
#define _CFFI_PRIM_UINT16 20
#define _CFFI_PRIM_INT32 21
#define _CFFI_PRIM_UINT32 22
#define _CFFI_PRIM_INT64 23
#define _CFFI_PRIM_UINT64 24
#define _CFFI_PRIM_INTPTR 25
#define _CFFI_PRIM_UINTPTR 26
#define _CFFI_PRIM_PTRDIFF 27
#define _CFFI_PRIM_SIZE 28
#define _CFFI_PRIM_SSIZE 29
#define _CFFI_PRIM_INT_LEAST8 30
#define _CFFI_PRIM_UINT_LEAST8 31
#define _CFFI_PRIM_INT_LEAST16 32
#define _CFFI_PRIM_UINT_LEAST16 33
#define _CFFI_PRIM_INT_LEAST32 34
#define _CFFI_PRIM_UINT_LEAST32 35
#define _CFFI_PRIM_INT_LEAST64 36
#define _CFFI_PRIM_UINT_LEAST64 37
#define _CFFI_PRIM_INT_FAST8 38
#define _CFFI_PRIM_UINT_FAST8 39
#define _CFFI_PRIM_INT_FAST16 40
#define _CFFI_PRIM_UINT_FAST16 41
#define _CFFI_PRIM_INT_FAST32 42
#define _CFFI_PRIM_UINT_FAST32 43
#define _CFFI_PRIM_INT_FAST64 44
#define _CFFI_PRIM_UINT_FAST64 45
#define _CFFI_PRIM_INTMAX 46
#define _CFFI_PRIM_UINTMAX 47
#define _CFFI__NUM_PRIM 48
#define _CFFI__UNKNOWN_PRIM (-1)
#define _CFFI__UNKNOWN_FLOAT_PRIM (-2)
#define _CFFI__UNKNOWN_LONG_DOUBLE (-3)
#define _CFFI__IO_FILE_STRUCT (-1)
struct _cffi_global_s {
const char *name;
void *address;
_cffi_opcode_t type_op;
void *size_or_direct_fn; // OP_GLOBAL_VAR: size, or 0 if unknown
// OP_CPYTHON_BLTN_*: addr of direct function
};
struct _cffi_getconst_s {
unsigned long long value;
const struct _cffi_type_context_s *ctx;
int gindex;
};
struct _cffi_struct_union_s {
const char *name;
int type_index; // -> _cffi_types, on a OP_STRUCT_UNION
int flags; // _CFFI_F_* flags below
size_t size;
int alignment;
int first_field_index; // -> _cffi_fields array
int num_fields;
};
#define _CFFI_F_UNION 0x01 // is a union, not a struct
#define _CFFI_F_CHECK_FIELDS 0x02 // complain if fields are not in the
// "standard layout" or if some are missing
#define _CFFI_F_PACKED 0x04 // for CHECK_FIELDS, assume a packed struct
#define _CFFI_F_EXTERNAL 0x08 // in some other ffi.include()
#define _CFFI_F_OPAQUE 0x10 // opaque
struct _cffi_field_s {
const char *name;
size_t field_offset;
size_t field_size;
_cffi_opcode_t field_type_op;
};
struct _cffi_enum_s {
const char *name;
int type_index; // -> _cffi_types, on a OP_ENUM
int type_prim; // _CFFI_PRIM_xxx
const char *enumerators; // comma-delimited string
};
struct _cffi_typename_s {
const char *name;
int type_index; /* if opaque, points to a possibly artificial
OP_STRUCT which is itself opaque */
};
struct _cffi_type_context_s {
_cffi_opcode_t *types;
const struct _cffi_global_s *globals;
const struct _cffi_field_s *fields;
const struct _cffi_struct_union_s *struct_unions;
const struct _cffi_enum_s *enums;
const struct _cffi_typename_s *typenames;
int num_globals;
int num_struct_unions;
int num_enums;
int num_typenames;
const char *const *includes;
int num_types;
int flags; /* future extension */
};
struct _cffi_parse_info_s {
const struct _cffi_type_context_s *ctx;
_cffi_opcode_t *output;
unsigned int output_size;
size_t error_location;
const char *error_message;
};
struct _cffi_externpy_s {
const char *name;
size_t size_of_result;
void *reserved1, *reserved2;
};
#ifdef _CFFI_INTERNAL
static int parse_c_type(struct _cffi_parse_info_s *info, const char *input);
static int search_in_globals(const struct _cffi_type_context_s *ctx,
const char *search, size_t search_len);
static int search_in_struct_unions(const struct _cffi_type_context_s *ctx,
const char *search, size_t search_len);
#endif
/* this block of #ifs should be kept exactly identical between
c/_cffi_backend.c, cffi/vengine_cpy.py, cffi/vengine_gen.py
and cffi/_cffi_include.h */
#if defined(_MSC_VER)
# include <malloc.h> /* for alloca() */
# if _MSC_VER < 1600 /* MSVC < 2010 */
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
typedef __int8 int_least8_t;
typedef __int16 int_least16_t;
typedef __int32 int_least32_t;
typedef __int64 int_least64_t;
typedef unsigned __int8 uint_least8_t;
typedef unsigned __int16 uint_least16_t;
typedef unsigned __int32 uint_least32_t;
typedef unsigned __int64 uint_least64_t;
typedef __int8 int_fast8_t;
typedef __int16 int_fast16_t;
typedef __int32 int_fast32_t;
typedef __int64 int_fast64_t;
typedef unsigned __int8 uint_fast8_t;
typedef unsigned __int16 uint_fast16_t;
typedef unsigned __int32 uint_fast32_t;
typedef unsigned __int64 uint_fast64_t;
typedef __int64 intmax_t;
typedef unsigned __int64 uintmax_t;
# else
# include <stdint.h>
# endif
# if _MSC_VER < 1800 /* MSVC < 2013 */
typedef unsigned char _Bool;
# endif
#else
# include <stdint.h>
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX) || defined(__hpux)
# include <alloca.h>
# endif
#endif
#ifdef __GNUC__
# define _CFFI_UNUSED_FN __attribute__((unused))
#else
# define _CFFI_UNUSED_FN /* nothing */
#endif
#ifdef __cplusplus
# ifndef _Bool
# define _Bool bool /* semi-hackish: C++ has no _Bool; bool is builtin */
# endif
#endif
/********** CPython-specific section **********/
#ifndef PYPY_VERSION
#if PY_MAJOR_VERSION >= 3
# define PyInt_FromLong PyLong_FromLong
#endif
#define _cffi_from_c_double PyFloat_FromDouble
#define _cffi_from_c_float PyFloat_FromDouble
#define _cffi_from_c_long PyInt_FromLong
#define _cffi_from_c_ulong PyLong_FromUnsignedLong
#define _cffi_from_c_longlong PyLong_FromLongLong
#define _cffi_from_c_ulonglong PyLong_FromUnsignedLongLong
#define _cffi_to_c_double PyFloat_AsDouble
#define _cffi_to_c_float PyFloat_AsDouble
#define _cffi_from_c_int(x, type) \
(((type)-1) > 0 ? /* unsigned */ \
(sizeof(type) < sizeof(long) ? \
PyInt_FromLong((long)x) : \
sizeof(type) == sizeof(long) ? \
PyLong_FromUnsignedLong((unsigned long)x) : \
PyLong_FromUnsignedLongLong((unsigned long long)x)) : \
(sizeof(type) <= sizeof(long) ? \
PyInt_FromLong((long)x) : \
PyLong_FromLongLong((long long)x)))
#define _cffi_to_c_int(o, type) \
((type)( \
sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \
: (type)_cffi_to_c_i8(o)) : \
sizeof(type) == 2 ? (((type)-1) > 0 ? (type)_cffi_to_c_u16(o) \
: (type)_cffi_to_c_i16(o)) : \
sizeof(type) == 4 ? (((type)-1) > 0 ? (type)_cffi_to_c_u32(o) \
: (type)_cffi_to_c_i32(o)) : \
sizeof(type) == 8 ? (((type)-1) > 0 ? (type)_cffi_to_c_u64(o) \
: (type)_cffi_to_c_i64(o)) : \
(Py_FatalError("unsupported size for type " #type), (type)0)))
#define _cffi_to_c_i8 \
((int(*)(PyObject *))_cffi_exports[1])
#define _cffi_to_c_u8 \
((int(*)(PyObject *))_cffi_exports[2])
#define _cffi_to_c_i16 \
((int(*)(PyObject *))_cffi_exports[3])
#define _cffi_to_c_u16 \
((int(*)(PyObject *))_cffi_exports[4])
#define _cffi_to_c_i32 \
((int(*)(PyObject *))_cffi_exports[5])
#define _cffi_to_c_u32 \
((unsigned int(*)(PyObject *))_cffi_exports[6])
#define _cffi_to_c_i64 \
((long long(*)(PyObject *))_cffi_exports[7])
#define _cffi_to_c_u64 \
((unsigned long long(*)(PyObject *))_cffi_exports[8])
#define _cffi_to_c_char \
((int(*)(PyObject *))_cffi_exports[9])
#define _cffi_from_c_pointer \
((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[10])
#define _cffi_to_c_pointer \
((char *(*)(PyObject *, CTypeDescrObject *))_cffi_exports[11])
#define _cffi_get_struct_layout \
not used any more
#define _cffi_restore_errno \
((void(*)(void))_cffi_exports[13])
#define _cffi_save_errno \
((void(*)(void))_cffi_exports[14])
#define _cffi_from_c_char \
((PyObject *(*)(char))_cffi_exports[15])
#define _cffi_from_c_deref \
((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[16])
#define _cffi_to_c \
((int(*)(char *, CTypeDescrObject *, PyObject *))_cffi_exports[17])
#define _cffi_from_c_struct \
((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[18])
#define _cffi_to_c_wchar_t \
((wchar_t(*)(PyObject *))_cffi_exports[19])
#define _cffi_from_c_wchar_t \
((PyObject *(*)(wchar_t))_cffi_exports[20])
#define _cffi_to_c_long_double \
((long double(*)(PyObject *))_cffi_exports[21])
#define _cffi_to_c__Bool \
((_Bool(*)(PyObject *))_cffi_exports[22])
#define _cffi_prepare_pointer_call_argument \
((Py_ssize_t(*)(CTypeDescrObject *, PyObject *, char **))_cffi_exports[23])
#define _cffi_convert_array_from_object \
((int(*)(char *, CTypeDescrObject *, PyObject *))_cffi_exports[24])
#define _CFFI_CPIDX 25
#define _cffi_call_python \
((void(*)(struct _cffi_externpy_s *, char *))_cffi_exports[_CFFI_CPIDX])
#define _CFFI_NUM_EXPORTS 26
typedef struct _ctypedescr CTypeDescrObject;
static void *_cffi_exports[_CFFI_NUM_EXPORTS];
#define _cffi_type(index) ( \
assert((((uintptr_t)_cffi_types[index]) & 1) == 0), \
(CTypeDescrObject *)_cffi_types[index])
static PyObject *_cffi_init(const char *module_name, Py_ssize_t version,
const struct _cffi_type_context_s *ctx)
{
PyObject *module, *o_arg, *new_module;
void *raw[] = {
(void *)module_name,
(void *)version,
(void *)_cffi_exports,
(void *)ctx,
};
module = PyImport_ImportModule("_cffi_backend");
if (module == NULL)
goto failure;
o_arg = PyLong_FromVoidPtr((void *)raw);
if (o_arg == NULL)
goto failure;
new_module = PyObject_CallMethod(
module, (char *)"_init_cffi_1_0_external_module", (char *)"O", o_arg);
Py_DECREF(o_arg);
Py_DECREF(module);
return new_module;
failure:
Py_XDECREF(module);
return NULL;
}
_CFFI_UNUSED_FN
static PyObject **_cffi_unpack_args(PyObject *args_tuple, Py_ssize_t expected,
const char *fnname)
{
if (PyTuple_GET_SIZE(args_tuple) != expected) {
PyErr_Format(PyExc_TypeError,
"%.150s() takes exactly %zd arguments (%zd given)",
fnname, expected, PyTuple_GET_SIZE(args_tuple));
return NULL;
}
return &PyTuple_GET_ITEM(args_tuple, 0); /* pointer to the first item,
the others follow */
}
/********** end CPython-specific section **********/
#else
_CFFI_UNUSED_FN
static void (*_cffi_call_python_org)(struct _cffi_externpy_s *, char *);
# define _cffi_call_python _cffi_call_python_org
#endif
#define _cffi_array_len(array) (sizeof(array) / sizeof((array)[0]))
#define _cffi_prim_int(size, sign) \
((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8 : _CFFI_PRIM_UINT8) : \
(size) == 2 ? ((sign) ? _CFFI_PRIM_INT16 : _CFFI_PRIM_UINT16) : \
(size) == 4 ? ((sign) ? _CFFI_PRIM_INT32 : _CFFI_PRIM_UINT32) : \
(size) == 8 ? ((sign) ? _CFFI_PRIM_INT64 : _CFFI_PRIM_UINT64) : \
_CFFI__UNKNOWN_PRIM)
#define _cffi_prim_float(size) \
((size) == sizeof(float) ? _CFFI_PRIM_FLOAT : \
(size) == sizeof(double) ? _CFFI_PRIM_DOUBLE : \
(size) == sizeof(long double) ? _CFFI__UNKNOWN_LONG_DOUBLE : \
_CFFI__UNKNOWN_FLOAT_PRIM)
#define _cffi_check_int(got, got_nonpos, expected) \
((got_nonpos) == (expected <= 0) && \
(got) == (unsigned long long)expected)
#ifdef MS_WIN32
# define _cffi_stdcall __stdcall
#else
# define _cffi_stdcall /* nothing */
#endif
#ifdef __cplusplus
}
#endif
/************************************************************/
// copy from pyport.h // not sure if it's correct
typedef uintptr_t Py_uintptr_t;
typedef intptr_t Py_intptr_t;
// Copy from pypy/pypy/module/cpyext/include/numpy/npy_common.h
// with "PY_LONG_LONG" replaced by "long long"
typedef Py_intptr_t npy_intp;
typedef Py_uintptr_t npy_uintp;
typedef long long npy_longlong;
typedef unsigned long long npy_ulonglong;
typedef unsigned char npy_bool;
typedef long npy_int32;
typedef unsigned long npy_uint32;
typedef unsigned long npy_ucs4;
typedef long npy_int64;
typedef unsigned long npy_uint64;
typedef unsigned char npy_uint8;
typedef signed char npy_byte;
typedef unsigned char npy_ubyte;
typedef unsigned short npy_ushort;
typedef unsigned int npy_uint;
typedef unsigned long npy_ulong;
/* These are for completeness */
typedef char npy_char;
typedef short npy_short;
typedef int npy_int;
typedef long npy_long;
typedef float npy_float;
typedef double npy_double;
typedef struct { float real, imag; } npy_cfloat;
typedef struct { double real, imag; } npy_cdouble;
typedef npy_cdouble npy_complex128;
// copy from npy_common.h of numpypy
typedef long double npy_longdouble;
extern int get_max_pivot_stack();
int introselect_bool(npy_bool *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_byte(npy_byte *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_ubyte(npy_ubyte *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_short(npy_short *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_ushort(npy_ushort *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_int(npy_int *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_uint(npy_uint *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_long(npy_long *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_ulong(npy_ulong *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_longlong(npy_longlong *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_ulonglong(npy_ulonglong *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_half(npy_ushort *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_float(npy_float *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_double(npy_double *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
int introselect_longdouble(npy_longdouble *v, npy_intp num,
npy_intp kth,
npy_intp * pivots,
npy_intp * npiv,
void *NOT_USED);
/************************************************************/
static void *_cffi_types[] = {
/* 0 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(double *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 1 */ _CFFI_OP(_CFFI_OP_POINTER, 107), // double *
/* 2 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25), // intptr_t
/* 3 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 4 */ _CFFI_OP(_CFFI_OP_POINTER, 2), // intptr_t *
/* 5 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 6 */ _CFFI_OP(_CFFI_OP_POINTER, 123), // void *
/* 7 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 8 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(float *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 9 */ _CFFI_OP(_CFFI_OP_POINTER, 108), // float *
/* 10 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 11 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 12 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 13 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 14 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 15 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 16 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(int *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 17 */ _CFFI_OP(_CFFI_OP_POINTER, 109), // int *
/* 18 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 19 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 20 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 21 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 22 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 23 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 24 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(long *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 25 */ _CFFI_OP(_CFFI_OP_POINTER, 112), // long *
/* 26 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 27 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 28 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 29 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 30 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 31 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 32 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(long double *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 33 */ _CFFI_OP(_CFFI_OP_POINTER, 110), // long double *
/* 34 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 35 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 36 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 37 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 38 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 39 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 40 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(long long *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 41 */ _CFFI_OP(_CFFI_OP_POINTER, 111), // long long *
/* 42 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 43 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 44 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 45 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 46 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 47 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 48 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(short *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 49 */ _CFFI_OP(_CFFI_OP_POINTER, 115), // short *
/* 50 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 51 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 52 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 53 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 54 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 55 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 56 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(signed char *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 57 */ _CFFI_OP(_CFFI_OP_POINTER, 116), // signed char *
/* 58 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 59 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 60 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 61 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 62 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 63 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 64 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(unsigned char *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 65 */ _CFFI_OP(_CFFI_OP_POINTER, 118), // unsigned char *
/* 66 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 67 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 68 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 69 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 70 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 71 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 72 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(unsigned int *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 73 */ _CFFI_OP(_CFFI_OP_POINTER, 119), // unsigned int *
/* 74 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 75 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 76 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 77 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 78 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 79 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 80 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(unsigned long *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 81 */ _CFFI_OP(_CFFI_OP_POINTER, 121), // unsigned long *
/* 82 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 83 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 84 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 85 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 86 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 87 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 88 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(unsigned long long *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 89 */ _CFFI_OP(_CFFI_OP_POINTER, 120), // unsigned long long *
/* 90 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 91 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 92 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 93 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 94 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 95 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 96 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(unsigned short *, intptr_t, intptr_t, intptr_t *, intptr_t *, void *)
/* 97 */ _CFFI_OP(_CFFI_OP_POINTER, 122), // unsigned short *
/* 98 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 99 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 25),
/* 100 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 101 */ _CFFI_OP(_CFFI_OP_NOOP, 4),
/* 102 */ _CFFI_OP(_CFFI_OP_NOOP, 6),
/* 103 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 104 */ _CFFI_OP(_CFFI_OP_FUNCTION, 109), // int()(void)
/* 105 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 106 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 2), // char
/* 107 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 14), // double
/* 108 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 13), // float
/* 109 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7), // int
/* 110 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 15), // long double
/* 111 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 11), // long long
/* 112 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 9), // long
/* 113 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 0), // npy_cdouble
/* 114 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 1), // npy_cfloat
/* 115 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 5), // short
/* 116 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 3), // signed char
/* 117 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 26), // uintptr_t
/* 118 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 4), // unsigned char
/* 119 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 8), // unsigned int
/* 120 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 12), // unsigned long long
/* 121 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 10), // unsigned long
/* 122 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 6), // unsigned short
/* 123 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 0), // void
};
_CFFI_UNUSED_FN
static void _cffi_checkfld_typedef_npy_cdouble(npy_cdouble *p)
{
/* only to generate compile-time warnings or errors */
(void)p;
{ double *tmp = &p->real; (void)tmp; }
{ double *tmp = &p->imag; (void)tmp; }
}
struct _cffi_align_typedef_npy_cdouble { char x; npy_cdouble y; };
_CFFI_UNUSED_FN
static void _cffi_checkfld_typedef_npy_cfloat(npy_cfloat *p)
{
/* only to generate compile-time warnings or errors */
(void)p;
{ float *tmp = &p->real; (void)tmp; }
{ float *tmp = &p->imag; (void)tmp; }
}
struct _cffi_align_typedef_npy_cfloat { char x; npy_cfloat y; };
static int _cffi_d_get_max_pivot_stack(void)
{
return get_max_pivot_stack();
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_get_max_pivot_stack(PyObject *self, PyObject *noarg)
{
int result;
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = get_max_pivot_stack(); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
(void)noarg; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_get_max_pivot_stack _cffi_d_get_max_pivot_stack
#endif
static int _cffi_d_introselect_bool(unsigned char * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_bool(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_bool(PyObject *self, PyObject *args)
{
unsigned char * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_bool");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(65), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned char *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(65), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_bool(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_bool _cffi_d_introselect_bool
#endif
static int _cffi_d_introselect_byte(signed char * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_byte(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_byte(PyObject *self, PyObject *args)
{
signed char * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_byte");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(57), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (signed char *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(57), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_byte(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_byte _cffi_d_introselect_byte
#endif
static int _cffi_d_introselect_double(double * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_double(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_double(PyObject *self, PyObject *args)
{
double * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_double");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(1), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (double *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_double(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_double _cffi_d_introselect_double
#endif
static int _cffi_d_introselect_float(float * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_float(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_float(PyObject *self, PyObject *args)
{
float * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_float");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(9), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (float *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(9), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_float(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_float _cffi_d_introselect_float
#endif
static int _cffi_d_introselect_half(unsigned short * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_half(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_half(PyObject *self, PyObject *args)
{
unsigned short * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_half");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(97), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned short *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(97), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_half(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_half _cffi_d_introselect_half
#endif
static int _cffi_d_introselect_int(int * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_int(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_int(PyObject *self, PyObject *args)
{
int * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_int");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(17), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (int *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(17), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_int(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_int _cffi_d_introselect_int
#endif
static int _cffi_d_introselect_long(long * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_long(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_long(PyObject *self, PyObject *args)
{
long * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_long");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(25), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (long *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(25), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_long(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_long _cffi_d_introselect_long
#endif
static int _cffi_d_introselect_longdouble(long double * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_longdouble(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_longdouble(PyObject *self, PyObject *args)
{
long double * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_longdouble");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(33), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (long double *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(33), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_longdouble(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_longdouble _cffi_d_introselect_longdouble
#endif
static int _cffi_d_introselect_longlong(long long * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_longlong(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_longlong(PyObject *self, PyObject *args)
{
long long * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_longlong");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(41), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (long long *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(41), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_longlong(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_longlong _cffi_d_introselect_longlong
#endif
static int _cffi_d_introselect_short(short * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_short(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_short(PyObject *self, PyObject *args)
{
short * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_short");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(49), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (short *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(49), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_short(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_short _cffi_d_introselect_short
#endif
static int _cffi_d_introselect_ubyte(unsigned char * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_ubyte(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_ubyte(PyObject *self, PyObject *args)
{
unsigned char * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_ubyte");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(65), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned char *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(65), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_ubyte(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_ubyte _cffi_d_introselect_ubyte
#endif
static int _cffi_d_introselect_uint(unsigned int * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_uint(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_uint(PyObject *self, PyObject *args)
{
unsigned int * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_uint");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(73), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned int *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(73), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_uint(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_uint _cffi_d_introselect_uint
#endif
static int _cffi_d_introselect_ulong(unsigned long * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_ulong(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_ulong(PyObject *self, PyObject *args)
{
unsigned long * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_ulong");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(81), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned long *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(81), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_ulong(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_ulong _cffi_d_introselect_ulong
#endif
static int _cffi_d_introselect_ulonglong(unsigned long long * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_ulonglong(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_ulonglong(PyObject *self, PyObject *args)
{
unsigned long long * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_ulonglong");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(89), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned long long *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(89), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_ulonglong(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_ulonglong _cffi_d_introselect_ulonglong
#endif
static int _cffi_d_introselect_ushort(unsigned short * x0, intptr_t x1, intptr_t x2, intptr_t * x3, intptr_t * x4, void * x5)
{
return introselect_ushort(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_introselect_ushort(PyObject *self, PyObject *args)
{
unsigned short * x0;
intptr_t x1;
intptr_t x2;
intptr_t * x3;
intptr_t * x4;
void * x5;
Py_ssize_t datasize;
int result;
PyObject *arg0;
PyObject *arg1;
PyObject *arg2;
PyObject *arg3;
PyObject *arg4;
PyObject *arg5;
PyObject **aa;
aa = _cffi_unpack_args(args, 6, "introselect_ushort");
if (aa == NULL)
return NULL;
arg0 = aa[0];
arg1 = aa[1];
arg2 = aa[2];
arg3 = aa[3];
arg4 = aa[4];
arg5 = aa[5];
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(97), arg0, (char **)&x0);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x0 = (unsigned short *)alloca((size_t)datasize);
memset((void *)x0, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x0, _cffi_type(97), arg0) < 0)
return NULL;
}
x1 = _cffi_to_c_int(arg1, intptr_t);
if (x1 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
x2 = _cffi_to_c_int(arg2, intptr_t);
if (x2 == (intptr_t)-1 && PyErr_Occurred())
return NULL;
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg3, (char **)&x3);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x3 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x3, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(4), arg4, (char **)&x4);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x4 = (intptr_t *)alloca((size_t)datasize);
memset((void *)x4, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x4, _cffi_type(4), arg4) < 0)
return NULL;
}
datasize = _cffi_prepare_pointer_call_argument(
_cffi_type(6), arg5, (char **)&x5);
if (datasize != 0) {
if (datasize < 0)
return NULL;
x5 = (void *)alloca((size_t)datasize);
memset((void *)x5, 0, (size_t)datasize);
if (_cffi_convert_array_from_object((char *)x5, _cffi_type(6), arg5) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
_cffi_restore_errno();
{ result = introselect_ushort(x0, x1, x2, x3, x4, x5); }
_cffi_save_errno();
Py_END_ALLOW_THREADS
(void)self; /* unused */
return _cffi_from_c_int(result, int);
}
#else
# define _cffi_f_introselect_ushort _cffi_d_introselect_ushort
#endif
static const struct _cffi_global_s _cffi_globals[] = {
{ "get_max_pivot_stack", (void *)_cffi_f_get_max_pivot_stack, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 104), (void *)_cffi_d_get_max_pivot_stack },
{ "introselect_bool", (void *)_cffi_f_introselect_bool, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 64), (void *)_cffi_d_introselect_bool },
{ "introselect_byte", (void *)_cffi_f_introselect_byte, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 56), (void *)_cffi_d_introselect_byte },
{ "introselect_double", (void *)_cffi_f_introselect_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_introselect_double },
{ "introselect_float", (void *)_cffi_f_introselect_float, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 8), (void *)_cffi_d_introselect_float },
{ "introselect_half", (void *)_cffi_f_introselect_half, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 96), (void *)_cffi_d_introselect_half },
{ "introselect_int", (void *)_cffi_f_introselect_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 16), (void *)_cffi_d_introselect_int },
{ "introselect_long", (void *)_cffi_f_introselect_long, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 24), (void *)_cffi_d_introselect_long },
{ "introselect_longdouble", (void *)_cffi_f_introselect_longdouble, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 32), (void *)_cffi_d_introselect_longdouble },
{ "introselect_longlong", (void *)_cffi_f_introselect_longlong, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 40), (void *)_cffi_d_introselect_longlong },
{ "introselect_short", (void *)_cffi_f_introselect_short, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 48), (void *)_cffi_d_introselect_short },
{ "introselect_ubyte", (void *)_cffi_f_introselect_ubyte, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 64), (void *)_cffi_d_introselect_ubyte },
{ "introselect_uint", (void *)_cffi_f_introselect_uint, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 72), (void *)_cffi_d_introselect_uint },
{ "introselect_ulong", (void *)_cffi_f_introselect_ulong, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 80), (void *)_cffi_d_introselect_ulong },
{ "introselect_ulonglong", (void *)_cffi_f_introselect_ulonglong, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 88), (void *)_cffi_d_introselect_ulonglong },
{ "introselect_ushort", (void *)_cffi_f_introselect_ushort, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 96), (void *)_cffi_d_introselect_ushort },
};
static const struct _cffi_field_s _cffi_fields[] = {
{ "real", offsetof(npy_cdouble, real),
sizeof(((npy_cdouble *)0)->real),
_CFFI_OP(_CFFI_OP_NOOP, 107) },
{ "imag", offsetof(npy_cdouble, imag),
sizeof(((npy_cdouble *)0)->imag),
_CFFI_OP(_CFFI_OP_NOOP, 107) },
{ "real", offsetof(npy_cfloat, real),
sizeof(((npy_cfloat *)0)->real),
_CFFI_OP(_CFFI_OP_NOOP, 108) },
{ "imag", offsetof(npy_cfloat, imag),
sizeof(((npy_cfloat *)0)->imag),
_CFFI_OP(_CFFI_OP_NOOP, 108) },
};
static const struct _cffi_struct_union_s _cffi_struct_unions[] = {
{ "$npy_cdouble", 113, _CFFI_F_CHECK_FIELDS,
sizeof(npy_cdouble), offsetof(struct _cffi_align_typedef_npy_cdouble, y), 0, 2 },
{ "$npy_cfloat", 114, _CFFI_F_CHECK_FIELDS,
sizeof(npy_cfloat), offsetof(struct _cffi_align_typedef_npy_cfloat, y), 2, 2 },
};
static const struct _cffi_typename_s _cffi_typenames[] = {
{ "Py_intptr_t", 2 },
{ "Py_uintptr_t", 117 },
{ "npy_bool", 118 },
{ "npy_byte", 116 },
{ "npy_cdouble", 113 },
{ "npy_cfloat", 114 },
{ "npy_char", 106 },
{ "npy_complex128", 113 },
{ "npy_double", 107 },
{ "npy_float", 108 },
{ "npy_int", 109 },
{ "npy_int32", 112 },
{ "npy_int64", 112 },
{ "npy_intp", 2 },
{ "npy_long", 112 },
{ "npy_longdouble", 110 },
{ "npy_longlong", 111 },
{ "npy_short", 115 },
{ "npy_ubyte", 118 },
{ "npy_ucs4", 121 },
{ "npy_uint", 119 },
{ "npy_uint32", 121 },
{ "npy_uint64", 121 },
{ "npy_uint8", 118 },
{ "npy_uintp", 117 },
{ "npy_ulong", 121 },
{ "npy_ulonglong", 120 },
{ "npy_ushort", 122 },
};
static const struct _cffi_type_context_s _cffi_type_context = {
_cffi_types,
_cffi_globals,
_cffi_fields,
_cffi_struct_unions,
NULL, /* no enums */
_cffi_typenames,
16, /* num_globals */
2, /* num_struct_unions */
0, /* num_enums */
28, /* num_typenames */
NULL, /* no includes */
124, /* num_types */
0, /* flags */
};
#ifdef PYPY_VERSION
PyMODINIT_FUNC
_cffi_pypyinit__partition(const void *p[])
{
p[0] = (const void *)0x2601;
p[1] = &_cffi_type_context;
}
# ifdef _MSC_VER
PyMODINIT_FUNC
# if PY_MAJOR_VERSION >= 3
PyInit__partition(void) { return NULL; }
# else
init_partition(void) { }
# endif
# endif
#elif PY_MAJOR_VERSION >= 3
PyMODINIT_FUNC
PyInit__partition(void)
{
return _cffi_init("numpy.core._partition", 0x2601, &_cffi_type_context);
}
#else
PyMODINIT_FUNC
init_partition(void)
{
_cffi_init("numpy.core._partition", 0x2601, &_cffi_type_context);
}
#endif