source: devel/5.X/pbs_wrap.c @ 324

Last change on this file since 324 was 324, checked in by bas, 8 years ago

added 5.X setup, must be made better, want to generate a of stuff from the debian installation package, see #47

File size: 304.9 KB
Line 
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 2.0.7
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11#define SWIGPYTHON
12#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13
14/* -----------------------------------------------------------------------------
15 *  This section contains generic SWIG labels for method/variable
16 *  declarations/attributes, and other compiler dependent labels.
17 * ----------------------------------------------------------------------------- */
18
19/* template workaround for compilers that cannot correctly implement the C++ standard */
20#ifndef SWIGTEMPLATEDISAMBIGUATOR
21# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
22#  define SWIGTEMPLATEDISAMBIGUATOR template
23# elif defined(__HP_aCC)
24/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
25/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
26#  define SWIGTEMPLATEDISAMBIGUATOR template
27# else
28#  define SWIGTEMPLATEDISAMBIGUATOR
29# endif
30#endif
31
32/* inline attribute */
33#ifndef SWIGINLINE
34# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
35#   define SWIGINLINE inline
36# else
37#   define SWIGINLINE
38# endif
39#endif
40
41/* attribute recognised by some compilers to avoid 'unused' warnings */
42#ifndef SWIGUNUSED
43# if defined(__GNUC__)
44#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
45#     define SWIGUNUSED __attribute__ ((__unused__))
46#   else
47#     define SWIGUNUSED
48#   endif
49# elif defined(__ICC)
50#   define SWIGUNUSED __attribute__ ((__unused__))
51# else
52#   define SWIGUNUSED
53# endif
54#endif
55
56#ifndef SWIG_MSC_UNSUPPRESS_4505
57# if defined(_MSC_VER)
58#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
59# endif
60#endif
61
62#ifndef SWIGUNUSEDPARM
63# ifdef __cplusplus
64#   define SWIGUNUSEDPARM(p)
65# else
66#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
67# endif
68#endif
69
70/* internal SWIG method */
71#ifndef SWIGINTERN
72# define SWIGINTERN static SWIGUNUSED
73#endif
74
75/* internal inline SWIG method */
76#ifndef SWIGINTERNINLINE
77# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
78#endif
79
80/* exporting methods */
81#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
82#  ifndef GCC_HASCLASSVISIBILITY
83#    define GCC_HASCLASSVISIBILITY
84#  endif
85#endif
86
87#ifndef SWIGEXPORT
88# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
89#   if defined(STATIC_LINKED)
90#     define SWIGEXPORT
91#   else
92#     define SWIGEXPORT __declspec(dllexport)
93#   endif
94# else
95#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
96#     define SWIGEXPORT __attribute__ ((visibility("default")))
97#   else
98#     define SWIGEXPORT
99#   endif
100# endif
101#endif
102
103/* calling conventions for Windows */
104#ifndef SWIGSTDCALL
105# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
106#   define SWIGSTDCALL __stdcall
107# else
108#   define SWIGSTDCALL
109# endif
110#endif
111
112/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
113#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
114# define _CRT_SECURE_NO_DEPRECATE
115#endif
116
117/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
118#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
119# define _SCL_SECURE_NO_DEPRECATE
120#endif
121
122
123
124/* Python.h has to appear first */
125#include <Python.h>
126
127/* -----------------------------------------------------------------------------
128 * swigrun.swg
129 *
130 * This file contains generic C API SWIG runtime support for pointer
131 * type checking.
132 * ----------------------------------------------------------------------------- */
133
134/* This should only be incremented when either the layout of swig_type_info changes,
135   or for whatever reason, the runtime changes incompatibly */
136#define SWIG_RUNTIME_VERSION "4"
137
138/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
139#ifdef SWIG_TYPE_TABLE
140# define SWIG_QUOTE_STRING(x) #x
141# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
142# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
143#else
144# define SWIG_TYPE_TABLE_NAME
145#endif
146
147/*
148  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
149  creating a static or dynamic library from the SWIG runtime code.
150  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
151 
152  But only do this if strictly necessary, ie, if you have problems
153  with your compiler or suchlike.
154*/
155
156#ifndef SWIGRUNTIME
157# define SWIGRUNTIME SWIGINTERN
158#endif
159
160#ifndef SWIGRUNTIMEINLINE
161# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
162#endif
163
164/*  Generic buffer size */
165#ifndef SWIG_BUFFER_SIZE
166# define SWIG_BUFFER_SIZE 1024
167#endif
168
169/* Flags for pointer conversions */
170#define SWIG_POINTER_DISOWN        0x1
171#define SWIG_CAST_NEW_MEMORY       0x2
172
173/* Flags for new pointer objects */
174#define SWIG_POINTER_OWN           0x1
175
176
177/*
178   Flags/methods for returning states.
179   
180   The SWIG conversion methods, as ConvertPtr, return an integer
181   that tells if the conversion was successful or not. And if not,
182   an error code can be returned (see swigerrors.swg for the codes).
183   
184   Use the following macros/flags to set or process the returning
185   states.
186   
187   In old versions of SWIG, code such as the following was usually written:
188
189     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
190       // success code
191     } else {
192       //fail code
193     }
194
195   Now you can be more explicit:
196
197    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
198    if (SWIG_IsOK(res)) {
199      // success code
200    } else {
201      // fail code
202    }
203
204   which is the same really, but now you can also do
205
206    Type *ptr;
207    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
208    if (SWIG_IsOK(res)) {
209      // success code
210      if (SWIG_IsNewObj(res) {
211        ...
212        delete *ptr;
213      } else {
214        ...
215      }
216    } else {
217      // fail code
218    }
219   
220   I.e., now SWIG_ConvertPtr can return new objects and you can
221   identify the case and take care of the deallocation. Of course that
222   also requires SWIG_ConvertPtr to return new result values, such as
223
224      int SWIG_ConvertPtr(obj, ptr,...) {         
225        if (<obj is ok>) {                             
226          if (<need new object>) {                     
227            *ptr = <ptr to new allocated object>;
228            return SWIG_NEWOBJ;               
229          } else {                                     
230            *ptr = <ptr to old object>;       
231            return SWIG_OLDOBJ;               
232          }                                   
233        } else {                                       
234          return SWIG_BADOBJ;                 
235        }                                             
236      }
237
238   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
239   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
240   SWIG errors code.
241
242   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
243   allows to return the 'cast rank', for example, if you have this
244
245       int food(double)
246       int fooi(int);
247
248   and you call
249 
250      food(1)   // cast rank '1'  (1 -> 1.0)
251      fooi(1)   // cast rank '0'
252
253   just use the SWIG_AddCast()/SWIG_CheckState()
254*/
255
256#define SWIG_OK                    (0)
257#define SWIG_ERROR                 (-1)
258#define SWIG_IsOK(r)               (r >= 0)
259#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError) 
260
261/* The CastRankLimit says how many bits are used for the cast rank */
262#define SWIG_CASTRANKLIMIT         (1 << 8)
263/* The NewMask denotes the object was created (using new/malloc) */
264#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
265/* The TmpMask is for in/out typemaps that use temporal objects */
266#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
267/* Simple returning values */
268#define SWIG_BADOBJ                (SWIG_ERROR)
269#define SWIG_OLDOBJ                (SWIG_OK)
270#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
271#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
272/* Check, add and del mask methods */
273#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
274#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
275#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
276#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
277#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
278#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
279
280/* Cast-Rank Mode */
281#if defined(SWIG_CASTRANK_MODE)
282#  ifndef SWIG_TypeRank
283#    define SWIG_TypeRank             unsigned long
284#  endif
285#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
286#    define SWIG_MAXCASTRANK          (2)
287#  endif
288#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
289#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
290SWIGINTERNINLINE int SWIG_AddCast(int r) { 
291  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
292}
293SWIGINTERNINLINE int SWIG_CheckState(int r) { 
294  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
295}
296#else /* no cast-rank mode */
297#  define SWIG_AddCast
298#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
299#endif
300
301
302#include <string.h>
303
304#ifdef __cplusplus
305extern "C" {
306#endif
307
308typedef void *(*swig_converter_func)(void *, int *);
309typedef struct swig_type_info *(*swig_dycast_func)(void **);
310
311/* Structure to store information on one type */
312typedef struct swig_type_info {
313  const char             *name;                 /* mangled name of this type */
314  const char             *str;                  /* human readable name of this type */
315  swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
316  struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
317  void                   *clientdata;           /* language specific type data */
318  int                    owndata;               /* flag if the structure owns the clientdata */
319} swig_type_info;
320
321/* Structure to store a type and conversion function used for casting */
322typedef struct swig_cast_info {
323  swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
324  swig_converter_func     converter;            /* function to cast the void pointers */
325  struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
326  struct swig_cast_info  *prev;                 /* pointer to the previous cast */
327} swig_cast_info;
328
329/* Structure used to store module information
330 * Each module generates one structure like this, and the runtime collects
331 * all of these structures and stores them in a circularly linked list.*/
332typedef struct swig_module_info {
333  swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
334  size_t                 size;                  /* Number of types in this module */
335  struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
336  swig_type_info         **type_initial;        /* Array of initially generated type structures */
337  swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
338  void                    *clientdata;          /* Language specific module data */
339} swig_module_info;
340
341/*
342  Compare two type names skipping the space characters, therefore
343  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
344
345  Return 0 when the two name types are equivalent, as in
346  strncmp, but skipping ' '.
347*/
348SWIGRUNTIME int
349SWIG_TypeNameComp(const char *f1, const char *l1,
350                  const char *f2, const char *l2) {
351  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
352    while ((*f1 == ' ') && (f1 != l1)) ++f1;
353    while ((*f2 == ' ') && (f2 != l2)) ++f2;
354    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
355  }
356  return (int)((l1 - f1) - (l2 - f2));
357}
358
359/*
360  Check type equivalence in a name list like <name1>|<name2>|...
361  Return 0 if not equal, 1 if equal
362*/
363SWIGRUNTIME int
364SWIG_TypeEquiv(const char *nb, const char *tb) {
365  int equiv = 0;
366  const char* te = tb + strlen(tb);
367  const char* ne = nb;
368  while (!equiv && *ne) {
369    for (nb = ne; *ne; ++ne) {
370      if (*ne == '|') break;
371    }
372    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
373    if (*ne) ++ne;
374  }
375  return equiv;
376}
377
378/*
379  Check type equivalence in a name list like <name1>|<name2>|...
380  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
381*/
382SWIGRUNTIME int
383SWIG_TypeCompare(const char *nb, const char *tb) {
384  int equiv = 0;
385  const char* te = tb + strlen(tb);
386  const char* ne = nb;
387  while (!equiv && *ne) {
388    for (nb = ne; *ne; ++ne) {
389      if (*ne == '|') break;
390    }
391    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
392    if (*ne) ++ne;
393  }
394  return equiv;
395}
396
397
398/*
399  Check the typename
400*/
401SWIGRUNTIME swig_cast_info *
402SWIG_TypeCheck(const char *c, swig_type_info *ty) {
403  if (ty) {
404    swig_cast_info *iter = ty->cast;
405    while (iter) {
406      if (strcmp(iter->type->name, c) == 0) {
407        if (iter == ty->cast)
408          return iter;
409        /* Move iter to the top of the linked list */
410        iter->prev->next = iter->next;
411        if (iter->next)
412          iter->next->prev = iter->prev;
413        iter->next = ty->cast;
414        iter->prev = 0;
415        if (ty->cast) ty->cast->prev = iter;
416        ty->cast = iter;
417        return iter;
418      }
419      iter = iter->next;
420    }
421  }
422  return 0;
423}
424
425/*
426  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
427*/
428SWIGRUNTIME swig_cast_info *
429SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
430  if (ty) {
431    swig_cast_info *iter = ty->cast;
432    while (iter) {
433      if (iter->type == from) {
434        if (iter == ty->cast)
435          return iter;
436        /* Move iter to the top of the linked list */
437        iter->prev->next = iter->next;
438        if (iter->next)
439          iter->next->prev = iter->prev;
440        iter->next = ty->cast;
441        iter->prev = 0;
442        if (ty->cast) ty->cast->prev = iter;
443        ty->cast = iter;
444        return iter;
445      }
446      iter = iter->next;
447    }
448  }
449  return 0;
450}
451
452/*
453  Cast a pointer up an inheritance hierarchy
454*/
455SWIGRUNTIMEINLINE void *
456SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
457  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
458}
459
460/*
461   Dynamic pointer casting. Down an inheritance hierarchy
462*/
463SWIGRUNTIME swig_type_info *
464SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
465  swig_type_info *lastty = ty;
466  if (!ty || !ty->dcast) return ty;
467  while (ty && (ty->dcast)) {
468    ty = (*ty->dcast)(ptr);
469    if (ty) lastty = ty;
470  }
471  return lastty;
472}
473
474/*
475  Return the name associated with this type
476*/
477SWIGRUNTIMEINLINE const char *
478SWIG_TypeName(const swig_type_info *ty) {
479  return ty->name;
480}
481
482/*
483  Return the pretty name associated with this type,
484  that is an unmangled type name in a form presentable to the user.
485*/
486SWIGRUNTIME const char *
487SWIG_TypePrettyName(const swig_type_info *type) {
488  /* The "str" field contains the equivalent pretty names of the
489     type, separated by vertical-bar characters.  We choose
490     to print the last name, as it is often (?) the most
491     specific. */
492  if (!type) return NULL;
493  if (type->str != NULL) {
494    const char *last_name = type->str;
495    const char *s;
496    for (s = type->str; *s; s++)
497      if (*s == '|') last_name = s+1;
498    return last_name;
499  }
500  else
501    return type->name;
502}
503
504/*
505   Set the clientdata field for a type
506*/
507SWIGRUNTIME void
508SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
509  swig_cast_info *cast = ti->cast;
510  /* if (ti->clientdata == clientdata) return; */
511  ti->clientdata = clientdata;
512 
513  while (cast) {
514    if (!cast->converter) {
515      swig_type_info *tc = cast->type;
516      if (!tc->clientdata) {
517        SWIG_TypeClientData(tc, clientdata);
518      }
519    }   
520    cast = cast->next;
521  }
522}
523SWIGRUNTIME void
524SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
525  SWIG_TypeClientData(ti, clientdata);
526  ti->owndata = 1;
527}
528 
529/*
530  Search for a swig_type_info structure only by mangled name
531  Search is a O(log #types)
532 
533  We start searching at module start, and finish searching when start == end. 
534  Note: if start == end at the beginning of the function, we go all the way around
535  the circular list.
536*/
537SWIGRUNTIME swig_type_info *
538SWIG_MangledTypeQueryModule(swig_module_info *start, 
539                            swig_module_info *end, 
540                            const char *name) {
541  swig_module_info *iter = start;
542  do {
543    if (iter->size) {
544      register size_t l = 0;
545      register size_t r = iter->size - 1;
546      do {
547        /* since l+r >= 0, we can (>> 1) instead (/ 2) */
548        register size_t i = (l + r) >> 1; 
549        const char *iname = iter->types[i]->name;
550        if (iname) {
551          register int compare = strcmp(name, iname);
552          if (compare == 0) {       
553            return iter->types[i];
554          } else if (compare < 0) {
555            if (i) {
556              r = i - 1;
557            } else {
558              break;
559            }
560          } else if (compare > 0) {
561            l = i + 1;
562          }
563        } else {
564          break; /* should never happen */
565        }
566      } while (l <= r);
567    }
568    iter = iter->next;
569  } while (iter != end);
570  return 0;
571}
572
573/*
574  Search for a swig_type_info structure for either a mangled name or a human readable name.
575  It first searches the mangled names of the types, which is a O(log #types)
576  If a type is not found it then searches the human readable names, which is O(#types).
577 
578  We start searching at module start, and finish searching when start == end. 
579  Note: if start == end at the beginning of the function, we go all the way around
580  the circular list.
581*/
582SWIGRUNTIME swig_type_info *
583SWIG_TypeQueryModule(swig_module_info *start, 
584                     swig_module_info *end, 
585                     const char *name) {
586  /* STEP 1: Search the name field using binary search */
587  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
588  if (ret) {
589    return ret;
590  } else {
591    /* STEP 2: If the type hasn't been found, do a complete search
592       of the str field (the human readable name) */
593    swig_module_info *iter = start;
594    do {
595      register size_t i = 0;
596      for (; i < iter->size; ++i) {
597        if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
598          return iter->types[i];
599      }
600      iter = iter->next;
601    } while (iter != end);
602  }
603 
604  /* neither found a match */
605  return 0;
606}
607
608/*
609   Pack binary data into a string
610*/
611SWIGRUNTIME char *
612SWIG_PackData(char *c, void *ptr, size_t sz) {
613  static const char hex[17] = "0123456789abcdef";
614  register const unsigned char *u = (unsigned char *) ptr;
615  register const unsigned char *eu =  u + sz;
616  for (; u != eu; ++u) {
617    register unsigned char uu = *u;
618    *(c++) = hex[(uu & 0xf0) >> 4];
619    *(c++) = hex[uu & 0xf];
620  }
621  return c;
622}
623
624/*
625   Unpack binary data from a string
626*/
627SWIGRUNTIME const char *
628SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
629  register unsigned char *u = (unsigned char *) ptr;
630  register const unsigned char *eu = u + sz;
631  for (; u != eu; ++u) {
632    register char d = *(c++);
633    register unsigned char uu;
634    if ((d >= '0') && (d <= '9'))
635      uu = ((d - '0') << 4);
636    else if ((d >= 'a') && (d <= 'f'))
637      uu = ((d - ('a'-10)) << 4);
638    else 
639      return (char *) 0;
640    d = *(c++);
641    if ((d >= '0') && (d <= '9'))
642      uu |= (d - '0');
643    else if ((d >= 'a') && (d <= 'f'))
644      uu |= (d - ('a'-10));
645    else 
646      return (char *) 0;
647    *u = uu;
648  }
649  return c;
650}
651
652/*
653   Pack 'void *' into a string buffer.
654*/
655SWIGRUNTIME char *
656SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
657  char *r = buff;
658  if ((2*sizeof(void *) + 2) > bsz) return 0;
659  *(r++) = '_';
660  r = SWIG_PackData(r,&ptr,sizeof(void *));
661  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
662  strcpy(r,name);
663  return buff;
664}
665
666SWIGRUNTIME const char *
667SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
668  if (*c != '_') {
669    if (strcmp(c,"NULL") == 0) {
670      *ptr = (void *) 0;
671      return name;
672    } else {
673      return 0;
674    }
675  }
676  return SWIG_UnpackData(++c,ptr,sizeof(void *));
677}
678
679SWIGRUNTIME char *
680SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
681  char *r = buff;
682  size_t lname = (name ? strlen(name) : 0);
683  if ((2*sz + 2 + lname) > bsz) return 0;
684  *(r++) = '_';
685  r = SWIG_PackData(r,ptr,sz);
686  if (lname) {
687    strncpy(r,name,lname+1);
688  } else {
689    *r = 0;
690  }
691  return buff;
692}
693
694SWIGRUNTIME const char *
695SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
696  if (*c != '_') {
697    if (strcmp(c,"NULL") == 0) {
698      memset(ptr,0,sz);
699      return name;
700    } else {
701      return 0;
702    }
703  }
704  return SWIG_UnpackData(++c,ptr,sz);
705}
706
707#ifdef __cplusplus
708}
709#endif
710
711/*  Errors in SWIG */
712#define  SWIG_UnknownError         -1
713#define  SWIG_IOError              -2
714#define  SWIG_RuntimeError         -3
715#define  SWIG_IndexError           -4
716#define  SWIG_TypeError            -5
717#define  SWIG_DivisionByZero       -6
718#define  SWIG_OverflowError        -7
719#define  SWIG_SyntaxError          -8
720#define  SWIG_ValueError           -9
721#define  SWIG_SystemError          -10
722#define  SWIG_AttributeError       -11
723#define  SWIG_MemoryError          -12
724#define  SWIG_NullReferenceError   -13
725
726
727
728/* Compatibility macros for Python 3 */
729#if PY_VERSION_HEX >= 0x03000000
730
731#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
732#define PyInt_Check(x) PyLong_Check(x)
733#define PyInt_AsLong(x) PyLong_AsLong(x)
734#define PyInt_FromLong(x) PyLong_FromLong(x)
735#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
736#define PyString_Check(name) PyBytes_Check(name)
737#define PyString_FromString(x) PyUnicode_FromString(x)
738#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
739#define PyString_AsString(str) PyBytes_AsString(str)
740#define PyString_Size(str) PyBytes_Size(str)   
741#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
742#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
743#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
744#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
745
746#endif
747
748#ifndef Py_TYPE
749#  define Py_TYPE(op) ((op)->ob_type)
750#endif
751
752/* SWIG APIs for compatibility of both Python 2 & 3 */
753
754#if PY_VERSION_HEX >= 0x03000000
755#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
756#else
757#  define SWIG_Python_str_FromFormat PyString_FromFormat
758#endif
759
760
761/* Warning: This function will allocate a new string in Python 3,
762 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
763 */
764SWIGINTERN char*
765SWIG_Python_str_AsChar(PyObject *str)
766{
767#if PY_VERSION_HEX >= 0x03000000
768  char *cstr;
769  char *newstr;
770  Py_ssize_t len;
771  str = PyUnicode_AsUTF8String(str);
772  PyBytes_AsStringAndSize(str, &cstr, &len);
773  newstr = (char *) malloc(len+1);
774  memcpy(newstr, cstr, len+1);
775  Py_XDECREF(str);
776  return newstr;
777#else
778  return PyString_AsString(str);
779#endif
780}
781
782#if PY_VERSION_HEX >= 0x03000000
783#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
784#else
785#  define SWIG_Python_str_DelForPy3(x)
786#endif
787
788
789SWIGINTERN PyObject*
790SWIG_Python_str_FromChar(const char *c)
791{
792#if PY_VERSION_HEX >= 0x03000000
793  return PyUnicode_FromString(c); 
794#else
795  return PyString_FromString(c);
796#endif
797}
798
799/* Add PyOS_snprintf for old Pythons */
800#if PY_VERSION_HEX < 0x02020000
801# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
802#  define PyOS_snprintf _snprintf
803# else
804#  define PyOS_snprintf snprintf
805# endif
806#endif
807
808/* A crude PyString_FromFormat implementation for old Pythons */
809#if PY_VERSION_HEX < 0x02020000
810
811#ifndef SWIG_PYBUFFER_SIZE
812# define SWIG_PYBUFFER_SIZE 1024
813#endif
814
815static PyObject *
816PyString_FromFormat(const char *fmt, ...) {
817  va_list ap;
818  char buf[SWIG_PYBUFFER_SIZE * 2];
819  int res;
820  va_start(ap, fmt);
821  res = vsnprintf(buf, sizeof(buf), fmt, ap);
822  va_end(ap);
823  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
824}
825#endif
826
827/* Add PyObject_Del for old Pythons */
828#if PY_VERSION_HEX < 0x01060000
829# define PyObject_Del(op) PyMem_DEL((op))
830#endif
831#ifndef PyObject_DEL
832# define PyObject_DEL PyObject_Del
833#endif
834
835/* A crude PyExc_StopIteration exception for old Pythons */
836#if PY_VERSION_HEX < 0x02020000
837# ifndef PyExc_StopIteration
838#  define PyExc_StopIteration PyExc_RuntimeError
839# endif
840# ifndef PyObject_GenericGetAttr
841#  define PyObject_GenericGetAttr 0
842# endif
843#endif
844
845/* Py_NotImplemented is defined in 2.1 and up. */
846#if PY_VERSION_HEX < 0x02010000
847# ifndef Py_NotImplemented
848#  define Py_NotImplemented PyExc_RuntimeError
849# endif
850#endif
851
852/* A crude PyString_AsStringAndSize implementation for old Pythons */
853#if PY_VERSION_HEX < 0x02010000
854# ifndef PyString_AsStringAndSize
855#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
856# endif
857#endif
858
859/* PySequence_Size for old Pythons */
860#if PY_VERSION_HEX < 0x02000000
861# ifndef PySequence_Size
862#  define PySequence_Size PySequence_Length
863# endif
864#endif
865
866/* PyBool_FromLong for old Pythons */
867#if PY_VERSION_HEX < 0x02030000
868static
869PyObject *PyBool_FromLong(long ok)
870{
871  PyObject *result = ok ? Py_True : Py_False;
872  Py_INCREF(result);
873  return result;
874}
875#endif
876
877/* Py_ssize_t for old Pythons */
878/* This code is as recommended by: */
879/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
880#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
881typedef int Py_ssize_t;
882# define PY_SSIZE_T_MAX INT_MAX
883# define PY_SSIZE_T_MIN INT_MIN
884typedef inquiry lenfunc;
885typedef intargfunc ssizeargfunc;
886typedef intintargfunc ssizessizeargfunc;
887typedef intobjargproc ssizeobjargproc;
888typedef intintobjargproc ssizessizeobjargproc;
889typedef getreadbufferproc readbufferproc;
890typedef getwritebufferproc writebufferproc;
891typedef getsegcountproc segcountproc;
892typedef getcharbufferproc charbufferproc;
893static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
894{
895  long result = 0;
896  PyObject *i = PyNumber_Int(x);
897  if (i) {
898    result = PyInt_AsLong(i);
899    Py_DECREF(i);
900  }
901  return result;
902}
903#endif
904
905#if PY_VERSION_HEX < 0x02040000
906#define Py_VISIT(op)                            \
907  do {                                          \
908    if (op) {                                   \
909      int vret = visit((op), arg);              \
910      if (vret)                                 \
911        return vret;                            \
912    }                                           \
913  } while (0)
914#endif
915
916#if PY_VERSION_HEX < 0x02030000
917typedef struct {
918  PyTypeObject type;
919  PyNumberMethods as_number;
920  PyMappingMethods as_mapping;
921  PySequenceMethods as_sequence;
922  PyBufferProcs as_buffer;
923  PyObject *name, *slots;
924} PyHeapTypeObject;
925#endif
926
927#if PY_VERSION_HEX < 0x02030000
928typedef destructor freefunc;
929#endif
930
931#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
932     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
933     (PY_MAJOR_VERSION > 3))
934# define SWIGPY_USE_CAPSULE
935# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
936#endif
937
938#if PY_VERSION_HEX < 0x03020000
939#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
940#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
941#endif
942
943/* -----------------------------------------------------------------------------
944 * error manipulation
945 * ----------------------------------------------------------------------------- */
946
947SWIGRUNTIME PyObject*
948SWIG_Python_ErrorType(int code) {
949  PyObject* type = 0;
950  switch(code) {
951  case SWIG_MemoryError:
952    type = PyExc_MemoryError;
953    break;
954  case SWIG_IOError:
955    type = PyExc_IOError;
956    break;
957  case SWIG_RuntimeError:
958    type = PyExc_RuntimeError;
959    break;
960  case SWIG_IndexError:
961    type = PyExc_IndexError;
962    break;
963  case SWIG_TypeError:
964    type = PyExc_TypeError;
965    break;
966  case SWIG_DivisionByZero:
967    type = PyExc_ZeroDivisionError;
968    break;
969  case SWIG_OverflowError:
970    type = PyExc_OverflowError;
971    break;
972  case SWIG_SyntaxError:
973    type = PyExc_SyntaxError;
974    break;
975  case SWIG_ValueError:
976    type = PyExc_ValueError;
977    break;
978  case SWIG_SystemError:
979    type = PyExc_SystemError;
980    break;
981  case SWIG_AttributeError:
982    type = PyExc_AttributeError;
983    break;
984  default:
985    type = PyExc_RuntimeError;
986  }
987  return type;
988}
989
990
991SWIGRUNTIME void
992SWIG_Python_AddErrorMsg(const char* mesg)
993{
994  PyObject *type = 0;
995  PyObject *value = 0;
996  PyObject *traceback = 0;
997
998  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
999  if (value) {
1000    char *tmp;
1001    PyObject *old_str = PyObject_Str(value);
1002    PyErr_Clear();
1003    Py_XINCREF(type);
1004
1005    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1006    SWIG_Python_str_DelForPy3(tmp);
1007    Py_DECREF(old_str);
1008    Py_DECREF(value);
1009  } else {
1010    PyErr_SetString(PyExc_RuntimeError, mesg);
1011  }
1012}
1013
1014#if defined(SWIG_PYTHON_NO_THREADS)
1015#  if defined(SWIG_PYTHON_THREADS)
1016#    undef SWIG_PYTHON_THREADS
1017#  endif
1018#endif
1019#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1020#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1021#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1022#      define SWIG_PYTHON_USE_GIL
1023#    endif
1024#  endif
1025#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1026#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
1027#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads()
1028#    endif
1029#    ifdef __cplusplus /* C++ code */
1030       class SWIG_Python_Thread_Block {
1031         bool status;
1032         PyGILState_STATE state;
1033       public:
1034         void end() { if (status) { PyGILState_Release(state); status = false;} }
1035         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1036         ~SWIG_Python_Thread_Block() { end(); }
1037       };
1038       class SWIG_Python_Thread_Allow {
1039         bool status;
1040         PyThreadState *save;
1041       public:
1042         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1043         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1044         ~SWIG_Python_Thread_Allow() { end(); }
1045       };
1046#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
1047#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
1048#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
1049#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
1050#    else /* C code */
1051#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1052#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
1053#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1054#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
1055#    endif
1056#  else /* Old thread way, not implemented, user must provide it */
1057#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1058#      define SWIG_PYTHON_INITIALIZE_THREADS
1059#    endif
1060#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1061#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1062#    endif
1063#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1064#      define SWIG_PYTHON_THREAD_END_BLOCK
1065#    endif
1066#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1067#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1068#    endif
1069#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1070#      define SWIG_PYTHON_THREAD_END_ALLOW
1071#    endif
1072#  endif
1073#else /* No thread support */
1074#  define SWIG_PYTHON_INITIALIZE_THREADS
1075#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1076#  define SWIG_PYTHON_THREAD_END_BLOCK
1077#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1078#  define SWIG_PYTHON_THREAD_END_ALLOW
1079#endif
1080
1081/* -----------------------------------------------------------------------------
1082 * Python API portion that goes into the runtime
1083 * ----------------------------------------------------------------------------- */
1084
1085#ifdef __cplusplus
1086extern "C" {
1087#endif
1088
1089/* -----------------------------------------------------------------------------
1090 * Constant declarations
1091 * ----------------------------------------------------------------------------- */
1092
1093/* Constant Types */
1094#define SWIG_PY_POINTER 4
1095#define SWIG_PY_BINARY  5
1096
1097/* Constant information structure */
1098typedef struct swig_const_info {
1099  int type;
1100  char *name;
1101  long lvalue;
1102  double dvalue;
1103  void   *pvalue;
1104  swig_type_info **ptype;
1105} swig_const_info;
1106
1107
1108/* -----------------------------------------------------------------------------
1109 * Wrapper of PyInstanceMethod_New() used in Python 3
1110 * It is exported to the generated module, used for -fastproxy
1111 * ----------------------------------------------------------------------------- */
1112#if PY_VERSION_HEX >= 0x03000000
1113SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1114{
1115  return PyInstanceMethod_New(func);
1116}
1117#else
1118SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1119{
1120  return NULL;
1121}
1122#endif
1123
1124#ifdef __cplusplus
1125}
1126#endif
1127
1128
1129/* -----------------------------------------------------------------------------
1130 * pyrun.swg
1131 *
1132 * This file contains the runtime support for Python modules
1133 * and includes code for managing global variables and pointer
1134 * type checking.
1135 *
1136 * ----------------------------------------------------------------------------- */
1137
1138/* Common SWIG API */
1139
1140/* for raw pointers */
1141#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1142#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1143#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1144
1145#ifdef SWIGPYTHON_BUILTIN
1146#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
1147#else
1148#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1149#endif
1150
1151#define SWIG_InternalNewPointerObj(ptr, type, flags)    SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1152
1153#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty)
1154#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
1155#define swig_owntype                                    int
1156
1157/* for raw packed data */
1158#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1159#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1160
1161/* for class or struct pointers */
1162#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
1163#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
1164
1165/* for C or C++ function pointers */
1166#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1167#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1168
1169/* for C++ member pointers, ie, member methods */
1170#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1171#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1172
1173
1174/* Runtime API */
1175
1176#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
1177#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
1178#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
1179
1180#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                           
1181#define SWIG_SetErrorMsg                                SWIG_Python_SetErrorMsg                           
1182#define SWIG_ErrorType(code)                            SWIG_Python_ErrorType(code)                       
1183#define SWIG_Error(code, msg)                           SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1184#define SWIG_fail                                       goto fail                                         
1185
1186
1187/* Runtime API implementation */
1188
1189/* Error manipulation */
1190
1191SWIGINTERN void 
1192SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1193  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
1194  PyErr_SetObject(errtype, obj);
1195  Py_DECREF(obj);
1196  SWIG_PYTHON_THREAD_END_BLOCK;
1197}
1198
1199SWIGINTERN void 
1200SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1201  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1202  PyErr_SetString(errtype, msg);
1203  SWIG_PYTHON_THREAD_END_BLOCK;
1204}
1205
1206#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1207
1208/* Set a constant value */
1209
1210#if defined(SWIGPYTHON_BUILTIN)
1211
1212SWIGINTERN void
1213SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1214  PyObject *s = PyString_InternFromString(key);
1215  PyList_Append(seq, s);
1216  Py_DECREF(s);
1217}
1218
1219SWIGINTERN void
1220SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
1221#if PY_VERSION_HEX < 0x02030000
1222  PyDict_SetItemString(d, (char *)name, obj);
1223#else
1224  PyDict_SetItemString(d, name, obj);
1225#endif
1226  Py_DECREF(obj);
1227  if (public_interface)
1228    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1229}
1230
1231#else
1232
1233SWIGINTERN void
1234SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
1235#if PY_VERSION_HEX < 0x02030000
1236  PyDict_SetItemString(d, (char *)name, obj);
1237#else
1238  PyDict_SetItemString(d, name, obj);
1239#endif
1240  Py_DECREF(obj);                           
1241}
1242
1243#endif
1244
1245/* Append a value to the result obj */
1246
1247SWIGINTERN PyObject*
1248SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1249#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1250  if (!result) {
1251    result = obj;
1252  } else if (result == Py_None) {
1253    Py_DECREF(result);
1254    result = obj;
1255  } else {
1256    if (!PyList_Check(result)) {
1257      PyObject *o2 = result;
1258      result = PyList_New(1);
1259      PyList_SetItem(result, 0, o2);
1260    }
1261    PyList_Append(result,obj);
1262    Py_DECREF(obj);
1263  }
1264  return result;
1265#else
1266  PyObject*   o2;
1267  PyObject*   o3;
1268  if (!result) {
1269    result = obj;
1270  } else if (result == Py_None) {
1271    Py_DECREF(result);
1272    result = obj;
1273  } else {
1274    if (!PyTuple_Check(result)) {
1275      o2 = result;
1276      result = PyTuple_New(1);
1277      PyTuple_SET_ITEM(result, 0, o2);
1278    }
1279    o3 = PyTuple_New(1);
1280    PyTuple_SET_ITEM(o3, 0, obj);
1281    o2 = result;
1282    result = PySequence_Concat(o2, o3);
1283    Py_DECREF(o2);
1284    Py_DECREF(o3);
1285  }
1286  return result;
1287#endif
1288}
1289
1290/* Unpack the argument tuple */
1291
1292SWIGINTERN int
1293SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1294{
1295  if (!args) {
1296    if (!min && !max) {
1297      return 1;
1298    } else {
1299      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
1300                   name, (min == max ? "" : "at least "), (int)min);
1301      return 0;
1302    }
1303  } 
1304  if (!PyTuple_Check(args)) {
1305    if (min <= 1 && max >= 1) {
1306      register int i;
1307      objs[0] = args;
1308      for (i = 1; i < max; ++i) {
1309        objs[i] = 0;
1310      }
1311      return 2;
1312    }
1313    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1314    return 0;
1315  } else {
1316    register Py_ssize_t l = PyTuple_GET_SIZE(args);
1317    if (l < min) {
1318      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
1319                   name, (min == max ? "" : "at least "), (int)min, (int)l);
1320      return 0;
1321    } else if (l > max) {
1322      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
1323                   name, (min == max ? "" : "at most "), (int)max, (int)l);
1324      return 0;
1325    } else {
1326      register int i;
1327      for (i = 0; i < l; ++i) {
1328        objs[i] = PyTuple_GET_ITEM(args, i);
1329      }
1330      for (; l < max; ++l) {
1331        objs[l] = 0;
1332      }
1333      return i + 1;
1334    }   
1335  }
1336}
1337
1338/* A functor is a function object with one single object argument */
1339#if PY_VERSION_HEX >= 0x02020000
1340#define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunctionObjArgs(functor, obj, NULL);
1341#else
1342#define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunction(functor, "O", obj);
1343#endif
1344
1345/*
1346  Helper for static pointer initialization for both C and C++ code, for example
1347  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1348*/
1349#ifdef __cplusplus
1350#define SWIG_STATIC_POINTER(var)  var
1351#else
1352#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
1353#endif
1354
1355/* -----------------------------------------------------------------------------
1356 * Pointer declarations
1357 * ----------------------------------------------------------------------------- */
1358
1359/* Flags for new pointer objects */
1360#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
1361#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1362
1363#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
1364
1365#define SWIG_BUILTIN_TP_INIT        (SWIG_POINTER_OWN << 2)
1366#define SWIG_BUILTIN_INIT           (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1367
1368#ifdef __cplusplus
1369extern "C" {
1370#endif
1371
1372/*  How to access Py_None */
1373#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1374#  ifndef SWIG_PYTHON_NO_BUILD_NONE
1375#    ifndef SWIG_PYTHON_BUILD_NONE
1376#      define SWIG_PYTHON_BUILD_NONE
1377#    endif
1378#  endif
1379#endif
1380
1381#ifdef SWIG_PYTHON_BUILD_NONE
1382#  ifdef Py_None
1383#   undef Py_None
1384#   define Py_None SWIG_Py_None()
1385#  endif
1386SWIGRUNTIMEINLINE PyObject * 
1387_SWIG_Py_None(void)
1388{
1389  PyObject *none = Py_BuildValue((char*)"");
1390  Py_DECREF(none);
1391  return none;
1392}
1393SWIGRUNTIME PyObject * 
1394SWIG_Py_None(void)
1395{
1396  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1397  return none;
1398}
1399#endif
1400
1401/* The python void return value */
1402
1403SWIGRUNTIMEINLINE PyObject * 
1404SWIG_Py_Void(void)
1405{
1406  PyObject *none = Py_None;
1407  Py_INCREF(none);
1408  return none;
1409}
1410
1411/* SwigPyClientData */
1412
1413typedef struct {
1414  PyObject *klass;
1415  PyObject *newraw;
1416  PyObject *newargs;
1417  PyObject *destroy;
1418  int delargs;
1419  int implicitconv;
1420  PyTypeObject *pytype;
1421} SwigPyClientData;
1422
1423SWIGRUNTIMEINLINE int 
1424SWIG_Python_CheckImplicit(swig_type_info *ty)
1425{
1426  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1427  return data ? data->implicitconv : 0;
1428}
1429
1430SWIGRUNTIMEINLINE PyObject *
1431SWIG_Python_ExceptionType(swig_type_info *desc) {
1432  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1433  PyObject *klass = data ? data->klass : 0;
1434  return (klass ? klass : PyExc_RuntimeError);
1435}
1436
1437
1438SWIGRUNTIME SwigPyClientData * 
1439SwigPyClientData_New(PyObject* obj)
1440{
1441  if (!obj) {
1442    return 0;
1443  } else {
1444    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1445    /* the klass element */
1446    data->klass = obj;
1447    Py_INCREF(data->klass);
1448    /* the newraw method and newargs arguments used to create a new raw instance */
1449    if (PyClass_Check(obj)) {
1450      data->newraw = 0;
1451      data->newargs = obj;
1452      Py_INCREF(obj);
1453    } else {
1454#if (PY_VERSION_HEX < 0x02020000)
1455      data->newraw = 0;
1456#else
1457      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1458#endif
1459      if (data->newraw) {
1460        Py_INCREF(data->newraw);
1461        data->newargs = PyTuple_New(1);
1462        PyTuple_SetItem(data->newargs, 0, obj);
1463      } else {
1464        data->newargs = obj;
1465      }
1466      Py_INCREF(data->newargs);
1467    }
1468    /* the destroy method, aka as the C++ delete method */
1469    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1470    if (PyErr_Occurred()) {
1471      PyErr_Clear();
1472      data->destroy = 0;
1473    }
1474    if (data->destroy) {
1475      int flags;
1476      Py_INCREF(data->destroy);
1477      flags = PyCFunction_GET_FLAGS(data->destroy);
1478#ifdef METH_O
1479      data->delargs = !(flags & (METH_O));
1480#else
1481      data->delargs = 0;
1482#endif
1483    } else {
1484      data->delargs = 0;
1485    }
1486    data->implicitconv = 0;
1487    data->pytype = 0;
1488    return data;
1489  }
1490}
1491
1492SWIGRUNTIME void 
1493SwigPyClientData_Del(SwigPyClientData *data) {
1494  Py_XDECREF(data->newraw);
1495  Py_XDECREF(data->newargs);
1496  Py_XDECREF(data->destroy);
1497}
1498
1499/* =============== SwigPyObject =====================*/
1500
1501typedef struct {
1502  PyObject_HEAD
1503  void *ptr;
1504  swig_type_info *ty;
1505  int own;
1506  PyObject *next;
1507#ifdef SWIGPYTHON_BUILTIN
1508  PyObject *dict;
1509#endif
1510} SwigPyObject;
1511
1512SWIGRUNTIME PyObject *
1513SwigPyObject_long(SwigPyObject *v)
1514{
1515  return PyLong_FromVoidPtr(v->ptr);
1516}
1517
1518SWIGRUNTIME PyObject *
1519SwigPyObject_format(const char* fmt, SwigPyObject *v)
1520{
1521  PyObject *res = NULL;
1522  PyObject *args = PyTuple_New(1);
1523  if (args) {
1524    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1525      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1526      if (ofmt) {
1527#if PY_VERSION_HEX >= 0x03000000
1528        res = PyUnicode_Format(ofmt,args);
1529#else
1530        res = PyString_Format(ofmt,args);
1531#endif
1532        Py_DECREF(ofmt);
1533      }
1534      Py_DECREF(args);
1535    }
1536  }
1537  return res;
1538}
1539
1540SWIGRUNTIME PyObject *
1541SwigPyObject_oct(SwigPyObject *v)
1542{
1543  return SwigPyObject_format("%o",v);
1544}
1545
1546SWIGRUNTIME PyObject *
1547SwigPyObject_hex(SwigPyObject *v)
1548{
1549  return SwigPyObject_format("%x",v);
1550}
1551
1552SWIGRUNTIME PyObject *
1553#ifdef METH_NOARGS
1554SwigPyObject_repr(SwigPyObject *v)
1555#else
1556SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1557#endif
1558{
1559  const char *name = SWIG_TypePrettyName(v->ty);
1560  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1561  if (v->next) {
1562# ifdef METH_NOARGS
1563    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1564# else
1565    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1566# endif
1567# if PY_VERSION_HEX >= 0x03000000
1568    PyObject *joined = PyUnicode_Concat(repr, nrep);
1569    Py_DecRef(repr);
1570    Py_DecRef(nrep);
1571    repr = joined;
1572# else
1573    PyString_ConcatAndDel(&repr,nrep);
1574# endif
1575  }
1576  return repr; 
1577}
1578
1579SWIGRUNTIME int
1580SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1581{
1582  char *str;
1583#ifdef METH_NOARGS
1584  PyObject *repr = SwigPyObject_repr(v);
1585#else
1586  PyObject *repr = SwigPyObject_repr(v, NULL);
1587#endif
1588  if (repr) {
1589    str = SWIG_Python_str_AsChar(repr); 
1590    fputs(str, fp);
1591    SWIG_Python_str_DelForPy3(str);
1592    Py_DECREF(repr);
1593    return 0; 
1594  } else {
1595    return 1; 
1596  }
1597}
1598
1599SWIGRUNTIME PyObject *
1600SwigPyObject_str(SwigPyObject *v)
1601{
1602  char result[SWIG_BUFFER_SIZE];
1603  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1604    SWIG_Python_str_FromChar(result) : 0;
1605}
1606
1607SWIGRUNTIME int
1608SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1609{
1610  void *i = v->ptr;
1611  void *j = w->ptr;
1612  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1613}
1614
1615/* Added for Python 3.x, would it also be useful for Python 2.x? */
1616SWIGRUNTIME PyObject*
1617SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1618{
1619  PyObject* res;
1620  if( op != Py_EQ && op != Py_NE ) {
1621    Py_INCREF(Py_NotImplemented);
1622    return Py_NotImplemented;
1623  }
1624  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1625  return res; 
1626}
1627
1628
1629SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1630
1631#ifdef SWIGPYTHON_BUILTIN
1632static swig_type_info *SwigPyObject_stype = 0;
1633SWIGRUNTIME PyTypeObject*
1634SwigPyObject_type(void) {
1635    SwigPyClientData *cd;
1636    assert(SwigPyObject_stype);
1637    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1638    assert(cd);
1639    assert(cd->pytype);
1640    return cd->pytype;
1641}
1642#else
1643SWIGRUNTIME PyTypeObject*
1644SwigPyObject_type(void) {
1645  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1646  return type;
1647}
1648#endif
1649
1650SWIGRUNTIMEINLINE int
1651SwigPyObject_Check(PyObject *op) {
1652#ifdef SWIGPYTHON_BUILTIN
1653  PyTypeObject *target_tp = SwigPyObject_type();
1654  if (PyType_IsSubtype(op->ob_type, target_tp))
1655    return 1;
1656  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1657#else
1658  return (Py_TYPE(op) == SwigPyObject_type())
1659    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1660#endif
1661}
1662
1663SWIGRUNTIME PyObject *
1664SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1665
1666SWIGRUNTIME void
1667SwigPyObject_dealloc(PyObject *v)
1668{
1669  SwigPyObject *sobj = (SwigPyObject *) v;
1670  PyObject *next = sobj->next;
1671  if (sobj->own == SWIG_POINTER_OWN) {
1672    swig_type_info *ty = sobj->ty;
1673    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1674    PyObject *destroy = data ? data->destroy : 0;
1675    if (destroy) {
1676      /* destroy is always a VARARGS method */
1677      PyObject *res;
1678      if (data->delargs) {
1679        /* we need to create a temporary object to carry the destroy operation */
1680        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1681        res = SWIG_Python_CallFunctor(destroy, tmp);
1682        Py_DECREF(tmp);
1683      } else {
1684        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1685        PyObject *mself = PyCFunction_GET_SELF(destroy);
1686        res = ((*meth)(mself, v));
1687      }
1688      Py_XDECREF(res);
1689    } 
1690#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1691    else {
1692      const char *name = SWIG_TypePrettyName(ty);
1693      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1694    }
1695#endif
1696  } 
1697  Py_XDECREF(next);
1698  PyObject_DEL(v);
1699}
1700
1701SWIGRUNTIME PyObject* 
1702SwigPyObject_append(PyObject* v, PyObject* next)
1703{
1704  SwigPyObject *sobj = (SwigPyObject *) v;
1705#ifndef METH_O
1706  PyObject *tmp = 0;
1707  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1708  next = tmp;
1709#endif
1710  if (!SwigPyObject_Check(next)) {
1711    return NULL;
1712  }
1713  sobj->next = next;
1714  Py_INCREF(next);
1715  return SWIG_Py_Void();
1716}
1717
1718SWIGRUNTIME PyObject* 
1719#ifdef METH_NOARGS
1720SwigPyObject_next(PyObject* v)
1721#else
1722SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1723#endif
1724{
1725  SwigPyObject *sobj = (SwigPyObject *) v;
1726  if (sobj->next) {   
1727    Py_INCREF(sobj->next);
1728    return sobj->next;
1729  } else {
1730    return SWIG_Py_Void();
1731  }
1732}
1733
1734SWIGINTERN PyObject*
1735#ifdef METH_NOARGS
1736SwigPyObject_disown(PyObject *v)
1737#else
1738SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1739#endif
1740{
1741  SwigPyObject *sobj = (SwigPyObject *)v;
1742  sobj->own = 0;
1743  return SWIG_Py_Void();
1744}
1745
1746SWIGINTERN PyObject*
1747#ifdef METH_NOARGS
1748SwigPyObject_acquire(PyObject *v)
1749#else
1750SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1751#endif
1752{
1753  SwigPyObject *sobj = (SwigPyObject *)v;
1754  sobj->own = SWIG_POINTER_OWN;
1755  return SWIG_Py_Void();
1756}
1757
1758SWIGINTERN PyObject*
1759SwigPyObject_own(PyObject *v, PyObject *args)
1760{
1761  PyObject *val = 0;
1762#if (PY_VERSION_HEX < 0x02020000)
1763  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1764#elif (PY_VERSION_HEX < 0x02050000)
1765  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
1766#else
1767  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
1768#endif
1769    {
1770      return NULL;
1771    } 
1772  else
1773    {
1774      SwigPyObject *sobj = (SwigPyObject *)v;
1775      PyObject *obj = PyBool_FromLong(sobj->own);
1776      if (val) {
1777#ifdef METH_NOARGS
1778        if (PyObject_IsTrue(val)) {
1779          SwigPyObject_acquire(v);
1780        } else {
1781          SwigPyObject_disown(v);
1782        }
1783#else
1784        if (PyObject_IsTrue(val)) {
1785          SwigPyObject_acquire(v,args);
1786        } else {
1787          SwigPyObject_disown(v,args);
1788        }
1789#endif
1790      } 
1791      return obj;
1792    }
1793}
1794
1795#ifdef METH_O
1796static PyMethodDef
1797swigobject_methods[] = {
1798  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
1799  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
1800  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1801  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
1802  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
1803  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
1804  {0, 0, 0, 0} 
1805};
1806#else
1807static PyMethodDef
1808swigobject_methods[] = {
1809  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
1810  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
1811  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
1812  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
1813  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
1814  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
1815  {0, 0, 0, 0} 
1816};
1817#endif
1818
1819#if PY_VERSION_HEX < 0x02020000
1820SWIGINTERN PyObject *
1821SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1822{
1823  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1824}
1825#endif
1826
1827SWIGRUNTIME PyTypeObject*
1828SwigPyObject_TypeOnce(void) {
1829  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1830
1831  static PyNumberMethods SwigPyObject_as_number = {
1832    (binaryfunc)0, /*nb_add*/
1833    (binaryfunc)0, /*nb_subtract*/
1834    (binaryfunc)0, /*nb_multiply*/
1835    /* nb_divide removed in Python 3 */
1836#if PY_VERSION_HEX < 0x03000000
1837    (binaryfunc)0, /*nb_divide*/
1838#endif
1839    (binaryfunc)0, /*nb_remainder*/
1840    (binaryfunc)0, /*nb_divmod*/
1841    (ternaryfunc)0,/*nb_power*/
1842    (unaryfunc)0,  /*nb_negative*/
1843    (unaryfunc)0,  /*nb_positive*/
1844    (unaryfunc)0,  /*nb_absolute*/
1845    (inquiry)0,    /*nb_nonzero*/
1846    0,             /*nb_invert*/
1847    0,             /*nb_lshift*/
1848    0,             /*nb_rshift*/
1849    0,             /*nb_and*/
1850    0,             /*nb_xor*/
1851    0,             /*nb_or*/
1852#if PY_VERSION_HEX < 0x03000000
1853    0,   /*nb_coerce*/
1854#endif
1855    (unaryfunc)SwigPyObject_long, /*nb_int*/
1856#if PY_VERSION_HEX < 0x03000000
1857    (unaryfunc)SwigPyObject_long, /*nb_long*/
1858#else
1859    0, /*nb_reserved*/
1860#endif
1861    (unaryfunc)0,                 /*nb_float*/
1862#if PY_VERSION_HEX < 0x03000000
1863    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
1864    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
1865#endif
1866#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1867    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1868#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1869    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1870#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1871    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1872#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1873    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1874#endif
1875  };
1876
1877  static PyTypeObject swigpyobject_type;
1878  static int type_init = 0;
1879  if (!type_init) {
1880    const PyTypeObject tmp = {
1881      /* PyObject header changed in Python 3 */
1882#if PY_VERSION_HEX >= 0x03000000
1883      PyVarObject_HEAD_INIT(NULL, 0)
1884#else
1885      PyObject_HEAD_INIT(NULL)
1886      0,                                    /* ob_size */
1887#endif
1888      (char *)"SwigPyObject",               /* tp_name */
1889      sizeof(SwigPyObject),                 /* tp_basicsize */
1890      0,                                    /* tp_itemsize */
1891      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
1892      (printfunc)SwigPyObject_print,        /* tp_print */
1893#if PY_VERSION_HEX < 0x02020000
1894      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
1895#else
1896      (getattrfunc)0,                       /* tp_getattr */
1897#endif
1898      (setattrfunc)0,                       /* tp_setattr */
1899#if PY_VERSION_HEX >= 0x03000000
1900    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1901#else
1902      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
1903#endif
1904      (reprfunc)SwigPyObject_repr,          /* tp_repr */
1905      &SwigPyObject_as_number,              /* tp_as_number */
1906      0,                                    /* tp_as_sequence */
1907      0,                                    /* tp_as_mapping */
1908      (hashfunc)0,                          /* tp_hash */
1909      (ternaryfunc)0,                       /* tp_call */
1910      (reprfunc)SwigPyObject_str,           /* tp_str */
1911      PyObject_GenericGetAttr,              /* tp_getattro */
1912      0,                                    /* tp_setattro */
1913      0,                                    /* tp_as_buffer */
1914      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
1915      swigobject_doc,                       /* tp_doc */
1916      0,                                    /* tp_traverse */
1917      0,                                    /* tp_clear */
1918      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1919      0,                                    /* tp_weaklistoffset */
1920#if PY_VERSION_HEX >= 0x02020000
1921      0,                                    /* tp_iter */
1922      0,                                    /* tp_iternext */
1923      swigobject_methods,                   /* tp_methods */
1924      0,                                    /* tp_members */
1925      0,                                    /* tp_getset */
1926      0,                                    /* tp_base */
1927      0,                                    /* tp_dict */
1928      0,                                    /* tp_descr_get */
1929      0,                                    /* tp_descr_set */
1930      0,                                    /* tp_dictoffset */
1931      0,                                    /* tp_init */
1932      0,                                    /* tp_alloc */
1933      0,                                    /* tp_new */
1934      0,                                    /* tp_free */
1935      0,                                    /* tp_is_gc */
1936      0,                                    /* tp_bases */
1937      0,                                    /* tp_mro */
1938      0,                                    /* tp_cache */
1939      0,                                    /* tp_subclasses */
1940      0,                                    /* tp_weaklist */
1941#endif
1942#if PY_VERSION_HEX >= 0x02030000
1943      0,                                    /* tp_del */
1944#endif
1945#if PY_VERSION_HEX >= 0x02060000
1946      0,                                    /* tp_version */
1947#endif
1948#ifdef COUNT_ALLOCS
1949      0,0,0,0                               /* tp_alloc -> tp_next */
1950#endif
1951    };
1952    swigpyobject_type = tmp;
1953    type_init = 1;
1954#if PY_VERSION_HEX < 0x02020000
1955    swigpyobject_type.ob_type = &PyType_Type;
1956#else
1957    if (PyType_Ready(&swigpyobject_type) < 0)
1958      return NULL;
1959#endif
1960  }
1961  return &swigpyobject_type;
1962}
1963
1964SWIGRUNTIME PyObject *
1965SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1966{
1967  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1968  if (sobj) {
1969    sobj->ptr  = ptr;
1970    sobj->ty   = ty;
1971    sobj->own  = own;
1972    sobj->next = 0;
1973  }
1974  return (PyObject *)sobj;
1975}
1976
1977/* -----------------------------------------------------------------------------
1978 * Implements a simple Swig Packed type, and use it instead of string
1979 * ----------------------------------------------------------------------------- */
1980
1981typedef struct {
1982  PyObject_HEAD
1983  void *pack;
1984  swig_type_info *ty;
1985  size_t size;
1986} SwigPyPacked;
1987
1988SWIGRUNTIME int
1989SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1990{
1991  char result[SWIG_BUFFER_SIZE];
1992  fputs("<Swig Packed ", fp); 
1993  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1994    fputs("at ", fp); 
1995    fputs(result, fp); 
1996  }
1997  fputs(v->ty->name,fp); 
1998  fputs(">", fp);
1999  return 0; 
2000}
2001 
2002SWIGRUNTIME PyObject *
2003SwigPyPacked_repr(SwigPyPacked *v)
2004{
2005  char result[SWIG_BUFFER_SIZE];
2006  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2007    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2008  } else {
2009    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2010  } 
2011}
2012
2013SWIGRUNTIME PyObject *
2014SwigPyPacked_str(SwigPyPacked *v)
2015{
2016  char result[SWIG_BUFFER_SIZE];
2017  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2018    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2019  } else {
2020    return SWIG_Python_str_FromChar(v->ty->name);
2021  } 
2022}
2023
2024SWIGRUNTIME int
2025SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2026{
2027  size_t i = v->size;
2028  size_t j = w->size;
2029  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2030  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2031}
2032
2033SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2034
2035SWIGRUNTIME PyTypeObject*
2036SwigPyPacked_type(void) {
2037  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2038  return type;
2039}
2040
2041SWIGRUNTIMEINLINE int
2042SwigPyPacked_Check(PyObject *op) {
2043  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
2044    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2045}
2046
2047SWIGRUNTIME void
2048SwigPyPacked_dealloc(PyObject *v)
2049{
2050  if (SwigPyPacked_Check(v)) {
2051    SwigPyPacked *sobj = (SwigPyPacked *) v;
2052    free(sobj->pack);
2053  }
2054  PyObject_DEL(v);
2055}
2056
2057SWIGRUNTIME PyTypeObject*
2058SwigPyPacked_TypeOnce(void) {
2059  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2060  static PyTypeObject swigpypacked_type;
2061  static int type_init = 0;
2062  if (!type_init) {
2063    const PyTypeObject tmp = {
2064      /* PyObject header changed in Python 3 */
2065#if PY_VERSION_HEX>=0x03000000
2066      PyVarObject_HEAD_INIT(NULL, 0)
2067#else
2068      PyObject_HEAD_INIT(NULL)
2069      0,                                    /* ob_size */
2070#endif
2071      (char *)"SwigPyPacked",               /* tp_name */
2072      sizeof(SwigPyPacked),                 /* tp_basicsize */
2073      0,                                    /* tp_itemsize */
2074      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
2075      (printfunc)SwigPyPacked_print,        /* tp_print */
2076      (getattrfunc)0,                       /* tp_getattr */
2077      (setattrfunc)0,                       /* tp_setattr */
2078#if PY_VERSION_HEX>=0x03000000
2079      0, /* tp_reserved in 3.0.1 */
2080#else
2081      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
2082#endif
2083      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
2084      0,                                    /* tp_as_number */
2085      0,                                    /* tp_as_sequence */
2086      0,                                    /* tp_as_mapping */
2087      (hashfunc)0,                          /* tp_hash */
2088      (ternaryfunc)0,                       /* tp_call */
2089      (reprfunc)SwigPyPacked_str,           /* tp_str */
2090      PyObject_GenericGetAttr,              /* tp_getattro */
2091      0,                                    /* tp_setattro */
2092      0,                                    /* tp_as_buffer */
2093      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
2094      swigpacked_doc,                       /* tp_doc */
2095      0,                                    /* tp_traverse */
2096      0,                                    /* tp_clear */
2097      0,                                    /* tp_richcompare */
2098      0,                                    /* tp_weaklistoffset */
2099#if PY_VERSION_HEX >= 0x02020000
2100      0,                                    /* tp_iter */
2101      0,                                    /* tp_iternext */
2102      0,                                    /* tp_methods */
2103      0,                                    /* tp_members */
2104      0,                                    /* tp_getset */
2105      0,                                    /* tp_base */
2106      0,                                    /* tp_dict */
2107      0,                                    /* tp_descr_get */
2108      0,                                    /* tp_descr_set */
2109      0,                                    /* tp_dictoffset */
2110      0,                                    /* tp_init */
2111      0,                                    /* tp_alloc */
2112      0,                                    /* tp_new */
2113      0,                                    /* tp_free */
2114      0,                                    /* tp_is_gc */
2115      0,                                    /* tp_bases */
2116      0,                                    /* tp_mro */
2117      0,                                    /* tp_cache */
2118      0,                                    /* tp_subclasses */
2119      0,                                    /* tp_weaklist */
2120#endif
2121#if PY_VERSION_HEX >= 0x02030000
2122      0,                                    /* tp_del */
2123#endif
2124#if PY_VERSION_HEX >= 0x02060000
2125      0,                                    /* tp_version */
2126#endif
2127#ifdef COUNT_ALLOCS
2128      0,0,0,0                               /* tp_alloc -> tp_next */
2129#endif
2130    };
2131    swigpypacked_type = tmp;
2132    type_init = 1;
2133#if PY_VERSION_HEX < 0x02020000
2134    swigpypacked_type.ob_type = &PyType_Type;
2135#else
2136    if (PyType_Ready(&swigpypacked_type) < 0)
2137      return NULL;
2138#endif
2139  }
2140  return &swigpypacked_type;
2141}
2142
2143SWIGRUNTIME PyObject *
2144SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2145{
2146  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2147  if (sobj) {
2148    void *pack = malloc(size);
2149    if (pack) {
2150      memcpy(pack, ptr, size);
2151      sobj->pack = pack;
2152      sobj->ty   = ty;
2153      sobj->size = size;
2154    } else {
2155      PyObject_DEL((PyObject *) sobj);
2156      sobj = 0;
2157    }
2158  }
2159  return (PyObject *) sobj;
2160}
2161
2162SWIGRUNTIME swig_type_info *
2163SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2164{
2165  if (SwigPyPacked_Check(obj)) {
2166    SwigPyPacked *sobj = (SwigPyPacked *)obj;
2167    if (sobj->size != size) return 0;
2168    memcpy(ptr, sobj->pack, size);
2169    return sobj->ty;
2170  } else {
2171    return 0;
2172  }
2173}
2174
2175/* -----------------------------------------------------------------------------
2176 * pointers/data manipulation
2177 * ----------------------------------------------------------------------------- */
2178
2179SWIGRUNTIMEINLINE PyObject *
2180_SWIG_This(void)
2181{
2182    return SWIG_Python_str_FromChar("this");
2183}
2184
2185static PyObject *swig_this = NULL;
2186
2187SWIGRUNTIME PyObject *
2188SWIG_This(void)
2189{
2190  if (swig_this == NULL)
2191    swig_this = _SWIG_This();
2192  return swig_this;
2193}
2194
2195/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2196
2197/* TODO: I don't know how to implement the fast getset in Python 3 right now */
2198#if PY_VERSION_HEX>=0x03000000
2199#define SWIG_PYTHON_SLOW_GETSET_THIS
2200#endif
2201
2202SWIGRUNTIME SwigPyObject *
2203SWIG_Python_GetSwigThis(PyObject *pyobj) 
2204{
2205  PyObject *obj;
2206
2207  if (SwigPyObject_Check(pyobj))
2208    return (SwigPyObject *) pyobj;
2209
2210#ifdef SWIGPYTHON_BUILTIN
2211  (void)obj;
2212# ifdef PyWeakref_CheckProxy
2213  if (PyWeakref_CheckProxy(pyobj)) {
2214    pyobj = PyWeakref_GET_OBJECT(pyobj);
2215    if (pyobj && SwigPyObject_Check(pyobj))
2216      return (SwigPyObject*) pyobj;
2217  }
2218# endif
2219  return NULL;
2220#else
2221
2222  obj = 0;
2223
2224#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2225  if (PyInstance_Check(pyobj)) {
2226    obj = _PyInstance_Lookup(pyobj, SWIG_This());     
2227  } else {
2228    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2229    if (dictptr != NULL) {
2230      PyObject *dict = *dictptr;
2231      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2232    } else {
2233#ifdef PyWeakref_CheckProxy
2234      if (PyWeakref_CheckProxy(pyobj)) {
2235        PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2236        return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2237      }
2238#endif
2239      obj = PyObject_GetAttr(pyobj,SWIG_This());
2240      if (obj) {
2241        Py_DECREF(obj);
2242      } else {
2243        if (PyErr_Occurred()) PyErr_Clear();
2244        return 0;
2245      }
2246    }
2247  }
2248#else
2249  obj = PyObject_GetAttr(pyobj,SWIG_This());
2250  if (obj) {
2251    Py_DECREF(obj);
2252  } else {
2253    if (PyErr_Occurred()) PyErr_Clear();
2254    return 0;
2255  }
2256#endif
2257  if (obj && !SwigPyObject_Check(obj)) {
2258    /* a PyObject is called 'this', try to get the 'real this'
2259       SwigPyObject from it */ 
2260    return SWIG_Python_GetSwigThis(obj);
2261  }
2262  return (SwigPyObject *)obj;
2263#endif
2264}
2265
2266/* Acquire a pointer value */
2267
2268SWIGRUNTIME int
2269SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2270  if (own == SWIG_POINTER_OWN) {
2271    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2272    if (sobj) {
2273      int oldown = sobj->own;
2274      sobj->own = own;
2275      return oldown;
2276    }
2277  }
2278  return 0;
2279}
2280
2281/* Convert a pointer value */
2282
2283SWIGRUNTIME int
2284SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2285  int res;
2286  SwigPyObject *sobj;
2287
2288  if (!obj)
2289    return SWIG_ERROR;
2290  if (obj == Py_None) {
2291    if (ptr)
2292      *ptr = 0;
2293    return SWIG_OK;
2294  }
2295
2296  res = SWIG_ERROR;
2297
2298  sobj = SWIG_Python_GetSwigThis(obj);
2299  if (own)
2300    *own = 0;
2301  while (sobj) {
2302    void *vptr = sobj->ptr;
2303    if (ty) {
2304      swig_type_info *to = sobj->ty;
2305      if (to == ty) {
2306        /* no type cast needed */
2307        if (ptr) *ptr = vptr;
2308        break;
2309      } else {
2310        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2311        if (!tc) {
2312          sobj = (SwigPyObject *)sobj->next;
2313        } else {
2314          if (ptr) {
2315            int newmemory = 0;
2316            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2317            if (newmemory == SWIG_CAST_NEW_MEMORY) {
2318              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2319              if (own)
2320                *own = *own | SWIG_CAST_NEW_MEMORY;
2321            }
2322          }
2323          break;
2324        }
2325      }
2326    } else {
2327      if (ptr) *ptr = vptr;
2328      break;
2329    }
2330  }
2331  if (sobj) {
2332    if (own)
2333      *own = *own | sobj->own;
2334    if (flags & SWIG_POINTER_DISOWN) {
2335      sobj->own = 0;
2336    }
2337    res = SWIG_OK;
2338  } else {
2339    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2340      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2341      if (data && !data->implicitconv) {
2342        PyObject *klass = data->klass;
2343        if (klass) {
2344          PyObject *impconv;
2345          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2346          impconv = SWIG_Python_CallFunctor(klass, obj);
2347          data->implicitconv = 0;
2348          if (PyErr_Occurred()) {
2349            PyErr_Clear();
2350            impconv = 0;
2351          }
2352          if (impconv) {
2353            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2354            if (iobj) {
2355              void *vptr;
2356              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2357              if (SWIG_IsOK(res)) {
2358                if (ptr) {
2359                  *ptr = vptr;
2360                  /* transfer the ownership to 'ptr' */
2361                  iobj->own = 0;
2362                  res = SWIG_AddCast(res);
2363                  res = SWIG_AddNewMask(res);
2364                } else {
2365                  res = SWIG_AddCast(res);                 
2366                }
2367              }
2368            }
2369            Py_DECREF(impconv);
2370          }
2371        }
2372      }
2373    }
2374  }
2375  return res;
2376}
2377
2378/* Convert a function ptr value */
2379
2380SWIGRUNTIME int
2381SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2382  if (!PyCFunction_Check(obj)) {
2383    return SWIG_ConvertPtr(obj, ptr, ty, 0);
2384  } else {
2385    void *vptr = 0;
2386   
2387    /* here we get the method pointer for callbacks */
2388    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2389    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2390    if (desc)
2391      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2392    if (!desc) 
2393      return SWIG_ERROR;
2394    if (ty) {
2395      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2396      if (tc) {
2397        int newmemory = 0;
2398        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2399        assert(!newmemory); /* newmemory handling not yet implemented */
2400      } else {
2401        return SWIG_ERROR;
2402      }
2403    } else {
2404      *ptr = vptr;
2405    }
2406    return SWIG_OK;
2407  }
2408}
2409
2410/* Convert a packed value value */
2411
2412SWIGRUNTIME int
2413SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2414  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2415  if (!to) return SWIG_ERROR;
2416  if (ty) {
2417    if (to != ty) {
2418      /* check type cast? */
2419      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2420      if (!tc) return SWIG_ERROR;
2421    }
2422  }
2423  return SWIG_OK;
2424} 
2425
2426/* -----------------------------------------------------------------------------
2427 * Create a new pointer object
2428 * ----------------------------------------------------------------------------- */
2429
2430/*
2431  Create a new instance object, without calling __init__, and set the
2432  'this' attribute.
2433*/
2434
2435SWIGRUNTIME PyObject* 
2436SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2437{
2438#if (PY_VERSION_HEX >= 0x02020000)
2439  PyObject *inst = 0;
2440  PyObject *newraw = data->newraw;
2441  if (newraw) {
2442    inst = PyObject_Call(newraw, data->newargs, NULL);
2443    if (inst) {
2444#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2445      PyObject **dictptr = _PyObject_GetDictPtr(inst);
2446      if (dictptr != NULL) {
2447        PyObject *dict = *dictptr;
2448        if (dict == NULL) {
2449          dict = PyDict_New();
2450          *dictptr = dict;
2451          PyDict_SetItem(dict, SWIG_This(), swig_this);
2452        }
2453      }
2454#else
2455      PyObject *key = SWIG_This();
2456      PyObject_SetAttr(inst, key, swig_this);
2457#endif
2458    }
2459  } else {
2460#if PY_VERSION_HEX >= 0x03000000
2461    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2462    PyObject_SetAttr(inst, SWIG_This(), swig_this);
2463    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2464#else
2465    PyObject *dict = PyDict_New();
2466    PyDict_SetItem(dict, SWIG_This(), swig_this);
2467    inst = PyInstance_NewRaw(data->newargs, dict);
2468    Py_DECREF(dict);
2469#endif
2470  }
2471  return inst;
2472#else
2473#if (PY_VERSION_HEX >= 0x02010000)
2474  PyObject *inst;
2475  PyObject *dict = PyDict_New();
2476  PyDict_SetItem(dict, SWIG_This(), swig_this);
2477  inst = PyInstance_NewRaw(data->newargs, dict);
2478  Py_DECREF(dict);
2479  return (PyObject *) inst;
2480#else
2481  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2482  if (inst == NULL) {
2483    return NULL;
2484  }
2485  inst->in_class = (PyClassObject *)data->newargs;
2486  Py_INCREF(inst->in_class);
2487  inst->in_dict = PyDict_New();
2488  if (inst->in_dict == NULL) {
2489    Py_DECREF(inst);
2490    return NULL;
2491  }
2492#ifdef Py_TPFLAGS_HAVE_WEAKREFS
2493  inst->in_weakreflist = NULL;
2494#endif
2495#ifdef Py_TPFLAGS_GC
2496  PyObject_GC_Init(inst);
2497#endif
2498  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2499  return (PyObject *) inst;
2500#endif
2501#endif
2502}
2503
2504SWIGRUNTIME void
2505SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2506{
2507 PyObject *dict;
2508#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2509 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2510 if (dictptr != NULL) {
2511   dict = *dictptr;
2512   if (dict == NULL) {
2513     dict = PyDict_New();
2514     *dictptr = dict;
2515   }
2516   PyDict_SetItem(dict, SWIG_This(), swig_this);
2517   return;
2518 }
2519#endif
2520 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2521 PyDict_SetItem(dict, SWIG_This(), swig_this);
2522 Py_DECREF(dict);
2523} 
2524
2525
2526SWIGINTERN PyObject *
2527SWIG_Python_InitShadowInstance(PyObject *args) {
2528  PyObject *obj[2];
2529  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2530    return NULL;
2531  } else {
2532    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2533    if (sthis) {
2534      SwigPyObject_append((PyObject*) sthis, obj[1]);
2535    } else {
2536      SWIG_Python_SetSwigThis(obj[0], obj[1]);
2537    }
2538    return SWIG_Py_Void();
2539  }
2540}
2541
2542/* Create a new pointer object */
2543
2544SWIGRUNTIME PyObject *
2545SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2546  SwigPyClientData *clientdata;
2547  PyObject * robj;
2548  int own;
2549
2550  if (!ptr)
2551    return SWIG_Py_Void();
2552
2553  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2554  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2555  if (clientdata && clientdata->pytype) {
2556    SwigPyObject *newobj;
2557    if (flags & SWIG_BUILTIN_TP_INIT) {
2558      newobj = (SwigPyObject*) self;
2559      if (newobj->ptr) {
2560        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2561        while (newobj->next)
2562          newobj = (SwigPyObject *) newobj->next;
2563        newobj->next = next_self;
2564        newobj = (SwigPyObject *)next_self;
2565      }
2566    } else {
2567      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2568    }
2569    if (newobj) {
2570      newobj->ptr = ptr;
2571      newobj->ty = type;
2572      newobj->own = own;
2573      newobj->next = 0;
2574#ifdef SWIGPYTHON_BUILTIN
2575      newobj->dict = 0;
2576#endif
2577      return (PyObject*) newobj;
2578    }
2579    return SWIG_Py_Void();
2580  }
2581
2582  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2583
2584  robj = SwigPyObject_New(ptr, type, own);
2585  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2586    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2587    if (inst) {
2588      Py_DECREF(robj);
2589      robj = inst;
2590    }
2591  }
2592  return robj;
2593}
2594
2595/* Create a new packed object */
2596
2597SWIGRUNTIMEINLINE PyObject *
2598SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2599  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2600}
2601
2602/* -----------------------------------------------------------------------------*
2603 *  Get type list
2604 * -----------------------------------------------------------------------------*/
2605
2606#ifdef SWIG_LINK_RUNTIME
2607void *SWIG_ReturnGlobalTypeList(void *);
2608#endif
2609
2610SWIGRUNTIME swig_module_info *
2611SWIG_Python_GetModule(void) {
2612  static void *type_pointer = (void *)0;
2613  /* first check if module already created */
2614  if (!type_pointer) {
2615#ifdef SWIG_LINK_RUNTIME
2616    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2617#else
2618# ifdef SWIGPY_USE_CAPSULE
2619    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2620# else
2621    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2622                                    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2623# endif
2624    if (PyErr_Occurred()) {
2625      PyErr_Clear();
2626      type_pointer = (void *)0;
2627    }
2628#endif
2629  }
2630  return (swig_module_info *) type_pointer;
2631}
2632
2633#if PY_MAJOR_VERSION < 2
2634/* PyModule_AddObject function was introduced in Python 2.0.  The following function
2635   is copied out of Python/modsupport.c in python version 2.3.4 */
2636SWIGINTERN int
2637PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2638{
2639  PyObject *dict;
2640  if (!PyModule_Check(m)) {
2641    PyErr_SetString(PyExc_TypeError,
2642                    "PyModule_AddObject() needs module as first arg");
2643    return SWIG_ERROR;
2644  }
2645  if (!o) {
2646    PyErr_SetString(PyExc_TypeError,
2647                    "PyModule_AddObject() needs non-NULL value");
2648    return SWIG_ERROR;
2649  }
2650 
2651  dict = PyModule_GetDict(m);
2652  if (dict == NULL) {
2653    /* Internal error -- modules must have a dict! */
2654    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2655                 PyModule_GetName(m));
2656    return SWIG_ERROR;
2657  }
2658  if (PyDict_SetItemString(dict, name, o))
2659    return SWIG_ERROR;
2660  Py_DECREF(o);
2661  return SWIG_OK;
2662}
2663#endif
2664
2665SWIGRUNTIME void
2666#ifdef SWIGPY_USE_CAPSULE
2667SWIG_Python_DestroyModule(PyObject *obj)
2668#else
2669SWIG_Python_DestroyModule(void *vptr)
2670#endif
2671{
2672#ifdef SWIGPY_USE_CAPSULE
2673  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2674#else
2675  swig_module_info *swig_module = (swig_module_info *) vptr;
2676#endif
2677  swig_type_info **types = swig_module->types;
2678  size_t i;
2679  for (i =0; i < swig_module->size; ++i) {
2680    swig_type_info *ty = types[i];
2681    if (ty->owndata) {
2682      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2683      if (data) SwigPyClientData_Del(data);
2684    }
2685  }
2686  Py_DECREF(SWIG_This());
2687  swig_this = NULL;
2688}
2689
2690SWIGRUNTIME void
2691SWIG_Python_SetModule(swig_module_info *swig_module) {
2692#if PY_VERSION_HEX >= 0x03000000
2693 /* Add a dummy module object into sys.modules */
2694  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2695#else
2696  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2697  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2698#endif
2699#ifdef SWIGPY_USE_CAPSULE
2700  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2701  if (pointer && module) {
2702    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2703  } else {
2704    Py_XDECREF(pointer);
2705  }
2706#else
2707  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2708  if (pointer && module) {
2709    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2710  } else {
2711    Py_XDECREF(pointer);
2712  }
2713#endif
2714}
2715
2716/* The python cached type query */
2717SWIGRUNTIME PyObject *
2718SWIG_Python_TypeCache(void) {
2719  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2720  return cache;
2721}
2722
2723SWIGRUNTIME swig_type_info *
2724SWIG_Python_TypeQuery(const char *type)
2725{
2726  PyObject *cache = SWIG_Python_TypeCache();
2727  PyObject *key = SWIG_Python_str_FromChar(type); 
2728  PyObject *obj = PyDict_GetItem(cache, key);
2729  swig_type_info *descriptor;
2730  if (obj) {
2731#ifdef SWIGPY_USE_CAPSULE
2732    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2733#else
2734    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2735#endif
2736  } else {
2737    swig_module_info *swig_module = SWIG_Python_GetModule();
2738    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2739    if (descriptor) {
2740#ifdef SWIGPY_USE_CAPSULE
2741      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2742#else
2743      obj = PyCObject_FromVoidPtr(descriptor, NULL);
2744#endif
2745      PyDict_SetItem(cache, key, obj);
2746      Py_DECREF(obj);
2747    }
2748  }
2749  Py_DECREF(key);
2750  return descriptor;
2751}
2752
2753/*
2754   For backward compatibility only
2755*/
2756#define SWIG_POINTER_EXCEPTION  0
2757#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
2758#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
2759
2760SWIGRUNTIME int
2761SWIG_Python_AddErrMesg(const char* mesg, int infront)
2762{ 
2763  if (PyErr_Occurred()) {
2764    PyObject *type = 0;
2765    PyObject *value = 0;
2766    PyObject *traceback = 0;
2767    PyErr_Fetch(&type, &value, &traceback);
2768    if (value) {
2769      char *tmp;
2770      PyObject *old_str = PyObject_Str(value);
2771      Py_XINCREF(type);
2772      PyErr_Clear();
2773      if (infront) {
2774        PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2775      } else {
2776        PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2777      }
2778      SWIG_Python_str_DelForPy3(tmp);
2779      Py_DECREF(old_str);
2780    }
2781    return 1;
2782  } else {
2783    return 0;
2784  }
2785}
2786 
2787SWIGRUNTIME int
2788SWIG_Python_ArgFail(int argnum)
2789{
2790  if (PyErr_Occurred()) {
2791    /* add information about failing argument */
2792    char mesg[256];
2793    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2794    return SWIG_Python_AddErrMesg(mesg, 1);
2795  } else {
2796    return 0;
2797  }
2798}
2799
2800SWIGRUNTIMEINLINE const char *
2801SwigPyObject_GetDesc(PyObject *self)
2802{
2803  SwigPyObject *v = (SwigPyObject *)self;
2804  swig_type_info *ty = v ? v->ty : 0;
2805  return ty ? ty->str : "";
2806}
2807
2808SWIGRUNTIME void
2809SWIG_Python_TypeError(const char *type, PyObject *obj)
2810{
2811  if (type) {
2812#if defined(SWIG_COBJECT_TYPES)
2813    if (obj && SwigPyObject_Check(obj)) {
2814      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2815      if (otype) {
2816        PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2817                     type, otype);
2818        return;
2819      }
2820    } else 
2821#endif     
2822    {
2823      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
2824      if (otype) {
2825        PyObject *str = PyObject_Str(obj);
2826        const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2827        if (cstr) {
2828          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2829                       type, otype, cstr);
2830          SWIG_Python_str_DelForPy3(cstr);
2831        } else {
2832          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2833                       type, otype);
2834        }
2835        Py_XDECREF(str);
2836        return;
2837      }
2838    }   
2839    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2840  } else {
2841    PyErr_Format(PyExc_TypeError, "unexpected type is received");
2842  }
2843}
2844
2845
2846/* Convert a pointer value, signal an exception on a type mismatch */
2847SWIGRUNTIME void *
2848SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2849  void *result;
2850  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2851    PyErr_Clear();
2852#if SWIG_POINTER_EXCEPTION
2853    if (flags) {
2854      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2855      SWIG_Python_ArgFail(argnum);
2856    }
2857#endif
2858  }
2859  return result;
2860}
2861
2862#ifdef SWIGPYTHON_BUILTIN
2863SWIGRUNTIME int
2864SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2865  PyTypeObject *tp = obj->ob_type;
2866  PyObject *descr;
2867  PyObject *encoded_name;
2868  descrsetfunc f;
2869  int res;
2870
2871# ifdef Py_USING_UNICODE
2872  if (PyString_Check(name)) {
2873    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2874    if (!name)
2875      return -1;
2876  } else if (!PyUnicode_Check(name))
2877# else
2878  if (!PyString_Check(name))
2879# endif
2880  {
2881    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2882    return -1;
2883  } else {
2884    Py_INCREF(name);
2885  }
2886
2887  if (!tp->tp_dict) {
2888    if (PyType_Ready(tp) < 0)
2889      goto done;
2890  }
2891
2892  res = -1;
2893  descr = _PyType_Lookup(tp, name);
2894  f = NULL;
2895  if (descr != NULL)
2896    f = descr->ob_type->tp_descr_set;
2897  if (!f) {
2898    if (PyString_Check(name)) {
2899      encoded_name = name;
2900      Py_INCREF(name);
2901    } else {
2902      encoded_name = PyUnicode_AsUTF8String(name);
2903    }
2904    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2905    Py_DECREF(encoded_name);
2906  } else {
2907    res = f(descr, obj, value);
2908  }
2909 
2910  done:
2911  Py_DECREF(name);
2912  return res;
2913}
2914#endif
2915
2916
2917#ifdef __cplusplus
2918}
2919#endif
2920
2921
2922
2923#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2924
2925#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2926
2927
2928
2929/* -------- TYPES TABLE (BEGIN) -------- */
2930
2931#define SWIGTYPE_p_attrl swig_types[0]
2932#define SWIGTYPE_p_attrlArray swig_types[1]
2933#define SWIGTYPE_p_attropl swig_types[2]
2934#define SWIGTYPE_p_batch_status swig_types[3]
2935#define SWIGTYPE_p_char swig_types[4]
2936#define SWIGTYPE_p_getter_setter swig_types[5]
2937#define SWIGTYPE_p_int swig_types[6]
2938#define SWIGTYPE_p_long swig_types[7]
2939#define SWIGTYPE_p_p_char swig_types[8]
2940#define SWIGTYPE_p_pthread_mutex_t swig_types[9]
2941#define SWIGTYPE_p_sockaddr swig_types[10]
2942static swig_type_info *swig_types[12];
2943static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
2944#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2945#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2946
2947/* -------- TYPES TABLE (END) -------- */
2948
2949#if (PY_VERSION_HEX <= 0x02000000)
2950# if !defined(SWIG_PYTHON_CLASSIC)
2951#  error "This python version requires swig to be run with the '-classic' option"
2952# endif
2953#endif
2954
2955/*-----------------------------------------------
2956              @(target):= _pbs.so
2957  ------------------------------------------------*/
2958#if PY_VERSION_HEX >= 0x03000000
2959#  define SWIG_init    PyInit__pbs
2960
2961#else
2962#  define SWIG_init    init_pbs
2963
2964#endif
2965#define SWIG_name    "_pbs"
2966
2967#define SWIGVERSION 0x020007
2968#define SWIG_VERSION SWIGVERSION
2969
2970
2971#define SWIG_as_voidptr(a) (void *)((const void *)(a))
2972#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2973
2974
2975
2976#include "pbs_ifl.h"
2977#include "pbs_error.h"
2978#include "rm.h"
2979#include "log.h"
2980
2981#define SARA_DEBUG 0
2982
2983//extern int pbs_errno;
2984
2985
2986
2987int Get_List_Size(PyObject *src)
2988{
2989  if (PyList_Check(src))
2990    return(PyList_Size(src));
2991
2992  /* check if valid NULL pointer */
2993  if ( PyString_Check(src) ) {
2994    if ( ! strcmp(PyString_AsString(src), "NULL") )
2995      return(0);
2996  }
2997  return(-1);
2998
2999} // end Get_List_Size()
3000
3001
3002
3003
3004// The default constructor for struct attrl
3005//
3006struct attrl *new_attrl(int number)
3007{
3008  struct attrl *ptr;
3009  struct attrl *prev, *current;
3010  int i;
3011
3012  /*
3013    allocate memory as a one block is handy for Python scripts
3014    and fill in the next fields so it also works for the C-library
3015  */
3016  printf("basje \n");
3017  ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
3018
3019  prev = NULL;
3020  current = ptr + (number - 1);
3021  for (i=0; i < number; i++)
3022  { 
3023    printf("constructor called\n");
3024    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
3025    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
3026    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
3027
3028    bzero( (void*) current->name, sizeof(current->name));
3029    bzero( (void*) current->resource, sizeof(current->resource));
3030    bzero( (void*) current->value, sizeof(current->value));
3031
3032    current->next     = prev;
3033    prev = current;
3034    current--;
3035  }
3036  return (struct attrl *)ptr;
3037
3038} // end new_attrl()
3039
3040
3041
3042// The default constructor for struct attropl
3043//
3044struct attropl *new_attropl(int number)
3045{
3046  struct attropl *ptr;
3047  struct attropl *prev, *current;
3048  int i;
3049
3050  /*
3051    allocate memory as a one block is handy for Python scripts
3052    and fill in the next fields so it also works for the C-library
3053  */
3054  ptr = (struct attropl *) malloc(number * sizeof(struct attropl));
3055
3056  prev = NULL;
3057  current = ptr + (number - 1);
3058  for (i=0; i < number; i++)
3059  { 
3060    printf("constructor called\n");
3061    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
3062    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
3063    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
3064
3065    bzero( (void*) current->name, sizeof(current->name));
3066    bzero( (void*) current->resource, sizeof(current->resource));
3067    bzero( (void*) current->value, sizeof(current->value));
3068    // current->op = 0;
3069
3070    current->next     = prev;
3071    prev = current;
3072    current--;
3073  }
3074  return (struct attropl *)ptr;
3075
3076} // end new_attropl()
3077
3078/* Not used only returned */
3079struct batch_status *new_batch_status()
3080{
3081   struct batch_status *ptr;
3082
3083   ptr = (struct batch_status *) malloc(sizeof(struct batch_status));
3084   return (struct batch_status *)ptr;
3085} // end new struct batch_status
3086
3087int get_error()
3088{
3089   char *errmsg;
3090
3091   errmsg = pbse_to_txt(pbs_errno);
3092   if (SARA_DEBUG)
3093   {
3094      printf("Bas = %d\n", pbs_errno);
3095      printf("Bas = %d, text = %s\n", pbs_errno, errmsg);
3096   }
3097   return (pbs_errno);
3098}
3099
3100
3101
3102
3103#include <limits.h>
3104#if !defined(SWIG_NO_LLONG_MAX)
3105# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3106#   define LLONG_MAX __LONG_LONG_MAX__
3107#   define LLONG_MIN (-LLONG_MAX - 1LL)
3108#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3109# endif
3110#endif
3111
3112
3113SWIGINTERN int
3114SWIG_AsVal_double (PyObject *obj, double *val)
3115{
3116  int res = SWIG_TypeError;
3117  if (PyFloat_Check(obj)) {
3118    if (val) *val = PyFloat_AsDouble(obj);
3119    return SWIG_OK;
3120  } else if (PyInt_Check(obj)) {
3121    if (val) *val = PyInt_AsLong(obj);
3122    return SWIG_OK;
3123  } else if (PyLong_Check(obj)) {
3124    double v = PyLong_AsDouble(obj);
3125    if (!PyErr_Occurred()) {
3126      if (val) *val = v;
3127      return SWIG_OK;
3128    } else {
3129      PyErr_Clear();
3130    }
3131  }
3132#ifdef SWIG_PYTHON_CAST_MODE
3133  {
3134    int dispatch = 0;
3135    double d = PyFloat_AsDouble(obj);
3136    if (!PyErr_Occurred()) {
3137      if (val) *val = d;
3138      return SWIG_AddCast(SWIG_OK);
3139    } else {
3140      PyErr_Clear();
3141    }
3142    if (!dispatch) {
3143      long v = PyLong_AsLong(obj);
3144      if (!PyErr_Occurred()) {
3145        if (val) *val = v;
3146        return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3147      } else {
3148        PyErr_Clear();
3149      }
3150    }
3151  }
3152#endif
3153  return res;
3154}
3155
3156
3157#include <float.h>
3158
3159
3160#include <math.h>
3161
3162
3163SWIGINTERNINLINE int
3164SWIG_CanCastAsInteger(double *d, double min, double max) {
3165  double x = *d;
3166  if ((min <= x && x <= max)) {
3167   double fx = floor(x);
3168   double cx = ceil(x);
3169   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3170   if ((errno == EDOM) || (errno == ERANGE)) {
3171     errno = 0;
3172   } else {
3173     double summ, reps, diff;
3174     if (rd < x) {
3175       diff = x - rd;
3176     } else if (rd > x) {
3177       diff = rd - x;
3178     } else {
3179       return 1;
3180     }
3181     summ = rd + x;
3182     reps = diff/summ;
3183     if (reps < 8*DBL_EPSILON) {
3184       *d = rd;
3185       return 1;
3186     }
3187   }
3188  }
3189  return 0;
3190}
3191
3192
3193SWIGINTERN int
3194SWIG_AsVal_long (PyObject *obj, long* val)
3195{
3196  if (PyInt_Check(obj)) {
3197    if (val) *val = PyInt_AsLong(obj);
3198    return SWIG_OK;
3199  } else if (PyLong_Check(obj)) {
3200    long v = PyLong_AsLong(obj);
3201    if (!PyErr_Occurred()) {
3202      if (val) *val = v;
3203      return SWIG_OK;
3204    } else {
3205      PyErr_Clear();
3206    }
3207  }
3208#ifdef SWIG_PYTHON_CAST_MODE
3209  {
3210    int dispatch = 0;
3211    long v = PyInt_AsLong(obj);
3212    if (!PyErr_Occurred()) {
3213      if (val) *val = v;
3214      return SWIG_AddCast(SWIG_OK);
3215    } else {
3216      PyErr_Clear();
3217    }
3218    if (!dispatch) {
3219      double d;
3220      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3221      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3222        if (val) *val = (long)(d);
3223        return res;
3224      }
3225    }
3226  }
3227#endif
3228  return SWIG_TypeError;
3229}
3230
3231
3232SWIGINTERN int
3233SWIG_AsVal_int (PyObject * obj, int *val)
3234{
3235  long v;
3236  int res = SWIG_AsVal_long (obj, &v);
3237  if (SWIG_IsOK(res)) {
3238    if ((v < INT_MIN || v > INT_MAX)) {
3239      return SWIG_OverflowError;
3240    } else {
3241      if (val) *val = (int)(v);
3242    }
3243  } 
3244  return res;
3245}
3246
3247
3248SWIGINTERNINLINE PyObject*
3249  SWIG_From_int  (int value)
3250{
3251  return PyInt_FromLong((long) value);
3252}
3253
3254
3255typedef struct attrl attrlArray;
3256
3257
3258SWIGINTERN int
3259SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
3260{
3261  if (PyInt_Check(obj)) {
3262    long v = PyInt_AsLong(obj);
3263    if (v >= 0) {
3264      if (val) *val = v;
3265      return SWIG_OK;
3266    } else {
3267      return SWIG_OverflowError;
3268    }
3269  } else if (PyLong_Check(obj)) {
3270    unsigned long v = PyLong_AsUnsignedLong(obj);
3271    if (!PyErr_Occurred()) {
3272      if (val) *val = v;
3273      return SWIG_OK;
3274    } else {
3275      PyErr_Clear();
3276    }
3277  }
3278#ifdef SWIG_PYTHON_CAST_MODE
3279  {
3280    int dispatch = 0;
3281    unsigned long v = PyLong_AsUnsignedLong(obj);
3282    if (!PyErr_Occurred()) {
3283      if (val) *val = v;
3284      return SWIG_AddCast(SWIG_OK);
3285    } else {
3286      PyErr_Clear();
3287    }
3288    if (!dispatch) {
3289      double d;
3290      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3291      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3292        if (val) *val = (unsigned long)(d);
3293        return res;
3294      }
3295    }
3296  }
3297#endif
3298  return SWIG_TypeError;
3299}
3300
3301
3302SWIGINTERNINLINE int
3303SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3304{
3305  unsigned long v;
3306  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3307  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
3308  return res;
3309}
3310
3311SWIGINTERN attrlArray *new_attrlArray(size_t nelements){
3312    return (struct attrl *)malloc((nelements)*sizeof(struct attrl));
3313  }
3314SWIGINTERN void delete_attrlArray(attrlArray *self){
3315    free((char*)self);
3316  }
3317SWIGINTERN struct attrl attrlArray___getitem__(attrlArray *self,size_t index){
3318    return self[index];
3319  }
3320SWIGINTERN void attrlArray___setitem__(attrlArray *self,size_t index,struct attrl value){
3321    self[index] = value;
3322  }
3323SWIGINTERN struct attrl *attrlArray_cast(attrlArray *self){
3324    return self;
3325  }
3326SWIGINTERN attrlArray *attrlArray_frompointer(struct attrl *t){
3327    return (attrlArray *)(t);
3328  }
3329
3330SWIGINTERN swig_type_info*
3331SWIG_pchar_descriptor(void)
3332{
3333  static int init = 0;
3334  static swig_type_info* info = 0;
3335  if (!init) {
3336    info = SWIG_TypeQuery("_p_char");
3337    init = 1;
3338  }
3339  return info;
3340}
3341
3342
3343SWIGINTERNINLINE PyObject *
3344SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3345{
3346  if (carray) {
3347    if (size > INT_MAX) {
3348      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3349      return pchar_descriptor ? 
3350        SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3351    } else {
3352#if PY_VERSION_HEX >= 0x03000000
3353      return PyUnicode_FromStringAndSize(carray, (int)(size));
3354#else
3355      return PyString_FromStringAndSize(carray, (int)(size));
3356#endif
3357    }
3358  } else {
3359    return SWIG_Py_Void();
3360  }
3361}
3362
3363
3364SWIGINTERNINLINE PyObject * 
3365SWIG_FromCharPtr(const char *cptr)
3366{ 
3367  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3368}
3369
3370
3371SWIGINTERN int
3372SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3373{
3374#if PY_VERSION_HEX>=0x03000000
3375  if (PyUnicode_Check(obj))
3376#else 
3377  if (PyString_Check(obj))
3378#endif
3379  {
3380    char *cstr; Py_ssize_t len;
3381#if PY_VERSION_HEX>=0x03000000
3382    if (!alloc && cptr) {
3383        /* We can't allow converting without allocation, since the internal
3384           representation of string in Python 3 is UCS-2/UCS-4 but we require
3385           a UTF-8 representation.
3386           TODO(bhy) More detailed explanation */
3387        return SWIG_RuntimeError;
3388    }
3389    obj = PyUnicode_AsUTF8String(obj);
3390    PyBytes_AsStringAndSize(obj, &cstr, &len);
3391    if(alloc) *alloc = SWIG_NEWOBJ;
3392#else
3393    PyString_AsStringAndSize(obj, &cstr, &len);
3394#endif
3395    if (cptr) {
3396      if (alloc) {
3397        /*
3398           In python the user should not be able to modify the inner
3399           string representation. To warranty that, if you define
3400           SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3401           buffer is always returned.
3402
3403           The default behavior is just to return the pointer value,
3404           so, be careful.
3405        */ 
3406#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3407        if (*alloc != SWIG_OLDOBJ) 
3408#else
3409        if (*alloc == SWIG_NEWOBJ) 
3410#endif
3411          {
3412            *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3413            *alloc = SWIG_NEWOBJ;
3414          }
3415        else {
3416          *cptr = cstr;
3417          *alloc = SWIG_OLDOBJ;
3418        }
3419      } else {
3420        #if PY_VERSION_HEX>=0x03000000
3421        assert(0); /* Should never reach here in Python 3 */
3422        #endif
3423        *cptr = SWIG_Python_str_AsChar(obj);
3424      }
3425    }
3426    if (psize) *psize = len + 1;
3427#if PY_VERSION_HEX>=0x03000000
3428    Py_XDECREF(obj);
3429#endif
3430    return SWIG_OK;
3431  } else {
3432    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3433    if (pchar_descriptor) {
3434      void* vptr = 0;
3435      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3436        if (cptr) *cptr = (char *) vptr;
3437        if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3438        if (alloc) *alloc = SWIG_OLDOBJ;
3439        return SWIG_OK;
3440      }
3441    }
3442  }
3443  return SWIG_TypeError;
3444}
3445
3446
3447
3448
3449SWIGINTERN char *attrl___str__(struct attrl *self){
3450    static char temp[4 * 255] ;
3451    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
3452      self->name, self->resource, self->value);
3453   
3454    return &temp[0];
3455  }
3456SWIGINTERN void delete_attrl(struct attrl *self){
3457    if (SARA_DEBUG)
3458       printf("Bas free attrl\n");
3459
3460    /*
3461        free(self);
3462    */
3463  }
3464SWIGINTERN char *attropl___str__(struct attropl *self){
3465    static char temp[4 * 255] ;
3466    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
3467      self->name, self->resource, self->value);
3468   
3469    return &temp[0];
3470  }
3471SWIGINTERN void delete_attropl(struct attropl *self){
3472    if (SARA_DEBUG)
3473       printf("Bas free attropl\n");
3474
3475    /*
3476        free(self);
3477    */
3478  }
3479
3480SWIGINTERN int
3481SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
3482{
3483  unsigned long v;
3484  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3485  if (SWIG_IsOK(res)) {
3486    if ((v > UINT_MAX)) {
3487      return SWIG_OverflowError;
3488    } else {
3489      if (val) *val = (unsigned int)(v);
3490    }
3491  } 
3492  return res;
3493}
3494
3495
3496SWIGINTERNINLINE PyObject*
3497  SWIG_From_bool  (bool value)
3498{
3499  return PyBool_FromLong(value ? 1 : 0);
3500}
3501
3502
3503SWIGINTERN int
3504SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
3505{ 
3506  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
3507  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3508  if (SWIG_IsOK(res)) {
3509    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
3510    if (csize <= size) {
3511      if (val) {
3512        if (csize) memcpy(val, cptr, csize*sizeof(char));
3513        if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
3514      }
3515      if (alloc == SWIG_NEWOBJ) {
3516        free((char*)cptr);
3517        res = SWIG_DelNewMask(res);
3518      }     
3519      return res;
3520    }
3521    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
3522  }
3523  return SWIG_TypeError;
3524}
3525
3526#ifdef __cplusplus
3527extern "C" {
3528#endif
3529SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3530  PyObject *resultobj = 0;
3531  int arg1 ;
3532  int val1 ;
3533  int ecode1 = 0 ;
3534  PyObject * obj0 = 0 ;
3535  struct attrl *result = 0 ;
3536 
3537  if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail;
3538  ecode1 = SWIG_AsVal_int(obj0, &val1);
3539  if (!SWIG_IsOK(ecode1)) {
3540    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'");
3541  } 
3542  arg1 = (int)(val1);
3543  result = (struct attrl *)new_attrl(arg1);
3544  {
3545    PyObject      *obj_batch;
3546    struct attrl  *ptr;
3547    int           i=0, len=0;
3548   
3549    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
3550   
3551    ptr = result;
3552    while (ptr != NULL) {
3553      len++;
3554      ptr = ptr->next;
3555    }
3556    resultobj = PyList_New(len);
3557   
3558    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3559   
3560    if (SARA_DEBUG) printf("\t<Contents>\n");
3561    ptr = result;
3562    for (i=0; i < len; i++) {
3563      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
3564      PyList_SetItem(resultobj, i, obj_batch);
3565      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
3566      ptr = ptr->next;
3567    }
3568   
3569    free(ptr);
3570    if (SARA_DEBUG) printf("\t</Contents>\n");
3571  }
3572  return resultobj;
3573fail:
3574  return NULL;
3575}
3576
3577
3578SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3579  PyObject *resultobj = 0;
3580  int arg1 ;
3581  int val1 ;
3582  int ecode1 = 0 ;
3583  PyObject * obj0 = 0 ;
3584  struct attropl *result = 0 ;
3585 
3586  if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail;
3587  ecode1 = SWIG_AsVal_int(obj0, &val1);
3588  if (!SWIG_IsOK(ecode1)) {
3589    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'");
3590  } 
3591  arg1 = (int)(val1);
3592  result = (struct attropl *)new_attropl(arg1);
3593  {
3594    PyObject          *obj_batch;
3595    struct attropl    *ptr;
3596    int               i=0, len=0;
3597   
3598    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
3599   
3600    ptr = result;
3601    while (ptr != NULL) {
3602      len++;
3603      ptr = ptr->next;
3604    }
3605    resultobj = PyList_New(len);
3606    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3607   
3608    if (SARA_DEBUG) printf("\t<Contents>\n");
3609    ptr = result;
3610    for (i=0; i < len; i++) {
3611      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
3612      PyList_SetItem(resultobj, i, obj_batch); 
3613      ptr = ptr->next;
3614    }
3615   
3616    free(ptr);
3617    if (SARA_DEBUG) printf("\t</Contents>\n");
3618  }
3619  return resultobj;
3620fail:
3621  return NULL;
3622}
3623
3624
3625SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3626  PyObject *resultobj = 0;
3627  struct batch_status *result = 0 ;
3628 
3629  if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail;
3630  result = (struct batch_status *)new_batch_status();
3631  {
3632    PyObject              *obj_batch;
3633    struct batch_status   *ptr;
3634    int                   i=0, len=0;
3635   
3636    // printf("Ja we are in bussniss\n");
3637    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
3638   
3639    // Deterime length of list
3640    //
3641    ptr = result;
3642    while (ptr != NULL) {
3643      len++;
3644      ptr = ptr->next;
3645    }
3646    resultobj = PyList_New(len);
3647   
3648    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3649   
3650    // Make a list of batch_status pointers
3651    //
3652    if (SARA_DEBUG) printf("\t<Contents>\n");
3653    ptr = result;
3654    for (i=0; i < len; i++) {
3655      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
3656      PyList_SetItem(resultobj, i, obj_batch);
3657      if (SARA_DEBUG)  {
3658        printf("\t\t- %s\n", ptr->name);
3659      }
3660      ptr = ptr->next;
3661    }
3662   
3663    free(ptr);
3664    if (SARA_DEBUG) printf("\t</Contents>\n");
3665  }
3666  return resultobj;
3667fail:
3668  return NULL;
3669}
3670
3671
3672SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3673  PyObject *resultobj = 0;
3674  int result;
3675 
3676  if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail;
3677  result = (int)get_error();
3678  resultobj = SWIG_From_int((int)(result));
3679  return resultobj;
3680fail:
3681  return NULL;
3682}
3683
3684
3685SWIGINTERN PyObject *_wrap_new_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3686  PyObject *resultobj = 0;
3687  size_t arg1 ;
3688  size_t val1 ;
3689  int ecode1 = 0 ;
3690  PyObject * obj0 = 0 ;
3691  attrlArray *result = 0 ;
3692 
3693  if (!PyArg_ParseTuple(args,(char *)"O:new_attrlArray",&obj0)) SWIG_fail;
3694  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
3695  if (!SWIG_IsOK(ecode1)) {
3696    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrlArray" "', argument " "1"" of type '" "size_t""'");
3697  } 
3698  arg1 = (size_t)(val1);
3699  result = (attrlArray *)new_attrlArray(arg1);
3700  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, SWIG_POINTER_NEW |  0 );
3701  return resultobj;
3702fail:
3703  return NULL;
3704}
3705
3706
3707SWIGINTERN PyObject *_wrap_delete_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3708  PyObject *resultobj = 0;
3709  attrlArray *arg1 = (attrlArray *) 0 ;
3710  void *argp1 = 0 ;
3711  int res1 = 0 ;
3712  PyObject * obj0 = 0 ;
3713 
3714  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrlArray",&obj0)) SWIG_fail;
3715  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, SWIG_POINTER_DISOWN |  0 );
3716  if (!SWIG_IsOK(res1)) {
3717    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrlArray" "', argument " "1"" of type '" "attrlArray *""'"); 
3718  }
3719  arg1 = (attrlArray *)(argp1);
3720  delete_attrlArray(arg1);
3721  resultobj = SWIG_Py_Void();
3722  return resultobj;
3723fail:
3724  return NULL;
3725}
3726
3727
3728SWIGINTERN PyObject *_wrap_attrlArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3729  PyObject *resultobj = 0;
3730  attrlArray *arg1 = (attrlArray *) 0 ;
3731  size_t arg2 ;
3732  void *argp1 = 0 ;
3733  int res1 = 0 ;
3734  size_t val2 ;
3735  int ecode2 = 0 ;
3736  PyObject * obj0 = 0 ;
3737  PyObject * obj1 = 0 ;
3738  struct attrl result;
3739 
3740  if (!PyArg_ParseTuple(args,(char *)"OO:attrlArray___getitem__",&obj0,&obj1)) SWIG_fail;
3741  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
3742  if (!SWIG_IsOK(res1)) {
3743    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___getitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
3744  }
3745  arg1 = (attrlArray *)(argp1);
3746  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
3747  if (!SWIG_IsOK(ecode2)) {
3748    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___getitem__" "', argument " "2"" of type '" "size_t""'");
3749  } 
3750  arg2 = (size_t)(val2);
3751  result = attrlArray___getitem__(arg1,arg2);
3752  resultobj = SWIG_NewPointerObj((struct attrl *)memcpy((struct attrl *)malloc(sizeof(struct attrl)),&result,sizeof(struct attrl)), SWIGTYPE_p_attrl, SWIG_POINTER_OWN |  0 );
3753  return resultobj;
3754fail:
3755  return NULL;
3756}
3757
3758
3759SWIGINTERN PyObject *_wrap_attrlArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3760  PyObject *resultobj = 0;
3761  attrlArray *arg1 = (attrlArray *) 0 ;
3762  size_t arg2 ;
3763  struct attrl arg3 ;
3764  void *argp1 = 0 ;
3765  int res1 = 0 ;
3766  size_t val2 ;
3767  int ecode2 = 0 ;
3768  void *argp3 ;
3769  int res3 = 0 ;
3770  PyObject * obj0 = 0 ;
3771  PyObject * obj1 = 0 ;
3772  PyObject * obj2 = 0 ;
3773 
3774  if (!PyArg_ParseTuple(args,(char *)"OOO:attrlArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
3775  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
3776  if (!SWIG_IsOK(res1)) {
3777    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___setitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
3778  }
3779  arg1 = (attrlArray *)(argp1);
3780  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
3781  if (!SWIG_IsOK(ecode2)) {
3782    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___setitem__" "', argument " "2"" of type '" "size_t""'");
3783  } 
3784  arg2 = (size_t)(val2);
3785  {
3786    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_attrl,  0 );
3787    if (!SWIG_IsOK(res3)) {
3788      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'"); 
3789    } 
3790    if (!argp3) {
3791      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'");
3792    } else {
3793      arg3 = *((struct attrl *)(argp3));
3794    }
3795  }
3796  attrlArray___setitem__(arg1,arg2,arg3);
3797  resultobj = SWIG_Py_Void();
3798  return resultobj;
3799fail:
3800  return NULL;
3801}
3802
3803
3804SWIGINTERN PyObject *_wrap_attrlArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3805  PyObject *resultobj = 0;
3806  attrlArray *arg1 = (attrlArray *) 0 ;
3807  void *argp1 = 0 ;
3808  int res1 = 0 ;
3809  PyObject * obj0 = 0 ;
3810  struct attrl *result = 0 ;
3811 
3812  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_cast",&obj0)) SWIG_fail;
3813  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
3814  if (!SWIG_IsOK(res1)) {
3815    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_cast" "', argument " "1"" of type '" "attrlArray *""'"); 
3816  }
3817  arg1 = (attrlArray *)(argp1);
3818  result = (struct attrl *)attrlArray_cast(arg1);
3819  {
3820    PyObject      *obj_batch;
3821    struct attrl  *ptr;
3822    int           i=0, len=0;
3823   
3824    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
3825   
3826    ptr = result;
3827    while (ptr != NULL) {
3828      len++;
3829      ptr = ptr->next;
3830    }
3831    resultobj = PyList_New(len);
3832   
3833    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3834   
3835    if (SARA_DEBUG) printf("\t<Contents>\n");
3836    ptr = result;
3837    for (i=0; i < len; i++) {
3838      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
3839      PyList_SetItem(resultobj, i, obj_batch);
3840      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
3841      ptr = ptr->next;
3842    }
3843   
3844    free(ptr);
3845    if (SARA_DEBUG) printf("\t</Contents>\n");
3846  }
3847  return resultobj;
3848fail:
3849  return NULL;
3850}
3851
3852
3853SWIGINTERN PyObject *_wrap_attrlArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3854  PyObject *resultobj = 0;
3855  struct attrl *arg1 = (struct attrl *) 0 ;
3856  void *argp1 = 0 ;
3857  int res1 = 0 ;
3858  PyObject * obj0 = 0 ;
3859  attrlArray *result = 0 ;
3860 
3861  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_frompointer",&obj0)) SWIG_fail;
3862  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3863  if (!SWIG_IsOK(res1)) {
3864    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_frompointer" "', argument " "1"" of type '" "struct attrl *""'"); 
3865  }
3866  arg1 = (struct attrl *)(argp1);
3867  result = (attrlArray *)attrlArray_frompointer(arg1);
3868  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, 0 |  0 );
3869  return resultobj;
3870fail:
3871  return NULL;
3872}
3873
3874
3875SWIGINTERN PyObject *attrlArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3876  PyObject *obj;
3877  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
3878  SWIG_TypeNewClientData(SWIGTYPE_p_attrlArray, SWIG_NewClientData(obj));
3879  return SWIG_Py_Void();
3880}
3881
3882SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3883  PyObject *resultobj = 0;
3884  struct attrl *arg1 = (struct attrl *) 0 ;
3885  struct attrl *arg2 = (struct attrl *) 0 ;
3886  void *argp1 = 0 ;
3887  int res1 = 0 ;
3888  void *argp2 = 0 ;
3889  int res2 = 0 ;
3890  PyObject * obj0 = 0 ;
3891  PyObject * obj1 = 0 ;
3892 
3893  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail;
3894  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3895  if (!SWIG_IsOK(res1)) {
3896    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3897  }
3898  arg1 = (struct attrl *)(argp1);
3899  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
3900  if (!SWIG_IsOK(res2)) {
3901    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); 
3902  }
3903  arg2 = (struct attrl *)(argp2);
3904  if (arg1) (arg1)->next = arg2;
3905  resultobj = SWIG_Py_Void();
3906  return resultobj;
3907fail:
3908  return NULL;
3909}
3910
3911
3912SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3913  PyObject *resultobj = 0;
3914  struct attrl *arg1 = (struct attrl *) 0 ;
3915  void *argp1 = 0 ;
3916  int res1 = 0 ;
3917  PyObject * obj0 = 0 ;
3918  struct attrl *result = 0 ;
3919 
3920  if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail;
3921  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3922  if (!SWIG_IsOK(res1)) {
3923    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3924  }
3925  arg1 = (struct attrl *)(argp1);
3926  result = (struct attrl *) ((arg1)->next);
3927  {
3928    PyObject      *obj_batch;
3929    struct attrl  *ptr;
3930    int           i=0, len=0;
3931   
3932    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
3933   
3934    ptr = result;
3935    while (ptr != NULL) {
3936      len++;
3937      ptr = ptr->next;
3938    }
3939    resultobj = PyList_New(len);
3940   
3941    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3942   
3943    if (SARA_DEBUG) printf("\t<Contents>\n");
3944    ptr = result;
3945    for (i=0; i < len; i++) {
3946      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
3947      PyList_SetItem(resultobj, i, obj_batch);
3948      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
3949      ptr = ptr->next;
3950    }
3951   
3952    free(ptr);
3953    if (SARA_DEBUG) printf("\t</Contents>\n");
3954  }
3955  return resultobj;
3956fail:
3957  return NULL;
3958}
3959
3960
3961SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3962  PyObject *resultobj = 0;
3963  struct attrl *arg1 = (struct attrl *) 0 ;
3964  char *arg2 = (char *) 0 ;
3965  void *argp1 = 0 ;
3966  int res1 = 0 ;
3967  int res2 ;
3968  char *buf2 = 0 ;
3969  int alloc2 = 0 ;
3970  PyObject * obj0 = 0 ;
3971  PyObject * obj1 = 0 ;
3972 
3973  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail;
3974  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3975  if (!SWIG_IsOK(res1)) {
3976    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3977  }
3978  arg1 = (struct attrl *)(argp1);
3979  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3980  if (!SWIG_IsOK(res2)) {
3981    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'");
3982  }
3983  arg2 = (char *)(buf2);
3984  if (arg1->name) free((char*)arg1->name);
3985  if (arg2) {
3986    size_t size = strlen((const char *)(arg2)) + 1;
3987    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
3988  } else {
3989    arg1->name = 0;
3990  }
3991  resultobj = SWIG_Py_Void();
3992  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3993  return resultobj;
3994fail:
3995  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3996  return NULL;
3997}
3998
3999
4000SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4001  PyObject *resultobj = 0;
4002  struct attrl *arg1 = (struct attrl *) 0 ;
4003  void *argp1 = 0 ;
4004  int res1 = 0 ;
4005  PyObject * obj0 = 0 ;
4006  char *result = 0 ;
4007 
4008  if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail;
4009  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4010  if (!SWIG_IsOK(res1)) {
4011    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 
4012  }
4013  arg1 = (struct attrl *)(argp1);
4014  result = (char *) ((arg1)->name);
4015  resultobj = SWIG_FromCharPtr((const char *)result);
4016  return resultobj;
4017fail:
4018  return NULL;
4019}
4020
4021
4022SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4023  PyObject *resultobj = 0;
4024  struct attrl *arg1 = (struct attrl *) 0 ;
4025  char *arg2 = (char *) 0 ;
4026  void *argp1 = 0 ;
4027  int res1 = 0 ;
4028  int res2 ;
4029  char *buf2 = 0 ;
4030  int alloc2 = 0 ;
4031  PyObject * obj0 = 0 ;
4032  PyObject * obj1 = 0 ;
4033 
4034  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail;
4035  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4036  if (!SWIG_IsOK(res1)) {
4037    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 
4038  }
4039  arg1 = (struct attrl *)(argp1);
4040  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4041  if (!SWIG_IsOK(res2)) {
4042    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'");
4043  }
4044  arg2 = (char *)(buf2);
4045  if (arg1->resource) free((char*)arg1->resource);
4046  if (arg2) {
4047    size_t size = strlen((const char *)(arg2)) + 1;
4048    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4049  } else {
4050    arg1->resource = 0;
4051  }
4052  resultobj = SWIG_Py_Void();
4053  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4054  return resultobj;
4055fail:
4056  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4057  return NULL;
4058}
4059
4060
4061SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4062  PyObject *resultobj = 0;
4063  struct attrl *arg1 = (struct attrl *) 0 ;
4064  void *argp1 = 0 ;
4065  int res1 = 0 ;
4066  PyObject * obj0 = 0 ;
4067  char *result = 0 ;
4068 
4069  if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail;
4070  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4071  if (!SWIG_IsOK(res1)) {
4072    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 
4073  }
4074  arg1 = (struct attrl *)(argp1);
4075  result = (char *) ((arg1)->resource);
4076  resultobj = SWIG_FromCharPtr((const char *)result);
4077  return resultobj;
4078fail:
4079  return NULL;
4080}
4081
4082
4083SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4084  PyObject *resultobj = 0;
4085  struct attrl *arg1 = (struct attrl *) 0 ;
4086  char *arg2 = (char *) 0 ;
4087  void *argp1 = 0 ;
4088  int res1 = 0 ;
4089  int res2 ;
4090  char *buf2 = 0 ;
4091  int alloc2 = 0 ;
4092  PyObject * obj0 = 0 ;
4093  PyObject * obj1 = 0 ;
4094 
4095  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail;
4096  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4097  if (!SWIG_IsOK(res1)) {
4098    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 
4099  }
4100  arg1 = (struct attrl *)(argp1);
4101  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4102  if (!SWIG_IsOK(res2)) {
4103    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'");
4104  }
4105  arg2 = (char *)(buf2);
4106  if (arg1->value) free((char*)arg1->value);
4107  if (arg2) {
4108    size_t size = strlen((const char *)(arg2)) + 1;
4109    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4110  } else {
4111    arg1->value = 0;
4112  }
4113  resultobj = SWIG_Py_Void();
4114  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4115  return resultobj;
4116fail:
4117  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4118  return NULL;
4119}
4120
4121
4122SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4123  PyObject *resultobj = 0;
4124  struct attrl *arg1 = (struct attrl *) 0 ;
4125  void *argp1 = 0 ;
4126  int res1 = 0 ;
4127  PyObject * obj0 = 0 ;
4128  char *result = 0 ;
4129 
4130  if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail;
4131  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4132  if (!SWIG_IsOK(res1)) {
4133    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 
4134  }
4135  arg1 = (struct attrl *)(argp1);
4136  result = (char *) ((arg1)->value);
4137  resultobj = SWIG_FromCharPtr((const char *)result);
4138  return resultobj;
4139fail:
4140  return NULL;
4141}
4142
4143
4144SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4145  PyObject *resultobj = 0;
4146  struct attrl *arg1 = (struct attrl *) 0 ;
4147  enum batch_op arg2 ;
4148  void *argp1 = 0 ;
4149  int res1 = 0 ;
4150  int val2 ;
4151  int ecode2 = 0 ;
4152  PyObject * obj0 = 0 ;
4153  PyObject * obj1 = 0 ;
4154 
4155  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail;
4156  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4157  if (!SWIG_IsOK(res1)) {
4158    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 
4159  }
4160  arg1 = (struct attrl *)(argp1);
4161  ecode2 = SWIG_AsVal_int(obj1, &val2);
4162  if (!SWIG_IsOK(ecode2)) {
4163    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
4164  } 
4165  arg2 = (enum batch_op)(val2);
4166  if (arg1) (arg1)->op = arg2;
4167  resultobj = SWIG_Py_Void();
4168  return resultobj;
4169fail:
4170  return NULL;
4171}
4172
4173
4174SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4175  PyObject *resultobj = 0;
4176  struct attrl *arg1 = (struct attrl *) 0 ;
4177  void *argp1 = 0 ;
4178  int res1 = 0 ;
4179  PyObject * obj0 = 0 ;
4180  enum batch_op result;
4181 
4182  if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail;
4183  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4184  if (!SWIG_IsOK(res1)) {
4185    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 
4186  }
4187  arg1 = (struct attrl *)(argp1);
4188  result = (enum batch_op) ((arg1)->op);
4189  resultobj = SWIG_From_int((int)(result));
4190  return resultobj;
4191fail:
4192  return NULL;
4193}
4194
4195
4196SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4197  PyObject *resultobj = 0;
4198  struct attrl *arg1 = (struct attrl *) 0 ;
4199  void *argp1 = 0 ;
4200  int res1 = 0 ;
4201  PyObject * obj0 = 0 ;
4202  char *result = 0 ;
4203 
4204  if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail;
4205  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
4206  if (!SWIG_IsOK(res1)) {
4207    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 
4208  }
4209  arg1 = (struct attrl *)(argp1);
4210  result = (char *)attrl___str__(arg1);
4211  resultobj = SWIG_FromCharPtr((const char *)result);
4212  return resultobj;
4213fail:
4214  return NULL;
4215}
4216
4217
4218SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4219  PyObject *resultobj = 0;
4220  struct attrl *arg1 = (struct attrl *) 0 ;
4221  void *argp1 = 0 ;
4222  int res1 = 0 ;
4223  PyObject * obj0 = 0 ;
4224 
4225  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail;
4226  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
4227  if (!SWIG_IsOK(res1)) {
4228    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 
4229  }
4230  arg1 = (struct attrl *)(argp1);
4231  delete_attrl(arg1);
4232  resultobj = SWIG_Py_Void();
4233  return resultobj;
4234fail:
4235  return NULL;
4236}
4237
4238
4239SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4240  PyObject *obj;
4241  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4242  SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj));
4243  return SWIG_Py_Void();
4244}
4245
4246SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4247  PyObject *resultobj = 0;
4248  struct attropl *arg1 = (struct attropl *) 0 ;
4249  struct attropl *arg2 = (struct attropl *) 0 ;
4250  void *argp1 = 0 ;
4251  int res1 = 0 ;
4252  void *argp2 = 0 ;
4253  int res2 = 0 ;
4254  PyObject * obj0 = 0 ;
4255  PyObject * obj1 = 0 ;
4256 
4257  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail;
4258  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4259  if (!SWIG_IsOK(res1)) {
4260    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4261  }
4262  arg1 = (struct attropl *)(argp1);
4263  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
4264  if (!SWIG_IsOK(res2)) {
4265    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); 
4266  }
4267  arg2 = (struct attropl *)(argp2);
4268  if (arg1) (arg1)->next = arg2;
4269  resultobj = SWIG_Py_Void();
4270  return resultobj;
4271fail:
4272  return NULL;
4273}
4274
4275
4276SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4277  PyObject *resultobj = 0;
4278  struct attropl *arg1 = (struct attropl *) 0 ;
4279  void *argp1 = 0 ;
4280  int res1 = 0 ;
4281  PyObject * obj0 = 0 ;
4282  struct attropl *result = 0 ;
4283 
4284  if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail;
4285  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4286  if (!SWIG_IsOK(res1)) {
4287    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4288  }
4289  arg1 = (struct attropl *)(argp1);
4290  result = (struct attropl *) ((arg1)->next);
4291  {
4292    PyObject          *obj_batch;
4293    struct attropl    *ptr;
4294    int               i=0, len=0;
4295   
4296    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
4297   
4298    ptr = result;
4299    while (ptr != NULL) {
4300      len++;
4301      ptr = ptr->next;
4302    }
4303    resultobj = PyList_New(len);
4304    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4305   
4306    if (SARA_DEBUG) printf("\t<Contents>\n");
4307    ptr = result;
4308    for (i=0; i < len; i++) {
4309      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
4310      PyList_SetItem(resultobj, i, obj_batch); 
4311      ptr = ptr->next;
4312    }
4313   
4314    free(ptr);
4315    if (SARA_DEBUG) printf("\t</Contents>\n");
4316  }
4317  return resultobj;
4318fail:
4319  return NULL;
4320}
4321
4322
4323SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4324  PyObject *resultobj = 0;
4325  struct attropl *arg1 = (struct attropl *) 0 ;
4326  char *arg2 = (char *) 0 ;
4327  void *argp1 = 0 ;
4328  int res1 = 0 ;
4329  int res2 ;
4330  char *buf2 = 0 ;
4331  int alloc2 = 0 ;
4332  PyObject * obj0 = 0 ;
4333  PyObject * obj1 = 0 ;
4334 
4335  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail;
4336  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4337  if (!SWIG_IsOK(res1)) {
4338    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4339  }
4340  arg1 = (struct attropl *)(argp1);
4341  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4342  if (!SWIG_IsOK(res2)) {
4343    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'");
4344  }
4345  arg2 = (char *)(buf2);
4346  if (arg1->name) free((char*)arg1->name);
4347  if (arg2) {
4348    size_t size = strlen((const char *)(arg2)) + 1;
4349    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4350  } else {
4351    arg1->name = 0;
4352  }
4353  resultobj = SWIG_Py_Void();
4354  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4355  return resultobj;
4356fail:
4357  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4358  return NULL;
4359}
4360
4361
4362SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4363  PyObject *resultobj = 0;
4364  struct attropl *arg1 = (struct attropl *) 0 ;
4365  void *argp1 = 0 ;
4366  int res1 = 0 ;
4367  PyObject * obj0 = 0 ;
4368  char *result = 0 ;
4369 
4370  if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail;
4371  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4372  if (!SWIG_IsOK(res1)) {
4373    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4374  }
4375  arg1 = (struct attropl *)(argp1);
4376  result = (char *) ((arg1)->name);
4377  resultobj = SWIG_FromCharPtr((const char *)result);
4378  return resultobj;
4379fail:
4380  return NULL;
4381}
4382
4383
4384SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4385  PyObject *resultobj = 0;
4386  struct attropl *arg1 = (struct attropl *) 0 ;
4387  char *arg2 = (char *) 0 ;
4388  void *argp1 = 0 ;
4389  int res1 = 0 ;
4390  int res2 ;
4391  char *buf2 = 0 ;
4392  int alloc2 = 0 ;
4393  PyObject * obj0 = 0 ;
4394  PyObject * obj1 = 0 ;
4395 
4396  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail;
4397  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4398  if (!SWIG_IsOK(res1)) {
4399    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4400  }
4401  arg1 = (struct attropl *)(argp1);
4402  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4403  if (!SWIG_IsOK(res2)) {
4404    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'");
4405  }
4406  arg2 = (char *)(buf2);
4407  if (arg1->resource) free((char*)arg1->resource);
4408  if (arg2) {
4409    size_t size = strlen((const char *)(arg2)) + 1;
4410    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4411  } else {
4412    arg1->resource = 0;
4413  }
4414  resultobj = SWIG_Py_Void();
4415  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4416  return resultobj;
4417fail:
4418  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4419  return NULL;
4420}
4421
4422
4423SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4424  PyObject *resultobj = 0;
4425  struct attropl *arg1 = (struct attropl *) 0 ;
4426  void *argp1 = 0 ;
4427  int res1 = 0 ;
4428  PyObject * obj0 = 0 ;
4429  char *result = 0 ;
4430 
4431  if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail;
4432  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4433  if (!SWIG_IsOK(res1)) {
4434    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4435  }
4436  arg1 = (struct attropl *)(argp1);
4437  result = (char *) ((arg1)->resource);
4438  resultobj = SWIG_FromCharPtr((const char *)result);
4439  return resultobj;
4440fail:
4441  return NULL;
4442}
4443
4444
4445SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4446  PyObject *resultobj = 0;
4447  struct attropl *arg1 = (struct attropl *) 0 ;
4448  char *arg2 = (char *) 0 ;
4449  void *argp1 = 0 ;
4450  int res1 = 0 ;
4451  int res2 ;
4452  char *buf2 = 0 ;
4453  int alloc2 = 0 ;
4454  PyObject * obj0 = 0 ;
4455  PyObject * obj1 = 0 ;
4456 
4457  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail;
4458  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4459  if (!SWIG_IsOK(res1)) {
4460    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4461  }
4462  arg1 = (struct attropl *)(argp1);
4463  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4464  if (!SWIG_IsOK(res2)) {
4465    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'");
4466  }
4467  arg2 = (char *)(buf2);
4468  if (arg1->value) free((char*)arg1->value);
4469  if (arg2) {
4470    size_t size = strlen((const char *)(arg2)) + 1;
4471    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4472  } else {
4473    arg1->value = 0;
4474  }
4475  resultobj = SWIG_Py_Void();
4476  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4477  return resultobj;
4478fail:
4479  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4480  return NULL;
4481}
4482
4483
4484SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4485  PyObject *resultobj = 0;
4486  struct attropl *arg1 = (struct attropl *) 0 ;
4487  void *argp1 = 0 ;
4488  int res1 = 0 ;
4489  PyObject * obj0 = 0 ;
4490  char *result = 0 ;
4491 
4492  if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail;
4493  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4494  if (!SWIG_IsOK(res1)) {
4495    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4496  }
4497  arg1 = (struct attropl *)(argp1);
4498  result = (char *) ((arg1)->value);
4499  resultobj = SWIG_FromCharPtr((const char *)result);
4500  return resultobj;
4501fail:
4502  return NULL;
4503}
4504
4505
4506SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4507  PyObject *resultobj = 0;
4508  struct attropl *arg1 = (struct attropl *) 0 ;
4509  enum batch_op arg2 ;
4510  void *argp1 = 0 ;
4511  int res1 = 0 ;
4512  int val2 ;
4513  int ecode2 = 0 ;
4514  PyObject * obj0 = 0 ;
4515  PyObject * obj1 = 0 ;
4516 
4517  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail;
4518  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4519  if (!SWIG_IsOK(res1)) {
4520    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4521  }
4522  arg1 = (struct attropl *)(argp1);
4523  ecode2 = SWIG_AsVal_int(obj1, &val2);
4524  if (!SWIG_IsOK(ecode2)) {
4525    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
4526  } 
4527  arg2 = (enum batch_op)(val2);
4528  if (arg1) (arg1)->op = arg2;
4529  resultobj = SWIG_Py_Void();
4530  return resultobj;
4531fail:
4532  return NULL;
4533}
4534
4535
4536SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4537  PyObject *resultobj = 0;
4538  struct attropl *arg1 = (struct attropl *) 0 ;
4539  void *argp1 = 0 ;
4540  int res1 = 0 ;
4541  PyObject * obj0 = 0 ;
4542  enum batch_op result;
4543 
4544  if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail;
4545  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4546  if (!SWIG_IsOK(res1)) {
4547    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4548  }
4549  arg1 = (struct attropl *)(argp1);
4550  result = (enum batch_op) ((arg1)->op);
4551  resultobj = SWIG_From_int((int)(result));
4552  return resultobj;
4553fail:
4554  return NULL;
4555}
4556
4557
4558SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4559  PyObject *resultobj = 0;
4560  struct attropl *arg1 = (struct attropl *) 0 ;
4561  void *argp1 = 0 ;
4562  int res1 = 0 ;
4563  PyObject * obj0 = 0 ;
4564  char *result = 0 ;
4565 
4566  if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail;
4567  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4568  if (!SWIG_IsOK(res1)) {
4569    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 
4570  }
4571  arg1 = (struct attropl *)(argp1);
4572  result = (char *)attropl___str__(arg1);
4573  resultobj = SWIG_FromCharPtr((const char *)result);
4574  return resultobj;
4575fail:
4576  return NULL;
4577}
4578
4579
4580SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4581  PyObject *resultobj = 0;
4582  struct attropl *arg1 = (struct attropl *) 0 ;
4583  void *argp1 = 0 ;
4584  int res1 = 0 ;
4585  PyObject * obj0 = 0 ;
4586 
4587  if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail;
4588  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
4589  if (!SWIG_IsOK(res1)) {
4590    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 
4591  }
4592  arg1 = (struct attropl *)(argp1);
4593  delete_attropl(arg1);
4594  resultobj = SWIG_Py_Void();
4595  return resultobj;
4596fail:
4597  return NULL;
4598}
4599
4600
4601SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4602  PyObject *obj;
4603  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4604  SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj));
4605  return SWIG_Py_Void();
4606}
4607
4608SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4609  PyObject *resultobj = 0;
4610  struct batch_status *arg1 = (struct batch_status *) 0 ;
4611  struct batch_status *arg2 = (struct batch_status *) 0 ;
4612  void *argp1 = 0 ;
4613  int res1 = 0 ;
4614  void *argp2 = 0 ;
4615  int res2 = 0 ;
4616  PyObject * obj0 = 0 ;
4617  PyObject * obj1 = 0 ;
4618 
4619  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail;
4620  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4621  if (!SWIG_IsOK(res1)) {
4622    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4623  }
4624  arg1 = (struct batch_status *)(argp1);
4625  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN |  0 );
4626  if (!SWIG_IsOK(res2)) {
4627    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); 
4628  }
4629  arg2 = (struct batch_status *)(argp2);
4630  if (arg1) (arg1)->next = arg2;
4631  resultobj = SWIG_Py_Void();
4632  return resultobj;
4633fail:
4634  return NULL;
4635}
4636
4637
4638SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4639  PyObject *resultobj = 0;
4640  struct batch_status *arg1 = (struct batch_status *) 0 ;
4641  void *argp1 = 0 ;
4642  int res1 = 0 ;
4643  PyObject * obj0 = 0 ;
4644  struct batch_status *result = 0 ;
4645 
4646  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail;
4647  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4648  if (!SWIG_IsOK(res1)) {
4649    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4650  }
4651  arg1 = (struct batch_status *)(argp1);
4652  result = (struct batch_status *) ((arg1)->next);
4653  {
4654    PyObject              *obj_batch;
4655    struct batch_status   *ptr;
4656    int                   i=0, len=0;
4657   
4658    // printf("Ja we are in bussniss\n");
4659    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
4660   
4661    // Deterime length of list
4662    //
4663    ptr = result;
4664    while (ptr != NULL) {
4665      len++;
4666      ptr = ptr->next;
4667    }
4668    resultobj = PyList_New(len);
4669   
4670    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4671   
4672    // Make a list of batch_status pointers
4673    //
4674    if (SARA_DEBUG) printf("\t<Contents>\n");
4675    ptr = result;
4676    for (i=0; i < len; i++) {
4677      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
4678      PyList_SetItem(resultobj, i, obj_batch);
4679      if (SARA_DEBUG)  {
4680        printf("\t\t- %s\n", ptr->name);
4681      }
4682      ptr = ptr->next;
4683    }
4684   
4685    free(ptr);
4686    if (SARA_DEBUG) printf("\t</Contents>\n");
4687  }
4688  return resultobj;
4689fail:
4690  return NULL;
4691}
4692
4693
4694SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4695  PyObject *resultobj = 0;
4696  struct batch_status *arg1 = (struct batch_status *) 0 ;
4697  char *arg2 = (char *) 0 ;
4698  void *argp1 = 0 ;
4699  int res1 = 0 ;
4700  int res2 ;
4701  char *buf2 = 0 ;
4702  int alloc2 = 0 ;
4703  PyObject * obj0 = 0 ;
4704  PyObject * obj1 = 0 ;
4705 
4706  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail;
4707  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4708  if (!SWIG_IsOK(res1)) {
4709    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4710  }
4711  arg1 = (struct batch_status *)(argp1);
4712  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4713  if (!SWIG_IsOK(res2)) {
4714    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'");
4715  }
4716  arg2 = (char *)(buf2);
4717  if (arg1->name) free((char*)arg1->name);
4718  if (arg2) {
4719    size_t size = strlen((const char *)(arg2)) + 1;
4720    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4721  } else {
4722    arg1->name = 0;
4723  }
4724  resultobj = SWIG_Py_Void();
4725  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4726  return resultobj;
4727fail:
4728  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4729  return NULL;
4730}
4731
4732
4733SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4734  PyObject *resultobj = 0;
4735  struct batch_status *arg1 = (struct batch_status *) 0 ;
4736  void *argp1 = 0 ;
4737  int res1 = 0 ;
4738  PyObject * obj0 = 0 ;
4739  char *result = 0 ;
4740 
4741  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail;
4742  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4743  if (!SWIG_IsOK(res1)) {
4744    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4745  }
4746  arg1 = (struct batch_status *)(argp1);
4747  result = (char *) ((arg1)->name);
4748  resultobj = SWIG_FromCharPtr((const char *)result);
4749  return resultobj;
4750fail:
4751  return NULL;
4752}
4753
4754
4755SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4756  PyObject *resultobj = 0;
4757  struct batch_status *arg1 = (struct batch_status *) 0 ;
4758  struct attrl *arg2 = (struct attrl *) 0 ;
4759  void *argp1 = 0 ;
4760  int res1 = 0 ;
4761  void *argp2 = 0 ;
4762  int res2 = 0 ;
4763  PyObject * obj0 = 0 ;
4764  PyObject * obj1 = 0 ;
4765 
4766  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail;
4767  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4768  if (!SWIG_IsOK(res1)) {
4769    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4770  }
4771  arg1 = (struct batch_status *)(argp1);
4772  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
4773  if (!SWIG_IsOK(res2)) {
4774    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 
4775  }
4776  arg2 = (struct attrl *)(argp2);
4777  if (arg1) (arg1)->attribs = arg2;
4778  resultobj = SWIG_Py_Void();
4779  return resultobj;
4780fail:
4781  return NULL;
4782}
4783
4784
4785SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4786  PyObject *resultobj = 0;
4787  struct batch_status *arg1 = (struct batch_status *) 0 ;
4788  void *argp1 = 0 ;
4789  int res1 = 0 ;
4790  PyObject * obj0 = 0 ;
4791  struct attrl *result = 0 ;
4792 
4793  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail;
4794  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4795  if (!SWIG_IsOK(res1)) {
4796    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4797  }
4798  arg1 = (struct batch_status *)(argp1);
4799  result = (struct attrl *) ((arg1)->attribs);
4800  {
4801    PyObject      *obj_batch;
4802    struct attrl  *ptr;
4803    int           i=0, len=0;
4804   
4805    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
4806   
4807    ptr = result;
4808    while (ptr != NULL) {
4809      len++;
4810      ptr = ptr->next;
4811    }
4812    resultobj = PyList_New(len);
4813   
4814    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4815   
4816    if (SARA_DEBUG) printf("\t<Contents>\n");
4817    ptr = result;
4818    for (i=0; i < len; i++) {
4819      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
4820      PyList_SetItem(resultobj, i, obj_batch);
4821      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
4822      ptr = ptr->next;
4823    }
4824   
4825    free(ptr);
4826    if (SARA_DEBUG) printf("\t</Contents>\n");
4827  }
4828  return resultobj;
4829fail:
4830  return NULL;
4831}
4832
4833
4834SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4835  PyObject *resultobj = 0;
4836  struct batch_status *arg1 = (struct batch_status *) 0 ;
4837  char *arg2 = (char *) 0 ;
4838  void *argp1 = 0 ;
4839  int res1 = 0 ;
4840  int res2 ;
4841  char *buf2 = 0 ;
4842  int alloc2 = 0 ;
4843  PyObject * obj0 = 0 ;
4844  PyObject * obj1 = 0 ;
4845 
4846  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail;
4847  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4848  if (!SWIG_IsOK(res1)) {
4849    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4850  }
4851  arg1 = (struct batch_status *)(argp1);
4852  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4853  if (!SWIG_IsOK(res2)) {
4854    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'");
4855  }
4856  arg2 = (char *)(buf2);
4857  if (arg1->text) free((char*)arg1->text);
4858  if (arg2) {
4859    size_t size = strlen((const char *)(arg2)) + 1;
4860    arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4861  } else {
4862    arg1->text = 0;
4863  }
4864  resultobj = SWIG_Py_Void();
4865  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4866  return resultobj;
4867fail:
4868  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4869  return NULL;
4870}
4871
4872
4873SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4874  PyObject *resultobj = 0;
4875  struct batch_status *arg1 = (struct batch_status *) 0 ;
4876  void *argp1 = 0 ;
4877  int res1 = 0 ;
4878  PyObject * obj0 = 0 ;
4879  char *result = 0 ;
4880 
4881  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail;
4882  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4883  if (!SWIG_IsOK(res1)) {
4884    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4885  }
4886  arg1 = (struct batch_status *)(argp1);
4887  result = (char *) ((arg1)->text);
4888  resultobj = SWIG_FromCharPtr((const char *)result);
4889  return resultobj;
4890fail:
4891  return NULL;
4892}
4893
4894
4895SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896  PyObject *obj;
4897  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4898  SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj));
4899  return SWIG_Py_Void();
4900}
4901
4902SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) {
4903  {
4904    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
4905    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
4906    if (!SWIG_IsOK(res)) {
4907      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'");
4908    }
4909    if (pbs_server) free((char*)pbs_server);
4910    if (alloc == SWIG_NEWOBJ) {
4911      pbs_server = cptr;
4912    } else {
4913      pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
4914    }
4915  }
4916  return 0;
4917fail:
4918  return 1;
4919}
4920
4921
4922SWIGINTERN PyObject *Swig_var_pbs_server_get(void) {
4923  PyObject *pyobj = 0;
4924 
4925  pyobj = SWIG_FromCharPtr(pbs_server);
4926  return pyobj;
4927}
4928
4929
4930SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4931  PyObject *resultobj = 0;
4932  int arg1 ;
4933  char *arg2 = (char *) 0 ;
4934  int val1 ;
4935  int ecode1 = 0 ;
4936  int res2 ;
4937  char *buf2 = 0 ;
4938  int alloc2 = 0 ;
4939  PyObject * obj0 = 0 ;
4940  PyObject * obj1 = 0 ;
4941  char *result = 0 ;
4942 
4943  if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail;
4944  ecode1 = SWIG_AsVal_int(obj0, &val1);
4945  if (!SWIG_IsOK(ecode1)) {
4946    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'");
4947  } 
4948  arg1 = (int)(val1);
4949  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4950  if (!SWIG_IsOK(res2)) {
4951    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'");
4952  }
4953  arg2 = (char *)(buf2);
4954  result = (char *)avail(arg1,arg2);
4955  resultobj = SWIG_FromCharPtr((const char *)result);
4956  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4957  return resultobj;
4958fail:
4959  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4960  return NULL;
4961}
4962
4963
4964SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4965  PyObject *resultobj = 0;
4966  int arg1 ;
4967  char *arg2 = (char *) 0 ;
4968  char *arg3 = (char *) 0 ;
4969  char *arg4 = (char *) 0 ;
4970  int val1 ;
4971  int ecode1 = 0 ;
4972  int res2 ;
4973  char *buf2 = 0 ;
4974  int alloc2 = 0 ;
4975  int res3 ;
4976  char *buf3 = 0 ;
4977  int alloc3 = 0 ;
4978  int res4 ;
4979  char *buf4 = 0 ;
4980  int alloc4 = 0 ;
4981  PyObject * obj0 = 0 ;
4982  PyObject * obj1 = 0 ;
4983  PyObject * obj2 = 0 ;
4984  PyObject * obj3 = 0 ;
4985  int result;
4986 
4987  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4988  ecode1 = SWIG_AsVal_int(obj0, &val1);
4989  if (!SWIG_IsOK(ecode1)) {
4990    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'");
4991  } 
4992  arg1 = (int)(val1);
4993  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4994  if (!SWIG_IsOK(res2)) {
4995    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'");
4996  }
4997  arg2 = (char *)(buf2);
4998  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4999  if (!SWIG_IsOK(res3)) {
5000    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'");
5001  }
5002  arg3 = (char *)(buf3);
5003  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5004  if (!SWIG_IsOK(res4)) {
5005    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'");
5006  }
5007  arg4 = (char *)(buf4);
5008  result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
5009  resultobj = SWIG_From_int((int)(result));
5010  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5011  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5012  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5013  return resultobj;
5014fail:
5015  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5016  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5017  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5018  return NULL;
5019}
5020
5021
5022SWIGINTERN PyObject *_wrap_pbs_alterjob_async(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5023  PyObject *resultobj = 0;
5024  int arg1 ;
5025  char *arg2 = (char *) 0 ;
5026  struct attrl *arg3 = (struct attrl *) 0 ;
5027  char *arg4 = (char *) 0 ;
5028  int val1 ;
5029  int ecode1 = 0 ;
5030  int res2 ;
5031  char *buf2 = 0 ;
5032  int alloc2 = 0 ;
5033  int res4 ;
5034  char *buf4 = 0 ;
5035  int alloc4 = 0 ;
5036  PyObject * obj0 = 0 ;
5037  PyObject * obj1 = 0 ;
5038  PyObject * obj2 = 0 ;
5039  PyObject * obj3 = 0 ;
5040  int result;
5041 
5042  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob_async",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5043  ecode1 = SWIG_AsVal_int(obj0, &val1);
5044  if (!SWIG_IsOK(ecode1)) {
5045    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob_async" "', argument " "1"" of type '" "int""'");
5046  } 
5047  arg1 = (int)(val1);
5048  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5049  if (!SWIG_IsOK(res2)) {
5050    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob_async" "', argument " "2"" of type '" "char *""'");
5051  }
5052  arg2 = (char *)(buf2);
5053  {
5054    PyObject      *py_obj;
5055    struct attrl  *ptr, *prev;
5056    char          s[255];
5057    int           i=0, size=0;
5058   
5059    // printf("Python --> C\n");
5060   
5061    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
5062   
5063    size = Get_List_Size(obj2);
5064    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
5065   
5066    if ( size == -1 ) {
5067      PyErr_SetString(PyExc_TypeError, "not a list");
5068      return NULL; 
5069    }
5070   
5071    if (SARA_DEBUG) printf("\t<Contents>\n");
5072   
5073    arg3 = prev = NULL;
5074    for ( i=0; i < size; i++ ) {
5075      py_obj = PyList_GetItem(obj2, i);
5076      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
5077        sprintf(s,"list item %d has wrong type", i);
5078        PyErr_SetString(PyExc_TypeError, s);
5079        return NULL;
5080       
5081        // This will skipp the wrong entry
5082        // continue;
5083      }
5084     
5085      /*
5086           * Make first entry head of C linked list
5087          */ 
5088      if ( i == 0) {
5089        arg3 = ptr;
5090        ptr->next = prev;
5091      }
5092      else {
5093        prev->next = ptr;
5094        ptr->next = NULL;
5095      }
5096      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
5097     
5098      prev = ptr;
5099     
5100    } // end for
5101    if (SARA_DEBUG) printf("\t</Contents>\n");
5102  }
5103  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5104  if (!SWIG_IsOK(res4)) {
5105    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob_async" "', argument " "4"" of type '" "char *""'");
5106  }
5107  arg4 = (char *)(buf4);
5108  result = (int)pbs_alterjob_async(arg1,arg2,arg3,arg4);
5109  resultobj = SWIG_From_int((int)(result));
5110  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5111  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5112  return resultobj;
5113fail:
5114  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5115  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5116  return NULL;
5117}
5118
5119
5120SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5121  PyObject *resultobj = 0;
5122  int arg1 ;
5123  char *arg2 = (char *) 0 ;
5124  struct attrl *arg3 = (struct attrl *) 0 ;
5125  char *arg4 = (char *) 0 ;
5126  int val1 ;
5127  int ecode1 = 0 ;
5128  int res2 ;
5129  char *buf2 = 0 ;
5130  int alloc2 = 0 ;
5131  int res4 ;
5132  char *buf4 = 0 ;
5133  int alloc4 = 0 ;
5134  PyObject * obj0 = 0 ;
5135  PyObject * obj1 = 0 ;
5136  PyObject * obj2 = 0 ;
5137  PyObject * obj3 = 0 ;
5138  int result;
5139 
5140  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5141  ecode1 = SWIG_AsVal_int(obj0, &val1);
5142  if (!SWIG_IsOK(ecode1)) {
5143    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'");
5144  } 
5145  arg1 = (int)(val1);
5146  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5147  if (!SWIG_IsOK(res2)) {
5148    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'");
5149  }
5150  arg2 = (char *)(buf2);
5151  {
5152    PyObject      *py_obj;
5153    struct attrl  *ptr, *prev;
5154    char          s[255];
5155    int           i=0, size=0;
5156   
5157    // printf("Python --> C\n");
5158   
5159    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
5160   
5161    size = Get_List_Size(obj2);
5162    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
5163   
5164    if ( size == -1 ) {
5165      PyErr_SetString(PyExc_TypeError, "not a list");
5166      return NULL; 
5167    }
5168   
5169    if (SARA_DEBUG) printf("\t<Contents>\n");
5170   
5171    arg3 = prev = NULL;
5172    for ( i=0; i < size; i++ ) {
5173      py_obj = PyList_GetItem(obj2, i);
5174      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
5175        sprintf(s,"list item %d has wrong type", i);
5176        PyErr_SetString(PyExc_TypeError, s);
5177        return NULL;
5178       
5179        // This will skipp the wrong entry
5180        // continue;
5181      }
5182     
5183      /*
5184           * Make first entry head of C linked list
5185          */ 
5186      if ( i == 0) {
5187        arg3 = ptr;
5188        ptr->next = prev;
5189      }
5190      else {
5191        prev->next = ptr;
5192        ptr->next = NULL;
5193      }
5194      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
5195     
5196      prev = ptr;
5197     
5198    } // end for
5199    if (SARA_DEBUG) printf("\t</Contents>\n");
5200  }
5201  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5202  if (!SWIG_IsOK(res4)) {
5203    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'");
5204  }
5205  arg4 = (char *)(buf4);
5206  result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
5207  resultobj = SWIG_From_int((int)(result));
5208  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5209  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5210  return resultobj;
5211fail:
5212  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5213  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5214  return NULL;
5215}
5216
5217
5218SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5219  PyObject *resultobj = 0;
5220  char *arg1 = (char *) 0 ;
5221  int res1 ;
5222  char *buf1 = 0 ;
5223  int alloc1 = 0 ;
5224  PyObject * obj0 = 0 ;
5225  int result;
5226 
5227  if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail;
5228  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5229  if (!SWIG_IsOK(res1)) {
5230    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'");
5231  }
5232  arg1 = (char *)(buf1);
5233  result = (int)pbs_connect(arg1);
5234  resultobj = SWIG_From_int((int)(result));
5235  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5236  return resultobj;
5237fail:
5238  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5239  return NULL;
5240}
5241
5242
5243SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5244  PyObject *resultobj = 0;
5245  int result;
5246 
5247  if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail;
5248  result = (int)pbs_query_max_connections();
5249  resultobj = SWIG_From_int((int)(result));
5250  return resultobj;
5251fail:
5252  return NULL;
5253}
5254
5255
5256SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5257  PyObject *resultobj = 0;
5258  char *result = 0 ;
5259 
5260  if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail;
5261  result = (char *)pbs_default();
5262  resultobj = SWIG_FromCharPtr((const char *)result);
5263  return resultobj;
5264fail:
5265  return NULL;
5266}
5267
5268
5269SWIGINTERN PyObject *_wrap_pbs_fbserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5270  PyObject *resultobj = 0;
5271  char *result = 0 ;
5272 
5273  if (!PyArg_ParseTuple(args,(char *)":pbs_fbserver")) SWIG_fail;
5274  result = (char *)pbs_fbserver();
5275  resultobj = SWIG_FromCharPtr((const char *)result);
5276  return resultobj;
5277fail:
5278  return NULL;
5279}
5280
5281
5282SWIGINTERN PyObject *_wrap_pbs_get_server_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5283  PyObject *resultobj = 0;
5284  char *result = 0 ;
5285 
5286  if (!PyArg_ParseTuple(args,(char *)":pbs_get_server_list")) SWIG_fail;
5287  result = (char *)pbs_get_server_list();
5288  resultobj = SWIG_FromCharPtr((const char *)result);
5289  return resultobj;
5290fail:
5291  return NULL;
5292}
5293
5294
5295SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5296  PyObject *resultobj = 0;
5297  int arg1 ;
5298  char *arg2 = (char *) 0 ;
5299  char *arg3 = (char *) 0 ;
5300  int val1 ;
5301  int ecode1 = 0 ;
5302  int res2 ;
5303  char *buf2 = 0 ;
5304  int alloc2 = 0 ;
5305  int res3 ;
5306  char *buf3 = 0 ;
5307  int alloc3 = 0 ;
5308  PyObject * obj0 = 0 ;
5309  PyObject * obj1 = 0 ;
5310  PyObject * obj2 = 0 ;
5311  int result;
5312 
5313  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail;
5314  ecode1 = SWIG_AsVal_int(obj0, &val1);
5315  if (!SWIG_IsOK(ecode1)) {
5316    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'");
5317  } 
5318  arg1 = (int)(val1);
5319  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5320  if (!SWIG_IsOK(res2)) {
5321    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'");
5322  }
5323  arg2 = (char *)(buf2);
5324  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5325  if (!SWIG_IsOK(res3)) {
5326    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'");
5327  }
5328  arg3 = (char *)(buf3);
5329  result = (int)pbs_deljob(arg1,arg2,arg3);
5330  resultobj = SWIG_From_int((int)(result));
5331  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5332  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5333  return resultobj;
5334fail:
5335  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5336  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5337  return NULL;
5338}
5339
5340
5341SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5342  PyObject *resultobj = 0;
5343  int arg1 ;
5344  int val1 ;
5345  int ecode1 = 0 ;
5346  PyObject * obj0 = 0 ;
5347  int result;
5348 
5349  if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail;
5350  ecode1 = SWIG_AsVal_int(obj0, &val1);
5351  if (!SWIG_IsOK(ecode1)) {
5352    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'");
5353  } 
5354  arg1 = (int)(val1);
5355  result = (int)pbs_disconnect(arg1);
5356  resultobj = SWIG_From_int((int)(result));
5357  return resultobj;
5358fail:
5359  return NULL;
5360}
5361
5362
5363SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5364  PyObject *resultobj = 0;
5365  int arg1 ;
5366  int val1 ;
5367  int ecode1 = 0 ;
5368  PyObject * obj0 = 0 ;
5369  char *result = 0 ;
5370 
5371  if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail;
5372  ecode1 = SWIG_AsVal_int(obj0, &val1);
5373  if (!SWIG_IsOK(ecode1)) {
5374    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'");
5375  } 
5376  arg1 = (int)(val1);
5377  result = (char *)pbs_geterrmsg(arg1);
5378  resultobj = SWIG_FromCharPtr((const char *)result);
5379  return resultobj;
5380fail:
5381  return NULL;
5382}
5383
5384
5385SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5386  PyObject *resultobj = 0;
5387  int arg1 ;
5388  char *arg2 = (char *) 0 ;
5389  char *arg3 = (char *) 0 ;
5390  char *arg4 = (char *) 0 ;
5391  int val1 ;
5392  int ecode1 = 0 ;
5393  int res2 ;
5394  char *buf2 = 0 ;
5395  int alloc2 = 0 ;
5396  int res3 ;
5397  char *buf3 = 0 ;
5398  int alloc3 = 0 ;
5399  int res4 ;
5400  char *buf4 = 0 ;
5401  int alloc4 = 0 ;
5402  PyObject * obj0 = 0 ;
5403  PyObject * obj1 = 0 ;
5404  PyObject * obj2 = 0 ;
5405  PyObject * obj3 = 0 ;
5406  int result;
5407 
5408  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5409  ecode1 = SWIG_AsVal_int(obj0, &val1);
5410  if (!SWIG_IsOK(ecode1)) {
5411    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'");
5412  } 
5413  arg1 = (int)(val1);
5414  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5415  if (!SWIG_IsOK(res2)) {
5416    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'");
5417  }
5418  arg2 = (char *)(buf2);
5419  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5420  if (!SWIG_IsOK(res3)) {
5421    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'");
5422  }
5423  arg3 = (char *)(buf3);
5424  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5425  if (!SWIG_IsOK(res4)) {
5426    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'");
5427  }
5428  arg4 = (char *)(buf4);
5429  result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
5430  resultobj = SWIG_From_int((int)(result));
5431  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5432  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5433  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5434  return resultobj;
5435fail:
5436  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5437  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5438  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5439  return NULL;
5440}
5441
5442
5443SWIGINTERN PyObject *_wrap_pbs_checkpointjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5444  PyObject *resultobj = 0;
5445  int arg1 ;
5446  char *arg2 = (char *) 0 ;
5447  char *arg3 = (char *) 0 ;
5448  int val1 ;
5449  int ecode1 = 0 ;
5450  int res2 ;
5451  char *buf2 = 0 ;
5452  int alloc2 = 0 ;
5453  int res3 ;
5454  char *buf3 = 0 ;
5455  int alloc3 = 0 ;
5456  PyObject * obj0 = 0 ;
5457  PyObject * obj1 = 0 ;
5458  PyObject * obj2 = 0 ;
5459  int result;
5460 
5461  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_checkpointjob",&obj0,&obj1,&obj2)) SWIG_fail;
5462  ecode1 = SWIG_AsVal_int(obj0, &val1);
5463  if (!SWIG_IsOK(ecode1)) {
5464    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_checkpointjob" "', argument " "1"" of type '" "int""'");
5465  } 
5466  arg1 = (int)(val1);
5467  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5468  if (!SWIG_IsOK(res2)) {
5469    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_checkpointjob" "', argument " "2"" of type '" "char *""'");
5470  }
5471  arg2 = (char *)(buf2);
5472  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5473  if (!SWIG_IsOK(res3)) {
5474    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_checkpointjob" "', argument " "3"" of type '" "char *""'");
5475  }
5476  arg3 = (char *)(buf3);
5477  result = (int)pbs_checkpointjob(arg1,arg2,arg3);
5478  resultobj = SWIG_From_int((int)(result));
5479  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5480  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5481  return resultobj;
5482fail:
5483  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5484  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5485  return NULL;
5486}
5487
5488
5489SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5490  PyObject *resultobj = 0;
5491  int arg1 ;
5492  char *arg2 = (char *) 0 ;
5493  char *arg3 = (char *) 0 ;
5494  int val1 ;
5495  int ecode1 = 0 ;
5496  int res2 ;
5497  char *buf2 = 0 ;
5498  int alloc2 = 0 ;
5499  int res3 ;
5500  char *buf3 = 0 ;
5501  int alloc3 = 0 ;
5502  PyObject * obj0 = 0 ;
5503  PyObject * obj1 = 0 ;
5504  PyObject * obj2 = 0 ;
5505  char *result = 0 ;
5506 
5507  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail;
5508  ecode1 = SWIG_AsVal_int(obj0, &val1);
5509  if (!SWIG_IsOK(ecode1)) {
5510    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'");
5511  } 
5512  arg1 = (int)(val1);
5513  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5514  if (!SWIG_IsOK(res2)) {
5515    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'");
5516  }
5517  arg2 = (char *)(buf2);
5518  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5519  if (!SWIG_IsOK(res3)) {
5520    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'");
5521  }
5522  arg3 = (char *)(buf3);
5523  result = (char *)pbs_locjob(arg1,arg2,arg3);
5524  resultobj = SWIG_FromCharPtr((const char *)result);
5525  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5526  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5527  return resultobj;
5528fail:
5529  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5530  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5531  return NULL;
5532}
5533
5534
5535SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5536  PyObject *resultobj = 0;
5537  int arg1 ;
5538  int arg2 ;
5539  int arg3 ;
5540  char *arg4 = (char *) 0 ;
5541  struct attropl *arg5 = (struct attropl *) 0 ;
5542  char *arg6 = (char *) 0 ;
5543  int val1 ;
5544  int ecode1 = 0 ;
5545  int val2 ;
5546  int ecode2 = 0 ;
5547  int val3 ;
5548  int ecode3 = 0 ;
5549  int res4 ;
5550  char *buf4 = 0 ;
5551  int alloc4 = 0 ;
5552  void *argp5 = 0 ;
5553  int res5 = 0 ;
5554  int res6 ;
5555  char *buf6 = 0 ;
5556  int alloc6 = 0 ;
5557  PyObject * obj0 = 0 ;
5558  PyObject * obj1 = 0 ;
5559  PyObject * obj2 = 0 ;
5560  PyObject * obj3 = 0 ;
5561  PyObject * obj4 = 0 ;
5562  PyObject * obj5 = 0 ;
5563  int result;
5564 
5565  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
5566  ecode1 = SWIG_AsVal_int(obj0, &val1);
5567  if (!SWIG_IsOK(ecode1)) {
5568    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'");
5569  } 
5570  arg1 = (int)(val1);
5571  ecode2 = SWIG_AsVal_int(obj1, &val2);
5572  if (!SWIG_IsOK(ecode2)) {
5573    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'");
5574  } 
5575  arg2 = (int)(val2);
5576  ecode3 = SWIG_AsVal_int(obj2, &val3);
5577  if (!SWIG_IsOK(ecode3)) {
5578    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'");
5579  } 
5580  arg3 = (int)(val3);
5581  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5582  if (!SWIG_IsOK(res4)) {
5583    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'");
5584  }
5585  arg4 = (char *)(buf4);
5586  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_attropl, 0 |  0 );
5587  if (!SWIG_IsOK(res5)) {
5588    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_manager" "', argument " "5"" of type '" "struct attropl *""'"); 
5589  }
5590  arg5 = (struct attropl *)(argp5);
5591  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
5592  if (!SWIG_IsOK(res6)) {
5593    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'");
5594  }
5595  arg6 = (char *)(buf6);
5596  result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
5597  resultobj = SWIG_From_int((int)(result));
5598  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5599  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
5600  return resultobj;
5601fail:
5602  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5603  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
5604  return NULL;
5605}
5606
5607
5608SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5609  PyObject *resultobj = 0;
5610  int arg1 ;
5611  char *arg2 = (char *) 0 ;
5612  char *arg3 = (char *) 0 ;
5613  char *arg4 = (char *) 0 ;
5614  int val1 ;
5615  int ecode1 = 0 ;
5616  int res2 ;
5617  char *buf2 = 0 ;
5618  int alloc2 = 0 ;
5619  int res3 ;
5620  char *buf3 = 0 ;
5621  int alloc3 = 0 ;
5622  int res4 ;
5623  char *buf4 = 0 ;
5624  int alloc4 = 0 ;
5625  PyObject * obj0 = 0 ;
5626  PyObject * obj1 = 0 ;
5627  PyObject * obj2 = 0 ;
5628  PyObject * obj3 = 0 ;
5629  int result;
5630 
5631  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5632  ecode1 = SWIG_AsVal_int(obj0, &val1);
5633  if (!SWIG_IsOK(ecode1)) {
5634    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'");
5635  } 
5636  arg1 = (int)(val1);
5637  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5638  if (!SWIG_IsOK(res2)) {
5639    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'");
5640  }
5641  arg2 = (char *)(buf2);
5642  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5643  if (!SWIG_IsOK(res3)) {
5644    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'");
5645  }
5646  arg3 = (char *)(buf3);
5647  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5648  if (!SWIG_IsOK(res4)) {
5649    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'");
5650  }
5651  arg4 = (char *)(buf4);
5652  result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
5653  resultobj = SWIG_From_int((int)(result));
5654  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5655  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5656  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5657  return resultobj;
5658fail:
5659  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5660  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5661  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5662  return NULL;
5663}
5664
5665
5666SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5667  PyObject *resultobj = 0;
5668  int arg1 ;
5669  char *arg2 = (char *) 0 ;
5670  int arg3 ;
5671  char *arg4 = (char *) 0 ;
5672  char *arg5 = (char *) 0 ;
5673  int val1 ;
5674  int ecode1 = 0 ;
5675  int res2 ;
5676  char *buf2 = 0 ;
5677  int alloc2 = 0 ;
5678  int val3 ;
5679  int ecode3 = 0 ;
5680  int res4 ;
5681  char *buf4 = 0 ;
5682  int alloc4 = 0 ;
5683  int res5 ;
5684  char *buf5 = 0 ;
5685  int alloc5 = 0 ;
5686  PyObject * obj0 = 0 ;
5687  PyObject * obj1 = 0 ;
5688  PyObject * obj2 = 0 ;
5689  PyObject * obj3 = 0 ;
5690  PyObject * obj4 = 0 ;
5691  int result;
5692 
5693  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5694  ecode1 = SWIG_AsVal_int(obj0, &val1);
5695  if (!SWIG_IsOK(ecode1)) {
5696    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'");
5697  } 
5698  arg1 = (int)(val1);
5699  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5700  if (!SWIG_IsOK(res2)) {
5701    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'");
5702  }
5703  arg2 = (char *)(buf2);
5704  ecode3 = SWIG_AsVal_int(obj2, &val3);
5705  if (!SWIG_IsOK(ecode3)) {
5706    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'");
5707  } 
5708  arg3 = (int)(val3);
5709  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5710  if (!SWIG_IsOK(res4)) {
5711    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'");
5712  }
5713  arg4 = (char *)(buf4);
5714  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
5715  if (!SWIG_IsOK(res5)) {
5716    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'");
5717  }
5718  arg5 = (char *)(buf5);
5719  result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
5720  resultobj = SWIG_From_int((int)(result));
5721  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5722  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5723  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
5724  return resultobj;
5725fail:
5726  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5727  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5728  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
5729  return NULL;
5730}
5731
5732
5733SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5734  PyObject *resultobj = 0;
5735  int arg1 ;
5736  char *arg2 = (char *) 0 ;
5737  char *arg3 = (char *) 0 ;
5738  char *arg4 = (char *) 0 ;
5739  int val1 ;
5740  int ecode1 = 0 ;
5741  int res2 ;
5742  char *buf2 = 0 ;
5743  int alloc2 = 0 ;
5744  int res3 ;
5745  char *buf3 = 0 ;
5746  int alloc3 = 0 ;
5747  int res4 ;
5748  char *buf4 = 0 ;
5749  int alloc4 = 0 ;
5750  PyObject * obj0 = 0 ;
5751  PyObject * obj1 = 0 ;
5752  PyObject * obj2 = 0 ;
5753  PyObject * obj3 = 0 ;
5754  int result;
5755 
5756  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5757  ecode1 = SWIG_AsVal_int(obj0, &val1);
5758  if (!SWIG_IsOK(ecode1)) {
5759    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'");
5760  } 
5761  arg1 = (int)(val1);
5762  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5763  if (!SWIG_IsOK(res2)) {
5764    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'");
5765  }
5766  arg2 = (char *)(buf2);
5767  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5768  if (!SWIG_IsOK(res3)) {
5769    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'");
5770  }
5771  arg3 = (char *)(buf3);
5772  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5773  if (!SWIG_IsOK(res4)) {
5774    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'");
5775  }
5776  arg4 = (char *)(buf4);
5777  result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
5778  resultobj = SWIG_From_int((int)(result));
5779  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5780  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5781  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5782  return resultobj;
5783fail:
5784  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5785  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5786  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5787  return NULL;
5788}
5789
5790
5791SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5792  PyObject *resultobj = 0;
5793  int arg1 ;
5794  char **arg2 = (char **) 0 ;
5795  int arg3 ;
5796  int *arg4 = (int *) 0 ;
5797  int *arg5 = (int *) 0 ;
5798  int *arg6 = (int *) 0 ;
5799  int *arg7 = (int *) 0 ;
5800  int val1 ;
5801  int ecode1 = 0 ;
5802  void *argp2 = 0 ;
5803  int res2 = 0 ;
5804  int val3 ;
5805  int ecode3 = 0 ;
5806  void *argp4 = 0 ;
5807  int res4 =