Changeset 99 for 05/devel/sgfpars_wrap.cxx
- Timestamp:
- 03/19/04 22:58:00 (5 years ago)
- Files:
-
- 05/devel/sgfpars_wrap.cxx (modified) (70 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
05/devel/sgfpars_wrap.cxx
r62 r99 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3. 193 * Version 1.3.21 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 15 15 T *tt; 16 16 public: 17 inline SwigValueWrapper() : tt(0) { } 18 inline ~SwigValueWrapper() { if (tt) delete tt; } 19 inline SwigValueWrapper& operator=(const T& t) { tt = new T(t); return *this; } 20 inline operator T&() const { return *tt; } 21 inline T *operator&() { return tt; } 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); 22 26 }; 23 27 #endif … … 25 29 26 30 #include "Python.h" 31 32 /*************************************************************** -*- c -*- 33 * python/precommon.swg 34 * 35 * Rename all exported symbols from common.swg, to avoid symbol 36 * clashes if multiple interpreters are included 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 27 50 28 51 /*********************************************************************** … … 43 66 #include <string.h> 44 67 45 #if defined(_WIN32) || defined(__WIN32__) 46 # if defined(_MSC_VER)47 # if defined(STATIC_LINKED)48 # define SWIGEXPORT(a) a49 # define SWIGIMPORT(a) extern a50 # else51 # define SWIGEXPORT(a) __declspec(dllexport) a52 # define SWIGIMPORT(a) extern a53 # endif54 # else55 # if defined(__BORLANDC__)56 # define SWIGEXPORT(a) a _export57 # define SWIGIMPORT(a) a _export58 # else59 # define SWIGEXPORT(a) a60 # define SWIGIMPORT(a) a61 # endif62 # endif68 #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 63 86 #else 64 # define SWIGEXPORT(a) a65 # define SWIGIMPORT(a) a87 # define SWIGEXPORT(a) a 88 # define SWIGIMPORT(a) a 66 89 #endif 67 90 68 91 #ifdef SWIG_GLOBAL 69 # define SWIGRUNTIME(a) SWIGEXPORT(a)92 # define SWIGRUNTIME(a) SWIGEXPORT(a) 70 93 #else 71 # define SWIGRUNTIME(a) static a94 # define SWIGRUNTIME(a) static a 72 95 #endif 73 96 … … 80 103 81 104 typedef struct swig_type_info { 82 const char *name; 105 const char *name; 83 106 swig_converter_func converter; 84 107 const char *str; 85 void *clientdata; 108 void *clientdata; 86 109 swig_dycast_func dcast; 87 110 struct swig_type_info *next; … … 98 121 SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); 99 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); 100 125 101 126 #else … … 105 130 /* Register a type mapping with the type-checking */ 106 131 SWIGRUNTIME(swig_type_info *) 107 SWIG_TypeRegister(swig_type_info *ti) 108 { 132 SWIG_TypeRegister(swig_type_info *ti) { 109 133 swig_type_info *tc, *head, *ret, *next; 110 134 /* Check to see if this type has already been registered */ … … 113 137 if (strcmp(tc->name, ti->name) == 0) { 114 138 /* Already exists in the table. Just add additional types to the list */ 115 if (tc->clientdata) ti->clientdata = tc->clientdata; 139 if (tc->clientdata) ti->clientdata = tc->clientdata; 116 140 head = tc; 117 141 next = tc->next; … … 128 152 129 153 /* Build linked lists */ 130 l1:154 l1: 131 155 ret = head; 132 156 tc = ti + 1; … … 138 162 tc++; 139 163 } 140 if (next) next->prev = head; /**/164 if (next) next->prev = head; 141 165 head->next = next; 142 166 return ret; … … 145 169 /* Check the typename */ 146 170 SWIGRUNTIME(swig_type_info *) 147 SWIG_TypeCheck(char *c, swig_type_info *ty) 148 { 171 SWIG_TypeCheck(char *c, swig_type_info *ty) { 149 172 swig_type_info *s; 150 173 if (!ty) return 0; /* Void pointer */ … … 156 179 s->prev->next = s->next; 157 180 if (s->next) { 158 s->next->prev = s->prev;181 s->next->prev = s->prev; 159 182 } 160 183 /* Insert s as second element in the list */ … … 162 185 if (ty->next) ty->next->prev = s; 163 186 ty->next = s; 164 s->prev = ty; /**/187 s->prev = ty; 165 188 return s; 166 189 } … … 172 195 /* Cast a pointer up an inheritance hierarchy */ 173 196 SWIGRUNTIME(void *) 174 SWIG_TypeCast(swig_type_info *ty, void *ptr) 175 { 197 SWIG_TypeCast(swig_type_info *ty, void *ptr) { 176 198 if ((!ty) || (!ty->converter)) return ptr; 177 199 return (*ty->converter)(ptr); … … 180 202 /* Dynamic pointer casting. Down an inheritance hierarchy */ 181 203 SWIGRUNTIME(swig_type_info *) 182 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) 183 { 204 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { 184 205 swig_type_info *lastty = ty; 185 206 if (!ty || !ty->dcast) return ty; 186 207 while (ty && (ty->dcast)) { 187 ty = (*ty->dcast)(ptr);188 if (ty) lastty = ty;208 ty = (*ty->dcast)(ptr); 209 if (ty) lastty = ty; 189 210 } 190 211 return lastty; … … 220 241 tc = swig_type_list; 221 242 while (tc) { 222 if ((strcmp(tc->name, equiv->name) == 0))223 SWIG_TypeClientData(tc,clientdata);224 tc = tc->prev;243 if ((strcmp(tc->name, equiv->name) == 0)) 244 SWIG_TypeClientData(tc,clientdata); 245 tc = tc->prev; 225 246 } 226 247 } 227 248 equiv = equiv->next; 228 249 } 229 }230 #endif231 232 #ifdef __cplusplus233 }234 235 #endif236 237 /***********************************************************************238 * python.swg239 *240 * This file contains the runtime support for Python modules241 * and includes code for managing global variables and pointer242 * type checking.243 *244 * Author : David Beazley (beazley@cs.uchicago.edu)245 ************************************************************************/246 247 #include "Python.h"248 249 #ifdef __cplusplus250 extern "C" {251 #endif252 253 #define SWIG_PY_INT 1254 #define SWIG_PY_FLOAT 2255 #define SWIG_PY_STRING 3256 #define SWIG_PY_POINTER 4257 #define SWIG_PY_BINARY 5258 259 /* Flags for pointer conversion */260 261 #define SWIG_POINTER_EXCEPTION 0x1262 #define SWIG_POINTER_DISOWN 0x2263 264 /* Exception handling in wrappers */265 #define SWIG_fail goto fail266 267 /* Constant information structure */268 typedef struct swig_const_info {269 int type;270 char *name;271 long lvalue;272 double dvalue;273 void *pvalue;274 swig_type_info **ptype;275 } swig_const_info;276 277 #ifdef SWIG_NOINCLUDE278 279 SWIGEXPORT(PyObject *) SWIG_newvarlink(void);280 SWIGEXPORT(void) SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));281 SWIGEXPORT(int) SWIG_ConvertPtr(PyObject *, void **, swig_type_info *, int);282 SWIGEXPORT(int) SWIG_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);283 SWIGEXPORT(char *) SWIG_PackData(char *c, void *, int);284 SWIGEXPORT(char *) SWIG_UnpackData(char *c, void *, int);285 SWIGEXPORT(PyObject *) SWIG_NewPointerObj(void *, swig_type_info *,int own);286 SWIGEXPORT(PyObject *) SWIG_NewPackedObj(void *, int sz, swig_type_info *);287 SWIGEXPORT(void) SWIG_InstallConstants(PyObject *d, swig_const_info constants[]);288 #else289 290 /* -----------------------------------------------------------------------------291 * global variable support code.292 * ----------------------------------------------------------------------------- */293 294 typedef struct swig_globalvar {295 char *name; /* Name of global variable */296 PyObject *(*get_attr)(void); /* Return the current value */297 int (*set_attr)(PyObject *); /* Set the value */298 struct swig_globalvar *next;299 } swig_globalvar;300 301 typedef struct swig_varlinkobject {302 PyObject_HEAD303 swig_globalvar *vars;304 } swig_varlinkobject;305 306 static PyObject *307 swig_varlink_repr(swig_varlinkobject *v) {308 v = v;309 return PyString_FromString("<Global variables>");310 }311 312 static int313 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {314 swig_globalvar *var;315 flags = flags;316 fprintf(fp,"Global variables { ");317 for (var = v->vars; var; var=var->next) {318 fprintf(fp,"%s", var->name);319 if (var->next) fprintf(fp,", ");320 }321 fprintf(fp," }\n");322 return 0;323 }324 325 static PyObject *326 swig_varlink_getattr(swig_varlinkobject *v, char *n) {327 swig_globalvar *var = v->vars;328 while (var) {329 if (strcmp(var->name,n) == 0) {330 return (*var->get_attr)();331 }332 var = var->next;333 }334 PyErr_SetString(PyExc_NameError,"Unknown C global variable");335 return NULL;336 }337 338 static int339 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {340 swig_globalvar *var = v->vars;341 while (var) {342 if (strcmp(var->name,n) == 0) {343 return (*var->set_attr)(p);344 }345 var = var->next;346 }347 PyErr_SetString(PyExc_NameError,"Unknown C global variable");348 return 1;349 }350 351 statichere PyTypeObject varlinktype = {352 PyObject_HEAD_INIT(0)353 0,354 (char *)"swigvarlink", /* Type name */355 sizeof(swig_varlinkobject), /* Basic size */356 0, /* Itemsize */357 0, /* Deallocator */358 (printfunc) swig_varlink_print, /* Print */359 (getattrfunc) swig_varlink_getattr, /* get attr */360 (setattrfunc) swig_varlink_setattr, /* Set attr */361 0, /* tp_compare */362 (reprfunc) swig_varlink_repr, /* tp_repr */363 0, /* tp_as_number */364 0, /* tp_as_mapping*/365 0, /* tp_hash */366 };367 368 /* Create a variable linking object for use later */369 SWIGRUNTIME(PyObject *)370 SWIG_newvarlink(void) {371 swig_varlinkobject *result = 0;372 result = PyMem_NEW(swig_varlinkobject,1);373 varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */374 result->ob_type = &varlinktype;375 result->vars = 0;376 result->ob_refcnt = 0;377 Py_XINCREF((PyObject *) result);378 return ((PyObject*) result);379 }380 381 SWIGRUNTIME(void)382 SWIG_addvarlink(PyObject *p, char *name,383 PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {384 swig_varlinkobject *v;385 swig_globalvar *gv;386 v= (swig_varlinkobject *) p;387 gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));388 gv->name = (char *) malloc(strlen(name)+1);389 strcpy(gv->name,name);390 gv->get_attr = get_attr;391 gv->set_attr = set_attr;392 gv->next = v->vars;393 v->vars = gv;394 250 } 395 251 … … 432 288 } 433 289 290 #endif 291 292 #ifdef __cplusplus 293 } 294 #endif 295 296 /*********************************************************************** 297 * python.swg 298 * 299 * This file contains the runtime support for Python modules 300 * and includes code for managing global variables and pointer 301 * type checking. 302 * 303 * Author : David Beazley (beazley@cs.uchicago.edu) 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 /* Flags for pointer conversion */ 319 320 #define SWIG_POINTER_EXCEPTION 0x1 321 #define SWIG_POINTER_DISOWN 0x2 322 323 /* Exception handling in wrappers */ 324 #define SWIG_fail goto fail 325 326 /* Constant information structure */ 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 /* Common SWIG API */ 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 /* Python-specific SWIG API */ 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 * global variable support code. 371 * ----------------------------------------------------------------------------- */ 372 373 typedef struct swig_globalvar { 374 char *name; /* Name of global variable */ 375 PyObject *(*get_attr)(void); /* Return the current value */ 376 int (*set_attr)(PyObject *); /* Set the value */ 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", /* Type name */ 434 sizeof(swig_varlinkobject), /* Basic size */ 435 0, /* Itemsize */ 436 0, /* Deallocator */ 437 (printfunc) swig_varlink_print, /* Print */ 438 (getattrfunc) swig_varlink_getattr, /* get attr */ 439 (setattrfunc) swig_varlink_setattr, /* Set attr */ 440 0, /* tp_compare */ 441 (reprfunc) swig_varlink_repr, /* tp_repr */ 442 0, /* tp_as_number */ 443 0, /* tp_as_mapping*/ 444 0, /* tp_hash */ 445 }; 446 447 /* Create a variable linking object for use later */ 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; /* Patch varlinktype into a PyType */ 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 434 474 /* Convert a pointer value */ 435 475 SWIGRUNTIME(int) 436 SWIG_ ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {476 SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { 437 477 swig_type_info *tc; 438 char *c ;478 char *c = 0; 439 479 static PyObject *SWIG_this = 0; 440 480 int newref = 0; … … 504 544 505 545 if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { 506 PyObject *zero = PyInt_FromLong(0);507 PyObject_SetAttrString(pyobj,(char*)"thisown",zero);508 Py_DECREF(zero);546 PyObject *zero = PyInt_FromLong(0); 547 PyObject_SetAttrString(pyobj,(char*)"thisown",zero); 548 Py_DECREF(zero); 509 549 } 510 550 return 0; … … 512 552 type_error: 513 553 if (flags & SWIG_POINTER_EXCEPTION) { 514 if (ty ) {515 char *temp = (char *) malloc(64+strlen(ty->name) );516 sprintf(temp,"Type error. Expected %s", ty->name);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); 517 557 PyErr_SetString(PyExc_TypeError, temp); 518 558 free((char *) temp); … … 524 564 } 525 565 566 /* Convert a pointer value, signal an exception on a type mismatch */ 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 526 574 /* Convert a packed value value */ 527 575 SWIGRUNTIME(int) 528 SWIG_ ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {576 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { 529 577 swig_type_info *tc; 530 char *c ;578 char *c = 0; 531 579 532 580 if ((!obj) || (!PyString_Check(obj))) goto type_error; … … 545 593 546 594 if (flags) { 547 if (ty ) {548 char *temp = (char *) malloc(64+strlen(ty->name) );549 sprintf(temp,"Type error. Expected %s", ty->name);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); 550 598 PyErr_SetString(PyExc_TypeError, temp); 551 599 free((char *) temp); … … 559 607 /* Create a new pointer object */ 560 608 SWIGRUNTIME(PyObject *) 561 SWIG_ NewPointerObj(void *ptr, swig_type_info *type, int own) {609 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { 562 610 PyObject *robj; 563 611 if (!ptr) { … … 586 634 if (inst) { 587 635 if (own) { 588 PyObject *n = PyInt_FromLong(1);589 PyObject_SetAttrString(inst,(char*)"thisown",n);590 Py_DECREF(n);636 PyObject *n = PyInt_FromLong(1); 637 PyObject_SetAttrString(inst,(char*)"thisown",n); 638 Py_DECREF(n); 591 639 } 592 640 robj = inst; … … 597 645 598 646 SWIGRUNTIME(PyObject *) 599 SWIG_ NewPackedObj(void *ptr, int sz, swig_type_info *type) {647 SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) { 600 648 char result[1024]; 601 649 char *r = result; … … 609 657 /* Install Constants */ 610 658 SWIGRUNTIME(void) 611 SWIG_ InstallConstants(PyObject *d, swig_const_info constants[]) {659 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { 612 660 int i; 613 661 PyObject *obj; … … 642 690 #endif 643 691 692 /* Contract support */ 693 694 #define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else 695 644 696 #ifdef __cplusplus 645 697 } 646 698 #endif 647 648 649 650 651 652 653 699 654 700 … … 688 734 result = (SGFError *)new SGFError(); 689 735 690 } catch(SGFError e) {736 } catch(SGFError e) { 691 737 SGFError *ecopy = new SGFError(e); 692 738 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 713 759 delete arg1; 714 760 715 } catch(SGFError e) {761 } catch(SGFError e) { 716 762 SGFError *ecopy = new SGFError(e); 717 763 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 744 790 result = (char *)SGFescape(arg1); 745 791 746 } catch(SGFError e) {792 } catch(SGFError e) { 747 793 SGFError *ecopy = new SGFError(e); 748 794 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 983 1029 arg1->SGFstring = (char *) (new char[strlen(arg2)+1]); 984 1030 strcpy((char *) arg1->SGFstring,arg2); 985 } else {1031 } else { 986 1032 arg1->SGFstring = 0; 987 1033 } … … 1130 1176 result = (Node *)new Node(arg1,arg2,arg3); 1131 1177 1132 } catch(SGFError e) {1178 } catch(SGFError e) { 1133 1179 SGFError *ecopy = new SGFError(e); 1134 1180 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1165 1211 delete arg1; 1166 1212 1167 } catch(SGFError e) {1213 } catch(SGFError e) { 1168 1214 SGFError *ecopy = new SGFError(e); 1169 1215 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1191 1237 result = (PyObject *)(arg1)->pathToNode(); 1192 1238 1193 } catch(SGFError e) {1239 } catch(SGFError e) { 1194 1240 SGFError *ecopy = new SGFError(e); 1195 1241 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1217 1263 (arg1)->parseNode(); 1218 1264 1219 } catch(SGFError e) {1265 } catch(SGFError e) { 1220 1266 SGFError *ecopy = new SGFError(e); 1221 1267 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1253 1299 result = (PyObject *)(arg1)->getData(); 1254 1300 1255 } catch(SGFError e) {1301 } catch(SGFError e) { 1256 1302 SGFError *ecopy = new SGFError(e); 1257 1303 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1307 1353 result = (Cursor *)new Cursor(arg1,arg2); 1308 1354 1309 } catch(SGFError e) {1355 } catch(SGFError e) { 1310 1356 SGFError *ecopy = new SGFError(e); 1311 1357 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1342 1388 delete arg1; 1343 1389 1344 } catch(SGFError e) {1390 } catch(SGFError e) { 1345 1391 SGFError *ecopy = new SGFError(e); 1346 1392 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1645 1691 arg1->encoding = (char *) (new char[strlen(arg2)+1]); 1646 1692 strcpy((char *) arg1->encoding,arg2); 1647 } else {1693 } else { 1648 1694 arg1->encoding = 0; 1649 1695 } … … 1685 1731 result = (int)(arg1)->noChildren(); 1686 1732 1687 } catch(SGFError e) {1733 } catch(SGFError e) { 1688 1734 SGFError *ecopy = new SGFError(e); 1689 1735 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1711 1757 result = (PyObject *)(arg1)->currentNode(); 1712 1758 1713 } catch(SGFError e) {1759 } catch(SGFError e) { 1714 1760 SGFError *ecopy = new SGFError(e); 1715 1761 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1738 1784 (arg1)->parse(arg2); 1739 1785 1740 } catch(SGFError e) {1786 } catch(SGFError e) { 1741 1787 SGFError *ecopy = new SGFError(e); 1742 1788 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1775 1821 (arg1)->game(arg2); 1776 1822 1777 } catch(SGFError e) {1823 } catch(SGFError e) { 1778 1824 SGFError *ecopy = new SGFError(e); 1779 1825 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1813 1859 result = (PyObject *)(arg1)->next(arg2); 1814 1860 1815 } catch(SGFError e) {1861 } catch(SGFError e) { 1816 1862 SGFError *ecopy = new SGFError(e); 1817 1863 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1850 1896 result = (PyObject *)(arg1)->previous(); 1851 1897 1852 } catch(SGFError e) {1898 } catch(SGFError e) { 1853 1899 SGFError *ecopy = new SGFError(e); 1854 1900 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1888 1934 result = (PyObject *)(arg1)->getRootNode(arg2); 1889 1935 1890 } catch(SGFError e) {1936 } catch(SGFError e) { 1891 1937 SGFError *ecopy = new SGFError(e); 1892 1938 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1924 1970 (arg1)->updateCurrentNode(); 1925 1971 1926 } catch(SGFError e) {1972 } catch(SGFError e) { 1927 1973 SGFError *ecopy = new SGFError(e); 1928 1974 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 1964 2010 (arg1)->updateRootNode(arg2,arg3); 1965 2011 1966 } catch(SGFError e) {2012 } catch(SGFError e) { 1967 2013 SGFError *ecopy = new SGFError(e); 1968 2014 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2003 2049 result = (char *)(arg1)->rootNodeToString(arg2); 2004 2050 2005 } catch(SGFError e) {2051 } catch(SGFError e) { 2006 2052 SGFError *ecopy = new SGFError(e); 2007 2053 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2033 2079 result = (char *)(arg1)->nodeToString(arg2); 2034 2080 2035 } catch(SGFError e) {2081 } catch(SGFError e) { 2036 2082 SGFError *ecopy = new SGFError(e); 2037 2083 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2072 2118 result = (char *)(arg1)->outputVar(arg2); 2073 2119 2074 } catch(SGFError e) {2120 } catch(SGFError e) { 2075 2121 SGFError *ecopy = new SGFError(e); 2076 2122 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2098 2144 result = (char *)(arg1)->output(); 2099 2145 2100 } catch(SGFError e) {2146 } catch(SGFError e) { 2101 2147 SGFError *ecopy = new SGFError(e); 2102 2148 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2124 2170 (arg1)->add(arg2); 2125 2171 2126 } catch(SGFError e) {2172 } catch(SGFError e) { 2127 2173 SGFError *ecopy = new SGFError(e); 2128 2174 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2152 2198 (arg1)->delVariation(arg2); 2153 2199 2154 } catch(SGFError e) {2200 } catch(SGFError e) { 2155 2201 SGFError *ecopy = new SGFError(e); 2156 2202 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2177 2223 (arg1)->setFlags(); 2178 2224 2179 } catch(SGFError e) {2225 } catch(SGFError e) { 2180 2226 SGFError *ecopy = new SGFError(e); 2181 2227 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2281 2327 result = (intN *)new intN(arg1,arg2); 2282 2328 2283 } catch(SGFError e) {2329 } catch(SGFError e) { 2284 2330 SGFError *ecopy = new SGFError(e); 2285 2331 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2306 2352 delete arg1; 2307 2353 2308 } catch(SGFError e) {2354 } catch(SGFError e) { 2309 2355 SGFError *ecopy = new SGFError(e); 2310 2356 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2372 2418 result = (IntStack *)new IntStack(); 2373 2419 2374 } catch(SGFError e) {2420 } catch(SGFError e) { 2375 2421 SGFError *ecopy = new SGFError(e); 2376 2422 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2398 2444 (arg1)->push(arg2); 2399 2445 2400 } catch(SGFError e) {2446 } catch(SGFError e) { 2401 2447 SGFError *ecopy = new SGFError(e); 2402 2448 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2423 2469 (arg1)->pop(); 2424 2470 2425 } catch(SGFError e) {2471 } catch(SGFError e) { 2426 2472 SGFError *ecopy = new SGFError(e); 2427 2473 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2449 2495 result = (int)(arg1)->top(); 2450 2496 2451 } catch(SGFError e) {2497 } catch(SGFError e) { 2452 2498 SGFError *ecopy = new SGFError(e); 2453 2499 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2475 2521 result = (bool)(arg1)->nonempty(); 2476 2522 2477 } catch(SGFError e) {2523 } catch(SGFError e) { 2478 2524 SGFError *ecopy = new SGFError(e); 2479 2525 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2500 2546 delete arg1; 2501 2547 2502 } catch(SGFError e) {2548 } catch(SGFError e) { 2503 2549 SGFError *ecopy = new SGFError(e); 2504 2550 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2608 2654 result = (nodeN *)new nodeN(arg1,arg2); 2609 2655 2610 } catch(SGFError e) {2656 } catch(SGFError e) { 2611 2657 SGFError *ecopy = new SGFError(e); 2612 2658 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2633 2679 delete arg1; 2634 2680 2635 } catch(SGFError e) {2681 } catch(SGFError e) { 2636 2682 SGFError *ecopy = new SGFError(e); 2637 2683 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2699 2745 result = (NodeStack *)new NodeStack(); 2700 2746 2701 } catch(SGFError e) {2747 } catch(SGFError e) { 2702 2748 SGFError *ecopy = new SGFError(e); 2703 2749 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2727 2773 (arg1)->push(arg2); 2728 2774 2729 } catch(SGFError e) {2775 } catch(SGFError e) { 2730 2776 SGFError *ecopy = new SGFError(e); 2731 2777 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2752 2798 (arg1)->pop(); 2753 2799 2754 } catch(SGFError e) {2800 } catch(SGFError e) { 2755 2801 SGFError *ecopy = new SGFError(e); 2756 2802 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2778 2824 result = (Node *)(arg1)->top(); 2779 2825 2780 } catch(SGFError e) {2826 } catch(SGFError e) { 2781 2827 SGFError *ecopy = new SGFError(e); 2782 2828 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2804 2850 result = (bool)(arg1)->nonempty(); 2805 2851 2806 } catch(SGFError e) {2852 } catch(SGFError e) { 2807 2853 SGFError *ecopy = new SGFError(e); 2808 2854 PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); … … 2829 2875 delete arg1; 2830 2876 2831 } catch(SGFError e) {2877 } catch(SGFError e) { 2832 2878 <
