/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.38
+ * Version 1.3.33
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
#define SWIGPYTHON
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
-
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
# endif
#endif
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-# pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif
-#endif
-
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
/* -----------------------------------------------------------------------------
* swigrun.swg
*
- * This file contains generic C API SWIG runtime support for pointer
+ * This file contains generic CAPI SWIG runtime support for pointer
* type checking.
* ----------------------------------------------------------------------------- */
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "4"
+#define SWIG_RUNTIME_VERSION "3"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
/*
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
- creating a static or dynamic library from the SWIG runtime code.
- In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+ creating a static or dynamic library from the swig runtime code.
+ In 99.9% of the cases, swig just needs to declare them as 'static'.
- But only do this if strictly necessary, ie, if you have problems
- with your compiler or suchlike.
+ But only do this if is strictly necessary, ie, if you have problems
+ with your compiler or so.
*/
#ifndef SWIGRUNTIME
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
-#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
/*
Flags/methods for returning states.
- The SWIG conversion methods, as ConvertPtr, return and integer
+ The swig conversion methods, as ConvertPtr, return and integer
that tells if the conversion was successful or not. And if not,
an error code can be returned (see swigerrors.swg for the codes).
Use the following macros/flags to set or process the returning
states.
- In old versions of SWIG, code such as the following was usually written:
+ In old swig versions, you usually write code as:
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
// success code
//fail code
}
- Now you can be more explicit:
+ Now you can be more explicit as:
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
if (SWIG_IsOK(res)) {
// fail code
}
- which is the same really, but now you can also do
+ that seems to be the same, but now you can also do
Type *ptr;
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
I.e., now SWIG_ConvertPtr can return new objects and you can
identify the case and take care of the deallocation. Of course that
- also requires SWIG_ConvertPtr to return new result values, such as
+ requires also to SWIG_ConvertPtr to return new result values, as
int SWIG_ConvertPtr(obj, ptr,...) {
if (<obj is ok>) {
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
- SWIG errors code.
+ swig errors code.
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
allows to return the 'cast rank', for example, if you have this
fooi(1) // cast rank '0'
just use the SWIG_AddCast()/SWIG_CheckState()
-*/
+
+ */
#define SWIG_OK (0)
#define SWIG_ERROR (-1)
#define SWIG_IsOK(r) (r >= 0)
#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
# ifndef SWIG_TypeRank
#endif
+
+
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *, int *);
+typedef void *(*swig_converter_func)(void *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store information on one type */
+/* Structure to store inforomation on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
}
+/* think of this as a c++ template<> or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty) \
+ if (ty) { \
+ swig_cast_info *iter = ty->cast; \
+ while (iter) { \
+ if (comparison) { \
+ if (iter == ty->cast) return iter; \
+ /* Move iter to the top of the linked list */ \
+ iter->prev->next = iter->next; \
+ if (iter->next) \
+ iter->next->prev = iter->prev; \
+ iter->next = ty->cast; \
+ iter->prev = 0; \
+ if (ty->cast) ty->cast->prev = iter; \
+ ty->cast = iter; \
+ return iter; \
+ } \
+ iter = iter->next; \
+ } \
+ } \
+ return 0
+
/*
Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
- if (ty) {
- swig_cast_info *iter = ty->cast;
- while (iter) {
- if (strcmp(iter->type->name, c) == 0) {
- if (iter == ty->cast)
- return iter;
- /* Move iter to the top of the linked list */
- iter->prev->next = iter->next;
- if (iter->next)
- iter->next->prev = iter->prev;
- iter->next = ty->cast;
- iter->prev = 0;
- if (ty->cast) ty->cast->prev = iter;
- ty->cast = iter;
- return iter;
- }
- iter = iter->next;
- }
- }
- return 0;
+ SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
}
-/*
- Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
-*/
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
- if (ty) {
- swig_cast_info *iter = ty->cast;
- while (iter) {
- if (iter->type == from) {
- if (iter == ty->cast)
- return iter;
- /* Move iter to the top of the linked list */
- iter->prev->next = iter->next;
- if (iter->next)
- iter->next->prev = iter->prev;
- iter->next = ty->cast;
- iter->prev = 0;
- if (ty->cast) ty->cast->prev = iter;
- ty->cast = iter;
- return iter;
- }
- iter = iter->next;
- }
- }
- return 0;
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+ SWIG_TypeCheck_Template(iter->type == from, into);
}
/*
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
}
/*
-/* Compatibility marcos for Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
-
-#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
-#define PyInt_Check(x) PyLong_Check(x)
-#define PyInt_AsLong(x) PyLong_AsLong(x)
-#define PyInt_FromLong(x) PyLong_FromLong(x)
-#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
-
-#endif
-
-#ifndef Py_TYPE
-# define Py_TYPE(op) ((op)->ob_type)
-#endif
-
-/* SWIG APIs for compatibility of both Python 2 & 3 */
-
-#if PY_VERSION_HEX >= 0x03000000
-# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
-#else
-# define SWIG_Python_str_FromFormat PyString_FromFormat
-#endif
-
-SWIGINTERN char*
-SWIG_Python_str_AsChar(PyObject *str)
-{
-#if PY_VERSION_HEX >= 0x03000000
- str = PyUnicode_AsUTF8String(str);
- return PyBytes_AsString(str);
-#else
- return PyString_AsString(str);
-#endif
-}
-
-SWIGINTERN PyObject*
-SWIG_Python_str_FromChar(const char *c)
-{
-#if PY_VERSION_HEX >= 0x03000000
- return PyUnicode_FromString(c);
-#else
- return PyString_FromString(c);
-#endif
-}
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# define PyObject_GenericGetAttr 0
# endif
#endif
-
/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
# endif
#endif
+
/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
# endif
#endif
+
/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *old_str = PyObject_Str(value);
PyErr_Clear();
Py_XINCREF(type);
-
- PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg);
+ PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_SetString(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, mesg);
}
}
+
+
#if defined(SWIG_PYTHON_NO_THREADS)
# if defined(SWIG_PYTHON_THREADS)
# undef SWIG_PYTHON_THREADS
swig_type_info **ptype;
} swig_const_info;
-
-/* -----------------------------------------------------------------------------
- * Wrapper of PyInstanceMethod_New() used in Python 3
- * It is exported to the generated module, used for -fastproxy
- * ----------------------------------------------------------------------------- */
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
-{
-#if PY_VERSION_HEX >= 0x03000000
- return PyInstanceMethod_New(func);
-#else
- return NULL;
-#endif
-}
-
#ifdef __cplusplus
#if 0
{ /* cc-mode */
#define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
-#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
+#define SWIG_NewClientData(obj) PySwigClientData_New(obj)
#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
return none;
}
-/* SwigPyClientData */
+/* PySwigClientData */
typedef struct {
PyObject *klass;
PyObject *destroy;
int delargs;
int implicitconv;
-} SwigPyClientData;
+} PySwigClientData;
SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
- SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
+ PySwigClientData *data = (PySwigClientData *)ty->clientdata;
return data ? data->implicitconv : 0;
}
SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
- SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
+ PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
PyObject *klass = data ? data->klass : 0;
return (klass ? klass : PyExc_RuntimeError);
}
-SWIGRUNTIME SwigPyClientData *
-SwigPyClientData_New(PyObject* obj)
+SWIGRUNTIME PySwigClientData *
+PySwigClientData_New(PyObject* obj)
{
if (!obj) {
return 0;
} else {
- SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
+ PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
/* the klass element */
data->klass = obj;
Py_INCREF(data->klass);
}
SWIGRUNTIME void
-SwigPyClientData_Del(SwigPyClientData* data)
+PySwigClientData_Del(PySwigClientData* data)
{
Py_XDECREF(data->newraw);
Py_XDECREF(data->newargs);
Py_XDECREF(data->destroy);
}
-/* =============== SwigPyObject =====================*/
+/* =============== PySwigObject =====================*/
typedef struct {
PyObject_HEAD
swig_type_info *ty;
int own;
PyObject *next;
-} SwigPyObject;
+} PySwigObject;
SWIGRUNTIME PyObject *
-SwigPyObject_long(SwigPyObject *v)
+PySwigObject_long(PySwigObject *v)
{
return PyLong_FromVoidPtr(v->ptr);
}
SWIGRUNTIME PyObject *
-SwigPyObject_format(const char* fmt, SwigPyObject *v)
+PySwigObject_format(const char* fmt, PySwigObject *v)
{
PyObject *res = NULL;
PyObject *args = PyTuple_New(1);
if (args) {
- if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
- PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
+ if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
+ PyObject *ofmt = PyString_FromString(fmt);
if (ofmt) {
-#if PY_VERSION_HEX >= 0x03000000
- res = PyUnicode_Format(ofmt,args);
-#else
res = PyString_Format(ofmt,args);
-#endif
Py_DECREF(ofmt);
}
Py_DECREF(args);
}
SWIGRUNTIME PyObject *
-SwigPyObject_oct(SwigPyObject *v)
+PySwigObject_oct(PySwigObject *v)
{
- return SwigPyObject_format("%o",v);
+ return PySwigObject_format("%o",v);
}
SWIGRUNTIME PyObject *
-SwigPyObject_hex(SwigPyObject *v)
+PySwigObject_hex(PySwigObject *v)
{
- return SwigPyObject_format("%x",v);
+ return PySwigObject_format("%x",v);
}
SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
-SwigPyObject_repr(SwigPyObject *v)
+PySwigObject_repr(PySwigObject *v)
#else
-SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+PySwigObject_repr(PySwigObject *v, PyObject *args)
#endif
{
const char *name = SWIG_TypePrettyName(v->ty);
- PyObject *hex = SwigPyObject_hex(v);
- PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, hex);
+ PyObject *hex = PySwigObject_hex(v);
+ PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
Py_DECREF(hex);
if (v->next) {
#ifdef METH_NOARGS
- PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
+ PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
#else
- PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
+ PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
#endif
-#if PY_VERSION_HEX >= 0x03000000
- PyObject *joined = PyUnicode_Concat(repr, nrep);
- Py_DecRef(repr);
- Py_DecRef(nrep);
- repr = joined;
-#else
PyString_ConcatAndDel(&repr,nrep);
-#endif
}
return repr;
}
SWIGRUNTIME int
-SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
#ifdef METH_NOARGS
- PyObject *repr = SwigPyObject_repr(v);
+ PyObject *repr = PySwigObject_repr(v);
#else
- PyObject *repr = SwigPyObject_repr(v, NULL);
+ PyObject *repr = PySwigObject_repr(v, NULL);
#endif
if (repr) {
- fputs(SWIG_Python_str_AsChar(repr), fp);
+ fputs(PyString_AsString(repr), fp);
Py_DECREF(repr);
return 0;
} else {
}
SWIGRUNTIME PyObject *
-SwigPyObject_str(SwigPyObject *v)
+PySwigObject_str(PySwigObject *v)
{
char result[SWIG_BUFFER_SIZE];
return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
- SWIG_Python_str_FromChar(result) : 0;
+ PyString_FromString(result) : 0;
}
SWIGRUNTIME int
-SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
{
void *i = v->ptr;
void *j = w->ptr;
return (i < j) ? -1 : ((i > j) ? 1 : 0);
}
-/* Added for Python 3.x, whould it also useful for Python 2.x? */
-SWIGRUNTIME PyObject*
-SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
-{
- PyObject* res;
- if( op != Py_EQ && op != Py_NE ) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
- res = Py_True;
- else
- res = Py_False;
- Py_INCREF(res);
- return res;
-}
-
-
SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
SWIGRUNTIME PyTypeObject*
-SwigPyObject_type(void) {
+PySwigObject_type(void) {
static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
return type;
}
SWIGRUNTIMEINLINE int
-SwigPyObject_Check(PyObject *op) {
- return (Py_TYPE(op) == SwigPyObject_type())
- || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+PySwigObject_Check(PyObject *op) {
+ return ((op)->ob_type == PySwigObject_type())
+ || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
}
SWIGRUNTIME PyObject *
-SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
+PySwigObject_New(void *ptr, swig_type_info *ty, int own);
SWIGRUNTIME void
-SwigPyObject_dealloc(PyObject *v)
+PySwigObject_dealloc(PyObject *v)
{
- SwigPyObject *sobj = (SwigPyObject *) v;
+ PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own == SWIG_POINTER_OWN) {
+ if (sobj->own) {
swig_type_info *ty = sobj->ty;
- SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+ PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
if (destroy) {
/* destroy is always a VARARGS method */
PyObject *res;
if (data->delargs) {
/* we need to create a temporal object to carry the destroy operation */
- PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+ PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
} else {
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- }
-#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- else {
+ } else {
const char *name = SWIG_TypePrettyName(ty);
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
- }
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
#endif
+ }
}
Py_XDECREF(next);
PyObject_DEL(v);
}
SWIGRUNTIME PyObject*
-SwigPyObject_append(PyObject* v, PyObject* next)
+PySwigObject_append(PyObject* v, PyObject* next)
{
- SwigPyObject *sobj = (SwigPyObject *) v;
+ PySwigObject *sobj = (PySwigObject *) v;
#ifndef METH_O
PyObject *tmp = 0;
if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
next = tmp;
#endif
- if (!SwigPyObject_Check(next)) {
+ if (!PySwigObject_Check(next)) {
return NULL;
}
sobj->next = next;
SWIGRUNTIME PyObject*
#ifdef METH_NOARGS
-SwigPyObject_next(PyObject* v)
+PySwigObject_next(PyObject* v)
#else
-SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
- SwigPyObject *sobj = (SwigPyObject *) v;
+ PySwigObject *sobj = (PySwigObject *) v;
if (sobj->next) {
Py_INCREF(sobj->next);
return sobj->next;
SWIGINTERN PyObject*
#ifdef METH_NOARGS
-SwigPyObject_disown(PyObject *v)
+PySwigObject_disown(PyObject *v)
#else
-SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
- SwigPyObject *sobj = (SwigPyObject *)v;
+ PySwigObject *sobj = (PySwigObject *)v;
sobj->own = 0;
return SWIG_Py_Void();
}
SWIGINTERN PyObject*
#ifdef METH_NOARGS
-SwigPyObject_acquire(PyObject *v)
+PySwigObject_acquire(PyObject *v)
#else
-SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
- SwigPyObject *sobj = (SwigPyObject *)v;
+ PySwigObject *sobj = (PySwigObject *)v;
sobj->own = SWIG_POINTER_OWN;
return SWIG_Py_Void();
}
SWIGINTERN PyObject*
-SwigPyObject_own(PyObject *v, PyObject *args)
+PySwigObject_own(PyObject *v, PyObject *args)
{
PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
}
else
{
- SwigPyObject *sobj = (SwigPyObject *)v;
+ PySwigObject *sobj = (PySwigObject *)v;
PyObject *obj = PyBool_FromLong(sobj->own);
if (val) {
#ifdef METH_NOARGS
if (PyObject_IsTrue(val)) {
- SwigPyObject_acquire(v);
+ PySwigObject_acquire(v);
} else {
- SwigPyObject_disown(v);
+ PySwigObject_disown(v);
}
#else
if (PyObject_IsTrue(val)) {
- SwigPyObject_acquire(v,args);
+ PySwigObject_acquire(v,args);
} else {
- SwigPyObject_disown(v,args);
+ PySwigObject_disown(v,args);
}
#endif
}
#ifdef METH_O
static PyMethodDef
swigobject_methods[] = {
- {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
- {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
- {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
- {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
- {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
+ {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
+ {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
+ {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
+ {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#else
static PyMethodDef
swigobject_methods[] = {
- {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
- {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
- {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
- {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
- {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
+ {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
+ {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
+ {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+ {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
+ {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
+ {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#endif
#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
-SwigPyObject_getattr(SwigPyObject *sobj,char *name)
+PySwigObject_getattr(PySwigObject *sobj,char *name)
{
return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
_PySwigObject_type(void) {
static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
- static PyNumberMethods SwigPyObject_as_number = {
+ static PyNumberMethods PySwigObject_as_number = {
(binaryfunc)0, /*nb_add*/
(binaryfunc)0, /*nb_subtract*/
(binaryfunc)0, /*nb_multiply*/
- /* nb_divide removed in Python 3 */
-#if PY_VERSION_HEX < 0x03000000
(binaryfunc)0, /*nb_divide*/
-#endif
(binaryfunc)0, /*nb_remainder*/
(binaryfunc)0, /*nb_divmod*/
(ternaryfunc)0,/*nb_power*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
-#if PY_VERSION_HEX < 0x03000000
- 0, /*nb_coerce*/
-#endif
- (unaryfunc)SwigPyObject_long, /*nb_int*/
- (unaryfunc)SwigPyObject_long, /*nb_long*/
+ (coercion)0, /*nb_coerce*/
+ (unaryfunc)PySwigObject_long, /*nb_int*/
+ (unaryfunc)PySwigObject_long, /*nb_long*/
(unaryfunc)0, /*nb_float*/
-#if PY_VERSION_HEX < 0x03000000
- (unaryfunc)SwigPyObject_oct, /*nb_oct*/
- (unaryfunc)SwigPyObject_hex, /*nb_hex*/
-#endif
-#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
-#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+ (unaryfunc)PySwigObject_oct, /*nb_oct*/
+ (unaryfunc)PySwigObject_hex, /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#endif
};
- static PyTypeObject swigpyobject_type;
+ static PyTypeObject pyswigobject_type;
static int type_init = 0;
if (!type_init) {
const PyTypeObject tmp
= {
- /* PyOjbect header changed in Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
-#endif
- (char *)"SwigPyObject", /* tp_name */
- sizeof(SwigPyObject), /* tp_basicsize */
+ (char *)"PySwigObject", /* tp_name */
+ sizeof(PySwigObject), /* tp_basicsize */
0, /* tp_itemsize */
- (destructor)SwigPyObject_dealloc, /* tp_dealloc */
- (printfunc)SwigPyObject_print, /* tp_print */
+ (destructor)PySwigObject_dealloc, /* tp_dealloc */
+ (printfunc)PySwigObject_print, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
- (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
+ (getattrfunc)PySwigObject_getattr, /* tp_getattr */
#else
(getattrfunc)0, /* tp_getattr */
#endif
(setattrfunc)0, /* tp_setattr */
- (cmpfunc)SwigPyObject_compare, /* tp_compare */
- (reprfunc)SwigPyObject_repr, /* tp_repr */
- &SwigPyObject_as_number, /* tp_as_number */
+ (cmpfunc)PySwigObject_compare, /* tp_compare */
+ (reprfunc)PySwigObject_repr, /* tp_repr */
+ &PySwigObject_as_number, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
- (reprfunc)SwigPyObject_str, /* tp_str */
+ (reprfunc)PySwigObject_str, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
swigobject_doc, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
- (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */
+ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */
0, /* tp_alloc */
0, /* tp_new */
0, /* tp_free */
- 0, /* tp_is_gc */
+ 0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
- 0, /* tp_subclasses */
+ 0, /* tp_subclasses */
0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0,0,0,0 /* tp_alloc -> tp_next */
#endif
};
- swigpyobject_type = tmp;
- /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
- swigpyobject_type.ob_type = &PyType_Type;
-#endif
+ pyswigobject_type = tmp;
+ pyswigobject_type.ob_type = &PyType_Type;
type_init = 1;
}
- return &swigpyobject_type;
+ return &pyswigobject_type;
}
SWIGRUNTIME PyObject *
-SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
+PySwigObject_New(void *ptr, swig_type_info *ty, int own)
{
- SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
+ PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
if (sobj) {
sobj->ptr = ptr;
sobj->ty = ty;
void *pack;
swig_type_info *ty;
size_t size;
-} SwigPyPacked;
+} PySwigPacked;
SWIGRUNTIME int
-SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
char result[SWIG_BUFFER_SIZE];
fputs("<Swig Packed ", fp);
}
SWIGRUNTIME PyObject *
-SwigPyPacked_repr(SwigPyPacked *v)
+PySwigPacked_repr(PySwigPacked *v)
{
char result[SWIG_BUFFER_SIZE];
if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
- return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+ return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
} else {
- return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
+ return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
}
}
SWIGRUNTIME PyObject *
-SwigPyPacked_str(SwigPyPacked *v)
+PySwigPacked_str(PySwigPacked *v)
{
char result[SWIG_BUFFER_SIZE];
if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
- return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
+ return PyString_FromFormat("%s%s", result, v->ty->name);
} else {
- return SWIG_Python_str_FromChar(v->ty->name);
+ return PyString_FromString(v->ty->name);
}
}
SWIGRUNTIME int
-SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
{
size_t i = v->size;
size_t j = w->size;
SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
SWIGRUNTIME PyTypeObject*
-SwigPyPacked_type(void) {
+PySwigPacked_type(void) {
static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
return type;
}
SWIGRUNTIMEINLINE int
-SwigPyPacked_Check(PyObject *op) {
+PySwigPacked_Check(PyObject *op) {
return ((op)->ob_type == _PySwigPacked_type())
- || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
+ || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
}
SWIGRUNTIME void
-SwigPyPacked_dealloc(PyObject *v)
+PySwigPacked_dealloc(PyObject *v)
{
- if (SwigPyPacked_Check(v)) {
- SwigPyPacked *sobj = (SwigPyPacked *) v;
+ if (PySwigPacked_Check(v)) {
+ PySwigPacked *sobj = (PySwigPacked *) v;
free(sobj->pack);
}
PyObject_DEL(v);
SWIGRUNTIME PyTypeObject*
_PySwigPacked_type(void) {
static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
- static PyTypeObject swigpypacked_type;
+ static PyTypeObject pyswigpacked_type;
static int type_init = 0;
if (!type_init) {
const PyTypeObject tmp
= {
- /* PyObject header changed in Python 3 */
-#if PY_VERSION_HEX>=0x03000000
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else
PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
-#endif
- (char *)"SwigPyPacked", /* tp_name */
- sizeof(SwigPyPacked), /* tp_basicsize */
+ 0, /* ob_size */
+ (char *)"PySwigPacked", /* tp_name */
+ sizeof(PySwigPacked), /* tp_basicsize */
0, /* tp_itemsize */
- (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
- (printfunc)SwigPyPacked_print, /* tp_print */
+ (destructor)PySwigPacked_dealloc, /* tp_dealloc */
+ (printfunc)PySwigPacked_print, /* tp_print */
(getattrfunc)0, /* tp_getattr */
(setattrfunc)0, /* tp_setattr */
- (cmpfunc)SwigPyPacked_compare, /* tp_compare */
- (reprfunc)SwigPyPacked_repr, /* tp_repr */
+ (cmpfunc)PySwigPacked_compare, /* tp_compare */
+ (reprfunc)PySwigPacked_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
- (reprfunc)SwigPyPacked_str, /* tp_str */
+ (reprfunc)PySwigPacked_str, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
0,0,0,0 /* tp_alloc -> tp_next */
#endif
};
- swigpypacked_type = tmp;
- /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
- swigpypacked_type.ob_type = &PyType_Type;
-#endif
+ pyswigpacked_type = tmp;
+ pyswigpacked_type.ob_type = &PyType_Type;
type_init = 1;
}
- return &swigpypacked_type;
+ return &pyswigpacked_type;
}
SWIGRUNTIME PyObject *
-SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
+PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
- SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
+ PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
if (sobj) {
void *pack = malloc(size);
if (pack) {
}
SWIGRUNTIME swig_type_info *
-SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
- if (SwigPyPacked_Check(obj)) {
- SwigPyPacked *sobj = (SwigPyPacked *)obj;
+ if (PySwigPacked_Check(obj)) {
+ PySwigPacked *sobj = (PySwigPacked *)obj;
if (sobj->size != size) return 0;
memcpy(ptr, sobj->pack, size);
return sobj->ty;
SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)
{
- return SWIG_Python_str_FromChar("this");
+ return PyString_FromString("this");
}
SWIGRUNTIME PyObject *
/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
-/* TODO: I don't know how to implement the fast getset in Python 3 right now */
-#if PY_VERSION_HEX>=0x03000000
-#define SWIG_PYTHON_SLOW_GETSET_THIS
-#endif
-
-SWIGRUNTIME SwigPyObject *
+SWIGRUNTIME PySwigObject *
SWIG_Python_GetSwigThis(PyObject *pyobj)
{
- if (SwigPyObject_Check(pyobj)) {
- return (SwigPyObject *) pyobj;
+ if (PySwigObject_Check(pyobj)) {
+ return (PySwigObject *) pyobj;
} else {
PyObject *obj = 0;
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
return 0;
}
#endif
- if (obj && !SwigPyObject_Check(obj)) {
+ if (obj && !PySwigObject_Check(obj)) {
/* a PyObject is called 'this', try to get the 'real this'
- SwigPyObject from it */
+ PySwigObject from it */
return SWIG_Python_GetSwigThis(obj);
}
- return (SwigPyObject *)obj;
+ return (PySwigObject *)obj;
}
}
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own == SWIG_POINTER_OWN) {
- SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own) {
+ PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
sobj->own = own;
if (ptr) *ptr = 0;
return SWIG_OK;
} else {
- SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
- if (own)
- *own = 0;
+ PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
} else {
swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
if (!tc) {
- sobj = (SwigPyObject *)sobj->next;
+ sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) {
- int newmemory = 0;
- *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
- if (newmemory == SWIG_CAST_NEW_MEMORY) {
- assert(own);
- if (own)
- *own = *own | SWIG_CAST_NEW_MEMORY;
- }
- }
+ if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
break;
}
}
}
}
if (sobj) {
- if (own)
- *own = *own | sobj->own;
+ if (own) *own = sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
} else {
int res = SWIG_ERROR;
if (flags & SWIG_POINTER_IMPLICIT_CONV) {
- SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+ PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) {
PyObject *klass = data->klass;
if (klass) {
impconv = 0;
}
if (impconv) {
- SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+ PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
if (iobj) {
void *vptr;
res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (tc) {
- int newmemory = 0;
- *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
- assert(!newmemory); /* newmemory handling not yet implemented */
- } else {
- return SWIG_ERROR;
- }
+ if (!tc) return SWIG_ERROR;
+ *ptr = SWIG_TypeCast(tc,vptr);
} else {
*ptr = vptr;
}
SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
- swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
+ swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
if (!to) return SWIG_ERROR;
if (ty) {
if (to != ty) {
*/
SWIGRUNTIME PyObject*
-SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
+SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
{
#if (PY_VERSION_HEX >= 0x02020000)
PyObject *inst = 0;
#endif
}
} else {
-#if PY_VERSION_HEX >= 0x03000000
- inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
- Py_INCREF(data->newargs);
- PyObject_SetAttr(inst, SWIG_This(), swig_this);
- Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
-#else
PyObject *dict = PyDict_New();
PyDict_SetItem(dict, SWIG_This(), swig_this);
inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
-#endif
}
return inst;
#else
if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
return NULL;
} else {
- SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+ PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
if (sthis) {
- SwigPyObject_append((PyObject*) sthis, obj[1]);
+ PySwigObject_append((PyObject*) sthis, obj[1]);
} else {
SWIG_Python_SetSwigThis(obj[0], obj[1]);
}
return SWIG_Py_Void();
} else {
int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
- PyObject *robj = SwigPyObject_New(ptr, type, own);
- SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+ PyObject *robj = PySwigObject_New(ptr, type, own);
+ PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
if (inst) {
SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
- return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+ return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}
/* -----------------------------------------------------------------------------*
for (i =0; i < swig_module->size; ++i) {
swig_type_info *ty = types[i];
if (ty->owndata) {
- SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
- if (data) SwigPyClientData_Del(data);
+ PySwigClientData *data = (PySwigClientData *) ty->clientdata;
+ if (data) PySwigClientData_Del(data);
}
}
Py_DECREF(SWIG_This());
SWIG_Python_SetModule(swig_module_info *swig_module) {
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
-#if PY_VERSION_HEX >= 0x03000000
- /* Add a dummy module object into sys.modules */
- PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
-#else
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
swig_empty_runtime_method_table);
-#endif
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
SWIG_Python_TypeQuery(const char *type)
{
PyObject *cache = SWIG_Python_TypeCache();
- PyObject *key = SWIG_Python_str_FromChar(type);
+ PyObject *key = PyString_FromString(type);
PyObject *obj = PyDict_GetItem(cache, key);
swig_type_info *descriptor;
if (obj) {
Py_XINCREF(type);
PyErr_Clear();
if (infront) {
- PyErr_Format(type, "%s %s", mesg, SWIG_Python_str_AsChar(old_str));
+ PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
} else {
- PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg);
+ PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
}
Py_DECREF(old_str);
}
}
SWIGRUNTIMEINLINE const char *
-SwigPyObject_GetDesc(PyObject *self)
+PySwigObject_GetDesc(PyObject *self)
{
- SwigPyObject *v = (SwigPyObject *)self;
+ PySwigObject *v = (PySwigObject *)self;
swig_type_info *ty = v ? v->ty : 0;
return ty ? ty->str : (char*)"";
}
{
if (type) {
#if defined(SWIG_COBJECT_TYPES)
- if (obj && SwigPyObject_Check(obj)) {
- const char *otype = (const char *) SwigPyObject_GetDesc(obj);
+ if (obj && PySwigObject_Check(obj)) {
+ const char *otype = (const char *) PySwigObject_GetDesc(obj);
if (otype) {
- PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
+ PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
type, otype);
return;
}
const char *otype = (obj ? obj->ob_type->tp_name : 0);
if (otype) {
PyObject *str = PyObject_Str(obj);
- const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
+ const char *cstr = str ? PyString_AsString(str) : 0;
if (cstr) {
PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
type, otype, cstr);
/*-----------------------------------------------
@(target):= _unbound.so
------------------------------------------------*/
-#if PY_VERSION_HEX >= 0x03000000
-# define SWIG_init PyInit__unbound
+#define SWIG_init init_unbound
-#else
-# define SWIG_init init_unbound
-
-#endif
#define SWIG_name "_unbound"
-#define SWIGVERSION 0x010338
+#define SWIGVERSION 0x010333
#define SWIG_VERSION SWIGVERSION
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
-#if PY_VERSION_HEX>=0x03000000
- if (PyUnicode_Check(obj))
-#else
- if (PyString_Check(obj))
-#endif
- {
+ if (PyString_Check(obj)) {
char *cstr; Py_ssize_t len;
-#if PY_VERSION_HEX>=0x03000000
- obj = PyUnicode_AsUTF8String(obj);
- PyBytes_AsStringAndSize(obj, &cstr, &len);
-#else
PyString_AsStringAndSize(obj, &cstr, &len);
-#endif
- if (cptr) {
+ if (cptr) {
if (alloc) {
/*
In python the user should not be able to modify the inner
*alloc = SWIG_OLDOBJ;
}
} else {
- *cptr = SWIG_Python_str_AsChar(obj);
+ *cptr = PyString_AsString(obj);
}
}
if (psize) *psize = len + 1;
return pchar_descriptor ?
SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else {
-#if PY_VERSION_HEX >= 0x03000000
- return PyUnicode_FromStringAndSize(carray, (int)(size));
-#else
return PyString_FromStringAndSize(carray, (int)(size));
-#endif
}
} else {
return SWIG_Py_Void();
if ((SWIG_ConvertPtr(obj, &vptr, desc, 0)) == SWIG_OK) {
if (val) *val = (FILE *)vptr;
return SWIG_OK;
- }
-#if PY_VERSION_HEX < 0x03000000
+ }
if (PyFile_Check(obj)) {
if (val) *val = PyFile_AsFile(obj);
return SWIG_OK;
}
-#endif
return SWIG_TypeError;
}
SWIGINTERN PyObject *_wrap_ub_result_qname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- char *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_qname_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->qtype = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_qtype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_qtype_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->qclass = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_qclass_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_qclass_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (char **)(argp2);
if (arg1) (arg1)->data = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result__data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ char **result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- char **result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result__data_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int *)(argp2);
if (arg1) (arg1)->len = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_len_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_result_canonname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- char *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_canonname_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->rcode = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_rcode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_rcode_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ub_result_answer_packet_set" "', argument " "2"" of type '" "void *""'");
}
if (arg1) (arg1)->answer_packet = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_answer_packet_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ void *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- void *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_answer_packet_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->answer_len = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_answer_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_answer_len_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->havedata = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_havedata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_havedata_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->nxdomain = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_nxdomain_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_nxdomain_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->secure = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_secure_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_secure_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
}
arg2 = (int)(val2);
if (arg1) (arg1)->bogus = arg2;
+
resultobj = SWIG_Py_Void();
return resultobj;
fail:
SWIGINTERN PyObject *_wrap_ub_result_bogus_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_result_bogus_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
PyObject *resultobj = 0;
struct ub_result *arg1 = (struct ub_result *) 0 ;
struct ub_result *arg2 = (struct ub_result *) 0 ;
+ PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- PyObject *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_result__ub_result_data",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_result, 0 | 0 );
SWIGINTERN PyObject *ub_result_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ub_result, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OOO:ub_ctx_set_option",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_config",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_set_fwd",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_resolvconf",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_hosts",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_add_ta",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_add_ta_file",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_trustedkeys",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
void *arg2 = (void *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_debugout",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
int arg2 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_debuglevel",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
int arg2 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_async",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_poll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_poll",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_wait(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_wait",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_fd",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_process",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
int arg3 ;
int arg4 ;
struct ub_result **arg5 = (struct ub_result **) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
- int result;
struct ub_result* newubr;
arg5 = &newubr;
void *arg5 = (void *) 0 ;
ub_callback_t arg6 = (ub_callback_t) 0 ;
int *arg7 = (int *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
PyObject * obj6 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ub_resolve_async",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
int arg2 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_cancel",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *_wrap_ub_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int arg1 ;
+ char *result = 0 ;
int val1 ;
int ecode1 = 0 ;
PyObject * obj0 = 0 ;
- char *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:ub_strerror",&obj0)) SWIG_fail;
ecode1 = SWIG_AsVal_int(obj0, &val1);
SWIGINTERN PyObject *_wrap_ub_ctx_print_local_zones(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"O:ub_ctx_print_local_zones",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OOO:ub_ctx_zone_add",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_zone_remove",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_data_add",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
char *arg2 = (char *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_data_remove",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
SWIGINTERN PyObject *ub_ctx_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ub_ctx, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
PyObject *resultobj = 0;
struct ub_ctx *arg1 = (struct ub_ctx *) 0 ;
FILE *arg2 = (FILE *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
FILE *val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- int result;
if (!PyArg_ParseTuple(args,(char *)"OO:ub_ctx_debugout",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ub_ctx, 0 | 0 );
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ub_ctx_debugout'.\n"
- " Possible C/C++ prototypes are:\n"
- " ub_ctx_debugout(struct ub_ctx *,void *)\n"
- " ub_ctx_debugout(struct ub_ctx *,FILE *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ub_ctx_debugout'.\n Possible C/C++ prototypes are:\n"" ub_ctx_debugout(struct ub_ctx *,void *)\n"" ub_ctx_debugout(struct ub_ctx *,FILE *)\n");
return NULL;
}
void *arg5 = (void *) 0 ;
PyObject *arg6 = (PyObject *) 0 ;
int *arg7 = (int *) 0 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
- int result;
int asyncid = -1;
arg7 = &asyncid;
static PyMethodDef SwigMethods[] = {
- { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
{ (char *)"ub_ctx_free_dbg", _wrap_ub_ctx_free_dbg, METH_VARARGS, NULL},
{ (char *)"ub_resolve_free_dbg", _wrap_ub_resolve_free_dbg, METH_VARARGS, NULL},
{ (char *)"ub_result_qname_set", _wrap_ub_result_qname_set, METH_VARARGS, NULL},
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found, init;
+ int found;
clientdata = clientdata;
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
- init = 1;
- } else {
- init = 0;
}
/* Try and load any already created modules */
module_head->next = &swig_module;
}
- /* When multiple interpeters are used, a module could have already been initialized in
- a different interpreter, but not yet have a pointer in this interpreter.
- In this case, we do not want to continue adding types... everything should be
- set up already */
- if (init == 0) return;
-
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
-#if PY_VERSION_HEX >= 0x03000000
- return PyUnicode_InternFromString("<Swig global variables>");
-#else
return PyString_FromString("<Swig global variables>");
-#endif
}
SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject *v) {
-#if PY_VERSION_HEX >= 0x03000000
- PyObject *str = PyUnicode_InternFromString("(");
- PyObject *tail;
- PyObject *joined;
- swig_globalvar *var;
- for (var = v->vars; var; var=var->next) {
- tail = PyUnicode_FromString(var->name);
- joined = PyUnicode_Concat(str, tail);
- Py_DecRef(str);
- Py_DecRef(tail);
- str = joined;
- if (var->next) {
- tail = PyUnicode_InternFromString(", ");
- joined = PyUnicode_Concat(str, tail);
- Py_DecRef(str);
- Py_DecRef(tail);
- str = joined;
- }
- }
- tail = PyUnicode_InternFromString(")");
- joined = PyUnicode_Concat(str, tail);
- Py_DecRef(str);
- Py_DecRef(tail);
- str = joined;
-#else
PyObject *str = PyString_FromString("(");
- swig_globalvar *var;
+ swig_globalvar *var;
for (var = v->vars; var; var=var->next) {
PyString_ConcatAndDel(&str,PyString_FromString(var->name));
if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
}
PyString_ConcatAndDel(&str,PyString_FromString(")"));
-#endif
return str;
}
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
PyObject *str = swig_varlink_str(v);
fprintf(fp,"Swig global variables ");
- fprintf(fp,"%s\n", SWIG_Python_str_AsChar(str));
+ fprintf(fp,"%s\n", PyString_AsString(str));
Py_DECREF(str);
return 0;
}
if (!type_init) {
const PyTypeObject tmp
= {
- /* PyObject header changed in Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
-#else
PyObject_HEAD_INIT(NULL)
0, /* Number of items in variable part (ob_size) */
-#endif
(char *)"swigvarlink", /* Type name (tp_name) */
sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
0, /* Itemsize (tp_itemsize) */
#endif
};
varlink_type = tmp;
- /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */
-#if PY_VERSION_HEX < 0x03000000
varlink_type.ob_type = &PyType_Type;
-#endif
type_init = 1;
}
return &varlink_type;
#ifdef __cplusplus
extern "C"
#endif
-
-SWIGEXPORT
-#if PY_VERSION_HEX >= 0x03000000
-PyObject*
-#else
-void
-#endif
-SWIG_init(void) {
+SWIGEXPORT void SWIG_init(void) {
PyObject *m, *d;
/* Fix SwigMethods to carry the callback ptrs when needed */
SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
-#if PY_VERSION_HEX >= 0x03000000
- static struct PyModuleDef SWIG_module = {
- PyModuleDef_HEAD_INIT,
- (char *) SWIG_name,
- NULL,
- -1,
- SwigMethods,
- NULL,
- NULL,
- NULL,
- NULL
- };
- m = PyModule_Create(&SWIG_module);
-#else
m = Py_InitModule((char *) SWIG_name, SwigMethods);
-#endif
d = PyModule_GetDict(m);
SWIG_InitializeModule(0);
SWIG_Python_SetConstant(d, "RCODE_NXRRSET",SWIG_From_int((int)(RCODE_NXRRSET)));
SWIG_Python_SetConstant(d, "RCODE_NOTAUTH",SWIG_From_int((int)(RCODE_NOTAUTH)));
SWIG_Python_SetConstant(d, "RCODE_NOTZONE",SWIG_From_int((int)(RCODE_NOTZONE)));
-#if PY_VERSION_HEX >= 0x03000000
- return m;
-#else
- return;
-#endif
}