source: devel/C/pbs_wrap_2.1.c @ 318

Last change on this file since 318 was 318, checked in by bas, 9 years ago

Updated all pbs files so we are in sync with the 2.4/2.5 features of torque

File size: 273.4 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_attropl swig_types[1]
2933#define SWIGTYPE_p_batch_status swig_types[2]
2934#define SWIGTYPE_p_char swig_types[3]
2935#define SWIGTYPE_p_int swig_types[4]
2936#define SWIGTYPE_p_long swig_types[5]
2937#define SWIGTYPE_p_p_char swig_types[6]
2938static swig_type_info *swig_types[8];
2939static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
2940#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2941#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2942
2943/* -------- TYPES TABLE (END) -------- */
2944
2945#if (PY_VERSION_HEX <= 0x02000000)
2946# if !defined(SWIG_PYTHON_CLASSIC)
2947#  error "This python version requires swig to be run with the '-classic' option"
2948# endif
2949#endif
2950
2951/*-----------------------------------------------
2952              @(target):= _pbs.so
2953  ------------------------------------------------*/
2954#if PY_VERSION_HEX >= 0x03000000
2955#  define SWIG_init    PyInit__pbs
2956
2957#else
2958#  define SWIG_init    init_pbs
2959
2960#endif
2961#define SWIG_name    "_pbs"
2962
2963#define SWIGVERSION 0x020007
2964#define SWIG_VERSION SWIGVERSION
2965
2966
2967#define SWIG_as_voidptr(a) (void *)((const void *)(a))
2968#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2969
2970
2971
2972#include "pbs_ifl.h"
2973#include "pbs_error.h"
2974#include "rm.h"
2975#include "log.h"
2976
2977#define SARA_DEBUG 0
2978
2979//extern int pbs_errno;
2980
2981
2982
2983int Get_List_Size(PyObject *src)
2984{
2985  if (PyList_Check(src))
2986    return(PyList_Size(src));
2987
2988  /* check if valid NULL pointer */
2989  if ( PyString_Check(src) ) {
2990    if ( ! strcmp(PyString_AsString(src), "NULL") )
2991      return(0);
2992  }
2993  return(-1);
2994
2995} // end Get_List_Size()
2996
2997
2998
2999
3000// The default constructor for struct attrl
3001//
3002struct attrl *new_attrl(int number)
3003{
3004  struct attrl *ptr;
3005  struct attrl *prev, *current;
3006  int i;
3007
3008  /*
3009    allocate memory as a one block is handy for Python scripts
3010    and fill in the next fields so it also works for the C-library
3011  */
3012  ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
3013
3014  prev = NULL;
3015  current = ptr + (number - 1);
3016  for (i=0; i < number; i++)
3017  { 
3018    // printf("constructor called\n");
3019    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
3020    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
3021    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
3022
3023    bzero( (void*) current->name, sizeof(current->name));
3024    bzero( (void*) current->resource, sizeof(current->resource));
3025    bzero( (void*) current->value, sizeof(current->value));
3026
3027    current->next     = prev;
3028    prev = current;
3029    current--;
3030  }
3031  return (struct attrl *)ptr;
3032
3033} // end new_attrl()
3034
3035
3036
3037// The default constructor for struct attropl
3038//
3039struct attropl *new_attropl(int number)
3040{
3041  struct attropl *ptr;
3042  struct attropl *prev, *current;
3043  int i;
3044
3045  /*
3046    allocate memory as a one block is handy for Python scripts
3047    and fill in the next fields so it also works for the C-library
3048  */
3049  ptr = (struct attropl *) malloc(number * sizeof(struct attropl));
3050
3051  prev = NULL;
3052  current = ptr + (number - 1);
3053  for (i=0; i < number; i++)
3054  { 
3055    // printf("constructor called\n");
3056    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
3057    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
3058    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
3059
3060    bzero( (void*) current->name, sizeof(current->name));
3061    bzero( (void*) current->resource, sizeof(current->resource));
3062    bzero( (void*) current->value, sizeof(current->value));
3063    // current->op = 0;
3064
3065    current->next     = prev;
3066    prev = current;
3067    current--;
3068  }
3069  return (struct attropl *)ptr;
3070
3071} // end new_attropl()
3072
3073/* Not used only returned */
3074struct batch_status *new_batch_status()
3075{
3076   struct batch_status *ptr;
3077
3078   ptr = (struct batch_status *) malloc(sizeof(struct batch_status));
3079   return (struct batch_status *)ptr;
3080} // end new struct batch_status
3081
3082int get_error()
3083{
3084   char *errmsg;
3085
3086   errmsg = pbse_to_txt(pbs_errno);
3087   if (SARA_DEBUG)
3088   {
3089      printf("Bas = %d\n", pbs_errno);
3090      printf("Bas = %d, text = %s\n", pbs_errno, errmsg);
3091   }
3092   return (pbs_errno);
3093}
3094
3095
3096
3097
3098#include <limits.h>
3099#if !defined(SWIG_NO_LLONG_MAX)
3100# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3101#   define LLONG_MAX __LONG_LONG_MAX__
3102#   define LLONG_MIN (-LLONG_MAX - 1LL)
3103#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3104# endif
3105#endif
3106
3107
3108SWIGINTERN int
3109SWIG_AsVal_double (PyObject *obj, double *val)
3110{
3111  int res = SWIG_TypeError;
3112  if (PyFloat_Check(obj)) {
3113    if (val) *val = PyFloat_AsDouble(obj);
3114    return SWIG_OK;
3115  } else if (PyInt_Check(obj)) {
3116    if (val) *val = PyInt_AsLong(obj);
3117    return SWIG_OK;
3118  } else if (PyLong_Check(obj)) {
3119    double v = PyLong_AsDouble(obj);
3120    if (!PyErr_Occurred()) {
3121      if (val) *val = v;
3122      return SWIG_OK;
3123    } else {
3124      PyErr_Clear();
3125    }
3126  }
3127#ifdef SWIG_PYTHON_CAST_MODE
3128  {
3129    int dispatch = 0;
3130    double d = PyFloat_AsDouble(obj);
3131    if (!PyErr_Occurred()) {
3132      if (val) *val = d;
3133      return SWIG_AddCast(SWIG_OK);
3134    } else {
3135      PyErr_Clear();
3136    }
3137    if (!dispatch) {
3138      long v = PyLong_AsLong(obj);
3139      if (!PyErr_Occurred()) {
3140        if (val) *val = v;
3141        return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3142      } else {
3143        PyErr_Clear();
3144      }
3145    }
3146  }
3147#endif
3148  return res;
3149}
3150
3151
3152#include <float.h>
3153
3154
3155#include <math.h>
3156
3157
3158SWIGINTERNINLINE int
3159SWIG_CanCastAsInteger(double *d, double min, double max) {
3160  double x = *d;
3161  if ((min <= x && x <= max)) {
3162   double fx = floor(x);
3163   double cx = ceil(x);
3164   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3165   if ((errno == EDOM) || (errno == ERANGE)) {
3166     errno = 0;
3167   } else {
3168     double summ, reps, diff;
3169     if (rd < x) {
3170       diff = x - rd;
3171     } else if (rd > x) {
3172       diff = rd - x;
3173     } else {
3174       return 1;
3175     }
3176     summ = rd + x;
3177     reps = diff/summ;
3178     if (reps < 8*DBL_EPSILON) {
3179       *d = rd;
3180       return 1;
3181     }
3182   }
3183  }
3184  return 0;
3185}
3186
3187
3188SWIGINTERN int
3189SWIG_AsVal_long (PyObject *obj, long* val)
3190{
3191  if (PyInt_Check(obj)) {
3192    if (val) *val = PyInt_AsLong(obj);
3193    return SWIG_OK;
3194  } else if (PyLong_Check(obj)) {
3195    long v = PyLong_AsLong(obj);
3196    if (!PyErr_Occurred()) {
3197      if (val) *val = v;
3198      return SWIG_OK;
3199    } else {
3200      PyErr_Clear();
3201    }
3202  }
3203#ifdef SWIG_PYTHON_CAST_MODE
3204  {
3205    int dispatch = 0;
3206    long v = PyInt_AsLong(obj);
3207    if (!PyErr_Occurred()) {
3208      if (val) *val = v;
3209      return SWIG_AddCast(SWIG_OK);
3210    } else {
3211      PyErr_Clear();
3212    }
3213    if (!dispatch) {
3214      double d;
3215      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3216      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3217        if (val) *val = (long)(d);
3218        return res;
3219      }
3220    }
3221  }
3222#endif
3223  return SWIG_TypeError;
3224}
3225
3226
3227SWIGINTERN int
3228SWIG_AsVal_int (PyObject * obj, int *val)
3229{
3230  long v;
3231  int res = SWIG_AsVal_long (obj, &v);
3232  if (SWIG_IsOK(res)) {
3233    if ((v < INT_MIN || v > INT_MAX)) {
3234      return SWIG_OverflowError;
3235    } else {
3236      if (val) *val = (int)(v);
3237    }
3238  } 
3239  return res;
3240}
3241
3242
3243SWIGINTERNINLINE PyObject*
3244  SWIG_From_int  (int value)
3245{
3246  return PyInt_FromLong((long) value);
3247}
3248
3249
3250SWIGINTERN swig_type_info*
3251SWIG_pchar_descriptor(void)
3252{
3253  static int init = 0;
3254  static swig_type_info* info = 0;
3255  if (!init) {
3256    info = SWIG_TypeQuery("_p_char");
3257    init = 1;
3258  }
3259  return info;
3260}
3261
3262
3263SWIGINTERNINLINE PyObject *
3264SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3265{
3266  if (carray) {
3267    if (size > INT_MAX) {
3268      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3269      return pchar_descriptor ? 
3270        SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3271    } else {
3272#if PY_VERSION_HEX >= 0x03000000
3273      return PyUnicode_FromStringAndSize(carray, (int)(size));
3274#else
3275      return PyString_FromStringAndSize(carray, (int)(size));
3276#endif
3277    }
3278  } else {
3279    return SWIG_Py_Void();
3280  }
3281}
3282
3283
3284SWIGINTERNINLINE PyObject * 
3285SWIG_FromCharPtr(const char *cptr)
3286{ 
3287  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3288}
3289
3290
3291SWIGINTERN int
3292SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3293{
3294#if PY_VERSION_HEX>=0x03000000
3295  if (PyUnicode_Check(obj))
3296#else 
3297  if (PyString_Check(obj))
3298#endif
3299  {
3300    char *cstr; Py_ssize_t len;
3301#if PY_VERSION_HEX>=0x03000000
3302    if (!alloc && cptr) {
3303        /* We can't allow converting without allocation, since the internal
3304           representation of string in Python 3 is UCS-2/UCS-4 but we require
3305           a UTF-8 representation.
3306           TODO(bhy) More detailed explanation */
3307        return SWIG_RuntimeError;
3308    }
3309    obj = PyUnicode_AsUTF8String(obj);
3310    PyBytes_AsStringAndSize(obj, &cstr, &len);
3311    if(alloc) *alloc = SWIG_NEWOBJ;
3312#else
3313    PyString_AsStringAndSize(obj, &cstr, &len);
3314#endif
3315    if (cptr) {
3316      if (alloc) {
3317        /*
3318           In python the user should not be able to modify the inner
3319           string representation. To warranty that, if you define
3320           SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3321           buffer is always returned.
3322
3323           The default behavior is just to return the pointer value,
3324           so, be careful.
3325        */ 
3326#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3327        if (*alloc != SWIG_OLDOBJ) 
3328#else
3329        if (*alloc == SWIG_NEWOBJ) 
3330#endif
3331          {
3332            *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3333            *alloc = SWIG_NEWOBJ;
3334          }
3335        else {
3336          *cptr = cstr;
3337          *alloc = SWIG_OLDOBJ;
3338        }
3339      } else {
3340        #if PY_VERSION_HEX>=0x03000000
3341        assert(0); /* Should never reach here in Python 3 */
3342        #endif
3343        *cptr = SWIG_Python_str_AsChar(obj);
3344      }
3345    }
3346    if (psize) *psize = len + 1;
3347#if PY_VERSION_HEX>=0x03000000
3348    Py_XDECREF(obj);
3349#endif
3350    return SWIG_OK;
3351  } else {
3352    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3353    if (pchar_descriptor) {
3354      void* vptr = 0;
3355      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3356        if (cptr) *cptr = (char *) vptr;
3357        if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3358        if (alloc) *alloc = SWIG_OLDOBJ;
3359        return SWIG_OK;
3360      }
3361    }
3362  }
3363  return SWIG_TypeError;
3364}
3365
3366
3367
3368
3369SWIGINTERN char *attrl___str__(struct attrl *self){
3370    static char temp[4 * 255] ;
3371    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
3372      self->name, self->resource, self->value);
3373   
3374    return &temp[0];
3375  }
3376SWIGINTERN void delete_attrl(struct attrl *self){
3377    if (SARA_DEBUG)
3378       printf("Bas free attrl\n");
3379
3380    /*
3381        free(self);
3382    */
3383  }
3384SWIGINTERN char *attropl___str__(struct attropl *self){
3385    static char temp[4 * 255] ;
3386    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
3387      self->name, self->resource, self->value);
3388   
3389    return &temp[0];
3390  }
3391SWIGINTERN void delete_attropl(struct attropl *self){
3392    if (SARA_DEBUG)
3393       printf("Bas free attropl\n");
3394
3395    /*
3396        free(self);
3397    */
3398  }
3399
3400SWIGINTERN int
3401SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
3402{
3403  if (PyInt_Check(obj)) {
3404    long v = PyInt_AsLong(obj);
3405    if (v >= 0) {
3406      if (val) *val = v;
3407      return SWIG_OK;
3408    } else {
3409      return SWIG_OverflowError;
3410    }
3411  } else if (PyLong_Check(obj)) {
3412    unsigned long v = PyLong_AsUnsignedLong(obj);
3413    if (!PyErr_Occurred()) {
3414      if (val) *val = v;
3415      return SWIG_OK;
3416    } else {
3417      PyErr_Clear();
3418    }
3419  }
3420#ifdef SWIG_PYTHON_CAST_MODE
3421  {
3422    int dispatch = 0;
3423    unsigned long v = PyLong_AsUnsignedLong(obj);
3424    if (!PyErr_Occurred()) {
3425      if (val) *val = v;
3426      return SWIG_AddCast(SWIG_OK);
3427    } else {
3428      PyErr_Clear();
3429    }
3430    if (!dispatch) {
3431      double d;
3432      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3433      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3434        if (val) *val = (unsigned long)(d);
3435        return res;
3436      }
3437    }
3438  }
3439#endif
3440  return SWIG_TypeError;
3441}
3442
3443
3444SWIGINTERN int
3445SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
3446{
3447  unsigned long v;
3448  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3449  if (SWIG_IsOK(res)) {
3450    if ((v > UINT_MAX)) {
3451      return SWIG_OverflowError;
3452    } else {
3453      if (val) *val = (unsigned int)(v);
3454    }
3455  } 
3456  return res;
3457}
3458
3459
3460  #define SWIG_From_long   PyLong_FromLong
3461
3462
3463SWIGINTERN int
3464SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
3465{ 
3466  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
3467  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3468  if (SWIG_IsOK(res)) {
3469    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
3470    if (csize <= size) {
3471      if (val) {
3472        if (csize) memcpy(val, cptr, csize*sizeof(char));
3473        if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
3474      }
3475      if (alloc == SWIG_NEWOBJ) {
3476        free((char*)cptr);
3477        res = SWIG_DelNewMask(res);
3478      }     
3479      return res;
3480    }
3481    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
3482  }
3483  return SWIG_TypeError;
3484}
3485
3486#ifdef __cplusplus
3487extern "C" {
3488#endif
3489SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3490  PyObject *resultobj = 0;
3491  int arg1 ;
3492  int val1 ;
3493  int ecode1 = 0 ;
3494  PyObject * obj0 = 0 ;
3495  struct attrl *result = 0 ;
3496 
3497  if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail;
3498  ecode1 = SWIG_AsVal_int(obj0, &val1);
3499  if (!SWIG_IsOK(ecode1)) {
3500    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'");
3501  } 
3502  arg1 = (int)(val1);
3503  result = (struct attrl *)new_attrl(arg1);
3504  {
3505    PyObject      *obj_batch;
3506    struct attrl  *ptr;
3507    int           i=0, len=0;
3508   
3509    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
3510   
3511    ptr = result;
3512    while (ptr != NULL) {
3513      len++;
3514      ptr = ptr->next;
3515    }
3516    resultobj = PyList_New(len);
3517   
3518    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3519   
3520    if (SARA_DEBUG) printf("\t<Contents>\n");
3521    ptr = result;
3522    for (i=0; i < len; i++) {
3523      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
3524      PyList_SetItem(resultobj, i, obj_batch);
3525      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
3526      ptr = ptr->next;
3527    }
3528    if (SARA_DEBUG) printf("\t</Contents>\n");
3529  }
3530  return resultobj;
3531fail:
3532  return NULL;
3533}
3534
3535
3536SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3537  PyObject *resultobj = 0;
3538  int arg1 ;
3539  int val1 ;
3540  int ecode1 = 0 ;
3541  PyObject * obj0 = 0 ;
3542  struct attropl *result = 0 ;
3543 
3544  if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail;
3545  ecode1 = SWIG_AsVal_int(obj0, &val1);
3546  if (!SWIG_IsOK(ecode1)) {
3547    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'");
3548  } 
3549  arg1 = (int)(val1);
3550  result = (struct attropl *)new_attropl(arg1);
3551  {
3552    PyObject          *obj_batch;
3553    struct attropl    *ptr;
3554    int               i=0, len=0;
3555   
3556    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
3557   
3558    ptr = result;
3559    while (ptr != NULL) {
3560      len++;
3561      ptr = ptr->next;
3562    }
3563    resultobj = PyList_New(len);
3564    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3565   
3566    if (SARA_DEBUG) printf("\t<Contents>\n");
3567    ptr = result;
3568    for (i=0; i < len; i++) {
3569      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
3570      PyList_SetItem(resultobj, i, obj_batch); 
3571      ptr = ptr->next;
3572    }
3573    if (SARA_DEBUG) printf("\t</Contents>\n");
3574  }
3575  return resultobj;
3576fail:
3577  return NULL;
3578}
3579
3580
3581SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3582  PyObject *resultobj = 0;
3583  struct batch_status *result = 0 ;
3584 
3585  if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail;
3586  result = (struct batch_status *)new_batch_status();
3587  {
3588    PyObject              *obj_batch;
3589    struct batch_status   *ptr;
3590    int                   i=0, len=0;
3591   
3592    // printf("Ja we are in bussniss\n");
3593    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
3594   
3595    // Deterime length of list
3596    //
3597    ptr = result;
3598    while (ptr != NULL) {
3599      len++;
3600      ptr = ptr->next;
3601    }
3602    resultobj = PyList_New(len);
3603   
3604    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3605   
3606    // Make a list of batch_status pointers
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_batch_status,0); 
3612      PyList_SetItem(resultobj, i, obj_batch);
3613      if (SARA_DEBUG)  {
3614        printf("\t\t- %s\n", ptr->name);
3615      }
3616      ptr = ptr->next;
3617    }
3618   
3619    if (SARA_DEBUG) printf("\t</Contents>\n");
3620  }
3621  return resultobj;
3622fail:
3623  return NULL;
3624}
3625
3626
3627SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3628  PyObject *resultobj = 0;
3629  int result;
3630 
3631  if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail;
3632  result = (int)get_error();
3633  resultobj = SWIG_From_int((int)(result));
3634  return resultobj;
3635fail:
3636  return NULL;
3637}
3638
3639
3640SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3641  PyObject *resultobj = 0;
3642  struct attrl *arg1 = (struct attrl *) 0 ;
3643  struct attrl *arg2 = (struct attrl *) 0 ;
3644  void *argp1 = 0 ;
3645  int res1 = 0 ;
3646  void *argp2 = 0 ;
3647  int res2 = 0 ;
3648  PyObject * obj0 = 0 ;
3649  PyObject * obj1 = 0 ;
3650 
3651  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail;
3652  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3653  if (!SWIG_IsOK(res1)) {
3654    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3655  }
3656  arg1 = (struct attrl *)(argp1);
3657  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
3658  if (!SWIG_IsOK(res2)) {
3659    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); 
3660  }
3661  arg2 = (struct attrl *)(argp2);
3662  if (arg1) (arg1)->next = arg2;
3663  resultobj = SWIG_Py_Void();
3664  return resultobj;
3665fail:
3666  return NULL;
3667}
3668
3669
3670SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3671  PyObject *resultobj = 0;
3672  struct attrl *arg1 = (struct attrl *) 0 ;
3673  void *argp1 = 0 ;
3674  int res1 = 0 ;
3675  PyObject * obj0 = 0 ;
3676  struct attrl *result = 0 ;
3677 
3678  if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail;
3679  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3680  if (!SWIG_IsOK(res1)) {
3681    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3682  }
3683  arg1 = (struct attrl *)(argp1);
3684  result = (struct attrl *) ((arg1)->next);
3685  {
3686    PyObject      *obj_batch;
3687    struct attrl  *ptr;
3688    int           i=0, len=0;
3689   
3690    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
3691   
3692    ptr = result;
3693    while (ptr != NULL) {
3694      len++;
3695      ptr = ptr->next;
3696    }
3697    resultobj = PyList_New(len);
3698   
3699    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
3700   
3701    if (SARA_DEBUG) printf("\t<Contents>\n");
3702    ptr = result;
3703    for (i=0; i < len; i++) {
3704      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
3705      PyList_SetItem(resultobj, i, obj_batch);
3706      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
3707      ptr = ptr->next;
3708    }
3709    if (SARA_DEBUG) printf("\t</Contents>\n");
3710  }
3711  return resultobj;
3712fail:
3713  return NULL;
3714}
3715
3716
3717SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3718  PyObject *resultobj = 0;
3719  struct attrl *arg1 = (struct attrl *) 0 ;
3720  char *arg2 = (char *) 0 ;
3721  void *argp1 = 0 ;
3722  int res1 = 0 ;
3723  int res2 ;
3724  char *buf2 = 0 ;
3725  int alloc2 = 0 ;
3726  PyObject * obj0 = 0 ;
3727  PyObject * obj1 = 0 ;
3728 
3729  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail;
3730  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3731  if (!SWIG_IsOK(res1)) {
3732    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3733  }
3734  arg1 = (struct attrl *)(argp1);
3735  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3736  if (!SWIG_IsOK(res2)) {
3737    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'");
3738  }
3739  arg2 = (char *)(buf2);
3740  if (arg1->name) free((char*)arg1->name);
3741  if (arg2) {
3742    size_t size = strlen((const char *)(arg2)) + 1;
3743    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
3744  } else {
3745    arg1->name = 0;
3746  }
3747  resultobj = SWIG_Py_Void();
3748  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3749  return resultobj;
3750fail:
3751  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3752  return NULL;
3753}
3754
3755
3756SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3757  PyObject *resultobj = 0;
3758  struct attrl *arg1 = (struct attrl *) 0 ;
3759  void *argp1 = 0 ;
3760  int res1 = 0 ;
3761  PyObject * obj0 = 0 ;
3762  char *result = 0 ;
3763 
3764  if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail;
3765  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3766  if (!SWIG_IsOK(res1)) {
3767    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3768  }
3769  arg1 = (struct attrl *)(argp1);
3770  result = (char *) ((arg1)->name);
3771  resultobj = SWIG_FromCharPtr((const char *)result);
3772  return resultobj;
3773fail:
3774  return NULL;
3775}
3776
3777
3778SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3779  PyObject *resultobj = 0;
3780  struct attrl *arg1 = (struct attrl *) 0 ;
3781  char *arg2 = (char *) 0 ;
3782  void *argp1 = 0 ;
3783  int res1 = 0 ;
3784  int res2 ;
3785  char *buf2 = 0 ;
3786  int alloc2 = 0 ;
3787  PyObject * obj0 = 0 ;
3788  PyObject * obj1 = 0 ;
3789 
3790  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail;
3791  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3792  if (!SWIG_IsOK(res1)) {
3793    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3794  }
3795  arg1 = (struct attrl *)(argp1);
3796  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3797  if (!SWIG_IsOK(res2)) {
3798    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'");
3799  }
3800  arg2 = (char *)(buf2);
3801  if (arg1->resource) free((char*)arg1->resource);
3802  if (arg2) {
3803    size_t size = strlen((const char *)(arg2)) + 1;
3804    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
3805  } else {
3806    arg1->resource = 0;
3807  }
3808  resultobj = SWIG_Py_Void();
3809  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3810  return resultobj;
3811fail:
3812  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3813  return NULL;
3814}
3815
3816
3817SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3818  PyObject *resultobj = 0;
3819  struct attrl *arg1 = (struct attrl *) 0 ;
3820  void *argp1 = 0 ;
3821  int res1 = 0 ;
3822  PyObject * obj0 = 0 ;
3823  char *result = 0 ;
3824 
3825  if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail;
3826  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3827  if (!SWIG_IsOK(res1)) {
3828    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3829  }
3830  arg1 = (struct attrl *)(argp1);
3831  result = (char *) ((arg1)->resource);
3832  resultobj = SWIG_FromCharPtr((const char *)result);
3833  return resultobj;
3834fail:
3835  return NULL;
3836}
3837
3838
3839SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3840  PyObject *resultobj = 0;
3841  struct attrl *arg1 = (struct attrl *) 0 ;
3842  char *arg2 = (char *) 0 ;
3843  void *argp1 = 0 ;
3844  int res1 = 0 ;
3845  int res2 ;
3846  char *buf2 = 0 ;
3847  int alloc2 = 0 ;
3848  PyObject * obj0 = 0 ;
3849  PyObject * obj1 = 0 ;
3850 
3851  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail;
3852  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3853  if (!SWIG_IsOK(res1)) {
3854    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3855  }
3856  arg1 = (struct attrl *)(argp1);
3857  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3858  if (!SWIG_IsOK(res2)) {
3859    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'");
3860  }
3861  arg2 = (char *)(buf2);
3862  if (arg1->value) free((char*)arg1->value);
3863  if (arg2) {
3864    size_t size = strlen((const char *)(arg2)) + 1;
3865    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
3866  } else {
3867    arg1->value = 0;
3868  }
3869  resultobj = SWIG_Py_Void();
3870  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3871  return resultobj;
3872fail:
3873  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3874  return NULL;
3875}
3876
3877
3878SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3879  PyObject *resultobj = 0;
3880  struct attrl *arg1 = (struct attrl *) 0 ;
3881  void *argp1 = 0 ;
3882  int res1 = 0 ;
3883  PyObject * obj0 = 0 ;
3884  char *result = 0 ;
3885 
3886  if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail;
3887  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3888  if (!SWIG_IsOK(res1)) {
3889    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3890  }
3891  arg1 = (struct attrl *)(argp1);
3892  result = (char *) ((arg1)->value);
3893  resultobj = SWIG_FromCharPtr((const char *)result);
3894  return resultobj;
3895fail:
3896  return NULL;
3897}
3898
3899
3900SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3901  PyObject *resultobj = 0;
3902  struct attrl *arg1 = (struct attrl *) 0 ;
3903  enum batch_op arg2 ;
3904  void *argp1 = 0 ;
3905  int res1 = 0 ;
3906  int val2 ;
3907  int ecode2 = 0 ;
3908  PyObject * obj0 = 0 ;
3909  PyObject * obj1 = 0 ;
3910 
3911  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail;
3912  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3913  if (!SWIG_IsOK(res1)) {
3914    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 
3915  }
3916  arg1 = (struct attrl *)(argp1);
3917  ecode2 = SWIG_AsVal_int(obj1, &val2);
3918  if (!SWIG_IsOK(ecode2)) {
3919    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
3920  } 
3921  arg2 = (enum batch_op)(val2);
3922  if (arg1) (arg1)->op = arg2;
3923  resultobj = SWIG_Py_Void();
3924  return resultobj;
3925fail:
3926  return NULL;
3927}
3928
3929
3930SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3931  PyObject *resultobj = 0;
3932  struct attrl *arg1 = (struct attrl *) 0 ;
3933  void *argp1 = 0 ;
3934  int res1 = 0 ;
3935  PyObject * obj0 = 0 ;
3936  enum batch_op result;
3937 
3938  if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail;
3939  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3940  if (!SWIG_IsOK(res1)) {
3941    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 
3942  }
3943  arg1 = (struct attrl *)(argp1);
3944  result = (enum batch_op) ((arg1)->op);
3945  resultobj = SWIG_From_int((int)(result));
3946  return resultobj;
3947fail:
3948  return NULL;
3949}
3950
3951
3952SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3953  PyObject *resultobj = 0;
3954  struct attrl *arg1 = (struct attrl *) 0 ;
3955  void *argp1 = 0 ;
3956  int res1 = 0 ;
3957  PyObject * obj0 = 0 ;
3958  char *result = 0 ;
3959 
3960  if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail;
3961  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
3962  if (!SWIG_IsOK(res1)) {
3963    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 
3964  }
3965  arg1 = (struct attrl *)(argp1);
3966  result = (char *)attrl___str__(arg1);
3967  resultobj = SWIG_FromCharPtr((const char *)result);
3968  return resultobj;
3969fail:
3970  return NULL;
3971}
3972
3973
3974SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3975  PyObject *resultobj = 0;
3976  struct attrl *arg1 = (struct attrl *) 0 ;
3977  void *argp1 = 0 ;
3978  int res1 = 0 ;
3979  PyObject * obj0 = 0 ;
3980 
3981  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail;
3982  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
3983  if (!SWIG_IsOK(res1)) {
3984    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 
3985  }
3986  arg1 = (struct attrl *)(argp1);
3987  delete_attrl(arg1);
3988  resultobj = SWIG_Py_Void();
3989  return resultobj;
3990fail:
3991  return NULL;
3992}
3993
3994
3995SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3996  PyObject *obj;
3997  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
3998  SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj));
3999  return SWIG_Py_Void();
4000}
4001
4002SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4003  PyObject *resultobj = 0;
4004  struct attropl *arg1 = (struct attropl *) 0 ;
4005  struct attropl *arg2 = (struct attropl *) 0 ;
4006  void *argp1 = 0 ;
4007  int res1 = 0 ;
4008  void *argp2 = 0 ;
4009  int res2 = 0 ;
4010  PyObject * obj0 = 0 ;
4011  PyObject * obj1 = 0 ;
4012 
4013  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail;
4014  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4015  if (!SWIG_IsOK(res1)) {
4016    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4017  }
4018  arg1 = (struct attropl *)(argp1);
4019  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
4020  if (!SWIG_IsOK(res2)) {
4021    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); 
4022  }
4023  arg2 = (struct attropl *)(argp2);
4024  if (arg1) (arg1)->next = arg2;
4025  resultobj = SWIG_Py_Void();
4026  return resultobj;
4027fail:
4028  return NULL;
4029}
4030
4031
4032SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4033  PyObject *resultobj = 0;
4034  struct attropl *arg1 = (struct attropl *) 0 ;
4035  void *argp1 = 0 ;
4036  int res1 = 0 ;
4037  PyObject * obj0 = 0 ;
4038  struct attropl *result = 0 ;
4039 
4040  if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail;
4041  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4042  if (!SWIG_IsOK(res1)) {
4043    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4044  }
4045  arg1 = (struct attropl *)(argp1);
4046  result = (struct attropl *) ((arg1)->next);
4047  {
4048    PyObject          *obj_batch;
4049    struct attropl    *ptr;
4050    int               i=0, len=0;
4051   
4052    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
4053   
4054    ptr = result;
4055    while (ptr != NULL) {
4056      len++;
4057      ptr = ptr->next;
4058    }
4059    resultobj = PyList_New(len);
4060    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4061   
4062    if (SARA_DEBUG) printf("\t<Contents>\n");
4063    ptr = result;
4064    for (i=0; i < len; i++) {
4065      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
4066      PyList_SetItem(resultobj, i, obj_batch); 
4067      ptr = ptr->next;
4068    }
4069    if (SARA_DEBUG) printf("\t</Contents>\n");
4070  }
4071  return resultobj;
4072fail:
4073  return NULL;
4074}
4075
4076
4077SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4078  PyObject *resultobj = 0;
4079  struct attropl *arg1 = (struct attropl *) 0 ;
4080  char *arg2 = (char *) 0 ;
4081  void *argp1 = 0 ;
4082  int res1 = 0 ;
4083  int res2 ;
4084  char *buf2 = 0 ;
4085  int alloc2 = 0 ;
4086  PyObject * obj0 = 0 ;
4087  PyObject * obj1 = 0 ;
4088 
4089  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail;
4090  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4091  if (!SWIG_IsOK(res1)) {
4092    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4093  }
4094  arg1 = (struct attropl *)(argp1);
4095  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4096  if (!SWIG_IsOK(res2)) {
4097    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'");
4098  }
4099  arg2 = (char *)(buf2);
4100  if (arg1->name) free((char*)arg1->name);
4101  if (arg2) {
4102    size_t size = strlen((const char *)(arg2)) + 1;
4103    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4104  } else {
4105    arg1->name = 0;
4106  }
4107  resultobj = SWIG_Py_Void();
4108  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4109  return resultobj;
4110fail:
4111  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4112  return NULL;
4113}
4114
4115
4116SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4117  PyObject *resultobj = 0;
4118  struct attropl *arg1 = (struct attropl *) 0 ;
4119  void *argp1 = 0 ;
4120  int res1 = 0 ;
4121  PyObject * obj0 = 0 ;
4122  char *result = 0 ;
4123 
4124  if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail;
4125  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4126  if (!SWIG_IsOK(res1)) {
4127    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4128  }
4129  arg1 = (struct attropl *)(argp1);
4130  result = (char *) ((arg1)->name);
4131  resultobj = SWIG_FromCharPtr((const char *)result);
4132  return resultobj;
4133fail:
4134  return NULL;
4135}
4136
4137
4138SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4139  PyObject *resultobj = 0;
4140  struct attropl *arg1 = (struct attropl *) 0 ;
4141  char *arg2 = (char *) 0 ;
4142  void *argp1 = 0 ;
4143  int res1 = 0 ;
4144  int res2 ;
4145  char *buf2 = 0 ;
4146  int alloc2 = 0 ;
4147  PyObject * obj0 = 0 ;
4148  PyObject * obj1 = 0 ;
4149 
4150  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail;
4151  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4152  if (!SWIG_IsOK(res1)) {
4153    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4154  }
4155  arg1 = (struct attropl *)(argp1);
4156  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4157  if (!SWIG_IsOK(res2)) {
4158    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'");
4159  }
4160  arg2 = (char *)(buf2);
4161  if (arg1->resource) free((char*)arg1->resource);
4162  if (arg2) {
4163    size_t size = strlen((const char *)(arg2)) + 1;
4164    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4165  } else {
4166    arg1->resource = 0;
4167  }
4168  resultobj = SWIG_Py_Void();
4169  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4170  return resultobj;
4171fail:
4172  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4173  return NULL;
4174}
4175
4176
4177SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4178  PyObject *resultobj = 0;
4179  struct attropl *arg1 = (struct attropl *) 0 ;
4180  void *argp1 = 0 ;
4181  int res1 = 0 ;
4182  PyObject * obj0 = 0 ;
4183  char *result = 0 ;
4184 
4185  if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail;
4186  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4187  if (!SWIG_IsOK(res1)) {
4188    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4189  }
4190  arg1 = (struct attropl *)(argp1);
4191  result = (char *) ((arg1)->resource);
4192  resultobj = SWIG_FromCharPtr((const char *)result);
4193  return resultobj;
4194fail:
4195  return NULL;
4196}
4197
4198
4199SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4200  PyObject *resultobj = 0;
4201  struct attropl *arg1 = (struct attropl *) 0 ;
4202  char *arg2 = (char *) 0 ;
4203  void *argp1 = 0 ;
4204  int res1 = 0 ;
4205  int res2 ;
4206  char *buf2 = 0 ;
4207  int alloc2 = 0 ;
4208  PyObject * obj0 = 0 ;
4209  PyObject * obj1 = 0 ;
4210 
4211  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail;
4212  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4213  if (!SWIG_IsOK(res1)) {
4214    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4215  }
4216  arg1 = (struct attropl *)(argp1);
4217  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4218  if (!SWIG_IsOK(res2)) {
4219    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'");
4220  }
4221  arg2 = (char *)(buf2);
4222  if (arg1->value) free((char*)arg1->value);
4223  if (arg2) {
4224    size_t size = strlen((const char *)(arg2)) + 1;
4225    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4226  } else {
4227    arg1->value = 0;
4228  }
4229  resultobj = SWIG_Py_Void();
4230  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4231  return resultobj;
4232fail:
4233  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4234  return NULL;
4235}
4236
4237
4238SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4239  PyObject *resultobj = 0;
4240  struct attropl *arg1 = (struct attropl *) 0 ;
4241  void *argp1 = 0 ;
4242  int res1 = 0 ;
4243  PyObject * obj0 = 0 ;
4244  char *result = 0 ;
4245 
4246  if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail;
4247  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4248  if (!SWIG_IsOK(res1)) {
4249    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4250  }
4251  arg1 = (struct attropl *)(argp1);
4252  result = (char *) ((arg1)->value);
4253  resultobj = SWIG_FromCharPtr((const char *)result);
4254  return resultobj;
4255fail:
4256  return NULL;
4257}
4258
4259
4260SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4261  PyObject *resultobj = 0;
4262  struct attropl *arg1 = (struct attropl *) 0 ;
4263  enum batch_op arg2 ;
4264  void *argp1 = 0 ;
4265  int res1 = 0 ;
4266  int val2 ;
4267  int ecode2 = 0 ;
4268  PyObject * obj0 = 0 ;
4269  PyObject * obj1 = 0 ;
4270 
4271  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail;
4272  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4273  if (!SWIG_IsOK(res1)) {
4274    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 
4275  }
4276  arg1 = (struct attropl *)(argp1);
4277  ecode2 = SWIG_AsVal_int(obj1, &val2);
4278  if (!SWIG_IsOK(ecode2)) {
4279    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
4280  } 
4281  arg2 = (enum batch_op)(val2);
4282  if (arg1) (arg1)->op = arg2;
4283  resultobj = SWIG_Py_Void();
4284  return resultobj;
4285fail:
4286  return NULL;
4287}
4288
4289
4290SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4291  PyObject *resultobj = 0;
4292  struct attropl *arg1 = (struct attropl *) 0 ;
4293  void *argp1 = 0 ;
4294  int res1 = 0 ;
4295  PyObject * obj0 = 0 ;
4296  enum batch_op result;
4297 
4298  if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail;
4299  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4300  if (!SWIG_IsOK(res1)) {
4301    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 
4302  }
4303  arg1 = (struct attropl *)(argp1);
4304  result = (enum batch_op) ((arg1)->op);
4305  resultobj = SWIG_From_int((int)(result));
4306  return resultobj;
4307fail:
4308  return NULL;
4309}
4310
4311
4312SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4313  PyObject *resultobj = 0;
4314  struct attropl *arg1 = (struct attropl *) 0 ;
4315  void *argp1 = 0 ;
4316  int res1 = 0 ;
4317  PyObject * obj0 = 0 ;
4318  char *result = 0 ;
4319 
4320  if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail;
4321  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
4322  if (!SWIG_IsOK(res1)) {
4323    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 
4324  }
4325  arg1 = (struct attropl *)(argp1);
4326  result = (char *)attropl___str__(arg1);
4327  resultobj = SWIG_FromCharPtr((const char *)result);
4328  return resultobj;
4329fail:
4330  return NULL;
4331}
4332
4333
4334SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4335  PyObject *resultobj = 0;
4336  struct attropl *arg1 = (struct attropl *) 0 ;
4337  void *argp1 = 0 ;
4338  int res1 = 0 ;
4339  PyObject * obj0 = 0 ;
4340 
4341  if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail;
4342  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
4343  if (!SWIG_IsOK(res1)) {
4344    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 
4345  }
4346  arg1 = (struct attropl *)(argp1);
4347  delete_attropl(arg1);
4348  resultobj = SWIG_Py_Void();
4349  return resultobj;
4350fail:
4351  return NULL;
4352}
4353
4354
4355SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4356  PyObject *obj;
4357  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4358  SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj));
4359  return SWIG_Py_Void();
4360}
4361
4362SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4363  PyObject *resultobj = 0;
4364  struct batch_status *arg1 = (struct batch_status *) 0 ;
4365  struct batch_status *arg2 = (struct batch_status *) 0 ;
4366  void *argp1 = 0 ;
4367  int res1 = 0 ;
4368  void *argp2 = 0 ;
4369  int res2 = 0 ;
4370  PyObject * obj0 = 0 ;
4371  PyObject * obj1 = 0 ;
4372 
4373  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail;
4374  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4375  if (!SWIG_IsOK(res1)) {
4376    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4377  }
4378  arg1 = (struct batch_status *)(argp1);
4379  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN |  0 );
4380  if (!SWIG_IsOK(res2)) {
4381    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); 
4382  }
4383  arg2 = (struct batch_status *)(argp2);
4384  if (arg1) (arg1)->next = arg2;
4385  resultobj = SWIG_Py_Void();
4386  return resultobj;
4387fail:
4388  return NULL;
4389}
4390
4391
4392SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4393  PyObject *resultobj = 0;
4394  struct batch_status *arg1 = (struct batch_status *) 0 ;
4395  void *argp1 = 0 ;
4396  int res1 = 0 ;
4397  PyObject * obj0 = 0 ;
4398  struct batch_status *result = 0 ;
4399 
4400  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail;
4401  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4402  if (!SWIG_IsOK(res1)) {
4403    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4404  }
4405  arg1 = (struct batch_status *)(argp1);
4406  result = (struct batch_status *) ((arg1)->next);
4407  {
4408    PyObject              *obj_batch;
4409    struct batch_status   *ptr;
4410    int                   i=0, len=0;
4411   
4412    // printf("Ja we are in bussniss\n");
4413    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
4414   
4415    // Deterime length of list
4416    //
4417    ptr = result;
4418    while (ptr != NULL) {
4419      len++;
4420      ptr = ptr->next;
4421    }
4422    resultobj = PyList_New(len);
4423   
4424    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4425   
4426    // Make a list of batch_status pointers
4427    //
4428    if (SARA_DEBUG) printf("\t<Contents>\n");
4429    ptr = result;
4430    for (i=0; i < len; i++) {
4431      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
4432      PyList_SetItem(resultobj, i, obj_batch);
4433      if (SARA_DEBUG)  {
4434        printf("\t\t- %s\n", ptr->name);
4435      }
4436      ptr = ptr->next;
4437    }
4438   
4439    if (SARA_DEBUG) printf("\t</Contents>\n");
4440  }
4441  return resultobj;
4442fail:
4443  return NULL;
4444}
4445
4446
4447SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4448  PyObject *resultobj = 0;
4449  struct batch_status *arg1 = (struct batch_status *) 0 ;
4450  char *arg2 = (char *) 0 ;
4451  void *argp1 = 0 ;
4452  int res1 = 0 ;
4453  int res2 ;
4454  char *buf2 = 0 ;
4455  int alloc2 = 0 ;
4456  PyObject * obj0 = 0 ;
4457  PyObject * obj1 = 0 ;
4458 
4459  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail;
4460  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4461  if (!SWIG_IsOK(res1)) {
4462    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4463  }
4464  arg1 = (struct batch_status *)(argp1);
4465  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4466  if (!SWIG_IsOK(res2)) {
4467    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'");
4468  }
4469  arg2 = (char *)(buf2);
4470  if (arg1->name) free((char*)arg1->name);
4471  if (arg2) {
4472    size_t size = strlen((const char *)(arg2)) + 1;
4473    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4474  } else {
4475    arg1->name = 0;
4476  }
4477  resultobj = SWIG_Py_Void();
4478  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4479  return resultobj;
4480fail:
4481  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4482  return NULL;
4483}
4484
4485
4486SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4487  PyObject *resultobj = 0;
4488  struct batch_status *arg1 = (struct batch_status *) 0 ;
4489  void *argp1 = 0 ;
4490  int res1 = 0 ;
4491  PyObject * obj0 = 0 ;
4492  char *result = 0 ;
4493 
4494  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail;
4495  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4496  if (!SWIG_IsOK(res1)) {
4497    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4498  }
4499  arg1 = (struct batch_status *)(argp1);
4500  result = (char *) ((arg1)->name);
4501  resultobj = SWIG_FromCharPtr((const char *)result);
4502  return resultobj;
4503fail:
4504  return NULL;
4505}
4506
4507
4508SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4509  PyObject *resultobj = 0;
4510  struct batch_status *arg1 = (struct batch_status *) 0 ;
4511  struct attrl *arg2 = (struct attrl *) 0 ;
4512  void *argp1 = 0 ;
4513  int res1 = 0 ;
4514  void *argp2 = 0 ;
4515  int res2 = 0 ;
4516  PyObject * obj0 = 0 ;
4517  PyObject * obj1 = 0 ;
4518 
4519  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail;
4520  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4521  if (!SWIG_IsOK(res1)) {
4522    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4523  }
4524  arg1 = (struct batch_status *)(argp1);
4525  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
4526  if (!SWIG_IsOK(res2)) {
4527    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 
4528  }
4529  arg2 = (struct attrl *)(argp2);
4530  if (arg1) (arg1)->attribs = arg2;
4531  resultobj = SWIG_Py_Void();
4532  return resultobj;
4533fail:
4534  return NULL;
4535}
4536
4537
4538SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4539  PyObject *resultobj = 0;
4540  struct batch_status *arg1 = (struct batch_status *) 0 ;
4541  void *argp1 = 0 ;
4542  int res1 = 0 ;
4543  PyObject * obj0 = 0 ;
4544  struct attrl *result = 0 ;
4545 
4546  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail;
4547  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4548  if (!SWIG_IsOK(res1)) {
4549    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4550  }
4551  arg1 = (struct batch_status *)(argp1);
4552  result = (struct attrl *) ((arg1)->attribs);
4553  {
4554    PyObject      *obj_batch;
4555    struct attrl  *ptr;
4556    int           i=0, len=0;
4557   
4558    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
4559   
4560    ptr = result;
4561    while (ptr != NULL) {
4562      len++;
4563      ptr = ptr->next;
4564    }
4565    resultobj = PyList_New(len);
4566   
4567    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
4568   
4569    if (SARA_DEBUG) printf("\t<Contents>\n");
4570    ptr = result;
4571    for (i=0; i < len; i++) {
4572      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
4573      PyList_SetItem(resultobj, i, obj_batch);
4574      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
4575      ptr = ptr->next;
4576    }
4577    if (SARA_DEBUG) printf("\t</Contents>\n");
4578  }
4579  return resultobj;
4580fail:
4581  return NULL;
4582}
4583
4584
4585SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4586  PyObject *resultobj = 0;
4587  struct batch_status *arg1 = (struct batch_status *) 0 ;
4588  char *arg2 = (char *) 0 ;
4589  void *argp1 = 0 ;
4590  int res1 = 0 ;
4591  int res2 ;
4592  char *buf2 = 0 ;
4593  int alloc2 = 0 ;
4594  PyObject * obj0 = 0 ;
4595  PyObject * obj1 = 0 ;
4596 
4597  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail;
4598  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4599  if (!SWIG_IsOK(res1)) {
4600    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
4601  }
4602  arg1 = (struct batch_status *)(argp1);
4603  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4604  if (!SWIG_IsOK(res2)) {
4605    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'");
4606  }
4607  arg2 = (char *)(buf2);
4608  if (arg1->text) free((char*)arg1->text);
4609  if (arg2) {
4610    size_t size = strlen((const char *)(arg2)) + 1;
4611    arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4612  } else {
4613    arg1->text = 0;
4614  }
4615  resultobj = SWIG_Py_Void();
4616  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4617  return resultobj;
4618fail:
4619  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4620  return NULL;
4621}
4622
4623
4624SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4625  PyObject *resultobj = 0;
4626  struct batch_status *arg1 = (struct batch_status *) 0 ;
4627  void *argp1 = 0 ;
4628  int res1 = 0 ;
4629  PyObject * obj0 = 0 ;
4630  char *result = 0 ;
4631 
4632  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail;
4633  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
4634  if (!SWIG_IsOK(res1)) {
4635    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
4636  }
4637  arg1 = (struct batch_status *)(argp1);
4638  result = (char *) ((arg1)->text);
4639  resultobj = SWIG_FromCharPtr((const char *)result);
4640  return resultobj;
4641fail:
4642  return NULL;
4643}
4644
4645
4646SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4647  PyObject *obj;
4648  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4649  SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj));
4650  return SWIG_Py_Void();
4651}
4652
4653SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) {
4654  {
4655    int val;
4656    int res = SWIG_AsVal_int(_val, &val);
4657    if (!SWIG_IsOK(res)) {
4658      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'");
4659    }
4660    pbs_errno = (int)(val);
4661  }
4662  return 0;
4663fail:
4664  return 1;
4665}
4666
4667
4668SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) {
4669  PyObject *pyobj = 0;
4670 
4671  pyobj = SWIG_From_int((int)(pbs_errno));
4672  return pyobj;
4673}
4674
4675
4676SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) {
4677  {
4678    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
4679    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
4680    if (!SWIG_IsOK(res)) {
4681      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'");
4682    }
4683    if (pbs_server) free((char*)pbs_server);
4684    if (alloc == SWIG_NEWOBJ) {
4685      pbs_server = cptr;
4686    } else {
4687      pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
4688    }
4689  }
4690  return 0;
4691fail:
4692  return 1;
4693}
4694
4695
4696SWIGINTERN PyObject *Swig_var_pbs_server_get(void) {
4697  PyObject *pyobj = 0;
4698 
4699  pyobj = SWIG_FromCharPtr(pbs_server);
4700  return pyobj;
4701}
4702
4703
4704SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4705  PyObject *resultobj = 0;
4706  int arg1 ;
4707  char *arg2 = (char *) 0 ;
4708  int val1 ;
4709  int ecode1 = 0 ;
4710  int res2 ;
4711  char *buf2 = 0 ;
4712  int alloc2 = 0 ;
4713  PyObject * obj0 = 0 ;
4714  PyObject * obj1 = 0 ;
4715  char *result = 0 ;
4716 
4717  if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail;
4718  ecode1 = SWIG_AsVal_int(obj0, &val1);
4719  if (!SWIG_IsOK(ecode1)) {
4720    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'");
4721  } 
4722  arg1 = (int)(val1);
4723  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4724  if (!SWIG_IsOK(res2)) {
4725    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'");
4726  }
4727  arg2 = (char *)(buf2);
4728  result = (char *)avail(arg1,arg2);
4729  resultobj = SWIG_FromCharPtr((const char *)result);
4730  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4731  return resultobj;
4732fail:
4733  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4734  return NULL;
4735}
4736
4737
4738SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4739  PyObject *resultobj = 0;
4740  int arg1 ;
4741  char *arg2 = (char *) 0 ;
4742  char *arg3 = (char *) 0 ;
4743  char *arg4 = (char *) 0 ;
4744  int val1 ;
4745  int ecode1 = 0 ;
4746  int res2 ;
4747  char *buf2 = 0 ;
4748  int alloc2 = 0 ;
4749  int res3 ;
4750  char *buf3 = 0 ;
4751  int alloc3 = 0 ;
4752  int res4 ;
4753  char *buf4 = 0 ;
4754  int alloc4 = 0 ;
4755  PyObject * obj0 = 0 ;
4756  PyObject * obj1 = 0 ;
4757  PyObject * obj2 = 0 ;
4758  PyObject * obj3 = 0 ;
4759  int result;
4760 
4761  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4762  ecode1 = SWIG_AsVal_int(obj0, &val1);
4763  if (!SWIG_IsOK(ecode1)) {
4764    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'");
4765  } 
4766  arg1 = (int)(val1);
4767  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4768  if (!SWIG_IsOK(res2)) {
4769    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'");
4770  }
4771  arg2 = (char *)(buf2);
4772  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4773  if (!SWIG_IsOK(res3)) {
4774    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'");
4775  }
4776  arg3 = (char *)(buf3);
4777  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
4778  if (!SWIG_IsOK(res4)) {
4779    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'");
4780  }
4781  arg4 = (char *)(buf4);
4782  result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
4783  resultobj = SWIG_From_int((int)(result));
4784  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4785  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4786  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4787  return resultobj;
4788fail:
4789  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4790  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4791  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4792  return NULL;
4793}
4794
4795
4796SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4797  PyObject *resultobj = 0;
4798  int arg1 ;
4799  char *arg2 = (char *) 0 ;
4800  struct attrl *arg3 = (struct attrl *) 0 ;
4801  char *arg4 = (char *) 0 ;
4802  int val1 ;
4803  int ecode1 = 0 ;
4804  int res2 ;
4805  char *buf2 = 0 ;
4806  int alloc2 = 0 ;
4807  int res4 ;
4808  char *buf4 = 0 ;
4809  int alloc4 = 0 ;
4810  PyObject * obj0 = 0 ;
4811  PyObject * obj1 = 0 ;
4812  PyObject * obj2 = 0 ;
4813  PyObject * obj3 = 0 ;
4814  int result;
4815 
4816  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4817  ecode1 = SWIG_AsVal_int(obj0, &val1);
4818  if (!SWIG_IsOK(ecode1)) {
4819    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'");
4820  } 
4821  arg1 = (int)(val1);
4822  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4823  if (!SWIG_IsOK(res2)) {
4824    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'");
4825  }
4826  arg2 = (char *)(buf2);
4827  {
4828    PyObject      *py_obj;
4829    struct attrl  *ptr, *prev;
4830    char          s[255];
4831    int           i=0, size=0;
4832   
4833    // printf("Python --> C\n");
4834   
4835    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
4836   
4837    size = Get_List_Size(obj2);
4838    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
4839   
4840    if ( size == -1 ) {
4841      PyErr_SetString(PyExc_TypeError, "not a list");
4842      return NULL; 
4843    }
4844   
4845    if (SARA_DEBUG) printf("\t<Contents>\n");
4846   
4847    arg3 = prev = NULL;
4848    for ( i=0; i < size; i++ ) {
4849      py_obj = PyList_GetItem(obj2, i);
4850      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
4851        sprintf(s,"list item %d has wrong type", i);
4852        PyErr_SetString(PyExc_TypeError, s);
4853        return NULL;
4854       
4855        // This will skipp the wrong entry
4856        // continue;
4857      }
4858     
4859      /*
4860           * Make first entry head of C linked list
4861          */ 
4862      if ( i == 0) {
4863        arg3 = ptr;
4864        ptr->next = prev;
4865      }
4866      else {
4867        prev->next = ptr;
4868        ptr->next = NULL;
4869      }
4870      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
4871     
4872      prev = ptr;
4873     
4874    } // end for
4875    if (SARA_DEBUG) printf("\t</Contents>\n");
4876  }
4877  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
4878  if (!SWIG_IsOK(res4)) {
4879    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'");
4880  }
4881  arg4 = (char *)(buf4);
4882  result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
4883  resultobj = SWIG_From_int((int)(result));
4884  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4885  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4886  return resultobj;
4887fail:
4888  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4889  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4890  return NULL;
4891}
4892
4893
4894SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4895  PyObject *resultobj = 0;
4896  char *arg1 = (char *) 0 ;
4897  int res1 ;
4898  char *buf1 = 0 ;
4899  int alloc1 = 0 ;
4900  PyObject * obj0 = 0 ;
4901  int result;
4902 
4903  if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail;
4904  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4905  if (!SWIG_IsOK(res1)) {
4906    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'");
4907  }
4908  arg1 = (char *)(buf1);
4909  result = (int)pbs_connect(arg1);
4910  resultobj = SWIG_From_int((int)(result));
4911  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4912  return resultobj;
4913fail:
4914  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4915  return NULL;
4916}
4917
4918
4919SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4920  PyObject *resultobj = 0;
4921  int result;
4922 
4923  if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail;
4924  result = (int)pbs_query_max_connections();
4925  resultobj = SWIG_From_int((int)(result));
4926  return resultobj;
4927fail:
4928  return NULL;
4929}
4930
4931
4932SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4933  PyObject *resultobj = 0;
4934  char *result = 0 ;
4935 
4936  if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail;
4937  result = (char *)pbs_default();
4938  resultobj = SWIG_FromCharPtr((const char *)result);
4939  return resultobj;
4940fail:
4941  return NULL;
4942}
4943
4944
4945SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4946  PyObject *resultobj = 0;
4947  int arg1 ;
4948  char *arg2 = (char *) 0 ;
4949  char *arg3 = (char *) 0 ;
4950  int val1 ;
4951  int ecode1 = 0 ;
4952  int res2 ;
4953  char *buf2 = 0 ;
4954  int alloc2 = 0 ;
4955  int res3 ;
4956  char *buf3 = 0 ;
4957  int alloc3 = 0 ;
4958  PyObject * obj0 = 0 ;
4959  PyObject * obj1 = 0 ;
4960  PyObject * obj2 = 0 ;
4961  int result;
4962 
4963  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail;
4964  ecode1 = SWIG_AsVal_int(obj0, &val1);
4965  if (!SWIG_IsOK(ecode1)) {
4966    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'");
4967  } 
4968  arg1 = (int)(val1);
4969  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4970  if (!SWIG_IsOK(res2)) {
4971    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'");
4972  }
4973  arg2 = (char *)(buf2);
4974  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4975  if (!SWIG_IsOK(res3)) {
4976    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'");
4977  }
4978  arg3 = (char *)(buf3);
4979  result = (int)pbs_deljob(arg1,arg2,arg3);
4980  resultobj = SWIG_From_int((int)(result));
4981  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4982  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4983  return resultobj;
4984fail:
4985  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4986  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4987  return NULL;
4988}
4989
4990
4991SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4992  PyObject *resultobj = 0;
4993  int arg1 ;
4994  int val1 ;
4995  int ecode1 = 0 ;
4996  PyObject * obj0 = 0 ;
4997  int result;
4998 
4999  if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail;
5000  ecode1 = SWIG_AsVal_int(obj0, &val1);
5001  if (!SWIG_IsOK(ecode1)) {
5002    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'");
5003  } 
5004  arg1 = (int)(val1);
5005  result = (int)pbs_disconnect(arg1);
5006  resultobj = SWIG_From_int((int)(result));
5007  return resultobj;
5008fail:
5009  return NULL;
5010}
5011
5012
5013SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5014  PyObject *resultobj = 0;
5015  int arg1 ;
5016  int val1 ;
5017  int ecode1 = 0 ;
5018  PyObject * obj0 = 0 ;
5019  char *result = 0 ;
5020 
5021  if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail;
5022  ecode1 = SWIG_AsVal_int(obj0, &val1);
5023  if (!SWIG_IsOK(ecode1)) {
5024    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'");
5025  } 
5026  arg1 = (int)(val1);
5027  result = (char *)pbs_geterrmsg(arg1);
5028  resultobj = SWIG_FromCharPtr((const char *)result);
5029  return resultobj;
5030fail:
5031  return NULL;
5032}
5033
5034
5035SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5036  PyObject *resultobj = 0;
5037  int arg1 ;
5038  char *arg2 = (char *) 0 ;
5039  char *arg3 = (char *) 0 ;
5040  char *arg4 = (char *) 0 ;
5041  int val1 ;
5042  int ecode1 = 0 ;
5043  int res2 ;
5044  char *buf2 = 0 ;
5045  int alloc2 = 0 ;
5046  int res3 ;
5047  char *buf3 = 0 ;
5048  int alloc3 = 0 ;
5049  int res4 ;
5050  char *buf4 = 0 ;
5051  int alloc4 = 0 ;
5052  PyObject * obj0 = 0 ;
5053  PyObject * obj1 = 0 ;
5054  PyObject * obj2 = 0 ;
5055  PyObject * obj3 = 0 ;
5056  int result;
5057 
5058  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5059  ecode1 = SWIG_AsVal_int(obj0, &val1);
5060  if (!SWIG_IsOK(ecode1)) {
5061    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'");
5062  } 
5063  arg1 = (int)(val1);
5064  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5065  if (!SWIG_IsOK(res2)) {
5066    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'");
5067  }
5068  arg2 = (char *)(buf2);
5069  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5070  if (!SWIG_IsOK(res3)) {
5071    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'");
5072  }
5073  arg3 = (char *)(buf3);
5074  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5075  if (!SWIG_IsOK(res4)) {
5076    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'");
5077  }
5078  arg4 = (char *)(buf4);
5079  result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
5080  resultobj = SWIG_From_int((int)(result));
5081  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5082  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5083  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5084  return resultobj;
5085fail:
5086  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5087  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5088  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5089  return NULL;
5090}
5091
5092
5093SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5094  PyObject *resultobj = 0;
5095  int arg1 ;
5096  char *arg2 = (char *) 0 ;
5097  char *arg3 = (char *) 0 ;
5098  int val1 ;
5099  int ecode1 = 0 ;
5100  int res2 ;
5101  char *buf2 = 0 ;
5102  int alloc2 = 0 ;
5103  int res3 ;
5104  char *buf3 = 0 ;
5105  int alloc3 = 0 ;
5106  PyObject * obj0 = 0 ;
5107  PyObject * obj1 = 0 ;
5108  PyObject * obj2 = 0 ;
5109  char *result = 0 ;
5110 
5111  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail;
5112  ecode1 = SWIG_AsVal_int(obj0, &val1);
5113  if (!SWIG_IsOK(ecode1)) {
5114    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'");
5115  } 
5116  arg1 = (int)(val1);
5117  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5118  if (!SWIG_IsOK(res2)) {
5119    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'");
5120  }
5121  arg2 = (char *)(buf2);
5122  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5123  if (!SWIG_IsOK(res3)) {
5124    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'");
5125  }
5126  arg3 = (char *)(buf3);
5127  result = (char *)pbs_locjob(arg1,arg2,arg3);
5128  resultobj = SWIG_FromCharPtr((const char *)result);
5129  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5130  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5131  return resultobj;
5132fail:
5133  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5134  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5135  return NULL;
5136}
5137
5138
5139SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5140  PyObject *resultobj = 0;
5141  int arg1 ;
5142  int arg2 ;
5143  int arg3 ;
5144  char *arg4 = (char *) 0 ;
5145  struct attropl *arg5 = (struct attropl *) 0 ;
5146  char *arg6 = (char *) 0 ;
5147  int val1 ;
5148  int ecode1 = 0 ;
5149  int val2 ;
5150  int ecode2 = 0 ;
5151  int val3 ;
5152  int ecode3 = 0 ;
5153  int res4 ;
5154  char *buf4 = 0 ;
5155  int alloc4 = 0 ;
5156  int res6 ;
5157  char *buf6 = 0 ;
5158  int alloc6 = 0 ;
5159  PyObject * obj0 = 0 ;
5160  PyObject * obj1 = 0 ;
5161  PyObject * obj2 = 0 ;
5162  PyObject * obj3 = 0 ;
5163  PyObject * obj4 = 0 ;
5164  PyObject * obj5 = 0 ;
5165  int result;
5166 
5167  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
5168  ecode1 = SWIG_AsVal_int(obj0, &val1);
5169  if (!SWIG_IsOK(ecode1)) {
5170    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'");
5171  } 
5172  arg1 = (int)(val1);
5173  ecode2 = SWIG_AsVal_int(obj1, &val2);
5174  if (!SWIG_IsOK(ecode2)) {
5175    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'");
5176  } 
5177  arg2 = (int)(val2);
5178  ecode3 = SWIG_AsVal_int(obj2, &val3);
5179  if (!SWIG_IsOK(ecode3)) {
5180    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'");
5181  } 
5182  arg3 = (int)(val3);
5183  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5184  if (!SWIG_IsOK(res4)) {
5185    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'");
5186  }
5187  arg4 = (char *)(buf4);
5188  {
5189    PyObject          *py_obj;
5190    struct attropl    *ptr, *prev;
5191    char              s[255];
5192    int               i=0, size=0;
5193   
5194    // printf("Python --> C\n");
5195   
5196    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
5197   
5198    size = Get_List_Size(obj4);
5199   
5200    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
5201   
5202    if ( size == -1 ) {
5203      PyErr_SetString(PyExc_TypeError, "not a list");
5204      return NULL; 
5205    }
5206    //printf("Size = %d\n", size);
5207   
5208    if (SARA_DEBUG) printf("\t<Contents>\n");
5209   
5210    arg5 = prev = NULL;
5211    for ( i=0; i < size; i++ ) {
5212      py_obj = PyList_GetItem(obj4, i);
5213      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
5214        sprintf(s,"list item %d has wrong type", i);
5215        PyErr_SetString(PyExc_TypeError, s);
5216        return NULL;
5217       
5218        // This will skipp the wrong entry
5219        // continue;
5220      }
5221     
5222      /*
5223           * Make first entry head of C linked list
5224          */ 
5225      if ( i == 0) {
5226        arg5 = ptr;
5227        ptr->next = prev;
5228      }
5229      else {
5230        prev->next = ptr;
5231        ptr->next = NULL;
5232      }
5233      prev = ptr;
5234     
5235    } // end for
5236    if (SARA_DEBUG) printf("\t</Contents>\n");
5237  }
5238  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
5239  if (!SWIG_IsOK(res6)) {
5240    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'");
5241  }
5242  arg6 = (char *)(buf6);
5243  result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
5244  resultobj = SWIG_From_int((int)(result));
5245  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5246  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
5247  return resultobj;
5248fail:
5249  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5250  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
5251  return NULL;
5252}
5253
5254
5255SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5256  PyObject *resultobj = 0;
5257  int arg1 ;
5258  char *arg2 = (char *) 0 ;
5259  char *arg3 = (char *) 0 ;
5260  char *arg4 = (char *) 0 ;
5261  int val1 ;
5262  int ecode1 = 0 ;
5263  int res2 ;
5264  char *buf2 = 0 ;
5265  int alloc2 = 0 ;
5266  int res3 ;
5267  char *buf3 = 0 ;
5268  int alloc3 = 0 ;
5269  int res4 ;
5270  char *buf4 = 0 ;
5271  int alloc4 = 0 ;
5272  PyObject * obj0 = 0 ;
5273  PyObject * obj1 = 0 ;
5274  PyObject * obj2 = 0 ;
5275  PyObject * obj3 = 0 ;
5276  int result;
5277 
5278  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5279  ecode1 = SWIG_AsVal_int(obj0, &val1);
5280  if (!SWIG_IsOK(ecode1)) {
5281    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'");
5282  } 
5283  arg1 = (int)(val1);
5284  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5285  if (!SWIG_IsOK(res2)) {
5286    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'");
5287  }
5288  arg2 = (char *)(buf2);
5289  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5290  if (!SWIG_IsOK(res3)) {
5291    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'");
5292  }
5293  arg3 = (char *)(buf3);
5294  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5295  if (!SWIG_IsOK(res4)) {
5296    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'");
5297  }
5298  arg4 = (char *)(buf4);
5299  result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
5300  resultobj = SWIG_From_int((int)(result));
5301  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5302  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5303  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5304  return resultobj;
5305fail:
5306  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5307  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5308  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5309  return NULL;
5310}
5311
5312
5313SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5314  PyObject *resultobj = 0;
5315  int arg1 ;
5316  char *arg2 = (char *) 0 ;
5317  int arg3 ;
5318  char *arg4 = (char *) 0 ;
5319  char *arg5 = (char *) 0 ;
5320  int val1 ;
5321  int ecode1 = 0 ;
5322  int res2 ;
5323  char *buf2 = 0 ;
5324  int alloc2 = 0 ;
5325  int val3 ;
5326  int ecode3 = 0 ;
5327  int res4 ;
5328  char *buf4 = 0 ;
5329  int alloc4 = 0 ;
5330  int res5 ;
5331  char *buf5 = 0 ;
5332  int alloc5 = 0 ;
5333  PyObject * obj0 = 0 ;
5334  PyObject * obj1 = 0 ;
5335  PyObject * obj2 = 0 ;
5336  PyObject * obj3 = 0 ;
5337  PyObject * obj4 = 0 ;
5338  int result;
5339 
5340  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5341  ecode1 = SWIG_AsVal_int(obj0, &val1);
5342  if (!SWIG_IsOK(ecode1)) {
5343    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'");
5344  } 
5345  arg1 = (int)(val1);
5346  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5347  if (!SWIG_IsOK(res2)) {
5348    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'");
5349  }
5350  arg2 = (char *)(buf2);
5351  ecode3 = SWIG_AsVal_int(obj2, &val3);
5352  if (!SWIG_IsOK(ecode3)) {
5353    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'");
5354  } 
5355  arg3 = (int)(val3);
5356  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5357  if (!SWIG_IsOK(res4)) {
5358    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'");
5359  }
5360  arg4 = (char *)(buf4);
5361  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
5362  if (!SWIG_IsOK(res5)) {
5363    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'");
5364  }
5365  arg5 = (char *)(buf5);
5366  result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
5367  resultobj = SWIG_From_int((int)(result));
5368  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5369  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5370  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
5371  return resultobj;
5372fail:
5373  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5374  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5375  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
5376  return NULL;
5377}
5378
5379
5380SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5381  PyObject *resultobj = 0;
5382  int arg1 ;
5383  char *arg2 = (char *) 0 ;
5384  char *arg3 = (char *) 0 ;
5385  char *arg4 = (char *) 0 ;
5386  int val1 ;
5387  int ecode1 = 0 ;
5388  int res2 ;
5389  char *buf2 = 0 ;
5390  int alloc2 = 0 ;
5391  int res3 ;
5392  char *buf3 = 0 ;
5393  int alloc3 = 0 ;
5394  int res4 ;
5395  char *buf4 = 0 ;
5396  int alloc4 = 0 ;
5397  PyObject * obj0 = 0 ;
5398  PyObject * obj1 = 0 ;
5399  PyObject * obj2 = 0 ;
5400  PyObject * obj3 = 0 ;
5401  int result;
5402 
5403  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5404  ecode1 = SWIG_AsVal_int(obj0, &val1);
5405  if (!SWIG_IsOK(ecode1)) {
5406    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'");
5407  } 
5408  arg1 = (int)(val1);
5409  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5410  if (!SWIG_IsOK(res2)) {
5411    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'");
5412  }
5413  arg2 = (char *)(buf2);
5414  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5415  if (!SWIG_IsOK(res3)) {
5416    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'");
5417  }
5418  arg3 = (char *)(buf3);
5419  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5420  if (!SWIG_IsOK(res4)) {
5421    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'");
5422  }
5423  arg4 = (char *)(buf4);
5424  result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
5425  resultobj = SWIG_From_int((int)(result));
5426  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5427  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5428  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5429  return resultobj;
5430fail:
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 NULL;
5435}
5436
5437
5438SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5439  PyObject *resultobj = 0;
5440  int arg1 ;
5441  char **arg2 = (char **) 0 ;
5442  int arg3 ;
5443  int *arg4 = (int *) 0 ;
5444  int *arg5 = (int *) 0 ;
5445  int *arg6 = (int *) 0 ;
5446  int *arg7 = (int *) 0 ;
5447  int val1 ;
5448  int ecode1 = 0 ;
5449  int val3 ;
5450  int ecode3 = 0 ;
5451  void *argp4 = 0 ;
5452  int res4 = 0 ;
5453  void *argp5 = 0 ;
5454  int res5 = 0 ;
5455  void *argp6 = 0 ;
5456  int res6 = 0 ;
5457  void *argp7 = 0 ;
5458  int res7 = 0 ;
5459  PyObject * obj0 = 0 ;
5460  PyObject * obj1 = 0 ;
5461  PyObject * obj2 = 0 ;
5462  PyObject * obj3 = 0 ;
5463  PyObject * obj4 = 0 ;
5464  PyObject * obj5 = 0 ;
5465  PyObject * obj6 = 0 ;
5466  int result;
5467 
5468  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
5469  ecode1 = SWIG_AsVal_int(obj0, &val1);
5470  if (!SWIG_IsOK(ecode1)) {
5471    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'");
5472  } 
5473  arg1 = (int)(val1);
5474  {
5475    int       i=0, size=0;
5476    PyObject  *py_obj;
5477   
5478    if (SARA_DEBUG) printf("Convert python -> c (char **):\n");
5479   
5480    size = Get_List_Size(obj1);
5481   
5482    if (SARA_DEBUG) printf("\tSize of List: %d\n", size);
5483   
5484    if ( size == -1 ) {
5485      PyErr_SetString(PyExc_TypeError, "not a list");
5486      return NULL; 
5487    }
5488    // printf("Size = %d\n", size);
5489   
5490    if (SARA_DEBUG) printf("\t<Contents>\n");
5491   
5492    arg2 = (char **) malloc( (size+1) * sizeof(char *));
5493    for (i=0; i < size; i++) {
5494      py_obj = PyList_GetItem(obj1, i);
5495      if (PyString_Check(py_obj)) {
5496        arg2[i] = PyString_AsString(py_obj);
5497        if (SARA_DEBUG) printf("%s", arg2[i]);
5498      }
5499      else {
5500        PyErr_SetString(PyExc_TypeError, "not a list of strings");
5501        free(arg2);
5502        return NULL; 
5503      }
5504    } // end for
5505    arg2[i] = 0;
5506    if (SARA_DEBUG) printf("\t</Contents>\n");
5507  }
5508  ecode3 = SWIG_AsVal_int(obj2, &val3);
5509  if (!SWIG_IsOK(ecode3)) {
5510    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'");
5511  } 
5512  arg3 = (int)(val3);
5513  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
5514  if (!SWIG_IsOK(res4)) {
5515    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescquery" "', argument " "4"" of type '" "int *""'"); 
5516  }
5517  arg4 = (int *)(argp4);
5518  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
5519  if (!SWIG_IsOK(res5)) {
5520    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_rescquery" "', argument " "5"" of type '" "int *""'"); 
5521  }
5522  arg5 = (int *)(argp5);
5523  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 |  0 );
5524  if (!SWIG_IsOK(res6)) {
5525    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_rescquery" "', argument " "6"" of type '" "int *""'"); 
5526  }
5527  arg6 = (int *)(argp6);
5528  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 |  0 );
5529  if (!SWIG_IsOK(res7)) {
5530    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_rescquery" "', argument " "7"" of type '" "int *""'"); 
5531  }
5532  arg7 = (int *)(argp7);
5533  result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
5534  resultobj = SWIG_From_int((int)(result));
5535  {
5536    free( (char *) arg2);
5537  }
5538  return resultobj;
5539fail:
5540  {
5541    free( (char *) arg2);
5542  }
5543  return NULL;
5544}
5545
5546
5547SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5548  PyObject *resultobj = 0;
5549  int arg1 ;
5550  char **arg2 = (char **) 0 ;
5551  int arg3 ;
5552  resource_t *arg4 = (resource_t *) 0 ;
5553  int val1 ;
5554  int ecode1 = 0 ;
5555  int val3 ;
5556  int ecode3 = 0 ;
5557  void *argp4 = 0 ;
5558  int res4 = 0 ;
5559  PyObject * obj0 = 0 ;
5560  PyObject * obj1 = 0 ;
5561  PyObject * obj2 = 0 ;
5562  PyObject * obj3 = 0 ;
5563  int result;
5564 
5565  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5566  ecode1 = SWIG_AsVal_int(obj0, &val1);
5567  if (!SWIG_IsOK(ecode1)) {
5568    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'");
5569  } 
5570  arg1 = (int)(val1);
5571  {
5572    int       i=0, size=0;
5573    PyObject  *py_obj;
5574   
5575    if (SARA_DEBUG) printf("Convert python -> c (char **):\n");
5576   
5577    size = Get_List_Size(obj1);
5578   
5579    if (SARA_DEBUG) printf("\tSize of List: %d\n", size);
5580   
5581    if ( size == -1 ) {
5582      PyErr_SetString(PyExc_TypeError, "not a list");
5583      return NULL; 
5584    }
5585    // printf("Size = %d\n", size);
5586   
5587    if (SARA_DEBUG) printf("\t<Contents>\n");
5588   
5589    arg2 = (char **) malloc( (size+1) * sizeof(char *));
5590    for (i=0; i < size; i++) {
5591      py_obj = PyList_GetItem(obj1, i);
5592      if (PyString_Check(py_obj)) {
5593        arg2[i] = PyString_AsString(py_obj);
5594        if (SARA_DEBUG) printf("%s", arg2[i]);
5595      }
5596      else {
5597        PyErr_SetString(PyExc_TypeError, "not a list of strings");
5598        free(arg2);
5599        return NULL; 
5600      }
5601    } // end for
5602    arg2[i] = 0;
5603    if (SARA_DEBUG) printf("\t</Contents>\n");
5604  }
5605  ecode3 = SWIG_AsVal_int(obj2, &val3);
5606  if (!SWIG_IsOK(ecode3)) {
5607    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'");
5608  } 
5609  arg3 = (int)(val3);
5610  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
5611  if (!SWIG_IsOK(res4)) {
5612    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescreserve" "', argument " "4"" of type '" "resource_t *""'"); 
5613  }
5614  arg4 = (resource_t *)(argp4);
5615  result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4);
5616  resultobj = SWIG_From_int((int)(result));
5617  {
5618    free( (char *) arg2);
5619  }
5620  return resultobj;
5621fail:
5622  {
5623    free( (char *) arg2);
5624  }
5625  return NULL;
5626}
5627
5628
5629SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5630  PyObject *resultobj = 0;
5631  int arg1 ;
5632  resource_t arg2 ;
5633  int val1 ;
5634  int ecode1 = 0 ;
5635  int val2 ;
5636  int ecode2 = 0 ;
5637  PyObject * obj0 = 0 ;
5638  PyObject * obj1 = 0 ;
5639  int result;
5640 
5641  if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail;
5642  ecode1 = SWIG_AsVal_int(obj0, &val1);
5643  if (!SWIG_IsOK(ecode1)) {
5644    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'");
5645  } 
5646  arg1 = (int)(val1);
5647  ecode2 = SWIG_AsVal_int(obj1, &val2);
5648  if (!SWIG_IsOK(ecode2)) {
5649    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "resource_t""'");
5650  } 
5651  arg2 = (resource_t)(val2);
5652  result = (int)pbs_rescrelease(arg1,arg2);
5653  resultobj = SWIG_From_int((int)(result));
5654  return resultobj;
5655fail:
5656  return NULL;
5657}
5658
5659
5660SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5661  PyObject *resultobj = 0;
5662  int arg1 ;
5663  char *arg2 = (char *) 0 ;
5664  char *arg3 = (char *) 0 ;
5665  int val1 ;
5666  int ecode1 = 0 ;
5667  int res2 ;
5668  char *buf2 = 0 ;
5669  int alloc2 = 0 ;
5670  int res3 ;
5671  char *buf3 = 0 ;
5672  int alloc3 = 0 ;
5673  PyObject * obj0 = 0 ;
5674  PyObject * obj1 = 0 ;
5675  PyObject * obj2 = 0 ;
5676  int result;
5677 
5678  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail;
5679  ecode1 = SWIG_AsVal_int(obj0, &val1);
5680  if (!SWIG_IsOK(ecode1)) {
5681    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'");
5682  } 
5683  arg1 = (int)(val1);
5684  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5685  if (!SWIG_IsOK(res2)) {
5686    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'");
5687  }
5688  arg2 = (char *)(buf2);
5689  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5690  if (!SWIG_IsOK(res3)) {
5691    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'");
5692  }
5693  arg3 = (char *)(buf3);
5694  result = (int)pbs_rerunjob(arg1,arg2,arg3);
5695  resultobj = SWIG_From_int((int)(result));
5696  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5697  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5698  return resultobj;
5699fail:
5700  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5701  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5702  return NULL;
5703}
5704
5705
5706SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5707  PyObject *resultobj = 0;
5708  int arg1 ;
5709  char *arg2 = (char *) 0 ;
5710  char *arg3 = (char *) 0 ;
5711  char *arg4 = (char *) 0 ;
5712  int val1 ;
5713  int ecode1 = 0 ;
5714  int res2 ;
5715  char *buf2 = 0 ;
5716  int alloc2 = 0 ;
5717  int res3 ;
5718  char *buf3 = 0 ;
5719  int alloc3 = 0 ;
5720  int res4 ;
5721  char *buf4 = 0 ;
5722  int alloc4 = 0 ;
5723  PyObject * obj0 = 0 ;
5724  PyObject * obj1 = 0 ;
5725  PyObject * obj2 = 0 ;
5726  PyObject * obj3 = 0 ;
5727  int result;
5728 
5729  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5730  ecode1 = SWIG_AsVal_int(obj0, &val1);
5731  if (!SWIG_IsOK(ecode1)) {
5732    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'");
5733  } 
5734  arg1 = (int)(val1);
5735  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5736  if (!SWIG_IsOK(res2)) {
5737    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'");
5738  }
5739  arg2 = (char *)(buf2);
5740  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5741  if (!SWIG_IsOK(res3)) {
5742    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'");
5743  }
5744  arg3 = (char *)(buf3);
5745  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5746  if (!SWIG_IsOK(res4)) {
5747    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'");
5748  }
5749  arg4 = (char *)(buf4);
5750  result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4);
5751  resultobj = SWIG_From_int((int)(result));
5752  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5753  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5754  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5755  return resultobj;
5756fail:
5757  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5758  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5759  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5760  return NULL;
5761}
5762
5763
5764SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5765  PyObject *resultobj = 0;
5766  int arg1 ;
5767  char *arg2 = (char *) 0 ;
5768  char *arg3 = (char *) 0 ;
5769  char *arg4 = (char *) 0 ;
5770  int val1 ;
5771  int ecode1 = 0 ;
5772  int res2 ;
5773  char *buf2 = 0 ;
5774  int alloc2 = 0 ;
5775  int res3 ;
5776  char *buf3 = 0 ;
5777  int alloc3 = 0 ;
5778  int res4 ;
5779  char *buf4 = 0 ;
5780  int alloc4 = 0 ;
5781  PyObject * obj0 = 0 ;
5782  PyObject * obj1 = 0 ;
5783  PyObject * obj2 = 0 ;
5784  PyObject * obj3 = 0 ;
5785  int result;
5786 
5787  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5788  ecode1 = SWIG_AsVal_int(obj0, &val1);
5789  if (!SWIG_IsOK(ecode1)) {
5790    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'");
5791  } 
5792  arg1 = (int)(val1);
5793  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5794  if (!SWIG_IsOK(res2)) {
5795    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'");
5796  }
5797  arg2 = (char *)(buf2);
5798  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5799  if (!SWIG_IsOK(res3)) {
5800    SWIG_exception_fail(SWIG_ArgError(res3),