Show
Ignore:
Timestamp:
03/19/04 22:58:00 (5 years ago)
Author:
ug
Message:

Typo in import list of encodings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 05/devel/sgfpars_wrap.cxx

    <
    r62 r99  
    11/* ---------------------------------------------------------------------------- 
    22 * This file was automatically generated by SWIG (http://www.swig.org). 
    3  * Version 1.3.19 
     3 * Version 1.3.21 
    44 *  
    55 * This file is not intended to be easily readable and contains a number of  
     
    1515    T *tt; 
    1616public: 
    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; } 
     24private: 
     25    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); 
    2226};                                                     
    2327#endif 
     
    2529 
    2630#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 
    2750 
    2851/*********************************************************************** 
     
    4366#include <string.h> 
    4467 
    45 #if defined(_WIN32) || defined(__WIN32__) 
    46      if defined(_MSC_VER
    47 #               if defined(STATIC_LINKED) 
    48 #                       define SWIGEXPORT(a) a 
    49 #                       define SWIGIMPORT(a) extern a 
    50 #               else 
    51 #                       define SWIGEXPORT(a) __declspec(dllexport) a 
    52 #                       define SWIGIMPORT(a) extern a 
    53 #               endif 
    54      else 
    55 #               if defined(__BORLANDC__) 
    56 #                       define SWIGEXPORT(a) a _export 
    57 #                       define SWIGIMPORT(a) a _export 
    58 #               else 
    59 #                       define SWIGEXPORT(a) a 
    60 #                       define SWIGIMPORT(a) a 
    61 #               endif 
    62      endif 
     68#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 
     69if 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 
     77else 
     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 
     85endif 
    6386#else 
    64      define SWIGEXPORT(a) a 
    65      define SWIGIMPORT(a) a 
     87define SWIGEXPORT(a) a 
     88define SWIGIMPORT(a) a 
    6689#endif 
    6790 
    6891#ifdef SWIG_GLOBAL 
    69 #define SWIGRUNTIME(a) SWIGEXPORT(a) 
     92#  define SWIGRUNTIME(a) SWIGEXPORT(a) 
    7093#else 
    71 #define SWIGRUNTIME(a) static a 
     94#  define SWIGRUNTIME(a) static a 
    7295#endif 
    7396 
     
    80103 
    81104typedef struct swig_type_info { 
    82   const char             *name;                  
     105  const char             *name; 
    83106  swig_converter_func     converter; 
    84107  const char             *str; 
    85   void                   *clientdata;   
     108  void                   *clientdata; 
    86109  swig_dycast_func        dcast; 
    87110  struct swig_type_info  *next; 
     
    98121SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); 
    99122SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *); 
     123SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int); 
     124SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int); 
    100125 
    101126#else 
     
    105130/* Register a type mapping with the type-checking */ 
    106131SWIGRUNTIME(swig_type_info *) 
    107 SWIG_TypeRegister(swig_type_info *ti) 
    108 
     132SWIG_TypeRegister(swig_type_info *ti) { 
    109133  swig_type_info *tc, *head, *ret, *next; 
    110134  /* Check to see if this type has already been registered */ 
     
    113137    if (strcmp(tc->name, ti->name) == 0) { 
    114138      /* 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; 
    116140      head = tc; 
    117141      next = tc->next; 
     
    128152 
    129153  /* Build linked lists */ 
    130  l1: 
     154  l1: 
    131155  ret = head; 
    132156  tc = ti + 1; 
     
    138162    tc++; 
    139163  } 
    140   if (next) next->prev = head;  /**/ 
     164  if (next) next->prev = head; 
    141165  head->next = next; 
    142166  return ret; 
     
    145169/* Check the typename */ 
    146170SWIGRUNTIME(swig_type_info *)  
    147 SWIG_TypeCheck(char *c, swig_type_info *ty) 
    148 
     171SWIG_TypeCheck(char *c, swig_type_info *ty) { 
    149172  swig_type_info *s; 
    150173  if (!ty) return 0;        /* Void pointer */ 
     
    156179      s->prev->next = s->next; 
    157180      if (s->next) { 
    158        s->next->prev = s->prev; 
     181        s->next->prev = s->prev; 
    159182      } 
    160183      /* Insert s as second element in the list */ 
     
    162185      if (ty->next) ty->next->prev = s; 
    163186      ty->next = s; 
    164       s->prev = ty;  /**/ 
     187      s->prev = ty; 
    165188      return s; 
    166189    } 
     
    172195/* Cast a pointer up an inheritance hierarchy */ 
    173196SWIGRUNTIME(void *)  
    174 SWIG_TypeCast(swig_type_info *ty, void *ptr)  
    175 
     197SWIG_TypeCast(swig_type_info *ty, void *ptr) { 
    176198  if ((!ty) || (!ty->converter)) return ptr; 
    177199  return (*ty->converter)(ptr); 
     
    180202/* Dynamic pointer casting. Down an inheritance hierarchy */ 
    181203SWIGRUNTIME(swig_type_info *)  
    182 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)  
    183 
     204SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { 
    184205  swig_type_info *lastty = ty; 
    185206  if (!ty || !ty->dcast) return ty; 
    186207  while (ty && (ty->dcast)) { 
    187     ty = (*ty->dcast)(ptr); 
    188     if (ty) lastty = ty; 
     208    ty = (*ty->dcast)(ptr); 
     209    if (ty) lastty = ty; 
    189210  } 
    190211  return lastty; 
     
    220241      tc = swig_type_list; 
    221242      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; 
    225246      } 
    226247    } 
    227248    equiv = equiv->next; 
    228249  } 
    229 } 
    230 #endif 
    231  
    232 #ifdef __cplusplus 
    233 } 
    234  
    235 #endif 
    236  
    237 /*********************************************************************** 
    238  * python.swg 
    239  * 
    240  *     This file contains the runtime support for Python modules 
    241  *     and includes code for managing global variables and pointer 
    242  *     type checking. 
    243  * 
    244  * Author : David Beazley (beazley@cs.uchicago.edu) 
    245  ************************************************************************/ 
    246  
    247 #include "Python.h" 
    248  
    249 #ifdef __cplusplus 
    250 extern "C" { 
    251 #endif 
    252  
    253 #define SWIG_PY_INT     1 
    254 #define SWIG_PY_FLOAT   2 
    255 #define SWIG_PY_STRING  3 
    256 #define SWIG_PY_POINTER 4 
    257 #define SWIG_PY_BINARY  5 
    258  
    259 /* Flags for pointer conversion */ 
    260  
    261 #define SWIG_POINTER_EXCEPTION     0x1 
    262 #define SWIG_POINTER_DISOWN        0x2 
    263  
    264 /* Exception handling in wrappers */ 
    265 #define SWIG_fail   goto fail 
    266  
    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_NOINCLUDE 
    278  
    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 #else 
    289  
    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_HEAD 
    303   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 int 
    313 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 int 
    339 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; 
    394250} 
    395251 
     
    432288} 
    433289 
     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 
     309extern "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 */ 
     327typedef 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 
     358SWIGIMPORT(int)               SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); 
     359SWIGIMPORT(PyObject *)        SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); 
     360SWIGIMPORT(void *)            SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); 
     361SWIGIMPORT(PyObject *)        SWIG_Python_newvarlink(void); 
     362SWIGIMPORT(void)              SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); 
     363SWIGIMPORT(int)               SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); 
     364SWIGIMPORT(PyObject *)        SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); 
     365SWIGIMPORT(void)              SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); 
     366 
     367#else 
     368 
     369/* ----------------------------------------------------------------------------- 
     370 * global variable support code. 
     371 * ----------------------------------------------------------------------------- */ 
     372 
     373typedef 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 
     380typedef struct swig_varlinkobject { 
     381  PyObject_HEAD 
     382  swig_globalvar *vars; 
     383} swig_varlinkobject; 
     384 
     385static PyObject * 
     386swig_varlink_repr(swig_varlinkobject *v) { 
     387  v = v; 
     388  return PyString_FromString("<Global variables>"); 
     389} 
     390 
     391static int 
     392swig_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 
     404static PyObject * 
     405swig_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 
     417static int 
     418swig_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 
     430statichere 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 */ 
     448SWIGRUNTIME(PyObject *) 
     449SWIG_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 
     460SWIGRUNTIME(void) 
     461SWIG_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 
    434474/* Convert a pointer value */ 
    435475SWIGRUNTIME(int) 
    436 SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { 
     476SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { 
    437477  swig_type_info *tc; 
    438   char  *c
     478  char  *c = 0
    439479  static PyObject *SWIG_this = 0; 
    440480  int    newref = 0; 
     
    504544 
    505545  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); 
    509549  } 
    510550  return 0; 
     
    512552type_error: 
    513553  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); 
    517557      PyErr_SetString(PyExc_TypeError, temp); 
    518558      free((char *) temp); 
     
    524564} 
    525565 
     566/* Convert a pointer value, signal an exception on a type mismatch */ 
     567SWIGRUNTIME(void *) 
     568SWIG_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 
    526574/* Convert a packed value value */ 
    527575SWIGRUNTIME(int) 
    528 SWIG_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { 
     576SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { 
    529577  swig_type_info *tc; 
    530   char  *c
     578  char  *c = 0
    531579 
    532580  if ((!obj) || (!PyString_Check(obj))) goto type_error; 
     
    545593 
    546594  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); 
    550598      PyErr_SetString(PyExc_TypeError, temp); 
    551599      free((char *) temp); 
     
    559607/* Create a new pointer object */ 
    560608SWIGRUNTIME(PyObject *) 
    561 SWIG_NewPointerObj(void *ptr, swig_type_info *type, int own) { 
     609SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { 
    562610  PyObject *robj; 
    563611  if (!ptr) { 
     
    586634    if (inst) { 
    587635      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); 
    591639      } 
    592640      robj = inst; 
     
    597645 
    598646SWIGRUNTIME(PyObject *) 
    599 SWIG_NewPackedObj(void *ptr, int sz, swig_type_info *type) { 
     647SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) { 
    600648  char result[1024]; 
    601649  char *r = result; 
     
    609657/* Install Constants */ 
    610658SWIGRUNTIME(void) 
    611 SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) { 
     659SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { 
    612660  int i; 
    613661  PyObject *obj; 
     
    642690#endif 
    643691 
     692/* Contract support */ 
     693 
     694#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else 
     695 
    644696#ifdef __cplusplus 
    645697} 
    646698#endif 
    647  
    648  
    649  
    650  
    651  
    652  
    653699 
    654700 
     
    688734            result = (SGFError *)new SGFError(); 
    689735             
    690         }catch(SGFError e) { 
     736        } catch(SGFError e) { 
    691737            SGFError *ecopy = new SGFError(e); 
    692738            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    713759            delete arg1; 
    714760             
    715         }catch(SGFError e) { 
     761        } catch(SGFError e) { 
    716762            SGFError *ecopy = new SGFError(e); 
    717763            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    744790            result = (char *)SGFescape(arg1); 
    745791             
    746         }catch(SGFError e) { 
     792        } catch(SGFError e) { 
    747793            SGFError *ecopy = new SGFError(e); 
    748794            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    9831029            arg1->SGFstring = (char *) (new char[strlen(arg2)+1]); 
    9841030            strcpy((char *) arg1->SGFstring,arg2); 
    985         }else { 
     1031        } else { 
    9861032            arg1->SGFstring = 0; 
    9871033        } 
     
    11301176                result = (Node *)new Node(arg1,arg2,arg3); 
    11311177                 
    1132             }catch(SGFError e) { 
     1178            } catch(SGFError e) { 
    11331179                SGFError *ecopy = new SGFError(e); 
    11341180                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    11651211            delete arg1; 
    11661212             
    1167         }catch(SGFError e) { 
     1213        } catch(SGFError e) { 
    11681214            SGFError *ecopy = new SGFError(e); 
    11691215            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    11911237            result = (PyObject *)(arg1)->pathToNode(); 
    11921238             
    1193         }catch(SGFError e) { 
     1239        } catch(SGFError e) { 
    11941240            SGFError *ecopy = new SGFError(e); 
    11951241            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    12171263                (arg1)->parseNode(); 
    12181264                 
    1219             }catch(SGFError e) { 
     1265            } catch(SGFError e) { 
    12201266                SGFError *ecopy = new SGFError(e); 
    12211267                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    12531299            result = (PyObject *)(arg1)->getData(); 
    12541300             
    1255         }catch(SGFError e) { 
     1301        } catch(SGFError e) { 
    12561302            SGFError *ecopy = new SGFError(e); 
    12571303            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    13071353                result = (Cursor *)new Cursor(arg1,arg2); 
    13081354                 
    1309             }catch(SGFError e) { 
     1355            } catch(SGFError e) { 
    13101356                SGFError *ecopy = new SGFError(e); 
    13111357                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    13421388            delete arg1; 
    13431389             
    1344         }catch(SGFError e) { 
     1390        } catch(SGFError e) { 
    13451391            SGFError *ecopy = new SGFError(e); 
    13461392            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    16451691            arg1->encoding = (char *) (new char[strlen(arg2)+1]); 
    16461692            strcpy((char *) arg1->encoding,arg2); 
    1647         }else { 
     1693        } else { 
    16481694            arg1->encoding = 0; 
    16491695        } 
     
    16851731            result = (int)(arg1)->noChildren(); 
    16861732             
    1687         }catch(SGFError e) { 
     1733        } catch(SGFError e) { 
    16881734            SGFError *ecopy = new SGFError(e); 
    16891735            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    17111757            result = (PyObject *)(arg1)->currentNode(); 
    17121758             
    1713         }catch(SGFError e) { 
     1759        } catch(SGFError e) { 
    17141760            SGFError *ecopy = new SGFError(e); 
    17151761            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    17381784                (arg1)->parse(arg2); 
    17391785                 
    1740             }catch(SGFError e) { 
     1786            } catch(SGFError e) { 
    17411787                SGFError *ecopy = new SGFError(e); 
    17421788                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    17751821                (arg1)->game(arg2); 
    17761822                 
    1777             }catch(SGFError e) { 
     1823            } catch(SGFError e) { 
    17781824                SGFError *ecopy = new SGFError(e); 
    17791825                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    18131859                result = (PyObject *)(arg1)->next(arg2); 
    18141860                 
    1815             }catch(SGFError e) { 
     1861            } catch(SGFError e) { 
    18161862                SGFError *ecopy = new SGFError(e); 
    18171863                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    18501896                result = (PyObject *)(arg1)->previous(); 
    18511897                 
    1852             }catch(SGFError e) { 
     1898            } catch(SGFError e) { 
    18531899                SGFError *ecopy = new SGFError(e); 
    18541900                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    18881934                result = (PyObject *)(arg1)->getRootNode(arg2); 
    18891935                 
    1890             }catch(SGFError e) { 
     1936            } catch(SGFError e) { 
    18911937                SGFError *ecopy = new SGFError(e); 
    18921938                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    19241970                (arg1)->updateCurrentNode(); 
    19251971                 
    1926             }catch(SGFError e) { 
     1972            } catch(SGFError e) { 
    19271973                SGFError *ecopy = new SGFError(e); 
    19281974                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    19642010                (arg1)->updateRootNode(arg2,arg3); 
    19652011                 
    1966             }catch(SGFError e) { 
     2012            } catch(SGFError e) { 
    19672013                SGFError *ecopy = new SGFError(e); 
    19682014                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    20032049            result = (char *)(arg1)->rootNodeToString(arg2); 
    20042050             
    2005         }catch(SGFError e) { 
     2051        } catch(SGFError e) { 
    20062052            SGFError *ecopy = new SGFError(e); 
    20072053            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    20332079                result = (char *)(arg1)->nodeToString(arg2); 
    20342080                 
    2035             }catch(SGFError e) { 
     2081            } catch(SGFError e) { 
    20362082                SGFError *ecopy = new SGFError(e); 
    20372083                PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    20722118            result = (char *)(arg1)->outputVar(arg2); 
    20732119             
    2074         }catch(SGFError e) { 
     2120        } catch(SGFError e) { 
    20752121            SGFError *ecopy = new SGFError(e); 
    20762122            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    20982144            result = (char *)(arg1)->output(); 
    20992145             
    2100         }catch(SGFError e) { 
     2146        } catch(SGFError e) { 
    21012147            SGFError *ecopy = new SGFError(e); 
    21022148            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    21242170            (arg1)->add(arg2); 
    21252171             
    2126         }catch(SGFError e) { 
     2172        } catch(SGFError e) { 
    21272173            SGFError *ecopy = new SGFError(e); 
    21282174            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    21522198            (arg1)->delVariation(arg2); 
    21532199             
    2154         }catch(SGFError e) { 
     2200        } catch(SGFError e) { 
    21552201            SGFError *ecopy = new SGFError(e); 
    21562202            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    21772223            (arg1)->setFlags(); 
    21782224             
    2179         }catch(SGFError e) { 
     2225        } catch(SGFError e) { 
    21802226            SGFError *ecopy = new SGFError(e); 
    21812227            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    22812327            result = (intN *)new intN(arg1,arg2); 
    22822328             
    2283         }catch(SGFError e) { 
     2329        } catch(SGFError e) { 
    22842330            SGFError *ecopy = new SGFError(e); 
    22852331            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    23062352            delete arg1; 
    23072353             
    2308         }catch(SGFError e) { 
     2354        } catch(SGFError e) { 
    23092355            SGFError *ecopy = new SGFError(e); 
    23102356            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    23722418            result = (IntStack *)new IntStack(); 
    23732419             
    2374         }catch(SGFError e) { 
     2420        } catch(SGFError e) { 
    23752421            SGFError *ecopy = new SGFError(e); 
    23762422            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    23982444            (arg1)->push(arg2); 
    23992445             
    2400         }catch(SGFError e) { 
     2446        } catch(SGFError e) { 
    24012447            SGFError *ecopy = new SGFError(e); 
    24022448            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    24232469            (arg1)->pop(); 
    24242470             
    2425         }catch(SGFError e) { 
     2471        } catch(SGFError e) { 
    24262472            SGFError *ecopy = new SGFError(e); 
    24272473            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    24492495            result = (int)(arg1)->top(); 
    24502496             
    2451         }catch(SGFError e) { 
     2497        } catch(SGFError e) { 
    24522498            SGFError *ecopy = new SGFError(e); 
    24532499            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    24752521            result = (bool)(arg1)->nonempty(); 
    24762522             
    2477         }catch(SGFError e) { 
     2523        } catch(SGFError e) { 
    24782524            SGFError *ecopy = new SGFError(e); 
    24792525            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    25002546            delete arg1; 
    25012547             
    2502         }catch(SGFError e) { 
     2548        } catch(SGFError e) { 
    25032549            SGFError *ecopy = new SGFError(e); 
    25042550            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    26082654            result = (nodeN *)new nodeN(arg1,arg2); 
    26092655             
    2610         }catch(SGFError e) { 
     2656        } catch(SGFError e) { 
    26112657            SGFError *ecopy = new SGFError(e); 
    26122658            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    26332679            delete arg1; 
    26342680             
    2635         }catch(SGFError e) { 
     2681        } catch(SGFError e) { 
    26362682            SGFError *ecopy = new SGFError(e); 
    26372683            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    26992745            result = (NodeStack *)new NodeStack(); 
    27002746             
    2701         }catch(SGFError e) { 
     2747        } catch(SGFError e) { 
    27022748            SGFError *ecopy = new SGFError(e); 
    27032749            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    27272773            (arg1)->push(arg2); 
    27282774             
    2729         }catch(SGFError e) { 
     2775        } catch(SGFError e) { 
    27302776            SGFError *ecopy = new SGFError(e); 
    27312777            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    27522798            (arg1)->pop(); 
    27532799             
    2754         }catch(SGFError e) { 
     2800        } catch(SGFError e) { 
    27552801            SGFError *ecopy = new SGFError(e); 
    27562802            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    27782824            result = (Node *)(arg1)->top(); 
    27792825             
    2780         }catch(SGFError e) { 
     2826        } catch(SGFError e) { 
    27812827            SGFError *ecopy = new SGFError(e); 
    27822828            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    28042850            result = (bool)(arg1)->nonempty(); 
    28052851             
    2806         }catch(SGFError e) { 
     2852        } catch(SGFError e) { 
    28072853            SGFError *ecopy = new SGFError(e); 
    28082854            PyObject *err = SWIG_NewPointerObj(ecopy, SWIGTYPE_p_SGFError, 1); 
     
    28292875            delete arg1; 
    28302876             
    2831         }catch(SGFError e) { 
     2877        } catch(SGFError e) { 
    28322878