1
#ifndef __PYX_HAVE_API__bzrlib___simple_set_pyx
2
#define __PYX_HAVE_API__bzrlib___simple_set_pyx
4
#include "_simple_set_pyx.h"
6
static PyTypeObject *__pyx_ptype_6bzrlib_15_simple_set_pyx_SimpleSet;
7
#define SimpleSet_Type (*__pyx_ptype_6bzrlib_15_simple_set_pyx_SimpleSet)
9
static struct SimpleSetObject *(*SimpleSet_New)(void);
10
static PyObject *(*SimpleSet_Add)(PyObject *, PyObject *);
11
static int (*SimpleSet_Contains)(PyObject *, PyObject *);
12
static int (*SimpleSet_Discard)(PyObject *, PyObject *);
13
static PyObject *(*SimpleSet_Get)(struct SimpleSetObject *, PyObject *);
14
static Py_ssize_t (*SimpleSet_Size)(PyObject *);
15
static int (*SimpleSet_Next)(PyObject *, Py_ssize_t *, PyObject **);
16
static PyObject **(*_SimpleSet_Lookup)(PyObject *, PyObject *);
18
#ifndef __PYX_HAVE_API_FUNC_import_module
19
#define __PYX_HAVE_API_FUNC_import_module
21
#ifndef __PYX_HAVE_RT_ImportModule
22
#define __PYX_HAVE_RT_ImportModule
23
static PyObject *__Pyx_ImportModule(const char *name) {
24
PyObject *py_name = 0;
25
PyObject *py_module = 0;
27
#if PY_MAJOR_VERSION < 3
28
py_name = PyString_FromString(name);
30
py_name = PyUnicode_FromString(name);
34
py_module = PyImport_Import(py_name);
46
#ifndef __PYX_HAVE_RT_ImportFunction
47
#define __PYX_HAVE_RT_ImportFunction
48
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
56
d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
59
cobj = PyDict_GetItemString(d, funcname);
61
PyErr_Format(PyExc_ImportError,
62
"%s does not export expected C function %s",
63
PyModule_GetName(module), funcname);
66
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
67
if (!PyCapsule_IsValid(cobj, sig)) {
68
PyErr_Format(PyExc_TypeError,
69
"C function %s.%s has wrong signature (expected %s, got %s)",
70
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
73
tmp.p = PyCapsule_GetPointer(cobj, sig);
75
{const char *desc, *s1, *s2;
76
desc = (const char *)PyCObject_GetDesc(cobj);
80
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
82
PyErr_Format(PyExc_TypeError,
83
"C function %s.%s has wrong signature (expected %s, got %s)",
84
PyModule_GetName(module), funcname, sig, desc);
87
tmp.p = PyCObject_AsVoidPtr(cobj);}
101
#ifndef __PYX_HAVE_RT_ImportType
102
#define __PYX_HAVE_RT_ImportType
103
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
104
long size, int strict)
106
PyObject *py_module = 0;
107
PyObject *result = 0;
108
PyObject *py_name = 0;
111
py_module = __Pyx_ImportModule(module_name);
114
#if PY_MAJOR_VERSION < 3
115
py_name = PyString_FromString(class_name);
117
py_name = PyUnicode_FromString(class_name);
121
result = PyObject_GetAttr(py_module, py_name);
124
Py_DECREF(py_module);
128
if (!PyType_Check(result)) {
129
PyErr_Format(PyExc_TypeError,
130
"%s.%s is not a type object",
131
module_name, class_name);
134
if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
135
PyOS_snprintf(warning, sizeof(warning),
136
"%s.%s size changed, may indicate binary incompatibility",
137
module_name, class_name);
138
#if PY_VERSION_HEX < 0x02050000
139
PyErr_Warn(NULL, warning);
141
PyErr_WarnEx(NULL, warning, 0);
144
else if (((PyTypeObject *)result)->tp_basicsize != size) {
145
PyErr_Format(PyExc_ValueError,
146
"%s.%s has the wrong size, try recompiling",
147
module_name, class_name);
150
return (PyTypeObject *)result;
152
Py_XDECREF(py_module);
158
static int import_bzrlib___simple_set_pyx(void) {
159
PyObject *module = 0;
160
module = __Pyx_ImportModule("bzrlib._simple_set_pyx");
161
if (!module) goto bad;
162
if (__Pyx_ImportFunction(module, "SimpleSet_New", (void (**)(void))&SimpleSet_New, "struct SimpleSetObject *(void)") < 0) goto bad;
163
if (__Pyx_ImportFunction(module, "SimpleSet_Add", (void (**)(void))&SimpleSet_Add, "PyObject *(PyObject *, PyObject *)") < 0) goto bad;
164
if (__Pyx_ImportFunction(module, "SimpleSet_Contains", (void (**)(void))&SimpleSet_Contains, "int (PyObject *, PyObject *)") < 0) goto bad;
165
if (__Pyx_ImportFunction(module, "SimpleSet_Discard", (void (**)(void))&SimpleSet_Discard, "int (PyObject *, PyObject *)") < 0) goto bad;
166
if (__Pyx_ImportFunction(module, "SimpleSet_Get", (void (**)(void))&SimpleSet_Get, "PyObject *(struct SimpleSetObject *, PyObject *)") < 0) goto bad;
167
if (__Pyx_ImportFunction(module, "SimpleSet_Size", (void (**)(void))&SimpleSet_Size, "Py_ssize_t (PyObject *)") < 0) goto bad;
168
if (__Pyx_ImportFunction(module, "SimpleSet_Next", (void (**)(void))&SimpleSet_Next, "int (PyObject *, Py_ssize_t *, PyObject **)") < 0) goto bad;
169
if (__Pyx_ImportFunction(module, "_SimpleSet_Lookup", (void (**)(void))&_SimpleSet_Lookup, "PyObject **(PyObject *, PyObject *)") < 0) goto bad;
170
Py_DECREF(module); module = 0;
171
__pyx_ptype_6bzrlib_15_simple_set_pyx_SimpleSet = __Pyx_ImportType("bzrlib._simple_set_pyx", "SimpleSet", sizeof(struct SimpleSetObject), 1); if (!__pyx_ptype_6bzrlib_15_simple_set_pyx_SimpleSet) goto bad;