| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
#define SWIGPYTHON |
|---|
| 12 |
|
|---|
| 13 |
#ifdef __cplusplus |
|---|
| 14 |
template<class T> class SwigValueWrapper { |
|---|
| 15 |
T *tt; |
|---|
| 16 |
public: |
|---|
| 17 |
SwigValueWrapper() : tt(0) { } |
|---|
| 18 |
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { } |
|---|
| 19 |
SwigValueWrapper(const T& t) : tt(new T(t)) { } |
|---|
| 20 |
~SwigValueWrapper() { delete tt; } |
|---|
| 21 |
SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } |
|---|
| 22 |
operator T&() const { return *tt; } |
|---|
| 23 |
T *operator&() { return tt; } |
|---|
| 24 |
private: |
|---|
| 25 |
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); |
|---|
| 26 |
}; |
|---|
| 27 |
#endif |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
#include "Python.h" |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
#define SWIG_TypeRegister SWIG_Python_TypeRegister |
|---|
| 41 |
#define SWIG_TypeCheck SWIG_Python_TypeCheck |
|---|
| 42 |
#define SWIG_TypeCast SWIG_Python_TypeCast |
|---|
| 43 |
#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast |
|---|
| 44 |
#define SWIG_TypeName SWIG_Python_TypeName |
|---|
| 45 |
#define SWIG_TypeQuery SWIG_Python_TypeQuery |
|---|
| 46 |
#define SWIG_TypeClientData SWIG_Python_TypeClientData |
|---|
| 47 |
#define SWIG_PackData SWIG_Python_PackData |
|---|
| 48 |
#define SWIG_UnpackData SWIG_Python_UnpackData |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
#include <string.h> |
|---|
| 67 |
|
|---|
| 68 |
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
|---|
| 69 |
# if defined(_MSC_VER) || defined(__GNUC__) |
|---|
| 70 |
# if defined(STATIC_LINKED) |
|---|
| 71 |
# define SWIGEXPORT(a) a |
|---|
| 72 |
# define SWIGIMPORT(a) extern a |
|---|
| 73 |
# else |
|---|
| 74 |
# define SWIGEXPORT(a) __declspec(dllexport) a |
|---|
| 75 |
# define SWIGIMPORT(a) extern a |
|---|
| 76 |
# endif |
|---|
| 77 |
# else |
|---|
| 78 |
# if defined(__BORLANDC__) |
|---|
| 79 |
# define SWIGEXPORT(a) a _export |
|---|
| 80 |
# define SWIGIMPORT(a) a _export |
|---|
| 81 |
# else |
|---|
| 82 |
# define SWIGEXPORT(a) a |
|---|
| 83 |
# define SWIGIMPORT(a) a |
|---|
| 84 |
# endif |
|---|
| 85 |
# endif |
|---|
| 86 |
#else |
|---|
| 87 |
# define SWIGEXPORT(a) a |
|---|
| 88 |
# define SWIGIMPORT(a) a |
|---|
| 89 |
#endif |
|---|
| 90 |
|
|---|
| 91 |
#ifdef SWIG_GLOBAL |
|---|
| 92 |
# define SWIGRUNTIME(a) SWIGEXPORT(a) |
|---|
| 93 |
#else |
|---|
| 94 |
# define SWIGRUNTIME(a) static a |
|---|
| 95 |
#endif |
|---|
| 96 |
|
|---|
| 97 |
#ifdef __cplusplus |
|---|
| 98 |
extern "C" { |
|---|
| 99 |
#endif |
|---|
| 100 |
|
|---|
| 101 |
typedef void *(*swig_converter_func)(void *); |
|---|
| 102 |
typedef struct swig_type_info *(*swig_dycast_func)(void **); |
|---|
| 103 |
|
|---|
| 104 |
typedef struct swig_type_info { |
|---|
| 105 |
const char *name; |
|---|
| 106 |
swig_converter_func converter; |
|---|
| 107 |
const char *str; |
|---|
| 108 |
void *clientdata; |
|---|
| 109 |
swig_dycast_func dcast; |
|---|
| 110 |
struct swig_type_info *next; |
|---|
| 111 |
struct swig_type_info *prev; |
|---|
| 112 |
} swig_type_info; |
|---|
| 113 |
|
|---|
| 114 |
#ifdef SWIG_NOINCLUDE |
|---|
| 115 |
|
|---|
| 116 |
SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *); |
|---|
| 117 |
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *); |
|---|
| 118 |
SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *); |
|---|
| 119 |
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); |
|---|
| 120 |
SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *); |
|---|
| 121 |
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); |
|---|
| 122 |
SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); |
|---|
| 123 |
SWIGIMPORT(char *) SWIG_PackData(char *, void *, int); |
|---|
| 124 |
SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); |
|---|
| 125 |
|
|---|
| 126 |
#else |
|---|
| 127 |
|
|---|
| 128 |
static swig_type_info *swig_type_list = 0; |
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
SWIGRUNTIME(swig_type_info *) |
|---|
| 132 |
SWIG_TypeRegister(swig_type_info *ti) { |
|---|
| 133 |
swig_type_info *tc, *head, *ret, *next; |
|---|
| 134 |
|
|---|
| 135 |
tc = swig_type_list; |
|---|
| 136 |
while (tc) { |
|---|
| 137 |
if (strcmp(tc->name, ti->name) == 0) { |
|---|
| 138 |
|
|---|
| 139 |
if (tc->clientdata) ti->clientdata = tc->clientdata; |
|---|
| 140 |
head = tc; |
|---|
| 141 |
next = tc->next; |
|---|
| 142 |
goto l1; |
|---|
| 143 |
} |
|---|
| 144 |
tc = tc->prev; |
|---|
| 145 |
} |
|---|
| 146 |
head = ti; |
|---|
| 147 |
next = 0; |
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
ti->prev = swig_type_list; |
|---|
| 151 |
swig_type_list = ti; |
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
l1: |
|---|
| 155 |
ret = head; |
|---|
| 156 |
tc = ti + 1; |
|---|
| 157 |
|
|---|
| 158 |
while (tc->name) { |
|---|
| 159 |
head->next = tc; |
|---|
| 160 |
tc->prev = head; |
|---|
| 161 |
head = tc; |
|---|
| 162 |
tc++; |
|---|
| 163 |
} |
|---|
| 164 |
if (next) next->prev = head; |
|---|
| 165 |
head->next = next; |
|---|
| 166 |
return ret; |
|---|
| 167 |
} |
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
SWIGRUNTIME(swig_type_info *) |
|---|
| 171 |
SWIG_TypeCheck(char *c, swig_type_info *ty) { |
|---|
| 172 |
swig_type_info *s; |
|---|
| 173 |
if (!ty) return 0; |
|---|
| 174 |
s = ty->next; |
|---|
| 175 |
do { |
|---|
| 176 |
if (strcmp(s->name,c) == 0) { |
|---|
| 177 |
if (s == ty->next) return s; |
|---|
| 178 |
|
|---|
| 179 |
s->prev->next = s->next; |
|---|
| 180 |
if (s->next) { |
|---|
| 181 |
s->next->prev = s->prev; |
|---|
| 182 |
} |
|---|
| 183 |
|
|---|
| 184 |
s->next = ty->next; |
|---|
| 185 |
if (ty->next) ty->next->prev = s; |
|---|
| 186 |
ty->next = s; |
|---|
| 187 |
s->prev = ty; |
|---|
| 188 |
return s; |
|---|
| 189 |
} |
|---|
| 190 |
s = s->next; |
|---|
| 191 |
} while (s && (s != ty->next)); |
|---|
| 192 |
return 0; |
|---|
| 193 |
} |
|---|
| 194 |
|
|---|
| 195 |
|
|---|
| 196 |
SWIGRUNTIME(void *) |
|---|
| 197 |
SWIG_TypeCast(swig_type_info *ty, void *ptr) { |
|---|
| 198 |
if ((!ty) || (!ty->converter)) return ptr; |
|---|
| 199 |
return (*ty->converter)(ptr); |
|---|
| 200 |
} |
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 |
SWIGRUNTIME(swig_type_info *) |
|---|
| 204 |
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { |
|---|
| 205 |
swig_type_info *lastty = ty; |
|---|
| 206 |
if (!ty || !ty->dcast) return ty; |
|---|
| 207 |
while (ty && (ty->dcast)) { |
|---|
| 208 |
ty = (*ty->dcast)(ptr); |
|---|
| 209 |
if (ty) lastty = ty; |
|---|
| 210 |
} |
|---|
| 211 |
return lastty; |
|---|
| 212 |
} |
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 |
SWIGRUNTIME(const char *) |
|---|
| 216 |
SWIG_TypeName(const swig_type_info *ty) { |
|---|
| 217 |
return ty->name; |
|---|
| 218 |
} |
|---|
| 219 |
|
|---|
| 220 |
|
|---|
| 221 |
SWIGRUNTIME(swig_type_info *) |
|---|
| 222 |
SWIG_TypeQuery(const char *name) { |
|---|
| 223 |
swig_type_info *ty = swig_type_list; |
|---|
| 224 |
while (ty) { |
|---|
| 225 |
if (ty->str && (strcmp(name,ty->str) == 0)) return ty; |
|---|
| 226 |
if (ty->name && (strcmp(name,ty->name) == 0)) return ty; |
|---|
| 227 |
ty = ty->prev; |
|---|
| 228 |
} |
|---|
| 229 |
return 0; |
|---|
| 230 |
} |
|---|
| 231 |
|
|---|
| 232 |
|
|---|
| 233 |
SWIGRUNTIME(void) |
|---|
| 234 |
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { |
|---|
| 235 |
swig_type_info *tc, *equiv; |
|---|
| 236 |
if (ti->clientdata == clientdata) return; |
|---|
| 237 |
ti->clientdata = clientdata; |
|---|
| 238 |
equiv = ti->next; |
|---|
| 239 |
while (equiv) { |
|---|
| 240 |
if (!equiv->converter) { |
|---|
| 241 |
tc = swig_type_list; |
|---|
| 242 |
while (tc) { |
|---|
| 243 |
if ((strcmp(tc->name, equiv->name) == 0)) |
|---|
| 244 |
SWIG_TypeClientData(tc,clientdata); |
|---|
| 245 |
tc = tc->prev; |
|---|
| 246 |
} |
|---|
| 247 |
} |
|---|
| 248 |
equiv = equiv->next; |
|---|
| 249 |
} |
|---|
| 250 |
} |
|---|
| 251 |
|
|---|
| 252 |
|
|---|
| 253 |
SWIGRUNTIME(char *) |
|---|
| 254 |
SWIG_PackData(char *c, void *ptr, int sz) { |
|---|
| 255 |
static char hex[17] = "0123456789abcdef"; |
|---|
| 256 |
int i; |
|---|
| 257 |
unsigned char *u = (unsigned char *) ptr; |
|---|
| 258 |
register unsigned char uu; |
|---|
| 259 |
for (i = 0; i < sz; i++,u++) { |
|---|
| 260 |
uu = *u; |
|---|
| 261 |
*(c++) = hex[(uu & 0xf0) >> 4]; |
|---|
| 262 |
*(c++) = hex[uu & 0xf]; |
|---|
| 263 |
} |
|---|
| 264 |
return c; |
|---|
| 265 |
} |
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
SWIGRUNTIME(char *) |
|---|
| 269 |
SWIG_UnpackData(char *c, void *ptr, int sz) { |
|---|
| 270 |
register unsigned char uu = 0; |
|---|
| 271 |
register int d; |
|---|
| 272 |
unsigned char *u = (unsigned char *) ptr; |
|---|
| 273 |
int i; |
|---|
| 274 |
for (i = 0; i < sz; i++, u++) { |
|---|
| 275 |
d = *(c++); |
|---|
| 276 |
if ((d >= '0') && (d <= '9')) |
|---|
| 277 |
uu = ((d - '0') << 4); |
|---|
| 278 |
else if ((d >= 'a') && (d <= 'f')) |
|---|
| 279 |
uu = ((d - ('a'-10)) << 4); |
|---|
| 280 |
d = *(c++); |
|---|
| 281 |
if ((d >= '0') && (d <= '9')) |
|---|
| 282 |
uu |= (d - '0'); |
|---|
| 283 |
else if ((d >= 'a') && (d <= 'f')) |
|---|
| 284 |
uu |= (d - ('a'-10)); |
|---|
| 285 |
*u = uu; |
|---|
| 286 |
} |
|---|
| 287 |
return c; |
|---|
| 288 |
} |
|---|
| 289 |
|
|---|
| 290 |
#endif |
|---|
| 291 |
|
|---|
| 292 |
#ifdef __cplusplus |
|---|
| 293 |
} |
|---|
| 294 |
#endif |
|---|
| 295 |
|
|---|
| 296 |
|
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
|
|---|
| 301 |
|
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
#include "Python.h" |
|---|
| 307 |
|
|---|
| 308 |
#ifdef __cplusplus |
|---|
| 309 |
extern "C" { |
|---|
| 310 |
#endif |
|---|
| 311 |
|
|---|
| 312 |
#define SWIG_PY_INT 1 |
|---|
| 313 |
#define SWIG_PY_FLOAT 2 |
|---|
| 314 |
#define SWIG_PY_STRING 3 |
|---|
| 315 |
#define SWIG_PY_POINTER 4 |
|---|
| 316 |
#define SWIG_PY_BINARY 5 |
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 |
|
|---|
| 320 |
#define SWIG_POINTER_EXCEPTION 0x1 |
|---|
| 321 |
#define SWIG_POINTER_DISOWN 0x2 |
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
#define SWIG_fail goto fail |
|---|
| 325 |
|
|---|
| 326 |
|
|---|
| 327 |
typedef struct swig_const_info { |
|---|
| 328 |
int type; |
|---|
| 329 |
char *name; |
|---|
| 330 |
long lvalue; |
|---|
| 331 |
double dvalue; |
|---|
| 332 |
void *pvalue; |
|---|
| 333 |
swig_type_info **ptype; |
|---|
| 334 |
} swig_const_info; |
|---|
| 335 |
|
|---|
| 336 |
|
|---|
| 337 |
#define SWIG_ConvertPtr(obj, pp, type, flags) \ |
|---|
| 338 |
SWIG_Python_ConvertPtr(obj, pp, type, flags) |
|---|
| 339 |
#define SWIG_NewPointerObj(p, type, flags) \ |
|---|
| 340 |
SWIG_Python_NewPointerObj(p, type, flags) |
|---|
| 341 |
#define SWIG_MustGetPtr(p, type, argnum, flags) \ |
|---|
| 342 |
SWIG_Python_MustGetPtr(p, type, argnum, flags) |
|---|
| 343 |
|
|---|
| 344 |
|
|---|
| 345 |
#define SWIG_newvarlink() \ |
|---|
| 346 |
SWIG_Python_newvarlink() |
|---|
| 347 |
#define SWIG_addvarlink(p, name, get_attr, set_attr) \ |
|---|
| 348 |
SWIG_Python_addvarlink(p, name, get_attr, set_attr) |
|---|
| 349 |
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \ |
|---|
| 350 |
SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) |
|---|
| 351 |
#define SWIG_NewPackedObj(ptr, sz, type) \ |
|---|
| 352 |
SWIG_Python_NewPackedObj(ptr, sz, type) |
|---|
| 353 |
#define SWIG_InstallConstants(d, constants) \ |
|---|
| 354 |
SWIG_Python_InstallConstants(d, constants) |
|---|
| 355 |
|
|---|
| 356 |
#ifdef SWIG_NOINCLUDE |
|---|
| 357 |
|
|---|
| 358 |
SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); |
|---|
| 359 |
SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); |
|---|
| 360 |
SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); |
|---|
| 361 |
SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void); |
|---|
| 362 |
SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); |
|---|
| 363 |
SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); |
|---|
| 364 |
SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); |
|---|
| 365 |
SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); |
|---|
| 366 |
|
|---|
| 367 |
#else |
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 |
|
|---|
| 371 |
|
|---|
| 372 |
|
|---|
| 373 |
typedef struct swig_globalvar { |
|---|
| 374 |
char *name; |
|---|
| 375 |
PyObject *(*get_attr)(void); |
|---|
| 376 |
int (*set_attr)(PyObject *); |
|---|
| 377 |
struct swig_globalvar *next; |
|---|
| 378 |
} swig_globalvar; |
|---|
| 379 |
|
|---|
| 380 |
typedef struct swig_varlinkobject { |
|---|
| 381 |
PyObject_HEAD |
|---|
| 382 |
swig_globalvar *vars; |
|---|
| 383 |
} swig_varlinkobject; |
|---|
| 384 |
|
|---|
| 385 |
static PyObject * |
|---|
| 386 |
swig_varlink_repr(swig_varlinkobject *v) { |
|---|
| 387 |
v = v; |
|---|
| 388 |
return PyString_FromString("<Global variables>"); |
|---|
| 389 |
} |
|---|
| 390 |
|
|---|
| 391 |
static int |
|---|
| 392 |
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { |
|---|
| 393 |
swig_globalvar *var; |
|---|
| 394 |
flags = flags; |
|---|
| 395 |
fprintf(fp,"Global variables { "); |
|---|
| 396 |
for (var = v->vars; var; var=var->next) { |
|---|
| 397 |
fprintf(fp,"%s", var->name); |
|---|
| 398 |
if (var->next) fprintf(fp,", "); |
|---|
| 399 |
} |
|---|
| 400 |
fprintf(fp," }\n"); |
|---|
| 401 |
return 0; |
|---|
| 402 |
} |
|---|
| 403 |
|
|---|
| 404 |
static PyObject * |
|---|
| 405 |
swig_varlink_getattr(swig_varlinkobject *v, char *n) { |
|---|
| 406 |
swig_globalvar *var = v->vars; |
|---|
| 407 |
while (var) { |
|---|
| 408 |
if (strcmp(var->name,n) == 0) { |
|---|
| 409 |
return (*var->get_attr)(); |
|---|
| 410 |
} |
|---|
| 411 |
var = var->next; |
|---|
| 412 |
} |
|---|
| 413 |
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
|---|
| 414 |
return NULL; |
|---|
| 415 |
} |
|---|
| 416 |
|
|---|
| 417 |
static int |
|---|
| 418 |
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { |
|---|
| 419 |
swig_globalvar *var = v->vars; |
|---|
| 420 |
while (var) { |
|---|
| 421 |
if (strcmp(var->name,n) == 0) { |
|---|
| 422 |
return (*var->set_attr)(p); |
|---|
| 423 |
} |
|---|
| 424 |
var = var->next; |
|---|
| 425 |
} |
|---|
| 426 |
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
|---|
| 427 |
return 1; |
|---|
| 428 |
} |
|---|
| 429 |
|
|---|
| 430 |
statichere PyTypeObject varlinktype = { |
|---|
| 431 |
PyObject_HEAD_INIT(0) |
|---|
| 432 |
0, |
|---|
| 433 |
(char *)"swigvarlink", |
|---|
| 434 |
sizeof(swig_varlinkobject), |
|---|
| 435 |
0, |
|---|
| 436 |
0, |
|---|
| 437 |
(printfunc) swig_varlink_print, |
|---|
| 438 |
(getattrfunc) swig_varlink_getattr, |
|---|
| 439 |
(setattrfunc) swig_varlink_setattr, |
|---|
| 440 |
0, |
|---|
| 441 |
(reprfunc) swig_varlink_repr, |
|---|
| 442 |
0, |
|---|
| 443 |
0, |
|---|
| 444 |
0, |
|---|
| 445 |
}; |
|---|
| 446 |
|
|---|
| 447 |
|
|---|
| 448 |
SWIGRUNTIME(PyObject *) |
|---|
| 449 |
SWIG_Python_newvarlink(void) { |
|---|
| 450 |
swig_varlinkobject *result = 0; |
|---|
| 451 |
result = PyMem_NEW(swig_varlinkobject,1); |
|---|
| 452 |
varlinktype.ob_type = &PyType_Type; |
|---|
| 453 |
result->ob_type = &varlinktype; |
|---|
| 454 |
result->vars = 0; |
|---|
| 455 |
result->ob_refcnt = 0; |
|---|
| 456 |
Py_XINCREF((PyObject *) result); |
|---|
| 457 |
return ((PyObject*) result); |
|---|
| 458 |
} |
|---|
| 459 |
|
|---|
| 460 |
SWIGRUNTIME(void) |
|---|
| 461 |
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { |
|---|
| 462 |
swig_varlinkobject *v; |
|---|
| 463 |
swig_globalvar *gv; |
|---|
| 464 |
v= (swig_varlinkobject *) p; |
|---|
| 465 |
gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); |
|---|
| 466 |
gv->name = (char *) malloc(strlen(name)+1); |
|---|
| 467 |
strcpy(gv->name,name); |
|---|
| 468 |
gv->get_attr = get_attr; |
|---|
| 469 |
gv->set_attr = set_attr; |
|---|
| 470 |
gv->next = v->vars; |
|---|
| 471 |
v->vars = gv; |
|---|
| 472 |
} |
|---|
| 473 |
|
|---|
| 474 |
|
|---|
| 475 |
SWIGRUNTIME(int) |
|---|
| 476 |
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { |
|---|
| 477 |
swig_type_info *tc; |
|---|
| 478 |
char *c = 0; |
|---|
| 479 |
static PyObject *SWIG_this = 0; |
|---|
| 480 |
int newref = 0; |
|---|
| 481 |
PyObject *pyobj = 0; |
|---|
| 482 |
|
|---|
| 483 |
if (!obj) return 0; |
|---|
| 484 |
if (obj == Py_None) { |
|---|
| 485 |
*ptr = 0; |
|---|
| 486 |
return 0; |
|---|
| 487 |
} |
|---|
| 488 |
#ifdef SWIG_COBJECT_TYPES |
|---|
| 489 |
if (!(PyCObject_Check(obj))) { |
|---|
| 490 |
if (!SWIG_this) |
|---|
| 491 |
SWIG_this = PyString_FromString("this"); |
|---|
| 492 |
pyobj = obj; |
|---|
| 493 |
obj = PyObject_GetAttr(obj,SWIG_this); |
|---|
| 494 |
newref = 1; |
|---|
| 495 |
if (!obj) goto type_error; |
|---|
| 496 |
if (!PyCObject_Check(obj)) { |
|---|
| 497 |
Py_DECREF(obj); |
|---|
| 498 |
goto type_error; |
|---|
| 499 |
} |
|---|
| 500 |
} |
|---|
| 501 |
*ptr = PyCObject_AsVoidPtr(obj); |
|---|
| 502 |
c = (char *) PyCObject_GetDesc(obj); |
|---|
| 503 |
if (newref) Py_DECREF(obj); |
|---|
| 504 |
goto cobject; |
|---|
| 505 |
#else |
|---|
| 506 |
if (!(PyString_Check(obj))) { |
|---|
| 507 |
if (!SWIG_this) |
|---|
| 508 |
SWIG_this = PyString_FromString("this"); |
|---|
| 509 |
pyobj = obj; |
|---|
| 510 |
obj = PyObject_GetAttr(obj,SWIG_this); |
|---|
| 511 |
newref = 1; |
|---|
| 512 |
if (!obj) goto type_error; |
|---|
| 513 |
if (!PyString_Check(obj)) { |
|---|
| 514 |
Py_DECREF(obj); |
|---|
| 515 |
goto type_error; |
|---|
| 516 |
} |
|---|
| 517 |
} |
|---|
| 518 |
c = PyString_AsString(obj); |
|---|
| 519 |
|
|---|
| 520 |
if (*c != '_') { |
|---|
| 521 |
*ptr = (void *) 0; |
|---|
| 522 |
if (strcmp(c,"NULL") == 0) { |
|---|
| 523 |
if (newref) { Py_DECREF(obj); } |
|---|
| 524 |
return 0; |
|---|
| 525 |
} else { |
|---|
| 526 |
if (newref) { Py_DECREF(obj); } |
|---|
| 527 |
goto type_error; |
|---|
| 528 |
} |
|---|
| 529 |
} |
|---|
| 530 |
c++; |
|---|
| 531 |
c = SWIG_UnpackData(c,ptr,sizeof(void *)); |
|---|
| 532 |
if (newref) { Py_DECREF(obj); } |
|---|
| 533 |
#endif |
|---|
| 534 |
|
|---|
| 535 |
#ifdef SWIG_COBJECT_TYPES |
|---|
| 536 |
cobject: |
|---|
| 537 |
#endif |
|---|
| 538 |
|
|---|
| 539 |
if (ty) { |
|---|
| 540 |
tc = SWIG_TypeCheck(c,ty); |
|---|
| 541 |
if (!tc) goto type_error; |
|---|
| 542 |
*ptr = SWIG_TypeCast(tc,(void*) *ptr); |
|---|
| 543 |
} |
|---|
| 544 |
|
|---|
| 545 |
if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { |
|---|
| 546 |
PyObject *zero = PyInt_FromLong(0); |
|---|
| 547 |
PyObject_SetAttrString(pyobj,(char*)"thisown",zero); |
|---|
| 548 |
Py_DECREF(zero); |
|---|
| 549 |
} |
|---|
| 550 |
return 0; |
|---|
| 551 |
|
|---|
| 552 |
type_error: |
|---|
| 553 |
if (flags & SWIG_POINTER_EXCEPTION) { |
|---|
| 554 |
if (ty && c) { |
|---|
| 555 |
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c)); |
|---|
| 556 |
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name); |
|---|
| 557 |
PyErr_SetString(PyExc_TypeError, temp); |
|---|
| 558 |
free((char *) temp); |
|---|
| 559 |
} else { |
|---|
| 560 |
PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
|---|
| 561 |
} |
|---|
| 562 |
} |
|---|
| 563 |
return -1; |
|---|
| 564 |
} |
|---|
| 565 |
|
|---|
| 566 |
|
|---|
| 567 |
SWIGRUNTIME(void *) |
|---|
| 568 |
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { |
|---|
| 569 |
void *result; |
|---|
| 570 |
SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION); |
|---|
| 571 |
return result; |
|---|
| 572 |
} |
|---|
| 573 |
|
|---|
| 574 |
|
|---|
| 575 |
SWIGRUNTIME(int) |
|---|
| 576 |
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { |
|---|
| 577 |
swig_type_info *tc; |
|---|
| 578 |
char *c = 0; |
|---|
| 579 |
|
|---|
| 580 |
if ((!obj) || (!PyString_Check(obj))) goto type_error; |
|---|
| 581 |
c = PyString_AsString(obj); |
|---|
| 582 |
|
|---|
| 583 |
if (*c != '_') goto type_error; |
|---|
| 584 |
c++; |
|---|
| 585 |
c = SWIG_UnpackData(c,ptr,sz); |
|---|
| 586 |
if (ty) { |
|---|
| 587 |
tc = SWIG_TypeCheck(c,ty); |
|---|
| 588 |
if (!tc) goto type_error; |
|---|
| 589 |
} |
|---|
| 590 |
return 0; |
|---|
| 591 |
|
|---|
| 592 |
type_error: |
|---|
| 593 |
|
|---|
| 594 |
if (flags) { |
|---|
| 595 |
if (ty && c) { |
|---|
| 596 |
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c)); |
|---|
| 597 |
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name); |
|---|
| 598 |
PyErr_SetString(PyExc_TypeError, temp); |
|---|
| 599 |
free((char *) temp); |
|---|
| 600 |
} else { |
|---|
| 601 |
PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
|---|
| 602 |
} |
|---|
| 603 |
} |
|---|
| 604 |
return -1; |
|---|
| 605 |
} |
|---|
| 606 |
|
|---|
| 607 |
|
|---|
| 608 |
SWIGRUNTIME(PyObject *) |
|---|
| 609 |
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { |
|---|
| 610 |
PyObject *robj; |
|---|
| 611 |
if (!ptr) { |
|---|
| 612 |
Py_INCREF(Py_None); |
|---|
| 613 |
return Py_None; |
|---|
| 614 |
} |
|---|
| 615 |
#ifdef SWIG_COBJECT_TYPES |
|---|
| 616 |
robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL); |
|---|
| 617 |
#else |
|---|
| 618 |
{ |
|---|
| 619 |
char result[1024]; |
|---|
| 620 |
char *r = result; |
|---|
| 621 |
*(r++) = '_'; |
|---|
| 622 |
r = SWIG_PackData(r,&ptr,sizeof(void *)); |
|---|
| 623 |
strcpy(r,type->name); |
|---|
| 624 |
robj = PyString_FromString(result); |
|---|
| 625 |
} |
|---|
| 626 |
#endif |
|---|
| 627 |
if (!robj || (robj == Py_None)) return robj; |
|---|
| 628 |
if (type->clientdata) { |
|---|
| 629 |
PyObject *inst; |
|---|
| 630 |
PyObject *args = Py_BuildValue((char*)"(O)", robj); |
|---|
| 631 |
Py_DECREF(robj); |
|---|
| 632 |
inst = PyObject_CallObject((PyObject *) type->clientdata, args); |
|---|
| 633 |
Py_DECREF(args); |
|---|
| 634 |
if (inst) { |
|---|
| 635 |
if (own) { |
|---|
| 636 |
PyObject *n = PyInt_FromLong(1); |
|---|
| 637 |
PyObject_SetAttrString(inst,(char*)"thisown",n); |
|---|
| 638 |
Py_DECREF(n); |
|---|
| 639 |
} |
|---|
| 640 |
robj = inst; |
|---|
| 641 |
} |
|---|
| 642 |
} |
|---|
| 643 |
return robj; |
|---|
| 644 |
} |
|---|
| 645 |
|
|---|
| 646 |
SWIGRUNTIME(PyObject *) |
|---|
| 647 |
SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) { |
|---|
| 648 |
char result[1024]; |
|---|
| 649 |
char *r = result; |
|---|
| 650 |
if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; |
|---|
| 651 |
*(r++) = '_'; |
|---|
| 652 |
r = SWIG_PackData(r,ptr,sz); |
|---|
| 653 |
strcpy(r,type->name); |
|---|
| 654 |
return PyString_FromString(result); |
|---|
| 655 |
} |
|---|
| 656 |
|
|---|
| 657 |
|
|---|
| 658 |
SWIGRUNTIME(void) |
|---|
| 659 |
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { |
|---|
| 660 |
int i; |
|---|
| 661 |
PyObject *obj; |
|---|
| 662 |
for (i = 0; constants[i].type; i++) { |
|---|
| 663 |
switch(constants[i].type) { |
|---|
| 664 |
case SWIG_PY_INT: |
|---|
| 665 |
obj = PyInt_FromLong(constants[i].lvalue); |
|---|
| 666 |
break; |
|---|
| 667 |
case SWIG_PY_FLOAT: |
|---|
| 668 |
obj = PyFloat_FromDouble(constants[i].dvalue); |
|---|
| 669 |
break; |
|---|
| 670 |
case SWIG_PY_STRING: |
|---|
| 671 |
obj = PyString_FromString((char *) constants[i].pvalue); |
|---|
| 672 |
break; |
|---|
| 673 |
case SWIG_PY_POINTER: |
|---|
| 674 |
obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); |
|---|
| 675 |
break; |
|---|
| 676 |
case SWIG_PY_BINARY: |
|---|
| 677 |
obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); |
|---|
| 678 |
break; |
|---|
| 679 |
default: |
|---|
| 680 |
obj = 0; |
|---|
| 681 |
break; |
|---|
| 682 |
} |
|---|
| 683 |
if (obj) { |
|---|
| 684 |
PyDict_SetItemString(d,constants[i].name,obj); |
|---|
| 685 |
Py_DECREF(obj); |
|---|
| 686 |
} |
|---|
| 687 |
} |
|---|
| 688 |
} |
|---|
| 689 |
|
|---|
| 690 |
#endif |
|---|
| 691 |
|
|---|
| 692 |
|
|---|
| 693 |
|
|---|
| 694 |
#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else |
|---|
| 695 |
|
|---|
| 696 |
#ifdef __cplusplus |
|---|
| 697 |
} |
|---|
| 698 |
#endif |
|---|
| 699 |
|
|---|
| 700 |
|
|---|
| 701 |
|
|---|
| 702 |
|
|---|
| 703 |
#define SWIGTYPE_p_nodeN swig_types[0] |
|---|
| 704 |
#define SWIGTYPE_p_NodeStack swig_types[1] |
|---|
| 705 |
#define SWIGTYPE_p_Node swig_types[2] |
|---|
| 706 |
#define SWIGTYPE_p_IntStack swig_types[3] |
|---|
| 707 |
#define SWIGTYPE_p_Cursor swig_types[4] |
|---|
| 708 |
#define SWIGTYPE_p_intN swig_types[5] |
|---|
| 709 |
#define SWIGTYPE_p_SGFError swig_types[6] |
|---|
| 710 |
static swig_type_info *swig_types[8]; |
|---|
| 711 |
|
|---|
| 712 |
|
|---|
| 713 |
|
|---|
| 714 |
|
|---|
| 715 |
|
|---|
| 716 |
|
|---|
| 717 |
|
|---|
| 718 |
#define SWIG_init init_sgfpars |
|---|
| 719 |
|
|---|
| 720 |
#define SWIG_name "_sgfpars" |
|---|
| 721 |
|
|---|
| 722 |
#include "sgfpars.h" |
|---|
| 723 |
|
|---|
| 724 |
#ifdef __cplusplus |
|---|
| 725 |
extern "C" { |
|---|
| 726 |
#endif |
|---|
| 727 |
static PyObject *_wrap_new_SGFError(PyObject *self, PyObject *args) { |
|---|
| 728 |
PyObject *resultobj; |
|---|
| 729 |
SGFError *result; |
|---|
| 730 |
|
|---|
| 731 |
if(!PyArg_ParseTuple(args,(char *)":new_SGFError")) goto fail; |
|---|
| 732 |
{ |
|---|
| 733 |
try { |
|---|
| 734 |
result = (SGFError *)new SGFError(); |
|---|
| 735 |
|
|---|
| 736 |
} catch(SGFError e) { |
|---|
| 737 |
SGFError *ecopy = new SGFError(e); |
|---|
| 738 |
PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); |
|---|
| 739 |
PyErr_SetObject((PyObject *) SWIGTYPE_p_SGFError->clientdata, err); |
|---|
| 740 |
return NULL; |
|---|
| 741 |
} |
|---|
| 742 |
} |
|---|
| 743 |
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_SGFError, 1); |
|---|
| 744 |
return resultobj; |
|---|
| 745 |
fail: |
|---|
| 746 |
return NULL; |
|---|
| 747 |
} |
|---|
| 748 |
|
|---|
| 749 |
|
|---|
| 750 |
static PyObject *_wrap_delete_SGFError(PyObject *self, PyObject *args) { |
|---|
| 751 |
PyObject *resultobj; |
|---|
| 752 |
SGFError *arg1 = (SGFError *) 0 ; |
|---|
| 753 |
PyObject * obj0 = 0 ; |
|---|
| 754 |
|
|---|
| 755 |
if(!PyArg_ParseTuple(args,(char *)"O:delete_SGFError",&obj0)) goto fail; |
|---|
| 756 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_SGFError,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 757 |
{ |
|---|
| 758 |
try { |
|---|
| 759 |
delete arg1; |
|---|
| 760 |
|
|---|
| 761 |
} catch(SGFError e) { |
|---|
| 762 |
SGFError *ecopy = new SGFError(e); |
|---|
| 763 |
PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); |
|---|
| 764 |
PyErr_SetObject((PyObject *) SWIGTYPE_p_SGFError->clientdata, err); |
|---|
| 765 |
return NULL; |
|---|
| 766 |
} |
|---|
| 767 |
} |
|---|
| 768 |
Py_INCREF(Py_None); resultobj = Py_None; |
|---|
| 769 |
return resultobj; |
|---|
| 770 |
fail: |
|---|
| 771 |
return NULL; |
|---|
| 772 |
} |
|---|
| 773 |
|
|---|
| 774 |
|
|---|
| 775 |
static PyObject * SGFError_swigregister(PyObject *self, PyObject *args) { |
|---|
| 776 |
PyObject *obj; |
|---|
| 777 |
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
|---|
| 778 |
SWIG_TypeClientData(SWIGTYPE_p_SGFError, obj); |
|---|
| 779 |
Py_INCREF(obj); |
|---|
| 780 |
return Py_BuildValue((char *)""); |
|---|
| 781 |
} |
|---|
| 782 |
static PyObject *_wrap_SGFescape(PyObject *self, PyObject *args) { |
|---|
| 783 |
PyObject *resultobj; |
|---|
| 784 |
char *arg1 ; |
|---|
| 785 |
char *result; |
|---|
| 786 |
|
|---|
| 787 |
if(!PyArg_ParseTuple(args,(char *)"s:SGFescape",&arg1)) goto fail; |
|---|
| 788 |
{ |
|---|
| 789 |
try { |
|---|
| 790 |
result = (char *)SGFescape(arg1); |
|---|
| 791 |
|
|---|
| 792 |
} catch(SGFError e) { |
|---|
| 793 |
SGFError *ecopy = new SGFError(e); |
|---|
| 794 |
PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); |
|---|
| 795 |
PyErr_SetObject((PyObject *) SWIGTYPE_p_SGFError->clientdata, err); |
|---|
| 796 |
return NULL; |
|---|
| 797 |
} |
|---|
| 798 |
} |
|---|
| 799 |
resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); |
|---|
| 800 |
return resultobj; |
|---|
| 801 |
fail: |
|---|
| 802 |
return NULL; |
|---|
| 803 |
} |
|---|
| 804 |
|
|---|
| 805 |
|
|---|
| 806 |
static PyObject *_wrap_Node_previous_set(PyObject *self, PyObject *args) { |
|---|
| 807 |
PyObject *resultobj; |
|---|
| 808 |
Node *arg1 = (Node *) 0 ; |
|---|
| 809 |
Node *arg2 = (Node *) 0 ; |
|---|
| 810 |
PyObject * obj0 = 0 ; |
|---|
| 811 |
PyObject * obj1 = 0 ; |
|---|
| 812 |
|
|---|
| 813 |
if(!PyArg_ParseTuple(args,(char *)"OO:Node_previous_set",&obj0,&obj1)) goto fail; |
|---|
| 814 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 815 |
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; |
|---|
| 816 |
if (arg1) (arg1)->previous = arg2; |
|---|
| 817 |
|
|---|
| 818 |
Py_INCREF(Py_None); resultobj = Py_None; |
|---|
| 819 |
return resultobj; |
|---|
| 820 |
fail: |
|---|
| 821 |
return NULL; |
|---|
| 822 |
} |
|---|
| 823 |
|
|---|
| 824 |
|
|---|
| 825 |
static PyObject *_wrap_Node_previous_get(PyObject *self, PyObject *args) { |
|---|
| 826 |
PyObject *resultobj; |
|---|
| 827 |
Node *arg1 = (Node *) 0 ; |
|---|
| 828 |
Node *result; |
|---|
| 829 |
PyObject * obj0 = 0 ; |
|---|
| 830 |
|
|---|
| 831 |
if(!PyArg_ParseTuple(args,(char *)"O:Node_previous_get",&obj0)) goto fail; |
|---|
| 832 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 833 |
result = (Node *) ((arg1)->previous); |
|---|
| 834 |
|
|---|
| 835 |
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Node, 0); |
|---|
| 836 |
return resultobj; |
|---|
| 837 |
fail: |
|---|
| 838 |
return NULL; |
|---|
| 839 |
} |
|---|
| 840 |
|
|---|
| 841 |
|
|---|
| 842 |
static PyObject *_wrap_Node_next_set(PyObject *self, PyObject *args) { |
|---|
| 843 |
PyObject *resultobj; |
|---|
| 844 |
Node *arg1 = (Node *) 0 ; |
|---|
| 845 |
Node *arg2 = (Node *) 0 ; |
|---|
| 846 |
PyObject * obj0 = 0 ; |
|---|
| 847 |
PyObject * obj1 = 0 ; |
|---|
| 848 |
|
|---|
| 849 |
if(!PyArg_ParseTuple(args,(char *)"OO:Node_next_set",&obj0,&obj1)) goto fail; |
|---|
| 850 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 851 |
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; |
|---|
| 852 |
if (arg1) (arg1)->next = arg2; |
|---|
| 853 |
|
|---|
| 854 |
Py_INCREF(Py_None); resultobj = Py_None; |
|---|
| 855 |
return resultobj; |
|---|
| 856 |
fail: |
|---|
| 857 |
return NULL; |
|---|
| 858 |
} |
|---|
| 859 |
|
|---|
| 860 |
|
|---|
| 861 |
static PyObject *_wrap_Node_next_get(PyObject *self, PyObject *args) { |
|---|
| 862 |
PyObject *resultobj; |
|---|
| 863 |
Node *arg1 = (Node *) 0 ; |
|---|
| 864 |
Node *result; |
|---|
| 865 |
PyObject * obj0 = 0 ; |
|---|
| 866 |
|
|---|
| 867 |
if(!PyArg_ParseTuple(args,(char *)"O:Node_next_get",&obj0)) goto fail; |
|---|
| 868 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 869 |
result = (Node *) ((arg1)->next); |
|---|
| 870 |
|
|---|
| 871 |
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Node, 0); |
|---|
| 872 |
return resultobj; |
|---|
| 873 |
fail: |
|---|
| 874 |
return NULL; |
|---|
| 875 |
} |
|---|
| 876 |
|
|---|
| 877 |
|
|---|
| 878 |
static PyObject *_wrap_Node_up_set(PyObject *self, PyObject *args) { |
|---|
| 879 |
PyObject *resultobj; |
|---|
| 880 |
Node *arg1 = (Node *) 0 ; |
|---|
| 881 |
Node *arg2 = (Node *) 0 ; |
|---|
| 882 |
PyObject * obj0 = 0 ; |
|---|
| 883 |
PyObject * obj1 = 0 ; |
|---|
| 884 |
|
|---|
| 885 |
if(!PyArg_ParseTuple(args,(char *)"OO:Node_up_set",&obj0,&obj1)) goto fail; |
|---|
| 886 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 887 |
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; |
|---|
| 888 |
if (arg1) (arg1)->up = arg2; |
|---|
| 889 |
|
|---|
| 890 |
Py_INCREF(Py_None); resultobj = Py_None; |
|---|
| 891 |
return resultobj; |
|---|
| 892 |
fail: |
|---|
| 893 |
return NULL; |
|---|
| 894 |
} |
|---|
| 895 |
|
|---|
| 896 |
|
|---|
| 897 |
static PyObject *_wrap_Node_up_get(PyObject *self, PyObject *args) { |
|---|
| 898 |
PyObject *resultobj; |
|---|
| 899 |
Node *arg1 = (Node *) 0 ; |
|---|
| 900 |
Node *result; |
|---|
| 901 |
PyObject * obj0 = 0 ; |
|---|
| 902 |
|
|---|
| 903 |
if(!PyArg_ParseTuple(args,(char *)"O:Node_up_get",&obj0)) goto fail; |
|---|
| 904 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 905 |
result = (Node *) ((arg1)->up); |
|---|
| 906 |
|
|---|
| 907 |
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Node, 0); |
|---|
| 908 |
return resultobj; |
|---|
| 909 |
fail: |
|---|
| 910 |
return NULL; |
|---|
| 911 |
} |
|---|
| 912 |
|
|---|
| 913 |
|
|---|
| 914 |
static PyObject *_wrap_Node_down_set(PyObject *self, PyObject *args) { |
|---|
| 915 |
PyObject *resultobj; |
|---|
| 916 |
Node *arg1 = (Node *) 0 ; |
|---|
| 917 |
Node *arg2 = (Node *) 0 ; |
|---|
| 918 |
PyObject * obj0 = 0 ; |
|---|
| 919 |
PyObject * obj1 = 0 ; |
|---|
| 920 |
|
|---|
| 921 |
if(!PyArg_ParseTuple(args,(char *)"OO:Node_down_set",&obj0,&obj1)) goto fail; |
|---|
| 922 |
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
|---|
| 923 |
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_Node,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail; |
|---|
| 924 |
if (arg1) (arg1)->down = arg2; |
|---|
| 925 |
|
|---|
| 926 |
Py_INCREF(Py_None); resultobj = Py_None; |
|---|
| 927 |
return resultobj; |
|---|
| 928 |
fail: |
|---|
| 929 |
return NULL; |
|---|
| 930 |
} |
|---|
| 931 |
|
|---|
| 932 |
|
|---|
| 933 |
static PyObject * |
|---|