Skip to content

Instantly share code, notes, and snippets.

@thedrow
Created May 25, 2022 13:22
Show Gist options
  • Save thedrow/b754ef37ed015135e20181446102cf50 to your computer and use it in GitHub Desktop.
Save thedrow/b754ef37ed015135e20181446102cf50 to your computer and use it in GitHub Desktop.
/* automatically generated by rust-bindgen 0.59.2 */
pub type __darwin_intptr_t = ::std::os::raw::c_long;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
pub type __darwin_ssize_t = ::std::os::raw::c_long;
pub type size_t = __darwin_size_t;
pub type ssize_t = __darwin_ssize_t;
pub type Py_ssize_t = ssize_t;
pub type Py_hash_t = Py_ssize_t;
pub type PyTypeObject = _typeobject;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _object {
pub ob_refcnt: Py_ssize_t,
pub ob_type: *mut PyTypeObject,
}
pub type PyObject = _object;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyVarObject {
pub ob_base: PyObject,
pub ob_size: Py_ssize_t,
}
pub type unaryfunc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> *mut PyObject>;
pub type binaryfunc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject,
>;
pub type ternaryfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> *mut PyObject,
>;
pub type inquiry =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> ::std::os::raw::c_int>;
pub type lenfunc = ::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> Py_ssize_t>;
pub type ssizeargfunc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject,
>;
pub type ssizeobjargproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: Py_ssize_t,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type objobjargproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type objobjproc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> ::std::os::raw::c_int,
>;
pub type visitproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type traverseproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: visitproc,
arg3: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type freefunc = ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub type destructor = ::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject)>;
pub type getattrfunc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_char) -> *mut PyObject,
>;
pub type getattrofunc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject,
>;
pub type setattrfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut ::std::os::raw::c_char,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type setattrofunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type reprfunc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> *mut PyObject>;
pub type hashfunc = ::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> Py_hash_t>;
pub type richcmpfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: ::std::os::raw::c_int,
) -> *mut PyObject,
>;
pub type getiterfunc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> *mut PyObject>;
pub type iternextfunc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject) -> *mut PyObject>;
pub type descrgetfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> *mut PyObject,
>;
pub type descrsetfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type initproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> ::std::os::raw::c_int,
>;
pub type newfunc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyTypeObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> *mut PyObject,
>;
pub type allocfunc = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyTypeObject, arg2: Py_ssize_t) -> *mut PyObject,
>;
pub const PySendResult_PYGEN_RETURN: PySendResult = 0;
pub const PySendResult_PYGEN_ERROR: PySendResult = -1;
pub const PySendResult_PYGEN_NEXT: PySendResult = 1;
pub type PySendResult = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bufferinfo {
pub buf: *mut ::std::os::raw::c_void,
pub obj: *mut PyObject,
pub len: Py_ssize_t,
pub itemsize: Py_ssize_t,
pub readonly: ::std::os::raw::c_int,
pub ndim: ::std::os::raw::c_int,
pub format: *mut ::std::os::raw::c_char,
pub shape: *mut Py_ssize_t,
pub strides: *mut Py_ssize_t,
pub suboffsets: *mut Py_ssize_t,
pub internal: *mut ::std::os::raw::c_void,
}
pub type Py_buffer = bufferinfo;
pub type getbufferproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut Py_buffer,
arg3: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type releasebufferproc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut Py_buffer)>;
pub type vectorcallfunc = ::std::option::Option<
unsafe extern "C" fn(
callable: *mut PyObject,
args: *const *mut PyObject,
nargsf: size_t,
kwnames: *mut PyObject,
) -> *mut PyObject,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyNumberMethods {
pub nb_add: binaryfunc,
pub nb_subtract: binaryfunc,
pub nb_multiply: binaryfunc,
pub nb_remainder: binaryfunc,
pub nb_divmod: binaryfunc,
pub nb_power: ternaryfunc,
pub nb_negative: unaryfunc,
pub nb_positive: unaryfunc,
pub nb_absolute: unaryfunc,
pub nb_bool: inquiry,
pub nb_invert: unaryfunc,
pub nb_lshift: binaryfunc,
pub nb_rshift: binaryfunc,
pub nb_and: binaryfunc,
pub nb_xor: binaryfunc,
pub nb_or: binaryfunc,
pub nb_int: unaryfunc,
pub nb_reserved: *mut ::std::os::raw::c_void,
pub nb_float: unaryfunc,
pub nb_inplace_add: binaryfunc,
pub nb_inplace_subtract: binaryfunc,
pub nb_inplace_multiply: binaryfunc,
pub nb_inplace_remainder: binaryfunc,
pub nb_inplace_power: ternaryfunc,
pub nb_inplace_lshift: binaryfunc,
pub nb_inplace_rshift: binaryfunc,
pub nb_inplace_and: binaryfunc,
pub nb_inplace_xor: binaryfunc,
pub nb_inplace_or: binaryfunc,
pub nb_floor_divide: binaryfunc,
pub nb_true_divide: binaryfunc,
pub nb_inplace_floor_divide: binaryfunc,
pub nb_inplace_true_divide: binaryfunc,
pub nb_index: unaryfunc,
pub nb_matrix_multiply: binaryfunc,
pub nb_inplace_matrix_multiply: binaryfunc,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PySequenceMethods {
pub sq_length: lenfunc,
pub sq_concat: binaryfunc,
pub sq_repeat: ssizeargfunc,
pub sq_item: ssizeargfunc,
pub was_sq_slice: *mut ::std::os::raw::c_void,
pub sq_ass_item: ssizeobjargproc,
pub was_sq_ass_slice: *mut ::std::os::raw::c_void,
pub sq_contains: objobjproc,
pub sq_inplace_concat: binaryfunc,
pub sq_inplace_repeat: ssizeargfunc,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyMappingMethods {
pub mp_length: lenfunc,
pub mp_subscript: binaryfunc,
pub mp_ass_subscript: objobjargproc,
}
pub type sendfunc = ::std::option::Option<
unsafe extern "C" fn(
iter: *mut PyObject,
value: *mut PyObject,
result: *mut *mut PyObject,
) -> PySendResult,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyAsyncMethods {
pub am_await: unaryfunc,
pub am_aiter: unaryfunc,
pub am_anext: unaryfunc,
pub am_send: sendfunc,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyBufferProcs {
pub bf_getbuffer: getbufferproc,
pub bf_releasebuffer: releasebufferproc,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _typeobject {
pub ob_base: PyVarObject,
pub tp_name: *const ::std::os::raw::c_char,
pub tp_basicsize: Py_ssize_t,
pub tp_itemsize: Py_ssize_t,
pub tp_dealloc: destructor,
pub tp_vectorcall_offset: Py_ssize_t,
pub tp_getattr: getattrfunc,
pub tp_setattr: setattrfunc,
pub tp_as_async: *mut PyAsyncMethods,
pub tp_repr: reprfunc,
pub tp_as_number: *mut PyNumberMethods,
pub tp_as_sequence: *mut PySequenceMethods,
pub tp_as_mapping: *mut PyMappingMethods,
pub tp_hash: hashfunc,
pub tp_call: ternaryfunc,
pub tp_str: reprfunc,
pub tp_getattro: getattrofunc,
pub tp_setattro: setattrofunc,
pub tp_as_buffer: *mut PyBufferProcs,
pub tp_flags: ::std::os::raw::c_ulong,
pub tp_doc: *const ::std::os::raw::c_char,
pub tp_traverse: traverseproc,
pub tp_clear: inquiry,
pub tp_richcompare: richcmpfunc,
pub tp_weaklistoffset: Py_ssize_t,
pub tp_iter: getiterfunc,
pub tp_iternext: iternextfunc,
pub tp_methods: *mut PyMethodDef,
pub tp_members: *mut PyMemberDef,
pub tp_getset: *mut PyGetSetDef,
pub tp_base: *mut _typeobject,
pub tp_dict: *mut PyObject,
pub tp_descr_get: descrgetfunc,
pub tp_descr_set: descrsetfunc,
pub tp_dictoffset: Py_ssize_t,
pub tp_init: initproc,
pub tp_alloc: allocfunc,
pub tp_new: newfunc,
pub tp_free: freefunc,
pub tp_is_gc: inquiry,
pub tp_bases: *mut PyObject,
pub tp_mro: *mut PyObject,
pub tp_cache: *mut PyObject,
pub tp_subclasses: *mut PyObject,
pub tp_weaklist: *mut PyObject,
pub tp_del: destructor,
pub tp_version_tag: ::std::os::raw::c_uint,
pub tp_finalize: destructor,
pub tp_vectorcall: vectorcallfunc,
}
pub type Py_UCS4 = u32;
pub type PyCFunction = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyMethodDef {
pub ml_name: *const ::std::os::raw::c_char,
pub ml_meth: PyCFunction,
pub ml_flags: ::std::os::raw::c_int,
pub ml_doc: *const ::std::os::raw::c_char,
}
pub type getter = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut PyObject, arg2: *mut ::std::os::raw::c_void) -> *mut PyObject,
>;
pub type setter = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyGetSetDef {
pub name: *const ::std::os::raw::c_char,
pub get: getter,
pub set: setter,
pub doc: *const ::std::os::raw::c_char,
pub closure: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PyMemberDef {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _HPy_s {
pub _i: isize,
}
pub type HPy = _HPy_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyField {
pub _i: isize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyGlobal {
pub _i: isize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyListBuilder {
pub _lst: isize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyTupleBuilder {
pub _tup: isize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyTracker {
pub _i: isize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyThreadState {
pub _i: isize,
}
pub type HPyContext = _HPyContext_s;
pub type HPy_ssize_t = Py_ssize_t;
pub type HPy_hash_t = Py_hash_t;
pub type HPy_UCS4 = Py_UCS4;
pub type cpy_PyObject = _object;
pub type cpy_PyCFunction = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut cpy_PyObject, arg2: *mut cpy_PyObject) -> *mut cpy_PyObject,
>;
pub type cpy_PyMethodDef = PyMethodDef;
pub type cpy_getter = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut cpy_PyObject,
arg2: *mut ::std::os::raw::c_void,
) -> *mut cpy_PyObject,
>;
pub type cpy_setter = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut cpy_PyObject,
arg2: *mut cpy_PyObject,
arg3: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub const HPy_RichCmpOp_HPy_LT: HPy_RichCmpOp = 0;
pub const HPy_RichCmpOp_HPy_LE: HPy_RichCmpOp = 1;
pub const HPy_RichCmpOp_HPy_EQ: HPy_RichCmpOp = 2;
pub const HPy_RichCmpOp_HPy_NE: HPy_RichCmpOp = 3;
pub const HPy_RichCmpOp_HPy_GT: HPy_RichCmpOp = 4;
pub const HPy_RichCmpOp_HPy_GE: HPy_RichCmpOp = 5;
pub type HPy_RichCmpOp = ::std::os::raw::c_uint;
pub const HPyFunc_Signature_HPyFunc_VARARGS: HPyFunc_Signature = 1;
pub const HPyFunc_Signature_HPyFunc_KEYWORDS: HPyFunc_Signature = 2;
pub const HPyFunc_Signature_HPyFunc_NOARGS: HPyFunc_Signature = 3;
pub const HPyFunc_Signature_HPyFunc_O: HPyFunc_Signature = 4;
pub const HPyFunc_Signature_HPyFunc_DESTROYFUNC: HPyFunc_Signature = 5;
pub const HPyFunc_Signature_HPyFunc_GETBUFFERPROC: HPyFunc_Signature = 6;
pub const HPyFunc_Signature_HPyFunc_RELEASEBUFFERPROC: HPyFunc_Signature = 7;
pub const HPyFunc_Signature_HPyFunc_UNARYFUNC: HPyFunc_Signature = 8;
pub const HPyFunc_Signature_HPyFunc_BINARYFUNC: HPyFunc_Signature = 9;
pub const HPyFunc_Signature_HPyFunc_TERNARYFUNC: HPyFunc_Signature = 10;
pub const HPyFunc_Signature_HPyFunc_INQUIRY: HPyFunc_Signature = 11;
pub const HPyFunc_Signature_HPyFunc_LENFUNC: HPyFunc_Signature = 12;
pub const HPyFunc_Signature_HPyFunc_SSIZEARGFUNC: HPyFunc_Signature = 13;
pub const HPyFunc_Signature_HPyFunc_SSIZESSIZEARGFUNC: HPyFunc_Signature = 14;
pub const HPyFunc_Signature_HPyFunc_SSIZEOBJARGPROC: HPyFunc_Signature = 15;
pub const HPyFunc_Signature_HPyFunc_SSIZESSIZEOBJARGPROC: HPyFunc_Signature = 16;
pub const HPyFunc_Signature_HPyFunc_OBJOBJARGPROC: HPyFunc_Signature = 17;
pub const HPyFunc_Signature_HPyFunc_FREEFUNC: HPyFunc_Signature = 18;
pub const HPyFunc_Signature_HPyFunc_GETATTRFUNC: HPyFunc_Signature = 19;
pub const HPyFunc_Signature_HPyFunc_GETATTROFUNC: HPyFunc_Signature = 20;
pub const HPyFunc_Signature_HPyFunc_SETATTRFUNC: HPyFunc_Signature = 21;
pub const HPyFunc_Signature_HPyFunc_SETATTROFUNC: HPyFunc_Signature = 22;
pub const HPyFunc_Signature_HPyFunc_REPRFUNC: HPyFunc_Signature = 23;
pub const HPyFunc_Signature_HPyFunc_HASHFUNC: HPyFunc_Signature = 24;
pub const HPyFunc_Signature_HPyFunc_RICHCMPFUNC: HPyFunc_Signature = 25;
pub const HPyFunc_Signature_HPyFunc_GETITERFUNC: HPyFunc_Signature = 26;
pub const HPyFunc_Signature_HPyFunc_ITERNEXTFUNC: HPyFunc_Signature = 27;
pub const HPyFunc_Signature_HPyFunc_DESCRGETFUNC: HPyFunc_Signature = 28;
pub const HPyFunc_Signature_HPyFunc_DESCRSETFUNC: HPyFunc_Signature = 29;
pub const HPyFunc_Signature_HPyFunc_INITPROC: HPyFunc_Signature = 30;
pub const HPyFunc_Signature_HPyFunc_GETTER: HPyFunc_Signature = 31;
pub const HPyFunc_Signature_HPyFunc_SETTER: HPyFunc_Signature = 32;
pub const HPyFunc_Signature_HPyFunc_OBJOBJPROC: HPyFunc_Signature = 33;
pub const HPyFunc_Signature_HPyFunc_TRAVERSEPROC: HPyFunc_Signature = 34;
pub const HPyFunc_Signature_HPyFunc_DESTRUCTOR: HPyFunc_Signature = 35;
pub type HPyFunc_Signature = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPy_buffer {
pub buf: *mut ::std::os::raw::c_void,
pub obj: HPy,
pub len: HPy_ssize_t,
pub itemsize: HPy_ssize_t,
pub readonly: ::std::os::raw::c_int,
pub ndim: ::std::os::raw::c_int,
pub format: *mut ::std::os::raw::c_char,
pub shape: *mut HPy_ssize_t,
pub strides: *mut HPy_ssize_t,
pub suboffsets: *mut HPy_ssize_t,
pub internal: *mut ::std::os::raw::c_void,
}
pub type HPyFunc_visitproc = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut HPyField,
arg2: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_noargs =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, self_: HPy) -> HPy>;
pub type HPyFunc_o =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, self_: HPy, arg: HPy) -> HPy>;
pub type HPyFunc_varargs = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
self_: HPy,
args: *mut HPy,
nargs: HPy_ssize_t,
) -> HPy,
>;
pub type HPyFunc_keywords = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
self_: HPy,
args: *mut HPy,
nargs: HPy_ssize_t,
kw: HPy,
) -> HPy,
>;
pub type HPyFunc_unaryfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy>;
pub type HPyFunc_binaryfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy) -> HPy>;
pub type HPyFunc_ternaryfunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy, arg3: HPy) -> HPy,
>;
pub type HPyFunc_inquiry = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_lenfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy_ssize_t>;
pub type HPyFunc_ssizeargfunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy_ssize_t) -> HPy,
>;
pub type HPyFunc_ssizessizeargfunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy_ssize_t,
arg3: HPy_ssize_t,
) -> HPy,
>;
pub type HPyFunc_ssizeobjargproc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy_ssize_t,
arg3: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_ssizessizeobjargproc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy_ssize_t,
arg3: HPy_ssize_t,
arg4: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_objobjargproc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy,
arg3: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_freefunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: *mut ::std::os::raw::c_void),
>;
pub type HPyFunc_getattrfunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: *mut ::std::os::raw::c_char) -> HPy,
>;
pub type HPyFunc_getattrofunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy) -> HPy>;
pub type HPyFunc_setattrfunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: *mut ::std::os::raw::c_char,
arg3: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_setattrofunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy,
arg3: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_reprfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy>;
pub type HPyFunc_hashfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy_hash_t>;
pub type HPyFunc_richcmpfunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy, arg3: HPy_RichCmpOp) -> HPy,
>;
pub type HPyFunc_getiterfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy>;
pub type HPyFunc_iternextfunc =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy) -> HPy>;
pub type HPyFunc_descrgetfunc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy, arg3: HPy) -> HPy,
>;
pub type HPyFunc_descrsetfunc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy,
arg3: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_initproc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
self_: HPy,
args: *mut HPy,
nargs: HPy_ssize_t,
kw: HPy,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_getter = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: *mut ::std::os::raw::c_void) -> HPy,
>;
pub type HPyFunc_setter = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: HPy,
arg3: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_objobjproc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: HPy) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_getbufferproc = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut HPyContext,
arg1: HPy,
arg2: *mut HPy_buffer,
arg3: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_releasebufferproc = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy, arg2: *mut HPy_buffer),
>;
pub type HPyFunc_traverseproc = ::std::option::Option<
unsafe extern "C" fn(
object: *mut ::std::os::raw::c_void,
visit: HPyFunc_visitproc,
arg: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type HPyFunc_destructor =
::std::option::Option<unsafe extern "C" fn(ctx: *mut HPyContext, arg1: HPy)>;
pub type HPyFunc_destroyfunc =
::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub const HPySlot_Slot_HPy_bf_getbuffer: HPySlot_Slot = 1;
pub const HPySlot_Slot_HPy_bf_releasebuffer: HPySlot_Slot = 2;
pub const HPySlot_Slot_HPy_mp_ass_subscript: HPySlot_Slot = 3;
pub const HPySlot_Slot_HPy_mp_length: HPySlot_Slot = 4;
pub const HPySlot_Slot_HPy_mp_subscript: HPySlot_Slot = 5;
pub const HPySlot_Slot_HPy_nb_absolute: HPySlot_Slot = 6;
pub const HPySlot_Slot_HPy_nb_add: HPySlot_Slot = 7;
pub const HPySlot_Slot_HPy_nb_and: HPySlot_Slot = 8;
pub const HPySlot_Slot_HPy_nb_bool: HPySlot_Slot = 9;
pub const HPySlot_Slot_HPy_nb_divmod: HPySlot_Slot = 10;
pub const HPySlot_Slot_HPy_nb_float: HPySlot_Slot = 11;
pub const HPySlot_Slot_HPy_nb_floor_divide: HPySlot_Slot = 12;
pub const HPySlot_Slot_HPy_nb_index: HPySlot_Slot = 13;
pub const HPySlot_Slot_HPy_nb_inplace_add: HPySlot_Slot = 14;
pub const HPySlot_Slot_HPy_nb_inplace_and: HPySlot_Slot = 15;
pub const HPySlot_Slot_HPy_nb_inplace_floor_divide: HPySlot_Slot = 16;
pub const HPySlot_Slot_HPy_nb_inplace_lshift: HPySlot_Slot = 17;
pub const HPySlot_Slot_HPy_nb_inplace_multiply: HPySlot_Slot = 18;
pub const HPySlot_Slot_HPy_nb_inplace_or: HPySlot_Slot = 19;
pub const HPySlot_Slot_HPy_nb_inplace_power: HPySlot_Slot = 20;
pub const HPySlot_Slot_HPy_nb_inplace_remainder: HPySlot_Slot = 21;
pub const HPySlot_Slot_HPy_nb_inplace_rshift: HPySlot_Slot = 22;
pub const HPySlot_Slot_HPy_nb_inplace_subtract: HPySlot_Slot = 23;
pub const HPySlot_Slot_HPy_nb_inplace_true_divide: HPySlot_Slot = 24;
pub const HPySlot_Slot_HPy_nb_inplace_xor: HPySlot_Slot = 25;
pub const HPySlot_Slot_HPy_nb_int: HPySlot_Slot = 26;
pub const HPySlot_Slot_HPy_nb_invert: HPySlot_Slot = 27;
pub const HPySlot_Slot_HPy_nb_lshift: HPySlot_Slot = 28;
pub const HPySlot_Slot_HPy_nb_multiply: HPySlot_Slot = 29;
pub const HPySlot_Slot_HPy_nb_negative: HPySlot_Slot = 30;
pub const HPySlot_Slot_HPy_nb_or: HPySlot_Slot = 31;
pub const HPySlot_Slot_HPy_nb_positive: HPySlot_Slot = 32;
pub const HPySlot_Slot_HPy_nb_power: HPySlot_Slot = 33;
pub const HPySlot_Slot_HPy_nb_remainder: HPySlot_Slot = 34;
pub const HPySlot_Slot_HPy_nb_rshift: HPySlot_Slot = 35;
pub const HPySlot_Slot_HPy_nb_subtract: HPySlot_Slot = 36;
pub const HPySlot_Slot_HPy_nb_true_divide: HPySlot_Slot = 37;
pub const HPySlot_Slot_HPy_nb_xor: HPySlot_Slot = 38;
pub const HPySlot_Slot_HPy_sq_ass_item: HPySlot_Slot = 39;
pub const HPySlot_Slot_HPy_sq_concat: HPySlot_Slot = 40;
pub const HPySlot_Slot_HPy_sq_contains: HPySlot_Slot = 41;
pub const HPySlot_Slot_HPy_sq_inplace_concat: HPySlot_Slot = 42;
pub const HPySlot_Slot_HPy_sq_inplace_repeat: HPySlot_Slot = 43;
pub const HPySlot_Slot_HPy_sq_item: HPySlot_Slot = 44;
pub const HPySlot_Slot_HPy_sq_length: HPySlot_Slot = 45;
pub const HPySlot_Slot_HPy_sq_repeat: HPySlot_Slot = 46;
pub const HPySlot_Slot_HPy_tp_init: HPySlot_Slot = 60;
pub const HPySlot_Slot_HPy_tp_new: HPySlot_Slot = 65;
pub const HPySlot_Slot_HPy_tp_repr: HPySlot_Slot = 66;
pub const HPySlot_Slot_HPy_tp_richcompare: HPySlot_Slot = 67;
pub const HPySlot_Slot_HPy_tp_traverse: HPySlot_Slot = 71;
pub const HPySlot_Slot_HPy_nb_matrix_multiply: HPySlot_Slot = 75;
pub const HPySlot_Slot_HPy_nb_inplace_matrix_multiply: HPySlot_Slot = 76;
pub const HPySlot_Slot_HPy_tp_finalize: HPySlot_Slot = 80;
pub const HPySlot_Slot_HPy_tp_destroy: HPySlot_Slot = 1000;
pub type HPySlot_Slot = ::std::os::raw::c_uint;
pub type HPyCFunction =
::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPySlot {
pub slot: HPySlot_Slot,
pub impl_: HPyCFunction,
pub cpy_trampoline: cpy_PyCFunction,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyMeth {
pub name: *const ::std::os::raw::c_char,
pub impl_: HPyCFunction,
pub cpy_trampoline: cpy_PyCFunction,
pub signature: HPyFunc_Signature,
pub doc: *const ::std::os::raw::c_char,
}
pub const HPyMember_FieldType_HPyMember_SHORT: HPyMember_FieldType = 0;
pub const HPyMember_FieldType_HPyMember_INT: HPyMember_FieldType = 1;
pub const HPyMember_FieldType_HPyMember_LONG: HPyMember_FieldType = 2;
pub const HPyMember_FieldType_HPyMember_FLOAT: HPyMember_FieldType = 3;
pub const HPyMember_FieldType_HPyMember_DOUBLE: HPyMember_FieldType = 4;
pub const HPyMember_FieldType_HPyMember_STRING: HPyMember_FieldType = 5;
pub const HPyMember_FieldType_HPyMember_OBJECT: HPyMember_FieldType = 6;
pub const HPyMember_FieldType_HPyMember_CHAR: HPyMember_FieldType = 7;
pub const HPyMember_FieldType_HPyMember_BYTE: HPyMember_FieldType = 8;
pub const HPyMember_FieldType_HPyMember_UBYTE: HPyMember_FieldType = 9;
pub const HPyMember_FieldType_HPyMember_USHORT: HPyMember_FieldType = 10;
pub const HPyMember_FieldType_HPyMember_UINT: HPyMember_FieldType = 11;
pub const HPyMember_FieldType_HPyMember_ULONG: HPyMember_FieldType = 12;
pub const HPyMember_FieldType_HPyMember_STRING_INPLACE: HPyMember_FieldType = 13;
pub const HPyMember_FieldType_HPyMember_BOOL: HPyMember_FieldType = 14;
pub const HPyMember_FieldType_HPyMember_OBJECT_EX: HPyMember_FieldType = 16;
pub const HPyMember_FieldType_HPyMember_LONGLONG: HPyMember_FieldType = 17;
pub const HPyMember_FieldType_HPyMember_ULONGLONG: HPyMember_FieldType = 18;
pub const HPyMember_FieldType_HPyMember_HPYSSIZET: HPyMember_FieldType = 19;
pub const HPyMember_FieldType_HPyMember_NONE: HPyMember_FieldType = 20;
pub type HPyMember_FieldType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyMember {
pub name: *const ::std::os::raw::c_char,
pub type_: HPyMember_FieldType,
pub offset: HPy_ssize_t,
pub readonly: ::std::os::raw::c_int,
pub doc: *const ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyGetSet {
pub name: *const ::std::os::raw::c_char,
pub getter_impl: HPyCFunction,
pub setter_impl: HPyCFunction,
pub getter_cpy_trampoline: cpy_getter,
pub setter_cpy_trampoline: cpy_setter,
pub doc: *const ::std::os::raw::c_char,
pub closure: *mut ::std::os::raw::c_void,
}
pub const HPyDef_Kind_HPyDef_Kind_Slot: HPyDef_Kind = 1;
pub const HPyDef_Kind_HPyDef_Kind_Meth: HPyDef_Kind = 2;
pub const HPyDef_Kind_HPyDef_Kind_Member: HPyDef_Kind = 3;
pub const HPyDef_Kind_HPyDef_Kind_GetSet: HPyDef_Kind = 4;
pub type HPyDef_Kind = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HPyDef {
pub kind: HPyDef_Kind,
pub __bindgen_anon_1: HPyDef__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union HPyDef__bindgen_ty_1 {
pub slot: HPySlot,
pub meth: HPyMeth,
pub member: HPyMember,
pub getset: HPyGetSet,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyType_Spec {
pub name: *const ::std::os::raw::c_char,
pub basicsize: ::std::os::raw::c_int,
pub itemsize: ::std::os::raw::c_int,
pub flags: ::std::os::raw::c_ulong,
pub legacy: ::std::os::raw::c_int,
pub legacy_slots: *mut ::std::os::raw::c_void,
pub defines: *mut *mut HPyDef,
pub doc: *const ::std::os::raw::c_char,
}
pub const HPyType_SpecParam_Kind_HPyType_SpecParam_Base: HPyType_SpecParam_Kind = 1;
pub const HPyType_SpecParam_Kind_HPyType_SpecParam_BasesTuple: HPyType_SpecParam_Kind = 2;
pub type HPyType_SpecParam_Kind = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyType_SpecParam {
pub kind: HPyType_SpecParam_Kind,
pub object: HPy,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HPyModuleDef {
pub name: *const ::std::os::raw::c_char,
pub doc: *const ::std::os::raw::c_char,
pub size: HPy_ssize_t,
pub legacy_methods: *mut cpy_PyMethodDef,
pub defines: *mut *mut HPyDef,
pub globals: *mut *mut HPyGlobal,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _HPyContext_s {
pub name: *const ::std::os::raw::c_char,
pub h_None: HPy,
pub h_True: HPy,
pub h_False: HPy,
pub h_NotImplemented: HPy,
pub h_Ellipsis: HPy,
pub h_BaseException: HPy,
pub h_Exception: HPy,
pub h_StopAsyncIteration: HPy,
pub h_StopIteration: HPy,
pub h_GeneratorExit: HPy,
pub h_ArithmeticError: HPy,
pub h_LookupError: HPy,
pub h_AssertionError: HPy,
pub h_AttributeError: HPy,
pub h_BufferError: HPy,
pub h_EOFError: HPy,
pub h_FloatingPointError: HPy,
pub h_OSError: HPy,
pub h_ImportError: HPy,
pub h_ModuleNotFoundError: HPy,
pub h_IndexError: HPy,
pub h_KeyError: HPy,
pub h_KeyboardInterrupt: HPy,
pub h_MemoryError: HPy,
pub h_NameError: HPy,
pub h_OverflowError: HPy,
pub h_RuntimeError: HPy,
pub h_RecursionError: HPy,
pub h_NotImplementedError: HPy,
pub h_SyntaxError: HPy,
pub h_IndentationError: HPy,
pub h_TabError: HPy,
pub h_ReferenceError: HPy,
pub h_SystemError: HPy,
pub h_SystemExit: HPy,
pub h_TypeError: HPy,
pub h_UnboundLocalError: HPy,
pub h_UnicodeError: HPy,
pub h_UnicodeEncodeError: HPy,
pub h_UnicodeDecodeError: HPy,
pub h_UnicodeTranslateError: HPy,
pub h_ValueError: HPy,
pub h_ZeroDivisionError: HPy,
pub h_BlockingIOError: HPy,
pub h_BrokenPipeError: HPy,
pub h_ChildProcessError: HPy,
pub h_ConnectionError: HPy,
pub h_ConnectionAbortedError: HPy,
pub h_ConnectionRefusedError: HPy,
pub h_ConnectionResetError: HPy,
pub h_FileExistsError: HPy,
pub h_FileNotFoundError: HPy,
pub h_InterruptedError: HPy,
pub h_IsADirectoryError: HPy,
pub h_NotADirectoryError: HPy,
pub h_PermissionError: HPy,
pub h_ProcessLookupError: HPy,
pub h_TimeoutError: HPy,
pub h_Warning: HPy,
pub h_UserWarning: HPy,
pub h_DeprecationWarning: HPy,
pub h_PendingDeprecationWarning: HPy,
pub h_SyntaxWarning: HPy,
pub h_RuntimeWarning: HPy,
pub h_FutureWarning: HPy,
pub h_ImportWarning: HPy,
pub h_UnicodeWarning: HPy,
pub h_BytesWarning: HPy,
pub h_ResourceWarning: HPy,
pub h_BaseObjectType: HPy,
pub h_TypeType: HPy,
pub h_BoolType: HPy,
pub h_LongType: HPy,
pub h_FloatType: HPy,
pub h_UnicodeType: HPy,
pub h_TupleType: HPy,
pub h_ListType: HPy,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment