PyCos_wrap.cpp

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.29
00004  * 
00005  * This file is not intended to be easily readable and contains a number of 
00006  * coding conventions designed to improve portability and efficiency. Do not make
00007  * changes to this file unless you know what you are doing--modify the SWIG 
00008  * interface file instead. 
00009  * ----------------------------------------------------------------------------- */
00010 
00011 #define SWIGPYTHON
00012 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
00013 
00014 #ifdef __cplusplus
00015 template<class T> class SwigValueWrapper {
00016     T *tt;
00017 public:
00018     SwigValueWrapper() : tt(0) { }
00019     SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
00020     SwigValueWrapper(const T& t) : tt(new T(t)) { }
00021     ~SwigValueWrapper() { delete tt; } 
00022     SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
00023     operator T&() const { return *tt; }
00024     T *operator&() { return tt; }
00025 private:
00026     SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
00027 };
00028 #endif
00029 
00030 /* -----------------------------------------------------------------------------
00031  *  This section contains generic SWIG labels for method/variable
00032  *  declarations/attributes, and other compiler dependent labels.
00033  * ----------------------------------------------------------------------------- */
00034 
00035 /* template workaround for compilers that cannot correctly implement the C++ standard */
00036 #ifndef SWIGTEMPLATEDISAMBIGUATOR
00037 # if defined(__SUNPRO_CC)
00038 #   if (__SUNPRO_CC <= 0x560)
00039 #     define SWIGTEMPLATEDISAMBIGUATOR template
00040 #   else
00041 #     define SWIGTEMPLATEDISAMBIGUATOR 
00042 #   endif
00043 # else
00044 #   define SWIGTEMPLATEDISAMBIGUATOR 
00045 # endif
00046 #endif
00047 
00048 /* inline attribute */
00049 #ifndef SWIGINLINE
00050 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
00051 #   define SWIGINLINE inline
00052 # else
00053 #   define SWIGINLINE
00054 # endif
00055 #endif
00056 
00057 /* attribute recognised by some compilers to avoid 'unused' warnings */
00058 #ifndef SWIGUNUSED
00059 # if defined(__GNUC__)
00060 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
00061 #     define SWIGUNUSED __attribute__ ((__unused__)) 
00062 #   else
00063 #     define SWIGUNUSED
00064 #   endif
00065 # elif defined(__ICC)
00066 #   define SWIGUNUSED __attribute__ ((__unused__)) 
00067 # else
00068 #   define SWIGUNUSED 
00069 # endif
00070 #endif
00071 
00072 #ifndef SWIGUNUSEDPARM
00073 # ifdef __cplusplus
00074 #   define SWIGUNUSEDPARM(p)
00075 # else
00076 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
00077 # endif
00078 #endif
00079 
00080 /* internal SWIG method */
00081 #ifndef SWIGINTERN
00082 # define SWIGINTERN static SWIGUNUSED
00083 #endif
00084 
00085 /* internal inline SWIG method */
00086 #ifndef SWIGINTERNINLINE
00087 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
00088 #endif
00089 
00090 /* exporting methods */
00091 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
00092 #  ifndef GCC_HASCLASSVISIBILITY
00093 #    define GCC_HASCLASSVISIBILITY
00094 #  endif
00095 #endif
00096 
00097 #ifndef SWIGEXPORT
00098 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00099 #   if defined(STATIC_LINKED)
00100 #     define SWIGEXPORT
00101 #   else
00102 #     define SWIGEXPORT __declspec(dllexport)
00103 #   endif
00104 # else
00105 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
00106 #     define SWIGEXPORT __attribute__ ((visibility("default")))
00107 #   else
00108 #     define SWIGEXPORT
00109 #   endif
00110 # endif
00111 #endif
00112 
00113 /* calling conventions for Windows */
00114 #ifndef SWIGSTDCALL
00115 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00116 #   define SWIGSTDCALL __stdcall
00117 # else
00118 #   define SWIGSTDCALL
00119 # endif 
00120 #endif
00121 
00122 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
00123 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
00124 # define _CRT_SECURE_NO_DEPRECATE
00125 #endif
00126 
00127 
00128 /* Python.h has to appear first */
00129 #include <Python.h>
00130 
00131 /* -----------------------------------------------------------------------------
00132  * swigrun.swg
00133  *
00134  * This file contains generic CAPI SWIG runtime support for pointer
00135  * type checking.
00136  * ----------------------------------------------------------------------------- */
00137 
00138 /* This should only be incremented when either the layout of swig_type_info changes,
00139    or for whatever reason, the runtime changes incompatibly */
00140 #define SWIG_RUNTIME_VERSION "2"
00141 
00142 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
00143 #ifdef SWIG_TYPE_TABLE
00144 # define SWIG_QUOTE_STRING(x) #x
00145 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
00146 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
00147 #else
00148 # define SWIG_TYPE_TABLE_NAME
00149 #endif
00150 
00151 /*
00152   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
00153   creating a static or dynamic library from the swig runtime code.
00154   In 99.9% of the cases, swig just needs to declare them as 'static'.
00155   
00156   But only do this if is strictly necessary, ie, if you have problems
00157   with your compiler or so.
00158 */
00159 
00160 #ifndef SWIGRUNTIME
00161 # define SWIGRUNTIME SWIGINTERN
00162 #endif
00163 
00164 #ifndef SWIGRUNTIMEINLINE
00165 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
00166 #endif
00167 
00168 /*  Generic buffer size */
00169 #ifndef SWIG_BUFFER_SIZE
00170 # define SWIG_BUFFER_SIZE 1024
00171 #endif
00172 
00173 /* Flags for pointer conversions */
00174 #define SWIG_POINTER_DISOWN        0x1
00175 
00176 /* Flags for new pointer objects */
00177 #define SWIG_POINTER_OWN           0x1
00178 
00179 
00180 /* 
00181    Flags/methods for returning states.
00182    
00183    The swig conversion methods, as ConvertPtr, return and integer 
00184    that tells if the conversion was successful or not. And if not,
00185    an error code can be returned (see swigerrors.swg for the codes).
00186    
00187    Use the following macros/flags to set or process the returning
00188    states.
00189    
00190    In old swig versions, you usually write code as:
00191 
00192      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
00193        // success code
00194      } else {
00195        //fail code
00196      }
00197 
00198    Now you can be more explicit as:
00199 
00200     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
00201     if (SWIG_IsOK(res)) {
00202       // success code
00203     } else {
00204       // fail code
00205     }
00206 
00207    that seems to be the same, but now you can also do
00208 
00209     Type *ptr;
00210     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
00211     if (SWIG_IsOK(res)) {
00212       // success code
00213       if (SWIG_IsNewObj(res) {
00214         ...
00215         delete *ptr;
00216       } else {
00217         ...
00218       }
00219     } else {
00220       // fail code
00221     }
00222     
00223    I.e., now SWIG_ConvertPtr can return new objects and you can
00224    identify the case and take care of the deallocation. Of course that
00225    requires also to SWIG_ConvertPtr to return new result values, as
00226 
00227       int SWIG_ConvertPtr(obj, ptr,...) {         
00228         if (<obj is ok>) {                             
00229           if (<need new object>) {                     
00230             *ptr = <ptr to new allocated object>; 
00231             return SWIG_NEWOBJ;                
00232           } else {                                     
00233             *ptr = <ptr to old object>;        
00234             return SWIG_OLDOBJ;                
00235           }                                    
00236         } else {                                       
00237           return SWIG_BADOBJ;                  
00238         }                                              
00239       }
00240 
00241    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
00242    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
00243    swig errors code.
00244 
00245    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
00246    allows to return the 'cast rank', for example, if you have this
00247 
00248        int food(double)
00249        int fooi(int);
00250 
00251    and you call
00252  
00253       food(1)   // cast rank '1'  (1 -> 1.0)
00254       fooi(1)   // cast rank '0'
00255 
00256    just use the SWIG_AddCast()/SWIG_CheckState()
00257 
00258 
00259  */
00260 #define SWIG_OK                    (0) 
00261 #define SWIG_ERROR                 (-1)
00262 #define SWIG_IsOK(r)               (r >= 0)
00263 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
00264 
00265 /* The CastRankLimit says how many bits are used for the cast rank */
00266 #define SWIG_CASTRANKLIMIT         (1 << 8)
00267 /* The NewMask denotes the object was created (using new/malloc) */
00268 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
00269 /* The TmpMask is for in/out typemaps that use temporal objects */
00270 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
00271 /* Simple returning values */
00272 #define SWIG_BADOBJ                (SWIG_ERROR)
00273 #define SWIG_OLDOBJ                (SWIG_OK)
00274 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
00275 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
00276 /* Check, add and del mask methods */
00277 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
00278 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
00279 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
00280 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
00281 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
00282 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
00283 
00284 
00285 /* Cast-Rank Mode */
00286 #if defined(SWIG_CASTRANK_MODE)
00287 #  ifndef SWIG_TypeRank
00288 #    define SWIG_TypeRank             unsigned long
00289 #  endif
00290 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
00291 #    define SWIG_MAXCASTRANK          (2)
00292 #  endif
00293 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
00294 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
00295 SWIGINTERNINLINE int SWIG_AddCast(int r) { 
00296   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
00297 }
00298 SWIGINTERNINLINE int SWIG_CheckState(int r) { 
00299   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
00300 }
00301 #else /* no cast-rank mode */
00302 #  define SWIG_AddCast
00303 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
00304 #endif
00305 
00306 
00307 
00308 
00309 #include <string.h>
00310 
00311 #ifdef __cplusplus
00312 extern "C" {
00313 #endif
00314 
00315 typedef void *(*swig_converter_func)(void *);
00316 typedef struct swig_type_info *(*swig_dycast_func)(void **);
00317 
00318 /* Structure to store inforomation on one type */
00319 typedef struct swig_type_info {
00320   const char             *name;                 /* mangled name of this type */
00321   const char             *str;                  /* human readable name of this type */
00322   swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
00323   struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
00324   void                   *clientdata;           /* language specific type data */
00325   int                    owndata;               /* flag if the structure owns the clientdata */
00326 } swig_type_info;
00327 
00328 /* Structure to store a type and conversion function used for casting */
00329 typedef struct swig_cast_info {
00330   swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
00331   swig_converter_func     converter;            /* function to cast the void pointers */
00332   struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
00333   struct swig_cast_info  *prev;                 /* pointer to the previous cast */
00334 } swig_cast_info;
00335 
00336 /* Structure used to store module information
00337  * Each module generates one structure like this, and the runtime collects
00338  * all of these structures and stores them in a circularly linked list.*/
00339 typedef struct swig_module_info {
00340   swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
00341   size_t                 size;                  /* Number of types in this module */
00342   struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
00343   swig_type_info         **type_initial;        /* Array of initially generated type structures */
00344   swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
00345   void                    *clientdata;          /* Language specific module data */
00346 } swig_module_info;
00347 
00348 /* 
00349   Compare two type names skipping the space characters, therefore
00350   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
00351 
00352   Return 0 when the two name types are equivalent, as in
00353   strncmp, but skipping ' '.
00354 */
00355 SWIGRUNTIME int
00356 SWIG_TypeNameComp(const char *f1, const char *l1,
00357                   const char *f2, const char *l2) {
00358   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
00359     while ((*f1 == ' ') && (f1 != l1)) ++f1;
00360     while ((*f2 == ' ') && (f2 != l2)) ++f2;
00361     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
00362   }
00363   return (l1 - f1) - (l2 - f2);
00364 }
00365 
00366 /*
00367   Check type equivalence in a name list like <name1>|<name2>|...
00368   Return 0 if not equal, 1 if equal
00369 */
00370 SWIGRUNTIME int
00371 SWIG_TypeEquiv(const char *nb, const char *tb) {
00372   int equiv = 0;
00373   const char* te = tb + strlen(tb);
00374   const char* ne = nb;
00375   while (!equiv && *ne) {
00376     for (nb = ne; *ne; ++ne) {
00377       if (*ne == '|') break;
00378     }
00379     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
00380     if (*ne) ++ne;
00381   }
00382   return equiv;
00383 }
00384 
00385 /*
00386   Check type equivalence in a name list like <name1>|<name2>|...
00387   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
00388 */
00389 SWIGRUNTIME int
00390 SWIG_TypeCompare(const char *nb, const char *tb) {
00391   int equiv = 0;
00392   const char* te = tb + strlen(tb);
00393   const char* ne = nb;
00394   while (!equiv && *ne) {
00395     for (nb = ne; *ne; ++ne) {
00396       if (*ne == '|') break;
00397     }
00398     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
00399     if (*ne) ++ne;
00400   }
00401   return equiv;
00402 }
00403 
00404 
00405 /* think of this as a c++ template<> or a scheme macro */
00406 #define SWIG_TypeCheck_Template(comparison, ty)         \
00407   if (ty) {                                             \
00408     swig_cast_info *iter = ty->cast;                    \
00409     while (iter) {                                      \
00410       if (comparison) {                                 \
00411         if (iter == ty->cast) return iter;              \
00412         /* Move iter to the top of the linked list */   \
00413         iter->prev->next = iter->next;                  \
00414         if (iter->next)                                 \
00415           iter->next->prev = iter->prev;                \
00416         iter->next = ty->cast;                          \
00417         iter->prev = 0;                                 \
00418         if (ty->cast) ty->cast->prev = iter;            \
00419         ty->cast = iter;                                \
00420         return iter;                                    \
00421       }                                                 \
00422       iter = iter->next;                                \
00423     }                                                   \
00424   }                                                     \
00425   return 0
00426 
00427 /*
00428   Check the typename
00429 */
00430 SWIGRUNTIME swig_cast_info *
00431 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
00432   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
00433 }
00434 
00435 /* Same as previous function, except strcmp is replaced with a pointer comparison */
00436 SWIGRUNTIME swig_cast_info *
00437 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
00438   SWIG_TypeCheck_Template(iter->type == from, into);
00439 }
00440 
00441 /*
00442   Cast a pointer up an inheritance hierarchy
00443 */
00444 SWIGRUNTIMEINLINE void *
00445 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
00446   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
00447 }
00448 
00449 /* 
00450    Dynamic pointer casting. Down an inheritance hierarchy
00451 */
00452 SWIGRUNTIME swig_type_info *
00453 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
00454   swig_type_info *lastty = ty;
00455   if (!ty || !ty->dcast) return ty;
00456   while (ty && (ty->dcast)) {
00457     ty = (*ty->dcast)(ptr);
00458     if (ty) lastty = ty;
00459   }
00460   return lastty;
00461 }
00462 
00463 /*
00464   Return the name associated with this type
00465 */
00466 SWIGRUNTIMEINLINE const char *
00467 SWIG_TypeName(const swig_type_info *ty) {
00468   return ty->name;
00469 }
00470 
00471 /*
00472   Return the pretty name associated with this type,
00473   that is an unmangled type name in a form presentable to the user.
00474 */
00475 SWIGRUNTIME const char *
00476 SWIG_TypePrettyName(const swig_type_info *type) {
00477   /* The "str" field contains the equivalent pretty names of the
00478      type, separated by vertical-bar characters.  We choose
00479      to print the last name, as it is often (?) the most
00480      specific. */
00481   if (!type) return NULL;
00482   if (type->str != NULL) {
00483     const char *last_name = type->str;
00484     const char *s;
00485     for (s = type->str; *s; s++)
00486       if (*s == '|') last_name = s+1;
00487     return last_name;
00488   }
00489   else
00490     return type->name;
00491 }
00492 
00493 /* 
00494    Set the clientdata field for a type
00495 */
00496 SWIGRUNTIME void
00497 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
00498   swig_cast_info *cast = ti->cast;
00499   /* if (ti->clientdata == clientdata) return; */
00500   ti->clientdata = clientdata;
00501   
00502   while (cast) {
00503     if (!cast->converter) {
00504       swig_type_info *tc = cast->type;
00505       if (!tc->clientdata) {
00506         SWIG_TypeClientData(tc, clientdata);
00507       }
00508     }    
00509     cast = cast->next;
00510   }
00511 }
00512 SWIGRUNTIME void
00513 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
00514   SWIG_TypeClientData(ti, clientdata);
00515   ti->owndata = 1;
00516 }
00517   
00518 /*
00519   Search for a swig_type_info structure only by mangled name
00520   Search is a O(log #types)
00521   
00522   We start searching at module start, and finish searching when start == end.  
00523   Note: if start == end at the beginning of the function, we go all the way around
00524   the circular list.
00525 */
00526 SWIGRUNTIME swig_type_info *
00527 SWIG_MangledTypeQueryModule(swig_module_info *start, 
00528                             swig_module_info *end, 
00529                             const char *name) {
00530   swig_module_info *iter = start;
00531   do {
00532     if (iter->size) {
00533       register size_t l = 0;
00534       register size_t r = iter->size - 1;
00535       do {
00536         /* since l+r >= 0, we can (>> 1) instead (/ 2) */
00537         register size_t i = (l + r) >> 1; 
00538         const char *iname = iter->types[i]->name;
00539         if (iname) {
00540           register int compare = strcmp(name, iname);
00541           if (compare == 0) {       
00542             return iter->types[i];
00543           } else if (compare < 0) {
00544             if (i) {
00545               r = i - 1;
00546             } else {
00547               break;
00548             }
00549           } else if (compare > 0) {
00550             l = i + 1;
00551           }
00552         } else {
00553           break; /* should never happen */
00554         }
00555       } while (l <= r);
00556     }
00557     iter = iter->next;
00558   } while (iter != end);
00559   return 0;
00560 }
00561 
00562 /*
00563   Search for a swig_type_info structure for either a mangled name or a human readable name.
00564   It first searches the mangled names of the types, which is a O(log #types)
00565   If a type is not found it then searches the human readable names, which is O(#types).
00566   
00567   We start searching at module start, and finish searching when start == end.  
00568   Note: if start == end at the beginning of the function, we go all the way around
00569   the circular list.
00570 */
00571 SWIGRUNTIME swig_type_info *
00572 SWIG_TypeQueryModule(swig_module_info *start, 
00573                      swig_module_info *end, 
00574                      const char *name) {
00575   /* STEP 1: Search the name field using binary search */
00576   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
00577   if (ret) {
00578     return ret;
00579   } else {
00580     /* STEP 2: If the type hasn't been found, do a complete search
00581        of the str field (the human readable name) */
00582     swig_module_info *iter = start;
00583     do {
00584       register size_t i = 0;
00585       for (; i < iter->size; ++i) {
00586         if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
00587           return iter->types[i];
00588       }
00589       iter = iter->next;
00590     } while (iter != end);
00591   }
00592   
00593   /* neither found a match */
00594   return 0;
00595 }
00596 
00597 /* 
00598    Pack binary data into a string
00599 */
00600 SWIGRUNTIME char *
00601 SWIG_PackData(char *c, void *ptr, size_t sz) {
00602   static const char hex[17] = "0123456789abcdef";
00603   register const unsigned char *u = (unsigned char *) ptr;
00604   register const unsigned char *eu =  u + sz;
00605   for (; u != eu; ++u) {
00606     register unsigned char uu = *u;
00607     *(c++) = hex[(uu & 0xf0) >> 4];
00608     *(c++) = hex[uu & 0xf];
00609   }
00610   return c;
00611 }
00612 
00613 /* 
00614    Unpack binary data from a string
00615 */
00616 SWIGRUNTIME const char *
00617 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
00618   register unsigned char *u = (unsigned char *) ptr;
00619   register const unsigned char *eu = u + sz;
00620   for (; u != eu; ++u) {
00621     register char d = *(c++);
00622     register unsigned char uu;
00623     if ((d >= '0') && (d <= '9'))
00624       uu = ((d - '0') << 4);
00625     else if ((d >= 'a') && (d <= 'f'))
00626       uu = ((d - ('a'-10)) << 4);
00627     else 
00628       return (char *) 0;
00629     d = *(c++);
00630     if ((d >= '0') && (d <= '9'))
00631       uu |= (d - '0');
00632     else if ((d >= 'a') && (d <= 'f'))
00633       uu |= (d - ('a'-10));
00634     else 
00635       return (char *) 0;
00636     *u = uu;
00637   }
00638   return c;
00639 }
00640 
00641 /* 
00642    Pack 'void *' into a string buffer.
00643 */
00644 SWIGRUNTIME char *
00645 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
00646   char *r = buff;
00647   if ((2*sizeof(void *) + 2) > bsz) return 0;
00648   *(r++) = '_';
00649   r = SWIG_PackData(r,&ptr,sizeof(void *));
00650   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
00651   strcpy(r,name);
00652   return buff;
00653 }
00654 
00655 SWIGRUNTIME const char *
00656 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
00657   if (*c != '_') {
00658     if (strcmp(c,"NULL") == 0) {
00659       *ptr = (void *) 0;
00660       return name;
00661     } else {
00662       return 0;
00663     }
00664   }
00665   return SWIG_UnpackData(++c,ptr,sizeof(void *));
00666 }
00667 
00668 SWIGRUNTIME char *
00669 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
00670   char *r = buff;
00671   size_t lname = (name ? strlen(name) : 0);
00672   if ((2*sz + 2 + lname) > bsz) return 0;
00673   *(r++) = '_';
00674   r = SWIG_PackData(r,ptr,sz);
00675   if (lname) {
00676     strncpy(r,name,lname+1);
00677   } else {
00678     *r = 0;
00679   }
00680   return buff;
00681 }
00682 
00683 SWIGRUNTIME const char *
00684 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
00685   if (*c != '_') {
00686     if (strcmp(c,"NULL") == 0) {
00687       memset(ptr,0,sz);
00688       return name;
00689     } else {
00690       return 0;
00691     }
00692   }
00693   return SWIG_UnpackData(++c,ptr,sz);
00694 }
00695 
00696 #ifdef __cplusplus
00697 }
00698 #endif
00699 
00700 /*  Errors in SWIG */
00701 #define  SWIG_UnknownError         -1 
00702 #define  SWIG_IOError              -2 
00703 #define  SWIG_RuntimeError         -3 
00704 #define  SWIG_IndexError           -4 
00705 #define  SWIG_TypeError            -5 
00706 #define  SWIG_DivisionByZero       -6 
00707 #define  SWIG_OverflowError        -7 
00708 #define  SWIG_SyntaxError          -8 
00709 #define  SWIG_ValueError           -9 
00710 #define  SWIG_SystemError          -10
00711 #define  SWIG_AttributeError       -11
00712 #define  SWIG_MemoryError          -12 
00713 #define  SWIG_NullReferenceError   -13
00714 
00715 
00716 
00717 /* Python.h has to appear first */
00718 #include <Python.h>
00719 
00720 /* Add PyOS_snprintf for old Pythons */
00721 #if PY_VERSION_HEX < 0x02020000
00722 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
00723 #  define PyOS_snprintf _snprintf
00724 # else
00725 #  define PyOS_snprintf snprintf
00726 # endif
00727 #endif
00728 
00729 /* A crude PyString_FromFormat implementation for old Pythons */
00730 #if PY_VERSION_HEX < 0x02020000
00731 
00732 #ifndef SWIG_PYBUFFER_SIZE
00733 # define SWIG_PYBUFFER_SIZE 1024
00734 #endif
00735 
00736 static PyObject *
00737 PyString_FromFormat(const char *fmt, ...) {
00738   va_list ap;
00739   char buf[SWIG_PYBUFFER_SIZE * 2];
00740   int res;
00741   va_start(ap, fmt);
00742   res = vsnprintf(buf, sizeof(buf), fmt, ap);
00743   va_end(ap);
00744   return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
00745 }
00746 #endif
00747 
00748 /* Add PyObject_Del for old Pythons */
00749 #if PY_VERSION_HEX < 0x01060000
00750 # define PyObject_Del(op) PyMem_DEL((op))
00751 #endif
00752 #ifndef PyObject_DEL
00753 # define PyObject_DEL PyObject_Del
00754 #endif
00755 
00756 /* A crude PyExc_StopIteration exception for old Pythons */
00757 #if PY_VERSION_HEX < 0x02020000
00758 # ifndef PyExc_StopIteration
00759 #  define PyExc_StopIteration PyExc_RuntimeError
00760 # endif
00761 # ifndef PyObject_GenericGetAttr
00762 #  define PyObject_GenericGetAttr 0
00763 # endif
00764 #endif
00765 /* Py_NotImplemented is defined in 2.1 and up. */
00766 #if PY_VERSION_HEX < 0x02010000
00767 # ifndef Py_NotImplemented
00768 #  define Py_NotImplemented PyExc_RuntimeError
00769 # endif
00770 #endif
00771 
00772 
00773 /* A crude PyString_AsStringAndSize implementation for old Pythons */
00774 #if PY_VERSION_HEX < 0x02010000
00775 # ifndef PyString_AsStringAndSize
00776 #  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
00777 # endif
00778 #endif
00779 
00780 /* PySequence_Size for old Pythons */
00781 #if PY_VERSION_HEX < 0x02000000
00782 # ifndef PySequence_Size
00783 #  define PySequence_Size PySequence_Length
00784 # endif
00785 #endif
00786 
00787 
00788 /* PyBool_FromLong for old Pythons */
00789 #if PY_VERSION_HEX < 0x02030000
00790 static
00791 PyObject *PyBool_FromLong(long ok)
00792 {
00793   PyObject *result = ok ? Py_True : Py_False;
00794   Py_INCREF(result);
00795   return result;
00796 }
00797 #endif
00798 
00799 
00800 /* -----------------------------------------------------------------------------
00801  * error manipulation
00802  * ----------------------------------------------------------------------------- */
00803 
00804 SWIGRUNTIME PyObject*
00805 SWIG_Python_ErrorType(int code) {
00806   PyObject* type = 0;
00807   switch(code) {
00808   case SWIG_MemoryError:
00809     type = PyExc_MemoryError;
00810     break;
00811   case SWIG_IOError:
00812     type = PyExc_IOError;
00813     break;
00814   case SWIG_RuntimeError:
00815     type = PyExc_RuntimeError;
00816     break;
00817   case SWIG_IndexError:
00818     type = PyExc_IndexError;
00819     break;
00820   case SWIG_TypeError:
00821     type = PyExc_TypeError;
00822     break;
00823   case SWIG_DivisionByZero:
00824     type = PyExc_ZeroDivisionError;
00825     break;
00826   case SWIG_OverflowError:
00827     type = PyExc_OverflowError;
00828     break;
00829   case SWIG_SyntaxError:
00830     type = PyExc_SyntaxError;
00831     break;
00832   case SWIG_ValueError:
00833     type = PyExc_ValueError;
00834     break;
00835   case SWIG_SystemError:
00836     type = PyExc_SystemError;
00837     break;
00838   case SWIG_AttributeError:
00839     type = PyExc_AttributeError;
00840     break;
00841   default:
00842     type = PyExc_RuntimeError;
00843   }
00844   return type;
00845 }
00846 
00847 
00848 SWIGRUNTIME void
00849 SWIG_Python_AddErrorMsg(const char* mesg)
00850 {
00851   PyObject *type = 0;
00852   PyObject *value = 0;
00853   PyObject *traceback = 0;
00854 
00855   if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
00856   if (value) {
00857     PyObject *old_str = PyObject_Str(value);
00858     PyErr_Clear();
00859     Py_XINCREF(type);
00860     PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
00861     Py_DECREF(old_str);
00862     Py_DECREF(value);
00863   } else {
00864     PyErr_Format(PyExc_RuntimeError, mesg);
00865   }
00866 }
00867 
00868 
00869 
00870 #if defined(SWIG_PYTHON_NO_THREADS)
00871 #  if defined(SWIG_PYTHON_THREADS)
00872 #    undef SWIG_PYTHON_THREADS
00873 #  endif
00874 #endif
00875 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
00876 #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
00877 #    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
00878 #      define SWIG_PYTHON_USE_GIL
00879 #    endif
00880 #  endif
00881 #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
00882 #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
00883 #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
00884 #    endif
00885 #    ifdef __cplusplus /* C++ code */
00886        class SWIG_Python_Thread_Block {
00887          bool status;
00888          PyGILState_STATE state;
00889        public:
00890          void end() { if (status) { PyGILState_Release(state); status = false;} }
00891          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
00892          ~SWIG_Python_Thread_Block() { end(); }
00893        };
00894        class SWIG_Python_Thread_Allow {
00895          bool status;
00896          PyThreadState *save;
00897        public:
00898          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
00899          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
00900          ~SWIG_Python_Thread_Allow() { end(); }
00901        };
00902 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
00903 #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
00904 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
00905 #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
00906 #    else /* C code */
00907 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
00908 #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
00909 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
00910 #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
00911 #    endif
00912 #  else /* Old thread way, not implemented, user must provide it */
00913 #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
00914 #      define SWIG_PYTHON_INITIALIZE_THREADS
00915 #    endif
00916 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
00917 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
00918 #    endif
00919 #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
00920 #      define SWIG_PYTHON_THREAD_END_BLOCK
00921 #    endif
00922 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
00923 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
00924 #    endif
00925 #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
00926 #      define SWIG_PYTHON_THREAD_END_ALLOW
00927 #    endif
00928 #  endif
00929 #else /* No thread support */
00930 #  define SWIG_PYTHON_INITIALIZE_THREADS
00931 #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
00932 #  define SWIG_PYTHON_THREAD_END_BLOCK
00933 #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
00934 #  define SWIG_PYTHON_THREAD_END_ALLOW
00935 #endif
00936 
00937 /* -----------------------------------------------------------------------------
00938  * Python API portion that goes into the runtime
00939  * ----------------------------------------------------------------------------- */
00940 
00941 #ifdef __cplusplus
00942 extern "C" {
00943 #if 0
00944 } /* cc-mode */
00945 #endif
00946 #endif
00947 
00948 /* -----------------------------------------------------------------------------
00949  * Constant declarations
00950  * ----------------------------------------------------------------------------- */
00951 
00952 /* Constant Types */
00953 #define SWIG_PY_POINTER 4
00954 #define SWIG_PY_BINARY  5
00955 
00956 /* Constant information structure */
00957 typedef struct swig_const_info {
00958   int type;
00959   char *name;
00960   long lvalue;
00961   double dvalue;
00962   void   *pvalue;
00963   swig_type_info **ptype;
00964 } swig_const_info;
00965 
00966 #ifdef __cplusplus
00967 #if 0
00968 { /* cc-mode */
00969 #endif
00970 }
00971 #endif
00972 
00973 
00974 /* -----------------------------------------------------------------------------
00975  * See the LICENSE file for information on copyright, usage and redistribution
00976  * of SWIG, and the README file for authors - http://www.swig.org/release.html.
00977  *
00978  * pyrun.swg
00979  *
00980  * This file contains the runtime support for Python modules
00981  * and includes code for managing global variables and pointer
00982  * type checking.
00983  *
00984  * ----------------------------------------------------------------------------- */
00985 
00986 /* Common SWIG API */
00987 
00988 /* for raw pointers */
00989 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
00990 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
00991 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
00992 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
00993 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
00994 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
00995 #define swig_owntype                                    int
00996 
00997 /* for raw packed data */
00998 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
00999 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
01000 
01001 /* for class or struct pointers */
01002 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
01003 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
01004 
01005 /* for C or C++ function pointers */
01006 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
01007 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
01008 
01009 /* for C++ member pointers, ie, member methods */
01010 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
01011 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
01012 
01013 
01014 /* Runtime API */
01015 
01016 #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
01017 #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
01018 #define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
01019 
01020 #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
01021 #define SWIG_SetErrorMsg                                SWIG_Python_SetErrorMsg                            
01022 #define SWIG_ErrorType(code)                            SWIG_Python_ErrorType(code)                        
01023 #define SWIG_Error(code, msg)                           SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
01024 #define SWIG_fail                                       goto fail                                          
01025 
01026 
01027 /* Runtime API implementation */
01028 
01029 /* Error manipulation */
01030 
01031 SWIGINTERN void 
01032 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
01033   SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
01034   PyErr_SetObject(errtype, obj);
01035   Py_DECREF(obj);
01036   SWIG_PYTHON_THREAD_END_BLOCK;
01037 }
01038 
01039 SWIGINTERN void 
01040 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
01041   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
01042   PyErr_SetString(errtype, (char *) msg);
01043   SWIG_PYTHON_THREAD_END_BLOCK;
01044 }
01045 
01046 #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
01047 
01048 /* Set a constant value */
01049 
01050 SWIGINTERN void
01051 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
01052   PyDict_SetItemString(d, (char*) name, obj);
01053   Py_DECREF(obj);                            
01054 }
01055 
01056 /* Append a value to the result obj */
01057 
01058 SWIGINTERN PyObject*
01059 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
01060 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
01061   if (!result) {
01062     result = obj;
01063   } else if (result == Py_None) {
01064     Py_DECREF(result);
01065     result = obj;
01066   } else {
01067     if (!PyList_Check(result)) {
01068       PyObject *o2 = result;
01069       result = PyList_New(1);
01070       PyList_SetItem(result, 0, o2);
01071     }
01072     PyList_Append(result,obj);
01073     Py_DECREF(obj);
01074   }
01075   return result;
01076 #else
01077   PyObject*   o2;
01078   PyObject*   o3;
01079   if (!result) {
01080     result = obj;
01081   } else if (result == Py_None) {
01082     Py_DECREF(result);
01083     result = obj;
01084   } else {
01085     if (!PyTuple_Check(result)) {
01086       o2 = result;
01087       result = PyTuple_New(1);
01088       PyTuple_SET_ITEM(result, 0, o2);
01089     }
01090     o3 = PyTuple_New(1);
01091     PyTuple_SET_ITEM(o3, 0, obj);
01092     o2 = result;
01093     result = PySequence_Concat(o2, o3);
01094     Py_DECREF(o2);
01095     Py_DECREF(o3);
01096   }
01097   return result;
01098 #endif
01099 }
01100 
01101 /* Unpack the argument tuple */
01102 
01103 SWIGINTERN int
01104 SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
01105 {
01106   if (!args) {
01107     if (!min && !max) {
01108       return 1;
01109     } else {
01110       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
01111                    name, (min == max ? "" : "at least "), min);
01112       return 0;
01113     }
01114   }  
01115   if (!PyTuple_Check(args)) {
01116     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
01117     return 0;
01118   } else {
01119     register int l = PyTuple_GET_SIZE(args);
01120     if (l < min) {
01121       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
01122                    name, (min == max ? "" : "at least "), min, l);
01123       return 0;
01124     } else if (l > max) {
01125       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
01126                    name, (min == max ? "" : "at most "), max, l);
01127       return 0;
01128     } else {
01129       register int i;
01130       for (i = 0; i < l; ++i) {
01131         objs[i] = PyTuple_GET_ITEM(args, i);
01132       }
01133       for (; l < max; ++l) {
01134         objs[l] = 0;
01135       }
01136       return i + 1;
01137     }    
01138   }
01139 }
01140 
01141 /* A functor is a function object with one single object argument */
01142 #if PY_VERSION_HEX >= 0x02020000
01143 #define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunctionObjArgs(functor, obj, NULL);
01144 #else
01145 #define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunction(functor, "O", obj);
01146 #endif
01147 
01148 /*
01149   Helper for static pointer initialization for both C and C++ code, for example
01150   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
01151 */
01152 #ifdef __cplusplus
01153 #define SWIG_STATIC_POINTER(var)  var
01154 #else
01155 #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
01156 #endif
01157 
01158 /* -----------------------------------------------------------------------------
01159  * Pointer declarations
01160  * ----------------------------------------------------------------------------- */
01161 
01162 /* Flags for new pointer objects */
01163 #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
01164 #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
01165 
01166 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
01167 
01168 #ifdef __cplusplus
01169 extern "C" {
01170 #if 0
01171 } /* cc-mode */
01172 #endif
01173 #endif
01174 
01175 /*  How to access Py_None */
01176 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
01177 #  ifndef SWIG_PYTHON_NO_BUILD_NONE
01178 #    ifndef SWIG_PYTHON_BUILD_NONE
01179 #      define SWIG_PYTHON_BUILD_NONE
01180 #    endif
01181 #  endif
01182 #endif
01183 
01184 #ifdef SWIG_PYTHON_BUILD_NONE
01185 #  ifdef Py_None
01186 #   undef Py_None
01187 #   define Py_None SWIG_Py_None()
01188 #  endif
01189 SWIGRUNTIMEINLINE PyObject * 
01190 _SWIG_Py_None(void)
01191 {
01192   PyObject *none = Py_BuildValue("");
01193   Py_DECREF(none);
01194   return none;
01195 }
01196 SWIGRUNTIME PyObject * 
01197 SWIG_Py_None(void)
01198 {
01199   static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
01200   return none;
01201 }
01202 #endif
01203 
01204 /* The python void return value */
01205 
01206 SWIGRUNTIMEINLINE PyObject * 
01207 SWIG_Py_Void(void)
01208 {
01209   PyObject *none = Py_None;
01210   Py_INCREF(none);
01211   return none;
01212 }
01213 
01214 /* PySwigClientData */
01215 
01216 typedef struct {
01217   PyObject *klass;
01218   PyObject *newraw;
01219   PyObject *newargs;
01220   PyObject *destroy;
01221   int delargs;
01222   int implicitconv;
01223 } PySwigClientData;
01224 
01225 SWIGRUNTIMEINLINE int 
01226 SWIG_Python_CheckImplicit(swig_type_info *ty)
01227 {
01228   PySwigClientData *data = (PySwigClientData *)ty->clientdata;
01229   return data ? data->implicitconv : 0;
01230 }
01231 
01232 SWIGRUNTIMEINLINE PyObject *
01233 SWIG_Python_ExceptionType(swig_type_info *desc) {
01234   PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
01235   PyObject *klass = data ? data->klass : 0;
01236   return (klass ? klass : PyExc_RuntimeError);
01237 }
01238 
01239 
01240 SWIGRUNTIME PySwigClientData * 
01241 PySwigClientData_New(PyObject* obj)
01242 {
01243   if (!obj) {
01244     return 0;
01245   } else {
01246     PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
01247     /* the klass element */
01248     data->klass = obj;
01249     Py_INCREF(data->klass);
01250     /* the newraw method and newargs arguments used to create a new raw instance */
01251     if (PyClass_Check(obj)) {
01252       data->newraw = 0;
01253       data->newargs = obj;
01254       Py_INCREF(obj);
01255     } else {
01256 #if (PY_VERSION_HEX < 0x02020000)
01257       data->newraw = 0;
01258 #else
01259       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
01260 #endif
01261       if (data->newraw) {
01262         Py_INCREF(data->newraw);
01263         data->newargs = PyTuple_New(1);
01264         PyTuple_SetItem(data->newargs, 0, obj);
01265       } else {
01266         data->newargs = obj;
01267       }
01268       Py_INCREF(data->newargs);
01269     }
01270     /* the destroy method, aka as the C++ delete method */
01271     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
01272     if (PyErr_Occurred()) {
01273       PyErr_Clear();
01274       data->destroy = 0;
01275     }
01276     if (data->destroy) {
01277       int flags;
01278       Py_INCREF(data->destroy);
01279       flags = PyCFunction_GET_FLAGS(data->destroy);
01280 #ifdef METH_O
01281       data->delargs = !(flags & (METH_O));
01282 #else
01283       data->delargs = 0;
01284 #endif
01285     } else {
01286       data->delargs = 0;
01287     }
01288     data->implicitconv = 0;
01289     return data;
01290   }
01291 }
01292 
01293 SWIGRUNTIME void 
01294 PySwigClientData_Del(PySwigClientData* data)
01295 {
01296   Py_XDECREF(data->newraw);
01297   Py_XDECREF(data->newargs);
01298   Py_XDECREF(data->destroy);
01299 }
01300 
01301 /* =============== PySwigObject =====================*/
01302 
01303 typedef struct {
01304   PyObject_HEAD
01305   void *ptr;
01306   swig_type_info *ty;
01307   int own;
01308   PyObject *next;
01309 } PySwigObject;
01310 
01311 SWIGRUNTIME PyObject *
01312 PySwigObject_long(PySwigObject *v)
01313 {
01314   return PyLong_FromVoidPtr(v->ptr);
01315 }
01316 
01317 SWIGRUNTIME PyObject *
01318 PySwigObject_format(const char* fmt, PySwigObject *v)
01319 {
01320   PyObject *res = NULL;
01321   PyObject *args = PyTuple_New(1);
01322   if (args) {
01323     if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
01324       PyObject *ofmt = PyString_FromString(fmt);
01325       if (ofmt) {
01326         res = PyString_Format(ofmt,args);
01327         Py_DECREF(ofmt);
01328       }
01329       Py_DECREF(args);
01330     }
01331   }
01332   return res;
01333 }
01334 
01335 SWIGRUNTIME PyObject *
01336 PySwigObject_oct(PySwigObject *v)
01337 {
01338   return PySwigObject_format("%o",v);
01339 }
01340 
01341 SWIGRUNTIME PyObject *
01342 PySwigObject_hex(PySwigObject *v)
01343 {
01344   return PySwigObject_format("%x",v);
01345 }
01346 
01347 SWIGRUNTIME PyObject *
01348 #ifdef METH_NOARGS
01349 PySwigObject_repr(PySwigObject *v)
01350 #else
01351 PySwigObject_repr(PySwigObject *v, PyObject *args)
01352 #endif
01353 {
01354   const char *name = SWIG_TypePrettyName(v->ty);
01355   PyObject *hex = PySwigObject_hex(v);    
01356   PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
01357   Py_DECREF(hex);
01358   if (v->next) {
01359 #ifdef METH_NOARGS
01360     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
01361 #else
01362     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
01363 #endif
01364     PyString_ConcatAndDel(&repr,nrep);
01365   }
01366   return repr;  
01367 }
01368 
01369 SWIGRUNTIME int
01370 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
01371 {
01372 #ifdef METH_NOARGS
01373   PyObject *repr = PySwigObject_repr(v);
01374 #else
01375   PyObject *repr = PySwigObject_repr(v, NULL);
01376 #endif
01377   if (repr) {
01378     fputs(PyString_AsString(repr), fp);
01379     Py_DECREF(repr);
01380     return 0; 
01381   } else {
01382     return 1; 
01383   }
01384 }
01385 
01386 SWIGRUNTIME PyObject *
01387 PySwigObject_str(PySwigObject *v)
01388 {
01389   char result[SWIG_BUFFER_SIZE];
01390   return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
01391     PyString_FromString(result) : 0;
01392 }
01393 
01394 SWIGRUNTIME int
01395 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
01396 {
01397   void *i = v->ptr;
01398   void *j = w->ptr;
01399   return (i < j) ? -1 : ((i > j) ? 1 : 0);
01400 }
01401 
01402 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
01403 
01404 SWIGRUNTIME PyTypeObject*
01405 PySwigObject_type(void) {
01406   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
01407   return type;
01408 }
01409 
01410 SWIGRUNTIMEINLINE int
01411 PySwigObject_Check(PyObject *op) {
01412   return ((op)->ob_type == PySwigObject_type())
01413     || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
01414 }
01415 
01416 SWIGRUNTIME PyObject *
01417 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
01418 
01419 SWIGRUNTIME void
01420 PySwigObject_dealloc(PyObject *v)
01421 {
01422   PySwigObject *sobj = (PySwigObject *) v;
01423   PyObject *next = sobj->next;
01424   if (sobj->own) {
01425     swig_type_info *ty = sobj->ty;
01426     PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
01427     PyObject *destroy = data ? data->destroy : 0;
01428     if (destroy) {
01429       /* destroy is always a VARARGS method */
01430       PyObject *res;
01431       if (data->delargs) {
01432         /* we need to create a temporal object to carry the destroy operation */
01433         PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
01434         res = SWIG_Python_CallFunctor(destroy, tmp);
01435         Py_DECREF(tmp);
01436       } else {
01437         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
01438         PyObject *mself = PyCFunction_GET_SELF(destroy);
01439         res = ((*meth)(mself, v));
01440       }
01441       Py_XDECREF(res);
01442     } else {
01443       const char *name = SWIG_TypePrettyName(ty);
01444 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
01445       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
01446 #endif
01447     }
01448   } 
01449   Py_XDECREF(next);
01450   PyObject_DEL(v);
01451 }
01452 
01453 SWIGRUNTIME PyObject* 
01454 PySwigObject_append(PyObject* v, PyObject* next)
01455 {
01456   PySwigObject *sobj = (PySwigObject *) v;
01457 #ifndef METH_O
01458   PyObject *tmp = 0;
01459   if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
01460   next = tmp;
01461 #endif
01462   if (!PySwigObject_Check(next)) {
01463     return NULL;
01464   }
01465   sobj->next = next;
01466   Py_INCREF(next);
01467   return SWIG_Py_Void();
01468 }
01469 
01470 SWIGRUNTIME PyObject* 
01471 #ifdef METH_NOARGS
01472 PySwigObject_next(PyObject* v)
01473 #else
01474 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01475 #endif
01476 {
01477   PySwigObject *sobj = (PySwigObject *) v;
01478   if (sobj->next) {    
01479     Py_INCREF(sobj->next);
01480     return sobj->next;
01481   } else {
01482     return SWIG_Py_Void();
01483   }
01484 }
01485 
01486 SWIGINTERN PyObject*
01487 #ifdef METH_NOARGS
01488 PySwigObject_disown(PyObject *v)
01489 #else
01490 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01491 #endif
01492 {
01493   PySwigObject *sobj = (PySwigObject *)v;
01494   sobj->own = 0;
01495   return SWIG_Py_Void();
01496 }
01497 
01498 SWIGINTERN PyObject*
01499 #ifdef METH_NOARGS
01500 PySwigObject_acquire(PyObject *v)
01501 #else
01502 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
01503 #endif
01504 {
01505   PySwigObject *sobj = (PySwigObject *)v;
01506   sobj->own = SWIG_POINTER_OWN;
01507   return SWIG_Py_Void();
01508 }
01509 
01510 SWIGINTERN PyObject*
01511 PySwigObject_own(PyObject *v, PyObject *args)
01512 {
01513   PyObject *val = 0;
01514 #if (PY_VERSION_HEX < 0x02020000)
01515   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
01516 #else
01517   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
01518 #endif
01519     {
01520       return NULL;
01521     } 
01522   else
01523     {
01524       PySwigObject *sobj = (PySwigObject *)v;
01525       PyObject *obj = PyBool_FromLong(sobj->own);
01526       if (val) {
01527 #ifdef METH_NOARGS
01528         if (PyObject_IsTrue(val)) {
01529           PySwigObject_acquire(v);
01530         } else {
01531           PySwigObject_disown(v);
01532         }
01533 #else
01534         if (PyObject_IsTrue(val)) {
01535           PySwigObject_acquire(v,args);
01536         } else {
01537           PySwigObject_disown(v,args);
01538         }
01539 #endif
01540       } 
01541       return obj;
01542     }
01543 }
01544 
01545 #ifdef METH_O
01546 static PyMethodDef
01547 swigobject_methods[] = {
01548   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
01549   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
01550   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
01551   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
01552   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
01553   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
01554   {0, 0, 0, 0}  
01555 };
01556 #else
01557 static PyMethodDef
01558 swigobject_methods[] = {
01559   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
01560   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
01561   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
01562   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
01563   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
01564   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
01565   {0, 0, 0, 0}  
01566 };
01567 #endif
01568 
01569 #if PY_VERSION_HEX < 0x02020000
01570 SWIGINTERN PyObject *
01571 PySwigObject_getattr(PySwigObject *sobj,char *name)
01572 {
01573   return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
01574 }
01575 #endif
01576 
01577 SWIGRUNTIME PyTypeObject*
01578 _PySwigObject_type(void) {
01579   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
01580   
01581   static PyNumberMethods PySwigObject_as_number = {
01582     (binaryfunc)0, /*nb_add*/
01583     (binaryfunc)0, /*nb_subtract*/
01584     (binaryfunc)0, /*nb_multiply*/
01585     (binaryfunc)0, /*nb_divide*/
01586     (binaryfunc)0, /*nb_remainder*/
01587     (binaryfunc)0, /*nb_divmod*/
01588     (ternaryfunc)0,/*nb_power*/
01589     (unaryfunc)0,  /*nb_negative*/
01590     (unaryfunc)0,  /*nb_positive*/
01591     (unaryfunc)0,  /*nb_absolute*/
01592     (inquiry)0,    /*nb_nonzero*/
01593     0,             /*nb_invert*/
01594     0,             /*nb_lshift*/
01595     0,             /*nb_rshift*/
01596     0,             /*nb_and*/
01597     0,             /*nb_xor*/
01598     0,             /*nb_or*/
01599     (coercion)0,   /*nb_coerce*/
01600     (unaryfunc)PySwigObject_long, /*nb_int*/
01601     (unaryfunc)PySwigObject_long, /*nb_long*/
01602     (unaryfunc)0,                 /*nb_float*/
01603     (unaryfunc)PySwigObject_oct,  /*nb_oct*/
01604     (unaryfunc)PySwigObject_hex,  /*nb_hex*/
01605 #if PY_VERSION_HEX >= 0x02020000
01606     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ 
01607 #elif PY_VERSION_HEX >= 0x02000000
01608     0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
01609 #endif
01610   };
01611 
01612   static PyTypeObject pyswigobject_type;  
01613   static int type_init = 0;
01614   if (!type_init) {
01615     const PyTypeObject tmp
01616       = {
01617         PyObject_HEAD_INIT(NULL)
01618         0,                                  /* ob_size */
01619         (char *)"PySwigObject",             /* tp_name */
01620         sizeof(PySwigObject),               /* tp_basicsize */
01621         0,                                  /* tp_itemsize */
01622         (destructor)PySwigObject_dealloc,   /* tp_dealloc */
01623         (printfunc)PySwigObject_print,      /* tp_print */
01624 #if PY_VERSION_HEX < 0x02020000
01625         (getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
01626 #else
01627         (getattrfunc)0,                     /* tp_getattr */ 
01628 #endif
01629         (setattrfunc)0,                     /* tp_setattr */ 
01630         (cmpfunc)PySwigObject_compare,      /* tp_compare */ 
01631         (reprfunc)PySwigObject_repr,        /* tp_repr */    
01632         &PySwigObject_as_number,            /* tp_as_number */
01633         0,                                  /* tp_as_sequence */
01634         0,                                  /* tp_as_mapping */
01635         (hashfunc)0,                        /* tp_hash */
01636         (ternaryfunc)0,                     /* tp_call */
01637         (reprfunc)PySwigObject_str,         /* tp_str */
01638         PyObject_GenericGetAttr,            /* tp_getattro */
01639         0,                                  /* tp_setattro */
01640         0,                                  /* tp_as_buffer */
01641         Py_TPFLAGS_DEFAULT,                 /* tp_flags */
01642         swigobject_doc,                     /* tp_doc */        
01643         0,                                  /* tp_traverse */
01644         0,                                  /* tp_clear */
01645         0,                                  /* tp_richcompare */
01646         0,                                  /* tp_weaklistoffset */
01647 #if PY_VERSION_HEX >= 0x02020000
01648         0,                                  /* tp_iter */
01649         0,                                  /* tp_iternext */
01650         swigobject_methods,                 /* tp_methods */ 
01651         0,                                  /* tp_members */
01652         0,                                  /* tp_getset */             
01653         0,                                  /* tp_base */               
01654         0,                                  /* tp_dict */               
01655         0,                                  /* tp_descr_get */          
01656         0,                                  /* tp_descr_set */          
01657         0,                                  /* tp_dictoffset */         
01658         0,                                  /* tp_init */               
01659         0,                                  /* tp_alloc */              
01660         0,                                  /* tp_new */                
01661         0,                                  /* tp_free */          
01662         0,                                  /* tp_is_gc */  
01663         0,                                  /* tp_bases */   
01664         0,                                  /* tp_mro */
01665         0,                                  /* tp_cache */   
01666         0,                                  /* tp_subclasses */
01667         0,                                  /* tp_weaklist */
01668 #endif
01669 #if PY_VERSION_HEX >= 0x02030000
01670         0,                                  /* tp_del */
01671 #endif
01672 #ifdef COUNT_ALLOCS
01673         0,0,0,0                             /* tp_alloc -> tp_next */
01674 #endif
01675       };
01676     pyswigobject_type = tmp;
01677     pyswigobject_type.ob_type = &PyType_Type;
01678     type_init = 1;
01679   }
01680   return &pyswigobject_type;
01681 }
01682 
01683 SWIGRUNTIME PyObject *
01684 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
01685 {
01686   PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
01687   if (sobj) {
01688     sobj->ptr  = ptr;
01689     sobj->ty   = ty;
01690     sobj->own  = own;
01691     sobj->next = 0;
01692   }
01693   return (PyObject *)sobj;
01694 }
01695 
01696 /* -----------------------------------------------------------------------------
01697  * Implements a simple Swig Packed type, and use it instead of string
01698  * ----------------------------------------------------------------------------- */
01699 
01700 typedef struct {
01701   PyObject_HEAD
01702   void *pack;
01703   swig_type_info *ty;
01704   size_t size;
01705 } PySwigPacked;
01706 
01707 SWIGRUNTIME int
01708 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
01709 {
01710   char result[SWIG_BUFFER_SIZE];
01711   fputs("<Swig Packed ", fp); 
01712   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
01713     fputs("at ", fp); 
01714     fputs(result, fp); 
01715   }
01716   fputs(v->ty->name,fp); 
01717   fputs(">", fp);
01718   return 0; 
01719 }
01720   
01721 SWIGRUNTIME PyObject *
01722 PySwigPacked_repr(PySwigPacked *v)
01723 {
01724   char result[SWIG_BUFFER_SIZE];
01725   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
01726     return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
01727   } else {
01728     return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
01729   }  
01730 }
01731 
01732 SWIGRUNTIME PyObject *
01733 PySwigPacked_str(PySwigPacked *v)
01734 {
01735   char result[SWIG_BUFFER_SIZE];
01736   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
01737     return PyString_FromFormat("%s%s", result, v->ty->name);
01738   } else {
01739     return PyString_FromString(v->ty->name);
01740   }  
01741 }
01742 
01743 SWIGRUNTIME int
01744 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
01745 {
01746   size_t i = v->size;
01747   size_t j = w->size;
01748   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
01749   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
01750 }
01751 
01752 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
01753 
01754 SWIGRUNTIME PyTypeObject*
01755 PySwigPacked_type(void) {
01756   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
01757   return type;
01758 }
01759 
01760 SWIGRUNTIMEINLINE int
01761 PySwigPacked_Check(PyObject *op) {
01762   return ((op)->ob_type == _PySwigPacked_type()) 
01763     || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
01764 }
01765 
01766 SWIGRUNTIME void
01767 PySwigPacked_dealloc(PyObject *v)
01768 {
01769   if (PySwigPacked_Check(v)) {
01770     PySwigPacked *sobj = (PySwigPacked *) v;
01771     free(sobj->pack);
01772   }
01773   PyObject_DEL(v);
01774 }
01775 
01776 SWIGRUNTIME PyTypeObject*
01777 _PySwigPacked_type(void) {
01778   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
01779   static PyTypeObject pyswigpacked_type;
01780   static int type_init = 0;  
01781   if (!type_init) {
01782     const PyTypeObject tmp
01783       = {
01784         PyObject_HEAD_INIT(NULL)
01785         0,                                  /* ob_size */       
01786         (char *)"PySwigPacked",             /* tp_name */       
01787         sizeof(PySwigPacked),               /* tp_basicsize */  
01788         0,                                  /* tp_itemsize */   
01789         (destructor)PySwigPacked_dealloc,   /* tp_dealloc */    
01790         (printfunc)PySwigPacked_print,      /* tp_print */      
01791         (getattrfunc)0,                     /* tp_getattr */    
01792         (setattrfunc)0,                     /* tp_setattr */    
01793         (cmpfunc)PySwigPacked_compare,      /* tp_compare */    
01794         (reprfunc)PySwigPacked_repr,        /* tp_repr */       
01795         0,                                  /* tp_as_number */  
01796         0,                                  /* tp_as_sequence */
01797         0,                                  /* tp_as_mapping */ 
01798         (hashfunc)0,                        /* tp_hash */       
01799         (ternaryfunc)0,                     /* tp_call */       
01800         (reprfunc)PySwigPacked_str,         /* tp_str */        
01801         PyObject_GenericGetAttr,            /* tp_getattro */
01802         0,                                  /* tp_setattro */
01803         0,                                  /* tp_as_buffer */
01804         Py_TPFLAGS_DEFAULT,                 /* tp_flags */
01805         swigpacked_doc,                     /* tp_doc */
01806         0,                                  /* tp_traverse */
01807         0,                                  /* tp_clear */
01808         0,                                  /* tp_richcompare */
01809         0,                                  /* tp_weaklistoffset */
01810 #if PY_VERSION_HEX >= 0x02020000
01811         0,                                  /* tp_iter */
01812         0,                                  /* tp_iternext */
01813         0,                                  /* tp_methods */ 
01814         0,                                  /* tp_members */
01815         0,                                  /* tp_getset */             
01816         0,                                  /* tp_base */               
01817         0,                                  /* tp_dict */               
01818         0,                                  /* tp_descr_get */          
01819         0,                                  /* tp_descr_set */          
01820         0,                                  /* tp_dictoffset */         
01821         0,                                  /* tp_init */               
01822         0,                                  /* tp_alloc */              
01823         0,                                  /* tp_new */                
01824         0,                                  /* tp_free */          
01825         0,                                  /* tp_is_gc */  
01826         0,                                  /* tp_bases */   
01827         0,                                  /* tp_mro */
01828         0,                                  /* tp_cache */   
01829         0,                                  /* tp_subclasses */
01830         0,                                  /* tp_weaklist */
01831 #endif
01832 #if PY_VERSION_HEX >= 0x02030000
01833         0,                                  /* tp_del */
01834 #endif
01835 #ifdef COUNT_ALLOCS
01836         0,0,0,0                             /* tp_alloc -> tp_next */
01837 #endif
01838       };
01839     pyswigpacked_type = tmp;
01840     pyswigpacked_type.ob_type = &PyType_Type;
01841     type_init = 1;
01842   }
01843   return &pyswigpacked_type;
01844 }
01845 
01846 SWIGRUNTIME PyObject *
01847 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
01848 {
01849   PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
01850   if (sobj) {
01851     void *pack = malloc(size);
01852     if (pack) {
01853       memcpy(pack, ptr, size);
01854       sobj->pack = pack;
01855       sobj->ty   = ty;
01856       sobj->size = size;
01857     } else {
01858       PyObject_DEL((PyObject *) sobj);
01859       sobj = 0;
01860     }
01861   }
01862   return (PyObject *) sobj;
01863 }
01864 
01865 SWIGRUNTIME swig_type_info *
01866 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
01867 {
01868   if (PySwigPacked_Check(obj)) {
01869     PySwigPacked *sobj = (PySwigPacked *)obj;
01870     if (sobj->size != size) return 0;
01871     memcpy(ptr, sobj->pack, size);
01872     return sobj->ty;
01873   } else {
01874     return 0;
01875   }
01876 }
01877 
01878 /* -----------------------------------------------------------------------------
01879  * pointers/data manipulation
01880  * ----------------------------------------------------------------------------- */
01881 
01882 SWIGRUNTIMEINLINE PyObject *
01883 _SWIG_This(void)
01884 {
01885   return PyString_FromString("this");
01886 }
01887 
01888 SWIGRUNTIME PyObject *
01889 SWIG_This(void)
01890 {
01891   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
01892   return swig_this;
01893 }
01894 
01895 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
01896 
01897 SWIGRUNTIME PySwigObject *
01898 SWIG_Python_GetSwigThis(PyObject *pyobj) 
01899 {
01900   if (PySwigObject_Check(pyobj)) {
01901     return (PySwigObject *) pyobj;
01902   } else {
01903     PyObject *obj = 0;
01904 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
01905     if (PyInstance_Check(pyobj)) {
01906       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
01907     } else {
01908       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
01909       if (dictptr != NULL) {
01910         PyObject *dict = *dictptr;
01911         obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
01912       } else {
01913 #ifdef PyWeakref_CheckProxy
01914         if (PyWeakref_CheckProxy(pyobj)) {
01915           PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
01916           return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
01917         }
01918 #endif
01919         obj = PyObject_GetAttr(pyobj,SWIG_This());
01920         if (obj) {
01921           Py_DECREF(obj);
01922         } else {
01923           if (PyErr_Occurred()) PyErr_Clear();
01924           return 0;
01925         }
01926       }
01927     }
01928 #else
01929     obj = PyObject_GetAttr(pyobj,SWIG_This());
01930     if (obj) {
01931       Py_DECREF(obj);
01932     } else {
01933       if (PyErr_Occurred()) PyErr_Clear();
01934       return 0;
01935     }
01936 #endif
01937     if (obj && !PySwigObject_Check(obj)) {
01938       /* a PyObject is called 'this', try to get the 'real this'
01939          PySwigObject from it */ 
01940       return SWIG_Python_GetSwigThis(obj);
01941     }
01942     return (PySwigObject *)obj;
01943   }
01944 }
01945 
01946 /* Acquire a pointer value */
01947 
01948 SWIGRUNTIME int
01949 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
01950   if (own) {
01951     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
01952     if (sobj) {
01953       int oldown = sobj->own;
01954       sobj->own = own;
01955       return oldown;
01956     }
01957   }
01958   return 0;
01959 }
01960 
01961 /* Convert a pointer value */
01962 
01963 SWIGRUNTIME int
01964 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
01965   if (!obj) return SWIG_ERROR;
01966   if (obj == Py_None) {
01967     if (ptr) *ptr = 0;
01968     return SWIG_OK;
01969   } else {
01970     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
01971     while (sobj) {
01972       void *vptr = sobj->ptr;
01973       if (ty) {
01974         swig_type_info *to = sobj->ty;
01975         if (to == ty) {
01976           /* no type cast needed */
01977           if (ptr) *ptr = vptr;
01978           break;
01979         } else {
01980           swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
01981           if (!tc) {
01982             sobj = (PySwigObject *)sobj->next;
01983           } else {
01984             if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
01985             break;
01986           }
01987         }
01988       } else {
01989         if (ptr) *ptr = vptr;
01990         break;
01991       }
01992     }
01993     if (sobj) {
01994       if (own) *own = sobj->own;
01995       if (flags & SWIG_POINTER_DISOWN) {
01996         sobj->own = 0;
01997       }
01998       return SWIG_OK;
01999     } else {
02000       int res = SWIG_ERROR;
02001       if (flags & SWIG_POINTER_IMPLICIT_CONV) {
02002         PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
02003         if (data && !data->implicitconv) {
02004           PyObject *klass = data->klass;
02005           if (klass) {
02006             PyObject *impconv;
02007             data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
02008             impconv = SWIG_Python_CallFunctor(klass, obj);
02009             data->implicitconv = 0;
02010             if (PyErr_Occurred()) {
02011               PyErr_Clear();
02012               impconv = 0;
02013             }
02014             if (impconv) {
02015               PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
02016               if (iobj) {
02017                 void *vptr;
02018                 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
02019                 if (SWIG_IsOK(res)) {
02020                   if (ptr) {
02021                     *ptr = vptr;
02022                     /* transfer the ownership to 'ptr' */
02023                     iobj->own = 0;
02024                     res = SWIG_AddCast(res);
02025                     res = SWIG_AddNewMask(res);
02026                   } else {
02027                     res = SWIG_AddCast(res);                
02028                   }
02029                 }
02030               }
02031               Py_DECREF(impconv);
02032             }
02033           }
02034         }
02035       }
02036       return res;
02037     }
02038   }
02039 }
02040 
02041 /* Convert a function ptr value */
02042 
02043 SWIGRUNTIME int
02044 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
02045   if (!PyCFunction_Check(obj)) {
02046     return SWIG_ConvertPtr(obj, ptr, ty, 0);
02047   } else {
02048     void *vptr = 0;
02049     
02050     /* here we get the method pointer for callbacks */
02051     char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
02052     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
02053     if (desc) {
02054       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
02055       if (!desc) return SWIG_ERROR;
02056     }
02057     if (ty) {
02058       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
02059       if (!tc) return SWIG_ERROR;
02060       *ptr = SWIG_TypeCast(tc,vptr);
02061     } else {
02062       *ptr = vptr;
02063     }
02064     return SWIG_OK;
02065   }
02066 }
02067 
02068 /* Convert a packed value value */
02069 
02070 SWIGRUNTIME int
02071 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
02072   swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
02073   if (!to) return SWIG_ERROR;
02074   if (ty) {
02075     if (to != ty) {
02076       /* check type cast? */
02077       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
02078       if (!tc) return SWIG_ERROR;
02079     }
02080   }
02081   return SWIG_OK;
02082 }  
02083 
02084 /* -----------------------------------------------------------------------------
02085  * Create a new pointer object
02086  * ----------------------------------------------------------------------------- */
02087 
02088 /*
02089   Create a new instance object, whitout calling __init__, and set the
02090   'this' attribute.
02091 */
02092 
02093 SWIGRUNTIME PyObject* 
02094 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
02095 {
02096 #if (PY_VERSION_HEX >= 0x02020000)
02097   PyObject *inst = 0;
02098   PyObject *newraw = data->newraw;
02099   if (newraw) {
02100     inst = PyObject_Call(newraw, data->newargs, NULL);
02101     if (inst) {
02102 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
02103       PyObject **dictptr = _PyObject_GetDictPtr(inst);
02104       if (dictptr != NULL) {
02105         PyObject *dict = *dictptr;
02106         if (dict == NULL) {
02107           dict = PyDict_New();
02108           *dictptr = dict;
02109           PyDict_SetItem(dict, SWIG_This(), swig_this);
02110         }
02111       }
02112 #else
02113       PyObject *key = SWIG_This();
02114       PyObject_SetAttr(inst, key, swig_this);
02115 #endif
02116     }
02117   } else {
02118     PyObject *dict = PyDict_New();
02119     PyDict_SetItem(dict, SWIG_This(), swig_this);
02120     inst = PyInstance_NewRaw(data->newargs, dict);
02121     Py_DECREF(dict);
02122   }
02123   return inst;
02124 #else
02125 #if (PY_VERSION_HEX >= 0x02010000)
02126   PyObject *inst;
02127   PyObject *dict = PyDict_New();
02128   PyDict_SetItem(dict, SWIG_This(), swig_this);
02129   inst = PyInstance_NewRaw(data->newargs, dict);
02130   Py_DECREF(dict);
02131   return (PyObject *) inst;
02132 #else
02133   PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
02134   if (inst == NULL) {
02135     return NULL;
02136   }
02137   inst->in_class = (PyClassObject *)data->newargs;
02138   Py_INCREF(inst->in_class);
02139   inst->in_dict = PyDict_New();
02140   if (inst->in_dict == NULL) {
02141     Py_DECREF(inst);
02142     return NULL;
02143   }
02144 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
02145   inst->in_weakreflist = NULL;
02146 #endif
02147 #ifdef Py_TPFLAGS_GC
02148   PyObject_GC_Init(inst);
02149 #endif
02150   PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
02151   return (PyObject *) inst;
02152 #endif
02153 #endif
02154 }
02155 
02156 SWIGRUNTIME void
02157 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
02158 {
02159  PyObject *dict;
02160 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
02161  PyObject **dictptr = _PyObject_GetDictPtr(inst);
02162  if (dictptr != NULL) {
02163    dict = *dictptr;
02164    if (dict == NULL) {
02165      dict = PyDict_New();
02166      *dictptr = dict;
02167    }
02168    PyDict_SetItem(dict, SWIG_This(), swig_this);
02169    return;
02170  }
02171 #endif
02172  dict = PyObject_GetAttrString(inst, "__dict__");
02173  PyDict_SetItem(dict, SWIG_This(), swig_this);
02174  Py_DECREF(dict);
02175 } 
02176 
02177 
02178 SWIGINTERN PyObject *
02179 SWIG_Python_InitShadowInstance(PyObject *args) {
02180   PyObject *obj[2];
02181   if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
02182     return NULL;
02183   } else {
02184     PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
02185     if (sthis) {
02186       PySwigObject_append((PyObject*) sthis, obj[1]);
02187     } else {
02188       SWIG_Python_SetSwigThis(obj[0], obj[1]);
02189     }
02190     return SWIG_Py_Void();
02191   }
02192 }
02193 
02194 /* Create a new pointer object */
02195 
02196 SWIGRUNTIME PyObject *
02197 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
02198   if (!ptr) {
02199     return SWIG_Py_Void();
02200   } else {
02201     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
02202     PyObject *robj = PySwigObject_New(ptr, type, own);
02203     PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
02204     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
02205       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
02206       if (inst) {
02207         Py_DECREF(robj);
02208         robj = inst;
02209       }
02210     }
02211     return robj;
02212   }
02213 }
02214 
02215 /* Create a new packed object */
02216 
02217 SWIGRUNTIMEINLINE PyObject *
02218 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
02219   return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
02220 }
02221 
02222 /* -----------------------------------------------------------------------------*
02223  *  Get type list 
02224  * -----------------------------------------------------------------------------*/
02225 
02226 #ifdef SWIG_LINK_RUNTIME
02227 void *SWIG_ReturnGlobalTypeList(void *);
02228 #endif
02229 
02230 SWIGRUNTIME swig_module_info *
02231 SWIG_Python_GetModule(void) {
02232   static void *type_pointer = (void *)0;
02233   /* first check if module already created */
02234   if (!type_pointer) {
02235 #ifdef SWIG_LINK_RUNTIME
02236     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
02237 #else
02238     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
02239                                     (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
02240     if (PyErr_Occurred()) {
02241       PyErr_Clear();
02242       type_pointer = (void *)0;
02243     }
02244 #endif
02245   }
02246   return (swig_module_info *) type_pointer;
02247 }
02248 
02249 #if PY_MAJOR_VERSION < 2
02250 /* PyModule_AddObject function was introduced in Python 2.0.  The following function
02251    is copied out of Python/modsupport.c in python version 2.3.4 */
02252 SWIGINTERN int
02253 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
02254 {
02255   PyObject *dict;
02256   if (!PyModule_Check(m)) {
02257     PyErr_SetString(PyExc_TypeError,
02258                     "PyModule_AddObject() needs module as first arg");
02259     return SWIG_ERROR;
02260   }
02261   if (!o) {
02262     PyErr_SetString(PyExc_TypeError,
02263                     "PyModule_AddObject() needs non-NULL value");
02264     return SWIG_ERROR;
02265   }
02266   
02267   dict = PyModule_GetDict(m);
02268   if (dict == NULL) {
02269     /* Internal error -- modules must have a dict! */
02270     PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
02271                  PyModule_GetName(m));
02272     return SWIG_ERROR;
02273   }
02274   if (PyDict_SetItemString(dict, name, o))
02275     return SWIG_ERROR;
02276   Py_DECREF(o);
02277   return SWIG_OK;
02278 }
02279 #endif
02280 
02281 SWIGRUNTIME void
02282 SWIG_Python_DestroyModule(void *vptr)
02283 {
02284   swig_module_info *swig_module = (swig_module_info *) vptr;
02285   swig_type_info **types = swig_module->types;
02286   size_t i;
02287   for (i =0; i < swig_module->size; ++i) {
02288     swig_type_info *ty = types[i];
02289     if (ty->owndata) {
02290       PySwigClientData *data = (PySwigClientData *) ty->clientdata;
02291       if (data) PySwigClientData_Del(data);
02292     }
02293   }
02294   Py_DECREF(SWIG_This());
02295 }
02296 
02297 SWIGRUNTIME void
02298 SWIG_Python_SetModule(swig_module_info *swig_module) {
02299   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
02300 
02301   PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
02302                                    swig_empty_runtime_method_table);
02303   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
02304   if (pointer && module) {
02305     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
02306   } else {
02307     Py_XDECREF(pointer);
02308   }
02309 }
02310 
02311 /* The python cached type query */
02312 SWIGRUNTIME PyObject *
02313 SWIG_Python_TypeCache() {
02314   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
02315   return cache;
02316 }
02317 
02318 SWIGRUNTIME swig_type_info *
02319 SWIG_Python_TypeQuery(const char *type)
02320 {
02321   PyObject *cache = SWIG_Python_TypeCache();
02322   PyObject *key = PyString_FromString(type); 
02323   PyObject *obj = PyDict_GetItem(cache, key);
02324   swig_type_info *descriptor;
02325   if (obj) {
02326     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
02327   } else {
02328     swig_module_info *swig_module = SWIG_Python_GetModule();
02329     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
02330     if (descriptor) {
02331       obj = PyCObject_FromVoidPtr(descriptor, NULL);
02332       PyDict_SetItem(cache, key, obj);
02333       Py_DECREF(obj);
02334     }
02335   }
02336   Py_DECREF(key);
02337   return descriptor;
02338 }
02339 
02340 /* 
02341    For backward compatibility only
02342 */
02343 #define SWIG_POINTER_EXCEPTION  0
02344 #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
02345 #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
02346 
02347 SWIGRUNTIME int
02348 SWIG_Python_AddErrMesg(const char* mesg, int infront)
02349 {
02350   if (PyErr_Occurred()) {
02351     PyObject *type = 0;
02352     PyObject *value = 0;
02353     PyObject *traceback = 0;
02354     PyErr_Fetch(&type, &value, &traceback);
02355     if (value) {
02356       PyObject *old_str = PyObject_Str(value);
02357       Py_XINCREF(type);
02358       PyErr_Clear();
02359       if (infront) {
02360         PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
02361       } else {
02362         PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
02363       }
02364       Py_DECREF(old_str);
02365     }
02366     return 1;
02367   } else {
02368     return 0;
02369   }
02370 }
02371   
02372 SWIGRUNTIME int
02373 SWIG_Python_ArgFail(int argnum)
02374 {
02375   if (PyErr_Occurred()) {
02376     /* add information about failing argument */
02377     char mesg[256];
02378     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
02379     return SWIG_Python_AddErrMesg(mesg, 1);
02380   } else {
02381     return 0;
02382   }
02383 }
02384 
02385 SWIGRUNTIMEINLINE const char *
02386 PySwigObject_GetDesc(PyObject *self)
02387 {
02388   PySwigObject *v = (PySwigObject *)self;
02389   swig_type_info *ty = v ? v->ty : 0;
02390   return ty ? ty->str : (char*)"";
02391 }
02392 
02393 SWIGRUNTIME void
02394 SWIG_Python_TypeError(const char *type, PyObject *obj)
02395 {
02396   if (type) {
02397 #if defined(SWIG_COBJECT_TYPES)
02398     if (obj && PySwigObject_Check(obj)) {
02399       const char *otype = (const char *) PySwigObject_GetDesc(obj);
02400       if (otype) {
02401         PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
02402                      type, otype);
02403         return;
02404       }
02405     } else 
02406 #endif      
02407     {
02408       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
02409       if (otype) {
02410         PyObject *str = PyObject_Str(obj);
02411         const char *cstr = str ? PyString_AsString(str) : 0;
02412         if (cstr) {
02413           PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
02414                        type, otype, cstr);
02415         } else {
02416           PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
02417                        type, otype);
02418         }
02419         Py_XDECREF(str);
02420         return;
02421       }
02422     }   
02423     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
02424   } else {
02425     PyErr_Format(PyExc_TypeError, "unexpected type is received");
02426   }
02427 }
02428 
02429 
02430 /* Convert a pointer value, signal an exception on a type mismatch */
02431 SWIGRUNTIME void *
02432 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
02433   void *result;
02434   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
02435     PyErr_Clear();
02436     if (flags & SWIG_POINTER_EXCEPTION) {
02437       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
02438       SWIG_Python_ArgFail(argnum);
02439     }
02440   }
02441   return result;
02442 }
02443 
02444 
02445 #ifdef __cplusplus
02446 #if 0
02447 { /* cc-mode */
02448 #endif
02449 }
02450 #endif
02451 
02452 
02453 
02454 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
02455 
02456 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
02457 
02458 
02459 
02460 /* -------- TYPES TABLE (BEGIN) -------- */
02461 
02462 #define SWIGTYPE_p_Cosmology swig_types[0]
02463 #define SWIGTYPE_p_char swig_types[1]
02464 static swig_type_info *swig_types[3];
02465 static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
02466 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
02467 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
02468 
02469 /* -------- TYPES TABLE (END) -------- */
02470 
02471 #if (PY_VERSION_HEX <= 0x02000000)
02472 # if !defined(SWIG_PYTHON_CLASSIC)
02473 #  error "This python version requires to use swig with the '-classic' option"
02474 # endif
02475 #endif
02476 
02477 /*-----------------------------------------------
02478               @(target):= _PyCos.so
02479   ------------------------------------------------*/
02480 #define SWIG_init    init_PyCos
02481 
02482 #define SWIG_name    "_PyCos"
02483 
02484 #define SWIGVERSION 0x010329 
02485 
02486 
02487 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
02488 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
02489 
02490 
02491 #include <stdexcept>
02492 
02493 
02494 namespace swig {
02495   class PyObject_ptr {
02496   protected:
02497     PyObject *_obj;
02498 
02499   public:
02500     PyObject_ptr() :_obj(0)
02501     {
02502     }
02503 
02504     PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
02505     {
02506       Py_XINCREF(_obj);      
02507     }
02508     
02509     PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
02510     {
02511       if (initial_ref) Py_XINCREF(_obj);
02512     }
02513     
02514     PyObject_ptr & operator=(const PyObject_ptr& item) 
02515     {
02516       Py_XINCREF(item._obj);
02517       Py_XDECREF(_obj);
02518       _obj = item._obj;
02519       return *this;      
02520     }
02521     
02522     ~PyObject_ptr() 
02523     {
02524       Py_XDECREF(_obj);
02525     }
02526     
02527     operator PyObject *() const
02528     {
02529       return _obj;
02530     }
02531 
02532     PyObject *operator->() const
02533     {
02534       return _obj;
02535     }
02536   };
02537 }
02538 
02539 
02540 namespace swig {
02541   struct PyObject_var : PyObject_ptr {
02542     PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
02543     
02544     PyObject_var & operator = (PyObject* obj)
02545     {
02546       Py_XDECREF(_obj);
02547       _obj = obj;
02548       return *this;      
02549     }
02550   };
02551 }
02552 
02553 
02554 #include "Cosmology.h"
02555 
02556 
02557 SWIGINTERN int
02558 SWIG_AsVal_double (PyObject *obj, double *val)
02559 {
02560   int res = SWIG_TypeError;
02561   if (PyFloat_Check(obj)) {
02562     if (val) *val = PyFloat_AsDouble(obj);
02563     return SWIG_OK;
02564   } else if (PyInt_Check(obj)) {
02565     if (val) *val = PyInt_AsLong(obj);
02566     return SWIG_OK;
02567   } else if (PyLong_Check(obj)) {
02568     double v = PyLong_AsDouble(obj);
02569     if (!PyErr_Occurred()) {
02570       if (val) *val = v;
02571       return SWIG_OK;
02572     } else {
02573       PyErr_Clear();
02574     }
02575   }
02576 #ifdef SWIG_PYTHON_CAST_MODE
02577   {
02578     int dispatch = 0;
02579     double d = PyFloat_AsDouble(obj);
02580     if (!PyErr_Occurred()) {
02581       if (val) *val = d;
02582       return SWIG_AddCast(SWIG_OK);
02583     } else {
02584       PyErr_Clear();
02585     }
02586     if (!dispatch) {
02587       long v = PyLong_AsLong(obj);
02588       if (!PyErr_Occurred()) {
02589         if (val) *val = v;
02590         return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
02591       } else {
02592         PyErr_Clear();
02593       }
02594     }
02595   }
02596 #endif
02597   return res;
02598 }
02599 
02600 
02601   #define SWIG_From_double   PyFloat_FromDouble 
02602 
02603 #ifdef __cplusplus
02604 extern "C" {
02605 #endif
02606 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02607   PyObject *resultobj = 0;
02608   double arg1 ;
02609   double arg2 ;
02610   double arg3 ;
02611   double arg4 ;
02612   double arg5 ;
02613   Cosmology *result = 0 ;
02614   double val1 ;
02615   int ecode1 = 0 ;
02616   double val2 ;
02617   int ecode2 = 0 ;
02618   double val3 ;
02619   int ecode3 = 0 ;
02620   double val4 ;
02621   int ecode4 = 0 ;
02622   double val5 ;
02623   int ecode5 = 0 ;
02624   PyObject * obj0 = 0 ;
02625   PyObject * obj1 = 0 ;
02626   PyObject * obj2 = 0 ;
02627   PyObject * obj3 = 0 ;
02628   PyObject * obj4 = 0 ;
02629   
02630   if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_Cosmology",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
02631   ecode1 = SWIG_AsVal_double(obj0, &val1);
02632   if (!SWIG_IsOK(ecode1)) {
02633     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cosmology" "', argument " "1"" of type '" "double""'");
02634   } 
02635   arg1 = static_cast< double >(val1);
02636   ecode2 = SWIG_AsVal_double(obj1, &val2);
02637   if (!SWIG_IsOK(ecode2)) {
02638     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cosmology" "', argument " "2"" of type '" "double""'");
02639   } 
02640   arg2 = static_cast< double >(val2);
02641   ecode3 = SWIG_AsVal_double(obj2, &val3);
02642   if (!SWIG_IsOK(ecode3)) {
02643     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cosmology" "', argument " "3"" of type '" "double""'");
02644   } 
02645   arg3 = static_cast< double >(val3);
02646   ecode4 = SWIG_AsVal_double(obj3, &val4);
02647   if (!SWIG_IsOK(ecode4)) {
02648     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Cosmology" "', argument " "4"" of type '" "double""'");
02649   } 
02650   arg4 = static_cast< double >(val4);
02651   ecode5 = SWIG_AsVal_double(obj4, &val5);
02652   if (!SWIG_IsOK(ecode5)) {
02653     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Cosmology" "', argument " "5"" of type '" "double""'");
02654   } 
02655   arg5 = static_cast< double >(val5);
02656   result = (Cosmology *)new Cosmology(arg1,arg2,arg3,arg4,arg5);
02657   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02658   return resultobj;
02659 fail:
02660   return NULL;
02661 }
02662 
02663 
02664 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02665   PyObject *resultobj = 0;
02666   double arg1 ;
02667   double arg2 ;
02668   double arg3 ;
02669   double arg4 ;
02670   Cosmology *result = 0 ;
02671   double val1 ;
02672   int ecode1 = 0 ;
02673   double val2 ;
02674   int ecode2 = 0 ;
02675   double val3 ;
02676   int ecode3 = 0 ;
02677   double val4 ;
02678   int ecode4 = 0 ;
02679   PyObject * obj0 = 0 ;
02680   PyObject * obj1 = 0 ;
02681   PyObject * obj2 = 0 ;
02682   PyObject * obj3 = 0 ;
02683   
02684   if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Cosmology",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
02685   ecode1 = SWIG_AsVal_double(obj0, &val1);
02686   if (!SWIG_IsOK(ecode1)) {
02687     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cosmology" "', argument " "1"" of type '" "double""'");
02688   } 
02689   arg1 = static_cast< double >(val1);
02690   ecode2 = SWIG_AsVal_double(obj1, &val2);
02691   if (!SWIG_IsOK(ecode2)) {
02692     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cosmology" "', argument " "2"" of type '" "double""'");
02693   } 
02694   arg2 = static_cast< double >(val2);
02695   ecode3 = SWIG_AsVal_double(obj2, &val3);
02696   if (!SWIG_IsOK(ecode3)) {
02697     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cosmology" "', argument " "3"" of type '" "double""'");
02698   } 
02699   arg3 = static_cast< double >(val3);
02700   ecode4 = SWIG_AsVal_double(obj3, &val4);
02701   if (!SWIG_IsOK(ecode4)) {
02702     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Cosmology" "', argument " "4"" of type '" "double""'");
02703   } 
02704   arg4 = static_cast< double >(val4);
02705   result = (Cosmology *)new Cosmology(arg1,arg2,arg3,arg4);
02706   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02707   return resultobj;
02708 fail:
02709   return NULL;
02710 }
02711 
02712 
02713 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02714   PyObject *resultobj = 0;
02715   double arg1 ;
02716   double arg2 ;
02717   double arg3 ;
02718   Cosmology *result = 0 ;
02719   double val1 ;
02720   int ecode1 = 0 ;
02721   double val2 ;
02722   int ecode2 = 0 ;
02723   double val3 ;
02724   int ecode3 = 0 ;
02725   PyObject * obj0 = 0 ;
02726   PyObject * obj1 = 0 ;
02727   PyObject * obj2 = 0 ;
02728   
02729   if (!PyArg_ParseTuple(args,(char *)"OOO:new_Cosmology",&obj0,&obj1,&obj2)) SWIG_fail;
02730   ecode1 = SWIG_AsVal_double(obj0, &val1);
02731   if (!SWIG_IsOK(ecode1)) {
02732     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cosmology" "', argument " "1"" of type '" "double""'");
02733   } 
02734   arg1 = static_cast< double >(val1);
02735   ecode2 = SWIG_AsVal_double(obj1, &val2);
02736   if (!SWIG_IsOK(ecode2)) {
02737     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cosmology" "', argument " "2"" of type '" "double""'");
02738   } 
02739   arg2 = static_cast< double >(val2);
02740   ecode3 = SWIG_AsVal_double(obj2, &val3);
02741   if (!SWIG_IsOK(ecode3)) {
02742     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cosmology" "', argument " "3"" of type '" "double""'");
02743   } 
02744   arg3 = static_cast< double >(val3);
02745   result = (Cosmology *)new Cosmology(arg1,arg2,arg3);
02746   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02747   return resultobj;
02748 fail:
02749   return NULL;
02750 }
02751 
02752 
02753 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02754   PyObject *resultobj = 0;
02755   double arg1 ;
02756   double arg2 ;
02757   Cosmology *result = 0 ;
02758   double val1 ;
02759   int ecode1 = 0 ;
02760   double val2 ;
02761   int ecode2 = 0 ;
02762   PyObject * obj0 = 0 ;
02763   PyObject * obj1 = 0 ;
02764   
02765   if (!PyArg_ParseTuple(args,(char *)"OO:new_Cosmology",&obj0,&obj1)) SWIG_fail;
02766   ecode1 = SWIG_AsVal_double(obj0, &val1);
02767   if (!SWIG_IsOK(ecode1)) {
02768     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cosmology" "', argument " "1"" of type '" "double""'");
02769   } 
02770   arg1 = static_cast< double >(val1);
02771   ecode2 = SWIG_AsVal_double(obj1, &val2);
02772   if (!SWIG_IsOK(ecode2)) {
02773     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cosmology" "', argument " "2"" of type '" "double""'");
02774   } 
02775   arg2 = static_cast< double >(val2);
02776   result = (Cosmology *)new Cosmology(arg1,arg2);
02777   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02778   return resultobj;
02779 fail:
02780   return NULL;
02781 }
02782 
02783 
02784 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02785   PyObject *resultobj = 0;
02786   double arg1 ;
02787   Cosmology *result = 0 ;
02788   double val1 ;
02789   int ecode1 = 0 ;
02790   PyObject * obj0 = 0 ;
02791   
02792   if (!PyArg_ParseTuple(args,(char *)"O:new_Cosmology",&obj0)) SWIG_fail;
02793   ecode1 = SWIG_AsVal_double(obj0, &val1);
02794   if (!SWIG_IsOK(ecode1)) {
02795     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cosmology" "', argument " "1"" of type '" "double""'");
02796   } 
02797   arg1 = static_cast< double >(val1);
02798   result = (Cosmology *)new Cosmology(arg1);
02799   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02800   return resultobj;
02801 fail:
02802   return NULL;
02803 }
02804 
02805 
02806 SWIGINTERN PyObject *_wrap_new_Cosmology__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02807   PyObject *resultobj = 0;
02808   Cosmology *result = 0 ;
02809   
02810   if (!PyArg_ParseTuple(args,(char *)":new_Cosmology")) SWIG_fail;
02811   result = (Cosmology *)new Cosmology();
02812   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cosmology, SWIG_POINTER_NEW |  0 );
02813   return resultobj;
02814 fail:
02815   return NULL;
02816 }
02817 
02818 
02819 SWIGINTERN PyObject *_wrap_new_Cosmology(PyObject *self, PyObject *args) {
02820   int argc;
02821   PyObject *argv[6];
02822   int ii;
02823   
02824   if (!PyTuple_Check(args)) SWIG_fail;
02825   argc = PyObject_Length(args);
02826   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
02827     argv[ii] = PyTuple_GET_ITEM(args,ii);
02828   }
02829   if (argc == 0) {
02830     return _wrap_new_Cosmology__SWIG_5(self, args);
02831   }
02832   if (argc == 1) {
02833     int _v;
02834     {
02835       int res = SWIG_AsVal_double(argv[0], NULL);
02836       _v = SWIG_CheckState(res);
02837     }
02838     if (_v) {
02839       return _wrap_new_Cosmology__SWIG_4(self, args);
02840     }
02841   }
02842   if (argc == 2) {
02843     int _v;
02844     {
02845       int res = SWIG_AsVal_double(argv[0], NULL);
02846       _v = SWIG_CheckState(res);
02847     }
02848     if (_v) {
02849       {
02850         int res = SWIG_AsVal_double(argv[1], NULL);
02851         _v = SWIG_CheckState(res);
02852       }
02853       if (_v) {
02854         return _wrap_new_Cosmology__SWIG_3(self, args);
02855       }
02856     }
02857   }
02858   if (argc == 3) {
02859     int _v;
02860     {
02861       int res = SWIG_AsVal_double(argv[0], NULL);
02862       _v = SWIG_CheckState(res);
02863     }
02864     if (_v) {
02865       {
02866         int res = SWIG_AsVal_double(argv[1], NULL);
02867         _v = SWIG_CheckState(res);
02868       }
02869       if (_v) {
02870         {
02871           int res = SWIG_AsVal_double(argv[2], NULL);
02872           _v = SWIG_CheckState(res);
02873         }
02874         if (_v) {
02875           return _wrap_new_Cosmology__SWIG_2(self, args);
02876         }
02877       }
02878     }
02879   }
02880   if (argc == 4) {
02881     int _v;
02882     {
02883       int res = SWIG_AsVal_double(argv[0], NULL);
02884       _v = SWIG_CheckState(res);
02885     }
02886     if (_v) {
02887       {
02888         int res = SWIG_AsVal_double(argv[1], NULL);
02889         _v = SWIG_CheckState(res);
02890       }
02891       if (_v) {
02892         {
02893           int res = SWIG_AsVal_double(argv[2], NULL);
02894           _v = SWIG_CheckState(res);
02895         }
02896         if (_v) {
02897           {
02898             int res = SWIG_AsVal_double(argv[3], NULL);
02899             _v = SWIG_CheckState(res);
02900           }
02901           if (_v) {
02902             return _wrap_new_Cosmology__SWIG_1(self, args);
02903           }
02904         }
02905       }
02906     }
02907   }
02908   if (argc == 5) {
02909     int _v;
02910     {
02911       int res = SWIG_AsVal_double(argv[0], NULL);
02912       _v = SWIG_CheckState(res);
02913     }
02914     if (_v) {
02915       {
02916         int res = SWIG_AsVal_double(argv[1], NULL);
02917         _v = SWIG_CheckState(res);
02918       }
02919       if (_v) {
02920         {
02921           int res = SWIG_AsVal_double(argv[2], NULL);
02922           _v = SWIG_CheckState(res);
02923         }
02924         if (_v) {
02925           {
02926             int res = SWIG_AsVal_double(argv[3], NULL);
02927             _v = SWIG_CheckState(res);
02928           }
02929           if (_v) {
02930             {
02931               int res = SWIG_AsVal_double(argv[4], NULL);
02932               _v = SWIG_CheckState(res);
02933             }
02934             if (_v) {
02935               return _wrap_new_Cosmology__SWIG_0(self, args);
02936             }
02937           }
02938         }
02939       }
02940     }
02941   }
02942   
02943 fail:
02944   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'new_Cosmology'");
02945   return NULL;
02946 }
02947 
02948 
02949 SWIGINTERN PyObject *_wrap_delete_Cosmology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02950   PyObject *resultobj = 0;
02951   Cosmology *arg1 = (Cosmology *) 0 ;
02952   void *argp1 = 0 ;
02953   int res1 = 0 ;
02954   PyObject * obj0 = 0 ;
02955   
02956   if (!PyArg_ParseTuple(args,(char *)"O:delete_Cosmology",&obj0)) SWIG_fail;
02957   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, SWIG_POINTER_DISOWN |  0 );
02958   if (!SWIG_IsOK(res1)) {
02959     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cosmology" "', argument " "1"" of type '" "Cosmology *""'"); 
02960   }
02961   arg1 = reinterpret_cast< Cosmology * >(argp1);
02962   delete arg1;
02963   
02964   resultobj = SWIG_Py_Void();
02965   return resultobj;
02966 fail:
02967   return NULL;
02968 }
02969 
02970 
02971 SWIGINTERN PyObject *_wrap_Cosmology_D_C(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
02972   PyObject *resultobj = 0;
02973   Cosmology *arg1 = (Cosmology *) 0 ;
02974   double arg2 ;
02975   double arg3 ;
02976   double result;
02977   void *argp1 = 0 ;
02978   int res1 = 0 ;
02979   double val2 ;
02980   int ecode2 = 0 ;
02981   double val3 ;
02982   int ecode3 = 0 ;
02983   PyObject * obj0 = 0 ;
02984   PyObject * obj1 = 0 ;
02985   PyObject * obj2 = 0 ;
02986   
02987   if (!PyArg_ParseTuple(args,(char *)"OOO:Cosmology_D_C",&obj0,&obj1,&obj2)) SWIG_fail;
02988   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
02989   if (!SWIG_IsOK(res1)) {
02990     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_D_C" "', argument " "1"" of type '" "Cosmology *""'"); 
02991   }
02992   arg1 = reinterpret_cast< Cosmology * >(argp1);
02993   ecode2 = SWIG_AsVal_double(obj1, &val2);
02994   if (!SWIG_IsOK(ecode2)) {
02995     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_D_C" "', argument " "2"" of type '" "double""'");
02996   } 
02997   arg2 = static_cast< double >(val2);
02998   ecode3 = SWIG_AsVal_double(obj2, &val3);
02999   if (!SWIG_IsOK(ecode3)) {
03000     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cosmology_D_C" "', argument " "3"" of type '" "double""'");
03001   } 
03002   arg3 = static_cast< double >(val3);
03003   result = (double)(arg1)->D_C(arg2,arg3);
03004   resultobj = SWIG_From_double(static_cast< double >(result));
03005   return resultobj;
03006 fail:
03007   return NULL;
03008 }
03009 
03010 
03011 SWIGINTERN PyObject *_wrap_Cosmology_D_M(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03012   PyObject *resultobj = 0;
03013   Cosmology *arg1 = (Cosmology *) 0 ;
03014   double arg2 ;
03015   double arg3 ;
03016   double result;
03017   void *argp1 = 0 ;
03018   int res1 = 0 ;
03019   double val2 ;
03020   int ecode2 = 0 ;
03021   double val3 ;
03022   int ecode3 = 0 ;
03023   PyObject * obj0 = 0 ;
03024   PyObject * obj1 = 0 ;
03025   PyObject * obj2 = 0 ;
03026   
03027   if (!PyArg_ParseTuple(args,(char *)"OOO:Cosmology_D_M",&obj0,&obj1,&obj2)) SWIG_fail;
03028   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03029   if (!SWIG_IsOK(res1)) {
03030     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_D_M" "', argument " "1"" of type '" "Cosmology *""'"); 
03031   }
03032   arg1 = reinterpret_cast< Cosmology * >(argp1);
03033   ecode2 = SWIG_AsVal_double(obj1, &val2);
03034   if (!SWIG_IsOK(ecode2)) {
03035     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_D_M" "', argument " "2"" of type '" "double""'");
03036   } 
03037   arg2 = static_cast< double >(val2);
03038   ecode3 = SWIG_AsVal_double(obj2, &val3);
03039   if (!SWIG_IsOK(ecode3)) {
03040     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cosmology_D_M" "', argument " "3"" of type '" "double""'");
03041   } 
03042   arg3 = static_cast< double >(val3);
03043   result = (double)(arg1)->D_M(arg2,arg3);
03044   resultobj = SWIG_From_double(static_cast< double >(result));
03045   return resultobj;
03046 fail:
03047   return NULL;
03048 }
03049 
03050 
03051 SWIGINTERN PyObject *_wrap_Cosmology_ang_dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03052   PyObject *resultobj = 0;
03053   Cosmology *arg1 = (Cosmology *) 0 ;
03054   double arg2 ;
03055   double result;
03056   void *argp1 = 0 ;
03057   int res1 = 0 ;
03058   double val2 ;
03059   int ecode2 = 0 ;
03060   PyObject * obj0 = 0 ;
03061   PyObject * obj1 = 0 ;
03062   
03063   if (!PyArg_ParseTuple(args,(char *)"OO:Cosmology_ang_dist",&obj0,&obj1)) SWIG_fail;
03064   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03065   if (!SWIG_IsOK(res1)) {
03066     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_ang_dist" "', argument " "1"" of type '" "Cosmology *""'"); 
03067   }
03068   arg1 = reinterpret_cast< Cosmology * >(argp1);
03069   ecode2 = SWIG_AsVal_double(obj1, &val2);
03070   if (!SWIG_IsOK(ecode2)) {
03071     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_ang_dist" "', argument " "2"" of type '" "double""'");
03072   } 
03073   arg2 = static_cast< double >(val2);
03074   result = (double)(arg1)->ang_dist(arg2);
03075   resultobj = SWIG_From_double(static_cast< double >(result));
03076   return resultobj;
03077 fail:
03078   return NULL;
03079 }
03080 
03081 
03082 SWIGINTERN PyObject *_wrap_Cosmology_ang_dist_z1_z2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03083   PyObject *resultobj = 0;
03084   Cosmology *arg1 = (Cosmology *) 0 ;
03085   double arg2 ;
03086   double arg3 ;
03087   double result;
03088   void *argp1 = 0 ;
03089   int res1 = 0 ;
03090   double val2 ;
03091   int ecode2 = 0 ;
03092   double val3 ;
03093   int ecode3 = 0 ;
03094   PyObject * obj0 = 0 ;
03095   PyObject * obj1 = 0 ;
03096   PyObject * obj2 = 0 ;
03097   
03098   if (!PyArg_ParseTuple(args,(char *)"OOO:Cosmology_ang_dist_z1_z2",&obj0,&obj1,&obj2)) SWIG_fail;
03099   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03100   if (!SWIG_IsOK(res1)) {
03101     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_ang_dist_z1_z2" "', argument " "1"" of type '" "Cosmology *""'"); 
03102   }
03103   arg1 = reinterpret_cast< Cosmology * >(argp1);
03104   ecode2 = SWIG_AsVal_double(obj1, &val2);
03105   if (!SWIG_IsOK(ecode2)) {
03106     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_ang_dist_z1_z2" "', argument " "2"" of type '" "double""'");
03107   } 
03108   arg2 = static_cast< double >(val2);
03109   ecode3 = SWIG_AsVal_double(obj2, &val3);
03110   if (!SWIG_IsOK(ecode3)) {
03111     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cosmology_ang_dist_z1_z2" "', argument " "3"" of type '" "double""'");
03112   } 
03113   arg3 = static_cast< double >(val3);
03114   result = (double)(arg1)->ang_dist_z1_z2(arg2,arg3);
03115   resultobj = SWIG_From_double(static_cast< double >(result));
03116   return resultobj;
03117 fail:
03118   return NULL;
03119 }
03120 
03121 
03122 SWIGINTERN PyObject *_wrap_Cosmology_lum_dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03123   PyObject *resultobj = 0;
03124   Cosmology *arg1 = (Cosmology *) 0 ;
03125   double arg2 ;
03126   double result;
03127   void *argp1 = 0 ;
03128   int res1 = 0 ;
03129   double val2 ;
03130   int ecode2 = 0 ;
03131   PyObject * obj0 = 0 ;
03132   PyObject * obj1 = 0 ;
03133   
03134   if (!PyArg_ParseTuple(args,(char *)"OO:Cosmology_lum_dist",&obj0,&obj1)) SWIG_fail;
03135   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03136   if (!SWIG_IsOK(res1)) {
03137     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_lum_dist" "', argument " "1"" of type '" "Cosmology *""'"); 
03138   }
03139   arg1 = reinterpret_cast< Cosmology * >(argp1);
03140   ecode2 = SWIG_AsVal_double(obj1, &val2);
03141   if (!SWIG_IsOK(ecode2)) {
03142     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_lum_dist" "', argument " "2"" of type '" "double""'");
03143   } 
03144   arg2 = static_cast< double >(val2);
03145   result = (double)(arg1)->lum_dist(arg2);
03146   resultobj = SWIG_From_double(static_cast< double >(result));
03147   return resultobj;
03148 fail:
03149   return NULL;
03150 }
03151 
03152 
03153 SWIGINTERN PyObject *_wrap_Cosmology_unit_comoving_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03154   PyObject *resultobj = 0;
03155   Cosmology *arg1 = (Cosmology *) 0 ;
03156   double arg2 ;
03157   void *arg3 = (void *) 0 ;
03158   double result;
03159   void *argp1 = 0 ;
03160   int res1 = 0 ;
03161   double val2 ;
03162   int ecode2 = 0 ;
03163   int res3 ;
03164   PyObject * obj0 = 0 ;
03165   PyObject * obj1 = 0 ;
03166   PyObject * obj2 = 0 ;
03167   
03168   if (!PyArg_ParseTuple(args,(char *)"OOO:Cosmology_unit_comoving_volume",&obj0,&obj1,&obj2)) SWIG_fail;
03169   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03170   if (!SWIG_IsOK(res1)) {
03171     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_unit_comoving_volume" "', argument " "1"" of type '" "Cosmology *""'"); 
03172   }
03173   arg1 = reinterpret_cast< Cosmology * >(argp1);
03174   ecode2 = SWIG_AsVal_double(obj1, &val2);
03175   if (!SWIG_IsOK(ecode2)) {
03176     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_unit_comoving_volume" "', argument " "2"" of type '" "double""'");
03177   } 
03178   arg2 = static_cast< double >(val2);
03179   res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
03180   if (!SWIG_IsOK(res3)) {
03181     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Cosmology_unit_comoving_volume" "', argument " "3"" of type '" "void *""'"); 
03182   }
03183   result = (double)(arg1)->unit_comoving_volume(arg2,arg3);
03184   resultobj = SWIG_From_double(static_cast< double >(result));
03185   return resultobj;
03186 fail:
03187   return NULL;
03188 }
03189 
03190 
03191 SWIGINTERN PyObject *_wrap_Cosmology_comoving_volume_z1_z2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03192   PyObject *resultobj = 0;
03193   Cosmology *arg1 = (Cosmology *) 0 ;
03194   double arg2 ;
03195   double arg3 ;
03196   double result;
03197   void *argp1 = 0 ;
03198   int res1 = 0 ;
03199   double val2 ;
03200   int ecode2 = 0 ;
03201   double val3 ;
03202   int ecode3 = 0 ;
03203   PyObject * obj0 = 0 ;
03204   PyObject * obj1 = 0 ;
03205   PyObject * obj2 = 0 ;
03206   
03207   if (!PyArg_ParseTuple(args,(char *)"OOO:Cosmology_comoving_volume_z1_z2",&obj0,&obj1,&obj2)) SWIG_fail;
03208   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03209   if (!SWIG_IsOK(res1)) {
03210     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_comoving_volume_z1_z2" "', argument " "1"" of type '" "Cosmology *""'"); 
03211   }
03212   arg1 = reinterpret_cast< Cosmology * >(argp1);
03213   ecode2 = SWIG_AsVal_double(obj1, &val2);
03214   if (!SWIG_IsOK(ecode2)) {
03215     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_comoving_volume_z1_z2" "', argument " "2"" of type '" "double""'");
03216   } 
03217   arg2 = static_cast< double >(val2);
03218   ecode3 = SWIG_AsVal_double(obj2, &val3);
03219   if (!SWIG_IsOK(ecode3)) {
03220     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cosmology_comoving_volume_z1_z2" "', argument " "3"" of type '" "double""'");
03221   } 
03222   arg3 = static_cast< double >(val3);
03223   result = (double)(arg1)->comoving_volume_z1_z2(arg2,arg3);
03224   resultobj = SWIG_From_double(static_cast< double >(result));
03225   return resultobj;
03226 fail:
03227   return NULL;
03228 }
03229 
03230 
03231 SWIGINTERN PyObject *_wrap_Cosmology_comoving_volume_0_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03232   PyObject *resultobj = 0;
03233   Cosmology *arg1 = (Cosmology *) 0 ;
03234   double arg2 ;
03235   double result;
03236   void *argp1 = 0 ;
03237   int res1 = 0 ;
03238   double val2 ;
03239   int ecode2 = 0 ;
03240   PyObject * obj0 = 0 ;
03241   PyObject * obj1 = 0 ;
03242   
03243   if (!PyArg_ParseTuple(args,(char *)"OO:Cosmology_comoving_volume_0_z",&obj0,&obj1)) SWIG_fail;
03244   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03245   if (!SWIG_IsOK(res1)) {
03246     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_comoving_volume_0_z" "', argument " "1"" of type '" "Cosmology *""'"); 
03247   }
03248   arg1 = reinterpret_cast< Cosmology * >(argp1);
03249   ecode2 = SWIG_AsVal_double(obj1, &val2);
03250   if (!SWIG_IsOK(ecode2)) {
03251     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_comoving_volume_0_z" "', argument " "2"" of type '" "double""'");
03252   } 
03253   arg2 = static_cast< double >(val2);
03254   result = (double)(arg1)->comoving_volume_0_z(arg2);
03255   resultobj = SWIG_From_double(static_cast< double >(result));
03256   return resultobj;
03257 fail:
03258   return NULL;
03259 }
03260 
03261 
03262 SWIGINTERN PyObject *_wrap_Cosmology_lookback_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03263   PyObject *resultobj = 0;
03264   Cosmology *arg1 = (Cosmology *) 0 ;
03265   double arg2 ;
03266   double result;
03267   void *argp1 = 0 ;
03268   int res1 = 0 ;
03269   double val2 ;
03270   int ecode2 = 0 ;
03271   PyObject * obj0 = 0 ;
03272   PyObject * obj1 = 0 ;
03273   
03274   if (!PyArg_ParseTuple(args,(char *)"OO:Cosmology_lookback_time",&obj0,&obj1)) SWIG_fail;
03275   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03276   if (!SWIG_IsOK(res1)) {
03277     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_lookback_time" "', argument " "1"" of type '" "Cosmology *""'"); 
03278   }
03279   arg1 = reinterpret_cast< Cosmology * >(argp1);
03280   ecode2 = SWIG_AsVal_double(obj1, &val2);
03281   if (!SWIG_IsOK(ecode2)) {
03282     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_lookback_time" "', argument " "2"" of type '" "double""'");
03283   } 
03284   arg2 = static_cast< double >(val2);
03285   result = (double)(arg1)->lookback_time(arg2);
03286   resultobj = SWIG_From_double(static_cast< double >(result));
03287   return resultobj;
03288 fail:
03289   return NULL;
03290 }
03291 
03292 
03293 SWIGINTERN PyObject *_wrap_Cosmology_age(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03294   PyObject *resultobj = 0;
03295   Cosmology *arg1 = (Cosmology *) 0 ;
03296   double arg2 ;
03297   double result;
03298   void *argp1 = 0 ;
03299   int res1 = 0 ;
03300   double val2 ;
03301   int ecode2 = 0 ;
03302   PyObject * obj0 = 0 ;
03303   PyObject * obj1 = 0 ;
03304   
03305   if (!PyArg_ParseTuple(args,(char *)"OO:Cosmology_age",&obj0,&obj1)) SWIG_fail;
03306   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03307   if (!SWIG_IsOK(res1)) {
03308     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_age" "', argument " "1"" of type '" "Cosmology *""'"); 
03309   }
03310   arg1 = reinterpret_cast< Cosmology * >(argp1);
03311   ecode2 = SWIG_AsVal_double(obj1, &val2);
03312   if (!SWIG_IsOK(ecode2)) {
03313     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cosmology_age" "', argument " "2"" of type '" "double""'");
03314   } 
03315   arg2 = static_cast< double >(val2);
03316   result = (double)(arg1)->age(arg2);
03317   resultobj = SWIG_From_double(static_cast< double >(result));
03318   return resultobj;
03319 fail:
03320   return NULL;
03321 }
03322 
03323 
03324 SWIGINTERN PyObject *_wrap_Cosmology_age_now(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03325   PyObject *resultobj = 0;
03326   Cosmology *arg1 = (Cosmology *) 0 ;
03327   double result;
03328   void *argp1 = 0 ;
03329   int res1 = 0 ;
03330   PyObject * obj0 = 0 ;
03331   
03332   if (!PyArg_ParseTuple(args,(char *)"O:Cosmology_age_now",&obj0)) SWIG_fail;
03333   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Cosmology, 0 |  0 );
03334   if (!SWIG_IsOK(res1)) {
03335     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cosmology_age_now" "', argument " "1"" of type '" "Cosmology *""'"); 
03336   }
03337   arg1 = reinterpret_cast< Cosmology * >(argp1);
03338   result = (double)(arg1)->age_now();
03339   resultobj = SWIG_From_double(static_cast< double >(result));
03340   return resultobj;
03341 fail:
03342   return NULL;
03343 }
03344 
03345 
03346 SWIGINTERN PyObject *Cosmology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03347   PyObject *obj;
03348   if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
03349   SWIG_TypeNewClientData(SWIGTYPE_p_Cosmology, SWIG_NewClientData(obj));
03350   return SWIG_Py_Void();
03351 }
03352 
03353 SWIGINTERN PyObject *_wrap_E_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03354   PyObject *resultobj = 0;
03355   double arg1 ;
03356   void *arg2 = (void *) 0 ;
03357   double result;
03358   double val1 ;
03359   int ecode1 = 0 ;
03360   int res2 ;
03361   PyObject * obj0 = 0 ;
03362   PyObject * obj1 = 0 ;
03363   
03364   if (!PyArg_ParseTuple(args,(char *)"OO:E_z",&obj0,&obj1)) SWIG_fail;
03365   ecode1 = SWIG_AsVal_double(obj0, &val1);
03366   if (!SWIG_IsOK(ecode1)) {
03367     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "E_z" "', argument " "1"" of type '" "double""'");
03368   } 
03369   arg1 = static_cast< double >(val1);
03370   res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
03371   if (!SWIG_IsOK(res2)) {
03372     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "E_z" "', argument " "2"" of type '" "void *""'"); 
03373   }
03374   result = (double)E_z(arg1,arg2);
03375   resultobj = SWIG_From_double(static_cast< double >(result));
03376   return resultobj;
03377 fail:
03378   return NULL;
03379 }
03380 
03381 
03382 SWIGINTERN PyObject *_wrap_time_integral(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03383   PyObject *resultobj = 0;
03384   double arg1 ;
03385   void *arg2 = (void *) 0 ;
03386   double result;
03387   double val1 ;
03388   int ecode1 = 0 ;
03389   int res2 ;
03390   PyObject * obj0 = 0 ;
03391   PyObject * obj1 = 0 ;
03392   
03393   if (!PyArg_ParseTuple(args,(char *)"OO:time_integral",&obj0,&obj1)) SWIG_fail;
03394   ecode1 = SWIG_AsVal_double(obj0, &val1);
03395   if (!SWIG_IsOK(ecode1)) {
03396     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "time_integral" "', argument " "1"" of type '" "double""'");
03397   } 
03398   arg1 = static_cast< double >(val1);
03399   res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
03400   if (!SWIG_IsOK(res2)) {
03401     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_integral" "', argument " "2"" of type '" "void *""'"); 
03402   }
03403   result = (double)time_integral(arg1,arg2);
03404   resultobj = SWIG_From_double(static_cast< double >(result));
03405   return resultobj;
03406 fail:
03407   return NULL;
03408 }
03409 
03410 
03411 SWIGINTERN PyObject *_wrap_schechter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03412   PyObject *resultobj = 0;
03413   double arg1 ;
03414   double arg2 ;
03415   double arg3 ;
03416   double arg4 ;
03417   double result;
03418   double val1 ;
03419   int ecode1 = 0 ;
03420   double val2 ;
03421   int ecode2 = 0 ;
03422   double val3 ;
03423   int ecode3 = 0 ;
03424   double val4 ;
03425   int ecode4 = 0 ;
03426   PyObject * obj0 = 0 ;
03427   PyObject * obj1 = 0 ;
03428   PyObject * obj2 = 0 ;
03429   PyObject * obj3 = 0 ;
03430   
03431   if (!PyArg_ParseTuple(args,(char *)"OOOO:schechter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
03432   ecode1 = SWIG_AsVal_double(obj0, &val1);
03433   if (!SWIG_IsOK(ecode1)) {
03434     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "schechter" "', argument " "1"" of type '" "double""'");
03435   } 
03436   arg1 = static_cast< double >(val1);
03437   ecode2 = SWIG_AsVal_double(obj1, &val2);
03438   if (!SWIG_IsOK(ecode2)) {
03439     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "schechter" "', argument " "2"" of type '" "double""'");
03440   } 
03441   arg2 = static_cast< double >(val2);
03442   ecode3 = SWIG_AsVal_double(obj2, &val3);
03443   if (!SWIG_IsOK(ecode3)) {
03444     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "schechter" "', argument " "3"" of type '" "double""'");
03445   } 
03446   arg3 = static_cast< double >(val3);
03447   ecode4 = SWIG_AsVal_double(obj3, &val4);
03448   if (!SWIG_IsOK(ecode4)) {
03449     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "schechter" "', argument " "4"" of type '" "double""'");
03450   } 
03451   arg4 = static_cast< double >(val4);
03452   result = (double)schechter(arg1,arg2,arg3,arg4);
03453   resultobj = SWIG_From_double(static_cast< double >(result));
03454   return resultobj;
03455 fail:
03456   return NULL;
03457 }
03458 
03459 
03460 SWIGINTERN PyObject *_wrap_number_schechter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03461   PyObject *resultobj = 0;
03462   double arg1 ;
03463   double arg2 ;
03464   double arg3 ;
03465   double arg4 ;
03466   double result;
03467   double val1 ;
03468   int ecode1 = 0 ;
03469   double val2 ;
03470   int ecode2 = 0 ;
03471   double val3 ;
03472   int ecode3 = 0 ;
03473   double val4 ;
03474   int ecode4 = 0 ;
03475   PyObject * obj0 = 0 ;
03476   PyObject * obj1 = 0 ;
03477   PyObject * obj2 = 0 ;
03478   PyObject * obj3 = 0 ;
03479   
03480   if (!PyArg_ParseTuple(args,(char *)"OOOO:number_schechter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
03481   ecode1 = SWIG_AsVal_double(obj0, &val1);
03482   if (!SWIG_IsOK(ecode1)) {
03483     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "number_schechter" "', argument " "1"" of type '" "double""'");
03484   } 
03485   arg1 = static_cast< double >(val1);
03486   ecode2 = SWIG_AsVal_double(obj1, &val2);
03487   if (!SWIG_IsOK(ecode2)) {
03488     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "number_schechter" "', argument " "2"" of type '" "double""'");
03489   } 
03490   arg2 = static_cast< double >(val2);
03491   ecode3 = SWIG_AsVal_double(obj2, &val3);
03492   if (!SWIG_IsOK(ecode3)) {
03493     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "number_schechter" "', argument " "3"" of type '" "double""'");
03494   } 
03495   arg3 = static_cast< double >(val3);
03496   ecode4 = SWIG_AsVal_double(obj3, &val4);
03497   if (!SWIG_IsOK(ecode4)) {
03498     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "number_schechter" "', argument " "4"" of type '" "double""'");
03499   } 
03500   arg4 = static_cast< double >(val4);
03501   result = (double)number_schechter(arg1,arg2,arg3,arg4);
03502   resultobj = SWIG_From_double(static_cast< double >(result));
03503   return resultobj;
03504 fail:
03505   return NULL;
03506 }
03507 
03508 
03509 SWIGINTERN PyObject *_wrap_total_number_schechter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03510   PyObject *resultobj = 0;
03511   double arg1 ;
03512   double arg2 ;
03513   double result;
03514   double val1 ;
03515   int ecode1 = 0 ;
03516   double val2 ;
03517   int ecode2 = 0 ;
03518   PyObject * obj0 = 0 ;
03519   PyObject * obj1 = 0 ;
03520   
03521   if (!PyArg_ParseTuple(args,(char *)"OO:total_number_schechter",&obj0,&obj1)) SWIG_fail;
03522   ecode1 = SWIG_AsVal_double(obj0, &val1);
03523   if (!SWIG_IsOK(ecode1)) {
03524     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "total_number_schechter" "', argument " "1"" of type '" "double""'");
03525   } 
03526   arg1 = static_cast< double >(val1);
03527   ecode2 = SWIG_AsVal_double(obj1, &val2);
03528   if (!SWIG_IsOK(ecode2)) {
03529     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "total_number_schechter" "', argument " "2"" of type '" "double""'");
03530   } 
03531   arg2 = static_cast< double >(val2);
03532   result = (double)total_number_schechter(arg1,arg2);
03533   resultobj = SWIG_From_double(static_cast< double >(result));
03534   return resultobj;
03535 fail:
03536   return NULL;
03537 }
03538 
03539 
03540 SWIGINTERN PyObject *_wrap_luminosity_schechter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03541   PyObject *resultobj = 0;
03542   double arg1 ;
03543   double arg2 ;
03544   double arg3 ;
03545   double arg4 ;
03546   double result;
03547   double val1 ;
03548   int ecode1 = 0 ;
03549   double val2 ;
03550   int ecode2 = 0 ;
03551   double val3 ;
03552   int ecode3 = 0 ;
03553   double val4 ;
03554   int ecode4 = 0 ;
03555   PyObject * obj0 = 0 ;
03556   PyObject * obj1 = 0 ;
03557   PyObject * obj2 = 0 ;
03558   PyObject * obj3 = 0 ;
03559   
03560   if (!PyArg_ParseTuple(args,(char *)"OOOO:luminosity_schechter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
03561   ecode1 = SWIG_AsVal_double(obj0, &val1);
03562   if (!SWIG_IsOK(ecode1)) {
03563     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "luminosity_schechter" "', argument " "1"" of type '" "double""'");
03564   } 
03565   arg1 = static_cast< double >(val1);
03566   ecode2 = SWIG_AsVal_double(obj1, &val2);
03567   if (!SWIG_IsOK(ecode2)) {
03568     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "luminosity_schechter" "', argument " "2"" of type '" "double""'");
03569   } 
03570   arg2 = static_cast< double >(val2);
03571   ecode3 = SWIG_AsVal_double(obj2, &val3);
03572   if (!SWIG_IsOK(ecode3)) {
03573     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "luminosity_schechter" "', argument " "3"" of type '" "double""'");
03574   } 
03575   arg3 = static_cast< double >(val3);
03576   ecode4 = SWIG_AsVal_double(obj3, &val4);
03577   if (!SWIG_IsOK(ecode4)) {
03578     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "luminosity_schechter" "', argument " "4"" of type '" "double""'");
03579   } 
03580   arg4 = static_cast< double >(val4);
03581   result = (double)luminosity_schechter(arg1,arg2,arg3,arg4);
03582   resultobj = SWIG_From_double(static_cast< double >(result));
03583   return resultobj;
03584 fail:
03585   return NULL;
03586 }
03587 
03588 
03589 SWIGINTERN PyObject *_wrap_total_luminosity_schechter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
03590   PyObject *resultobj = 0;
03591   double arg1 ;
03592   double arg2 ;
03593   double arg3 ;
03594   double result;
03595   double val1 ;
03596   int ecode1 = 0 ;
03597   double val2 ;
03598   int ecode2 = 0 ;
03599   double val3 ;
03600   int ecode3 = 0 ;
03601   PyObject * obj0 = 0 ;
03602   PyObject * obj1 = 0 ;
03603   PyObject * obj2 = 0 ;
03604   
03605   if (!PyArg_ParseTuple(args,(char *)"OOO:total_luminosity_schechter",&obj0,&obj1,&obj2)) SWIG_fail;
03606   ecode1 = SWIG_AsVal_double(obj0, &val1);
03607   if (!SWIG_IsOK(ecode1)) {
03608     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "total_luminosity_schechter" "', argument " "1"" of type '" "double""'");
03609   } 
03610   arg1 = static_cast< double >(val1);
03611   ecode2 = SWIG_AsVal_double(obj1, &val2);
03612   if (!SWIG_IsOK(ecode2)) {
03613     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "total_luminosity_schechter" "', argument " "2"" of type '" "double""'");
03614   } 
03615   arg2 = static_cast< double >(val2);
03616   ecode3 = SWIG_AsVal_double(obj2, &val3);
03617   if (!SWIG_IsOK(ecode3)) {
03618     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "total_luminosity_schechter" "', argument " "3"" of type '" "double""'");
03619   } 
03620   arg3 = static_cast< double >(val3);
03621   result = (double)total_luminosity_schechter(arg1,arg2,arg3);
03622   resultobj = SWIG_From_double(static_cast< double >(result));
03623   return resultobj;
03624 fail:
03625   return NULL;
03626 }
03627 
03628 
03629 static PyMethodDef SwigMethods[] = {
03630          { (char *)"new_Cosmology", _wrap_new_Cosmology, METH_VARARGS, NULL},
03631          { (char *)"delete_Cosmology", _wrap_delete_Cosmology, METH_VARARGS, NULL},
03632          { (char *)"Cosmology_D_C", _wrap_Cosmology_D_C, METH_VARARGS, NULL},
03633          { (char *)"Cosmology_D_M", _wrap_Cosmology_D_M, METH_VARARGS, NULL},
03634          { (char *)"Cosmology_ang_dist", _wrap_Cosmology_ang_dist, METH_VARARGS, NULL},
03635          { (char *)"Cosmology_ang_dist_z1_z2", _wrap_Cosmology_ang_dist_z1_z2, METH_VARARGS, NULL},
03636          { (char *)"Cosmology_lum_dist", _wrap_Cosmology_lum_dist, METH_VARARGS, NULL},
03637          { (char *)"Cosmology_unit_comoving_volume", _wrap_Cosmology_unit_comoving_volume, METH_VARARGS, NULL},
03638          { (char *)"Cosmology_comoving_volume_z1_z2", _wrap_Cosmology_comoving_volume_z1_z2, METH_VARARGS, NULL},
03639          { (char *)"Cosmology_comoving_volume_0_z", _wrap_Cosmology_comoving_volume_0_z, METH_VARARGS, NULL},
03640          { (char *)"Cosmology_lookback_time", _wrap_Cosmology_lookback_time, METH_VARARGS, NULL},
03641          { (char *)"Cosmology_age", _wrap_Cosmology_age, METH_VARARGS, NULL},
03642          { (char *)"Cosmology_age_now", _wrap_Cosmology_age_now, METH_VARARGS, NULL},
03643          { (char *)"Cosmology_swigregister", Cosmology_swigregister, METH_VARARGS, NULL},
03644          { (char *)"E_z", _wrap_E_z, METH_VARARGS, NULL},
03645          { (char *)"time_integral", _wrap_time_integral, METH_VARARGS, NULL},
03646          { (char *)"schechter", _wrap_schechter, METH_VARARGS, NULL},
03647          { (char *)"number_schechter", _wrap_number_schechter, METH_VARARGS, NULL},
03648          { (char *)"total_number_schechter", _wrap_total_number_schechter, METH_VARARGS, NULL},
03649          { (char *)"luminosity_schechter", _wrap_luminosity_schechter, METH_VARARGS, NULL},
03650          { (char *)"total_luminosity_schechter", _wrap_total_luminosity_schechter, METH_VARARGS, NULL},
03651          { NULL, NULL, 0, NULL }
03652 };
03653 
03654 
03655 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
03656 
03657 static swig_type_info _swigt__p_Cosmology = {"_p_Cosmology", "Cosmology *", 0, 0, (void*)0, 0};
03658 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
03659 
03660 static swig_type_info *swig_type_initial[] = {
03661   &_swigt__p_Cosmology,
03662   &_swigt__p_char,
03663 };
03664 
03665 static swig_cast_info _swigc__p_Cosmology[] = {  {&_swigt__p_Cosmology, 0, 0, 0},{0, 0, 0, 0}};
03666 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
03667 
03668 static swig_cast_info *swig_cast_initial[] = {
03669   _swigc__p_Cosmology,
03670   _swigc__p_char,
03671 };
03672 
03673 
03674 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
03675 
03676 static swig_const_info swig_const_table[] = {
03677 {0, 0, 0, 0.0, 0, 0}};
03678 
03679 #ifdef __cplusplus
03680 }
03681 #endif
03682 /* -----------------------------------------------------------------------------
03683  * Type initialization:
03684  * This problem is tough by the requirement that no dynamic 
03685  * memory is used. Also, since swig_type_info structures store pointers to 
03686  * swig_cast_info structures and swig_cast_info structures store pointers back
03687  * to swig_type_info structures, we need some lookup code at initialization. 
03688  * The idea is that swig generates all the structures that are needed. 
03689  * The runtime then collects these partially filled structures. 
03690  * The SWIG_InitializeModule function takes these initial arrays out of 
03691  * swig_module, and does all the lookup, filling in the swig_module.types
03692  * array with the correct data and linking the correct swig_cast_info
03693  * structures together.
03694  *
03695  * The generated swig_type_info structures are assigned staticly to an initial 
03696  * array. We just loop though that array, and handle each type individually.
03697  * First we lookup if this type has been already loaded, and if so, use the
03698  * loaded structure instead of the generated one. Then we have to fill in the
03699  * cast linked list. The cast data is initially stored in something like a
03700  * two-dimensional array. Each row corresponds to a type (there are the same
03701  * number of rows as there are in the swig_type_initial array). Each entry in
03702  * a column is one of the swig_cast_info structures for that type.
03703  * The cast_initial array is actually an array of arrays, because each row has
03704  * a variable number of columns. So to actually build the cast linked list,
03705  * we find the array of casts associated with the type, and loop through it 
03706  * adding the casts to the list. The one last trick we need to do is making
03707  * sure the type pointer in the swig_cast_info struct is correct.
03708  *
03709  * First off, we lookup the cast->type name to see if it is already loaded. 
03710  * There are three cases to handle:
03711  *  1) If the cast->type has already been loaded AND the type we are adding
03712  *     casting info to has not been loaded (it is in this module), THEN we
03713  *     replace the cast->type pointer with the type pointer that has already
03714  *     been loaded.
03715  *  2) If BOTH types (the one we are adding casting info to, and the 
03716  *     cast->type) are loaded, THEN the cast info has already been loaded by
03717  *     the previous module so we just ignore it.
03718  *  3) Finally, if cast->type has not already been loaded, then we add that
03719  *     swig_cast_info to the linked list (because the cast->type) pointer will
03720  *     be correct.
03721  * ----------------------------------------------------------------------------- */
03722 
03723 #ifdef __cplusplus
03724 extern "C" {
03725 #if 0
03726 } /* c-mode */
03727 #endif
03728 #endif
03729 
03730 #if 0
03731 #define SWIGRUNTIME_DEBUG
03732 #endif
03733 
03734 SWIGRUNTIME void
03735 SWIG_InitializeModule(void *clientdata) {
03736   size_t i;
03737   swig_module_info *module_head;
03738   static int init_run = 0;
03739   
03740   clientdata = clientdata;
03741   
03742   if (init_run) return;
03743   init_run = 1;
03744   
03745   /* Initialize the swig_module */
03746   swig_module.type_initial = swig_type_initial;
03747   swig_module.cast_initial = swig_cast_initial;
03748   
03749   /* Try and load any already created modules */
03750   module_head = SWIG_GetModule(clientdata);
03751   if (module_head) {
03752     swig_module.next = module_head->next;
03753     module_head->next = &swig_module;
03754   } else {
03755     /* This is the first module loaded */
03756     swig_module.next = &swig_module;
03757     SWIG_SetModule(clientdata, &swig_module);
03758   }
03759   
03760   /* Now work on filling in swig_module.types */
03761 #ifdef SWIGRUNTIME_DEBUG
03762   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
03763 #endif
03764   for (i = 0; i < swig_module.size; ++i) {
03765     swig_type_info *type = 0;
03766     swig_type_info *ret;
03767     swig_cast_info *cast;
03768     
03769 #ifdef SWIGRUNTIME_DEBUG
03770     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
03771 #endif
03772     
03773     /* if there is another module already loaded */
03774     if (swig_module.next != &swig_module) {
03775       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
03776     }
03777     if (type) {
03778       /* Overwrite clientdata field */
03779 #ifdef SWIGRUNTIME_DEBUG
03780       printf("SWIG_InitializeModule: found type %s\n", type->name);
03781 #endif
03782       if (swig_module.type_initial[i]->clientdata) {
03783         type->clientdata = swig_module.type_initial[i]->clientdata;
03784 #ifdef SWIGRUNTIME_DEBUG
03785         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
03786 #endif
03787       }
03788     } else {
03789       type = swig_module.type_initial[i];
03790     }
03791     
03792     /* Insert casting types */
03793     cast = swig_module.cast_initial[i];
03794     while (cast->type) {
03795       /* Don't need to add information already in the list */
03796       ret = 0;
03797 #ifdef SWIGRUNTIME_DEBUG
03798       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
03799 #endif
03800       if (swig_module.next != &swig_module) {
03801         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
03802 #ifdef SWIGRUNTIME_DEBUG
03803         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
03804 #endif
03805       }
03806       if (ret) {
03807         if (type == swig_module.type_initial[i]) {
03808 #ifdef SWIGRUNTIME_DEBUG
03809           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
03810 #endif
03811           cast->type = ret;
03812           ret = 0;
03813         } else {
03814           /* Check for casting already in the list */
03815           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
03816 #ifdef SWIGRUNTIME_DEBUG
03817           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
03818 #endif
03819           if (!ocast) ret = 0;
03820         }
03821       }
03822       
03823       if (!ret) {
03824 #ifdef SWIGRUNTIME_DEBUG
03825         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
03826 #endif
03827         if (type->cast) {
03828           type->cast->prev = cast;
03829           cast->next = type->cast;
03830         }
03831         type->cast = cast;
03832       }
03833       cast++;
03834     }
03835     /* Set entry in modules->types array equal to the type */
03836     swig_module.types[i] = type;
03837   }
03838   swig_module.types[i] = 0;
03839   
03840 #ifdef SWIGRUNTIME_DEBUG
03841   printf("**** SWIG_InitializeModule: Cast List ******\n");
03842   for (i = 0; i < swig_module.size; ++i) {
03843     int j = 0;
03844     swig_cast_info *cast = swig_module.cast_initial[i];
03845     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
03846     while (cast->type) {
03847       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
03848       cast++;
03849       ++j;
03850     }
03851     printf("---- Total casts: %d\n",j);
03852   }
03853   printf("**** SWIG_InitializeModule: Cast List ******\n");
03854 #endif
03855 }
03856 
03857 /* This function will propagate the clientdata field of type to
03858 * any new swig_type_info structures that have been added into the list
03859 * of equivalent types.  It is like calling
03860 * SWIG_TypeClientData(type, clientdata) a second time.
03861 */
03862 SWIGRUNTIME void
03863 SWIG_PropagateClientData(void) {
03864   size_t i;
03865   swig_cast_info *equiv;
03866   static int init_run = 0;
03867   
03868   if (init_run) return;
03869   init_run = 1;
03870   
03871   for (i = 0; i < swig_module.size; i++) {
03872     if (swig_module.types[i]->clientdata) {
03873       equiv = swig_module.types[i]->cast;
03874       while (equiv) {
03875         if (!equiv->converter) {
03876           if (equiv->type && !equiv->type->clientdata)
03877           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
03878         }
03879         equiv = equiv->next;
03880       }
03881     }
03882   }
03883 }
03884 
03885 #ifdef __cplusplus
03886 #if 0
03887 {
03888   /* c-mode */
03889 #endif
03890 }
03891 #endif
03892 
03893 
03894 
03895 #ifdef __cplusplus
03896 extern "C" {
03897 #endif
03898   
03899   /* Python-specific SWIG API */
03900 #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
03901 #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
03902 #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
03903   
03904   /* -----------------------------------------------------------------------------
03905    * global variable support code.
03906    * ----------------------------------------------------------------------------- */
03907   
03908   typedef struct swig_globalvar {
03909     char       *name;                  /* Name of global variable */
03910     PyObject *(*get_attr)(void);       /* Return the current value */
03911     int       (*set_attr)(PyObject *); /* Set the value */
03912     struct swig_globalvar *next;
03913   } swig_globalvar;
03914   
03915   typedef struct swig_varlinkobject {
03916     PyObject_HEAD
03917     swig_globalvar *vars;
03918   } swig_varlinkobject;
03919   
03920   SWIGINTERN PyObject *
03921   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
03922     return PyString_FromString("<Swig global variables>");
03923   }
03924   
03925   SWIGINTERN PyObject *
03926   swig_varlink_str(swig_varlinkobject *v) {
03927     PyObject *str = PyString_FromString("(");
03928     swig_globalvar  *var;
03929     for (var = v->vars; var; var=var->next) {
03930       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
03931       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
03932     }
03933     PyString_ConcatAndDel(&str,PyString_FromString(")"));
03934     return str;
03935   }
03936   
03937   SWIGINTERN int
03938   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
03939     PyObject *str = swig_varlink_str(v);
03940     fprintf(fp,"Swig global variables ");
03941     fprintf(fp,"%s\n", PyString_AsString(str));
03942     Py_DECREF(str);
03943     return 0;
03944   }
03945   
03946   SWIGINTERN void
03947   swig_varlink_dealloc(swig_varlinkobject *v) {
03948     swig_globalvar *var = v->vars;
03949     while (var) {
03950       swig_globalvar *n = var->next;
03951       free(var->name);
03952       free(var);
03953       var = n;
03954     }
03955   }
03956   
03957   SWIGINTERN PyObject *
03958   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
03959     PyObject *res = NULL;
03960     swig_globalvar *var = v->vars;
03961     while (var) {
03962       if (strcmp(var->name,n) == 0) {
03963         res = (*var->get_attr)();
03964         break;
03965       }
03966       var = var->next;
03967     }
03968     if (res == NULL && !PyErr_Occurred()) {
03969       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
03970     }
03971     return res;
03972   }
03973   
03974   SWIGINTERN int
03975   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
03976     int res = 1;
03977     swig_globalvar *var = v->vars;
03978     while (var) {
03979       if (strcmp(var->name,n) == 0) {
03980         res = (*var->set_attr)(p);
03981         break;
03982       }
03983       var = var->next;
03984     }
03985     if (res == 1 && !PyErr_Occurred()) {
03986       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
03987     }
03988     return res;
03989   }
03990   
03991   SWIGINTERN PyTypeObject*
03992   swig_varlink_type(void) {
03993     static char varlink__doc__[] = "Swig var link object";
03994     static PyTypeObject varlink_type;
03995     static int type_init = 0;  
03996     if (!type_init) {
03997       const PyTypeObject tmp
03998       = {
03999         PyObject_HEAD_INIT(NULL)
04000         0,                                  /* Number of items in variable part (ob_size) */
04001         (char *)"swigvarlink",              /* Type name (tp_name) */
04002         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
04003         0,                                  /* Itemsize (tp_itemsize) */
04004         (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
04005         (printfunc) swig_varlink_print,     /* Print (tp_print) */
04006         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
04007         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
04008         0,                                  /* tp_compare */
04009         (reprfunc) swig_varlink_repr,       /* tp_repr */
04010         0,                                  /* tp_as_number */
04011         0,                                  /* tp_as_sequence */
04012         0,                                  /* tp_as_mapping */
04013         0,                                  /* tp_hash */
04014         0,                                  /* tp_call */
04015         (reprfunc)swig_varlink_str,        /* tp_str */
04016         0,                                  /* tp_getattro */
04017         0,                                  /* tp_setattro */
04018         0,                                  /* tp_as_buffer */
04019         0,                                  /* tp_flags */
04020         varlink__doc__,                     /* tp_doc */
04021         0,                                  /* tp_traverse */
04022         0,                                  /* tp_clear */
04023         0,                                  /* tp_richcompare */
04024         0,                                  /* tp_weaklistoffset */
04025 #if PY_VERSION_HEX >= 0x02020000
04026         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
04027 #endif
04028 #if PY_VERSION_HEX >= 0x02030000
04029         0,                                  /* tp_del */
04030 #endif
04031 #ifdef COUNT_ALLOCS
04032         0,0,0,0                             /* tp_alloc -> tp_next */
04033 #endif
04034       };
04035       varlink_type = tmp;
04036       varlink_type.ob_type = &PyType_Type;
04037       type_init = 1;
04038     }
04039     return &varlink_type;
04040   }
04041   
04042   /* Create a variable linking object for use later */
04043   SWIGINTERN PyObject *
04044   SWIG_Python_newvarlink(void) {
04045     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
04046     if (result) {
04047       result->vars = 0;
04048     }
04049     return ((PyObject*) result);
04050   }
04051   
04052   SWIGINTERN void 
04053   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
04054     swig_varlinkobject *v = (swig_varlinkobject *) p;
04055     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
04056     if (gv) {
04057       size_t size = strlen(name)+1;
04058       gv->name = (char *)malloc(size);
04059       if (gv->name) {
04060         strncpy(gv->name,name,size);
04061         gv->get_attr = get_attr;
04062         gv->set_attr = set_attr;
04063         gv->next = v->vars;
04064       }
04065     }
04066     v->vars = gv;
04067   }
04068   
04069   SWIGINTERN PyObject *
04070   SWIG_globals() {
04071     static PyObject *_SWIG_globals = 0; 
04072     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
04073     return _SWIG_globals;
04074   }
04075   
04076   /* -----------------------------------------------------------------------------
04077    * constants/methods manipulation
04078    * ----------------------------------------------------------------------------- */
04079   
04080   /* Install Constants */
04081   SWIGINTERN void
04082   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
04083     PyObject *obj = 0;
04084     size_t i;
04085     for (i = 0; constants[i].type; ++i) {
04086       switch(constants[i].type) {
04087       case SWIG_PY_POINTER:
04088         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
04089         break;
04090       case SWIG_PY_BINARY:
04091         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
04092         break;
04093       default:
04094         obj = 0;
04095         break;
04096       }
04097       if (obj) {
04098         PyDict_SetItemString(d, constants[i].name, obj);
04099         Py_DECREF(obj);
04100       }
04101     }
04102   }
04103   
04104   /* -----------------------------------------------------------------------------*/
04105   /* Fix SwigMethods to carry the callback ptrs when needed */
04106   /* -----------------------------------------------------------------------------*/
04107   
04108   SWIGINTERN void
04109   SWIG_Python_FixMethods(PyMethodDef *methods,
04110     swig_const_info *const_table,
04111     swig_type_info **types,
04112     swig_type_info **types_initial) {
04113     size_t i;
04114     for (i = 0; methods[i].ml_name; ++i) {
04115       char *c = methods[i].ml_doc;
04116       if (c && (c = strstr(c, "swig_ptr: "))) {
04117         int j;
04118         swig_const_info *ci = 0;
04119         char *name = c + 10;
04120         for (j = 0; const_table[j].type; ++j) {
04121           if (strncmp(const_table[j].name, name, 
04122               strlen(const_table[j].name)) == 0) {
04123             ci = &(const_table[j]);
04124             break;
04125           }
04126         }
04127         if (ci) {
04128           size_t shift = (ci->ptype) - types;
04129           swig_type_info *ty = types_initial[shift];
04130           size_t ldoc = (c - methods[i].ml_doc);
04131           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
04132           char *ndoc = (char*)malloc(ldoc + lptr + 10);
04133           if (ndoc) {
04134             char *buff = ndoc;
04135             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
04136             if (ptr) {
04137               strncpy(buff, methods[i].ml_doc, ldoc);
04138               buff += ldoc;
04139               strncpy(buff, "swig_ptr: ", 10);
04140               buff += 10;
04141               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
04142               methods[i].ml_doc = ndoc;
04143             }
04144           }
04145         }
04146       }
04147     }
04148   } 
04149   
04150 #ifdef __cplusplus
04151 }
04152 #endif
04153 
04154 /* -----------------------------------------------------------------------------*
04155  *  Partial Init method
04156  * -----------------------------------------------------------------------------*/
04157 
04158 #ifdef __cplusplus
04159 extern "C"
04160 #endif
04161 SWIGEXPORT void SWIG_init(void) {
04162   PyObject *m, *d;
04163   
04164   /* Fix SwigMethods to carry the callback ptrs when needed */
04165   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
04166   
04167   m = Py_InitModule((char *) SWIG_name, SwigMethods);
04168   d = PyModule_GetDict(m);
04169   
04170   SWIG_InitializeModule(0);
04171   SWIG_InstallConstants(d,swig_const_table);
04172   
04173   
04174 }
04175 

Generated on Mon May 3 21:06:47 2010 for PyCos by  doxygen 1.4.7