Index: /trunk/pbs_swig/distro/CHANGES
===================================================================
--- /trunk/pbs_swig/distro/CHANGES	(revision 109)
+++ /trunk/pbs_swig/distro/CHANGES	(revision 110)
@@ -1,4 +1,6 @@
-=========== Version 2.8.?
+=========== Version 2.9.0
+	- Added support for new torque build system 2.1.0
 	- Added new_rack_pbsmon.py
+	  Authors: Walter de Jong & Bas van der Vlies
 
 =========== Version 2.8.2
Index: /trunk/pbs_swig/distro/Makefile.in
===================================================================
--- /trunk/pbs_swig/distro/Makefile.in	(revision 109)
+++ /trunk/pbs_swig/distro/Makefile.in	(revision 110)
@@ -16,5 +16,5 @@
 	python setup.py build
 
-install: pythonlib sara_install
+install: pythonlib
 	#mkdir -p $(DESTDIR)/@pyexecdir@ $(DESTDIR)/$(BINDIR)
 	#install build/lib*/* $(DESTDIR)/@pyexecdir@
Index: /trunk/pbs_swig/distro/debian/changelog
===================================================================
--- /trunk/pbs_swig/distro/debian/changelog	(revision 109)
+++ /trunk/pbs_swig/distro/debian/changelog	(revision 110)
@@ -1,2 +1,8 @@
+pbs-python (2.9.0-1) unstable; urgency=low
+
+  * Added new build system for torque 2.1.0 and higher
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 20 Apr 2006 14:25:21 +0200
+
 pbs-python (2.8.2-3) unstable; urgency=low
 
Index: /trunk/pbs_swig/distro/examples/logpbs.py
===================================================================
--- /trunk/pbs_swig/distro/examples/logpbs.py	(revision 109)
+++ /trunk/pbs_swig/distro/examples/logpbs.py	(revision 110)
@@ -5,5 +5,5 @@
 # Desc. : How to use the logging facility of Openpbs
 #
-# $Id: logpbs.py,v 1.1 2002/10/21 12:31:41 sscpbas Exp $
+# $Id$
 #
 import pbs
@@ -26,6 +26,6 @@
    # Open the sched log file
    #
-   if pbs.log_open('', '/var/spool/openpbs/sched_logs'):
-     print 'Could not open log file in /var/spool/openpbs/sched_logs'
+   if pbs.log_open('', '/var/spool/torque/sched_logs'):
+     print 'Could not open log file in /var/spool/torque/sched_logs'
      sys.exit(1)
 
Index: /trunk/pbs_swig/distro/pbs_python.spec
===================================================================
--- /trunk/pbs_swig/distro/pbs_python.spec	(revision 109)
+++ /trunk/pbs_swig/distro/pbs_python.spec	(revision 110)
@@ -1,5 +1,5 @@
 Summary: This package contains the pbs python module.
 Name: pbs_python
-Version: 2.8.1 
+Version: 2.9.0
 Release: 1
 Copyright: See LICENSE
Index: /trunk/pbs_swig/distro/setup.py.in
===================================================================
--- /trunk/pbs_swig/distro/setup.py.in	(revision 109)
+++ /trunk/pbs_swig/distro/setup.py.in	(revision 110)
@@ -2,4 +2,7 @@
 #
 # $Id: setup.py 434 2005-11-04 15:02:07Z bas $
+#
+# set ts=4
+#
 
 import sys
@@ -8,34 +11,41 @@
 from distutils.core import setup, Extension 
 
-# Libs required by this package
-#
-LIBS = ['log', 'net', 'pbs'] 
-
 # Try some usefule defaults if not set
 #
 PBS_LIB_DIR='@pbspath@'
-if not PBS_LIB_DIR:
-  for dir in ['/usr/lib', '/usr/local/lib', '/opt/pbs/usr/lib', '/usr/lib/torque', '/opt/pbs/lib', '/opt/torque/lib' ]:
-    dummy = os.path.join(dir, 'libpbs.a')
-    if os.path.exists(dummy):
-      PBS_LIB_DIR=dir
-      break
+NEW_BUILD_SYSTEM=1
 
 if not PBS_LIB_DIR:
-  print 'Please specify where the PBS libraries are!!'
-  print 'edit setup.py and fill in the PBS_LIB_DIR variable'
-  sys.exit(1)
+	for dir in ['/usr/lib', '/usr/local/lib', '/opt/pbs/usr/lib', '/usr/lib/torque', '/opt/pbs/lib', '/opt/torque/lib' ]:
+		dummy_new = os.path.join(dir, 'libtorque.so')
+		dummy_old = os.path.join(dir, 'libpbs.a')
+		if os.path.exists(dummy_new):
+			PBS_LIB_DIR=dir
+			break
+		elif os.path.exists(dummy_old):
+			PBS_LIB_DIR=dir
+			NEW_BUILD_SYSTEM=0
+			break
+
+if not PBS_LIB_DIR:
+	print 'Please specify where the PBS libraries are!!'
+	print 'edit setup.py and fill in the PBS_LIB_DIR variable'
+	sys.exit(1)
 
 # Test if we have all the libs:
 #
-for lib in LIBS:
-  library = 'lib%s.a' %(lib) 
-  dummy = os.path.join(PBS_LIB_DIR, library)
-  if not os.path.exists(dummy):
-    print 'You need to install "%s" in %s' %(library, PBS_LIB_DIR)
-    sys.exit(1)
+if NEW_BUILD_SYSTEM:
+	LIBS = ['torque']
+else:
+	LIBS = ['log', 'net', 'pbs']
+	for lib in LIBS:
+		library = 'lib%s.a' %(lib)
+		dummy = os.path.join(PBS_LIB_DIR, library)
+    	if not os.path.exists(dummy):
+			print 'You need to install "%s" in %s' %(library, PBS_LIB_DIR)
+			sys.exit(1)
 
 setup ( name = 'pbs_python',
-        version = '2.8.0',
+	version = '2.9.0',
 	description = 'openpbs/torque python interface',
 	author = 'Bas van der Vlies',
@@ -44,13 +54,11 @@
 
 	extra_path = 'pbs',
-        package_dir = { '' : 'src' }, 
-	py_modules = [ 'pbs', 'PBSQuery' ],
+		package_dir = { '' : 'src' }, 
+		py_modules = [ 'pbs', 'PBSQuery' ], 
 
 	ext_modules = [ 
-	  Extension( '_pbs', ['src/pbs_wrap.c'],
-	  library_dirs = [ PBS_LIB_DIR ],
-	  libraries = LIBS
-	  ) 
+		Extension( '_pbs', ['src/pbs_wrap.c'],
+		library_dirs = [ PBS_LIB_DIR ],
+		libraries = LIBS) 
 	]
 )
-
Index: /trunk/pbs_swig/distro/src/pbs.py
===================================================================
--- /trunk/pbs_swig/distro/src/pbs.py	(revision 109)
+++ /trunk/pbs_swig/distro/src/pbs.py	(revision 110)
@@ -5,5 +5,5 @@
 import _pbs
 
-def _swig_setattr(self,class_type,name,value):
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
     if (name == "this"):
         if isinstance(value, class_type):
@@ -14,5 +14,11 @@
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    self.__dict__[name] = value
+    if (not static) or hasattr(self,name) or (name == "thisown"):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
 
 def _swig_getattr(self,class_type,name):
@@ -228,5 +234,5 @@
     def __init__(self): raise RuntimeError, "No constructor defined"
     def __repr__(self):
-        return "<C attrl instance at %s>" % (self.this,)
+        return "<%s.%s; proxy of C attrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     __swig_setmethods__["name"] = _pbs.attrl_name_set
     __swig_getmethods__["name"] = _pbs.attrl_name_get
@@ -257,5 +263,5 @@
     def __init__(self): raise RuntimeError, "No constructor defined"
     def __repr__(self):
-        return "<C attropl instance at %s>" % (self.this,)
+        return "<%s.%s; proxy of C attropl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     __swig_setmethods__["name"] = _pbs.attropl_name_set
     __swig_getmethods__["name"] = _pbs.attropl_name_get
@@ -286,5 +292,5 @@
     def __init__(self): raise RuntimeError, "No constructor defined"
     def __repr__(self):
-        return "<C batch_status instance at %s>" % (self.this,)
+        return "<%s.%s; proxy of C batch_status instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     __swig_setmethods__["name"] = _pbs.batch_status_name_set
     __swig_getmethods__["name"] = _pbs.batch_status_name_get
@@ -549,5 +555,5 @@
   Returns the pbs python interface version as a string. 
   """
-  return '2.8.2'
+  return '2.9.0'
 
 # A useful dict with error codes to text
Index: /trunk/pbs_swig/distro/src/pbs_wrap.c
===================================================================
--- /trunk/pbs_swig/distro/src/pbs_wrap.c	(revision 109)
+++ /trunk/pbs_swig/distro/src/pbs_wrap.c	(revision 110)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.22
+ * Version 1.3.24
  * 
  * This file is not intended to be easily readable and contains a number of 
@@ -11,70 +11,59 @@
 #define SWIGPYTHON
 
-#include "Python.h"
-
-/*************************************************************** -*- c -*-
- * python/precommon.swg
+#ifndef SWIG_TEMPLATE_DISAMBIGUATOR
+#  if defined(__SUNPRO_CC) 
+#    define SWIG_TEMPLATE_DISAMBIGUATOR template
+#  else
+#    define SWIG_TEMPLATE_DISAMBIGUATOR 
+#  endif
+#endif
+
+
+#include <Python.h>
+
+/***********************************************************************
+ * swigrun.swg
  *
- * Rename all exported symbols from common.swg, to avoid symbol
- * clashes if multiple interpreters are included
+ *     This file contains generic CAPI SWIG runtime support for pointer
+ *     type checking.
  *
  ************************************************************************/
 
-#define SWIG_TypeRegister    SWIG_Python_TypeRegister
-#define SWIG_TypeCheck       SWIG_Python_TypeCheck
-#define SWIG_TypeCast        SWIG_Python_TypeCast
-#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
-#define SWIG_TypeName        SWIG_Python_TypeName
-#define SWIG_TypePrettyName  SWIG_Python_TypePrettyName
-#define SWIG_TypeQuery       SWIG_Python_TypeQuery
-#define SWIG_TypeClientData  SWIG_Python_TypeClientData
-#define SWIG_PackData        SWIG_Python_PackData 
-#define SWIG_UnpackData      SWIG_Python_UnpackData 
-
-
-/***********************************************************************
- * common.swg
- *
- *     This file contains generic SWIG runtime support for pointer
- *     type checking as well as a few commonly used macros to control
- *     external linkage.
- *
- * Author : David Beazley (beazley@cs.uchicago.edu)
- *
- * Copyright (c) 1999-2000, The University of Chicago
- * 
- * This file may be freely redistributed without license or fee provided
- * this copyright message remains intact.
- ************************************************************************/
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "1"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+#define SWIG_QUOTE_STRING(x) #x
+#define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+#define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+#define SWIG_TYPE_TABLE_NAME
+#endif
 
 #include <string.h>
 
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#  if defined(_MSC_VER) || defined(__GNUC__)
-#    if defined(STATIC_LINKED)
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) extern a
-#    else
-#      define SWIGEXPORT(a) __declspec(dllexport) a
-#      define SWIGIMPORT(a) extern a
-#    endif
-#  else
-#    if defined(__BORLANDC__)
-#      define SWIGEXPORT(a) a _export
-#      define SWIGIMPORT(a) a _export
-#    else
-#      define SWIGEXPORT(a) a
-#      define SWIGIMPORT(a) a
-#    endif
-#  endif
+#ifndef SWIGINLINE
+#if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#  define SWIGINLINE inline
 #else
-#  define SWIGEXPORT(a) a
-#  define SWIGIMPORT(a) a
+#  define SWIGINLINE
 #endif
-
-#ifdef SWIG_GLOBAL
-#  define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-#  define SWIGRUNTIME(a) static a
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+#ifndef SWIGRUNTIME
+#define SWIGRUNTIME static
+#endif
+#ifndef SWIGRUNTIMEINLINE
+#define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
 #endif
 
@@ -96,32 +85,61 @@
 } swig_type_info;
 
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
-SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
-SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
-SWIGIMPORT(const char *)     SWIG_TypePrettyName(const swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
-SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);
-SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int);
-SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
-
-#else
-
-static swig_type_info *swig_type_list = 0;
-static swig_type_info **swig_type_list_handle = &swig_type_list;
-
-/* Register a type mapping with the type-checking */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeRegister(swig_type_info *ti) {
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return *f1 - *f2;
+  }
+  return (l1 - f1) - (l2 - f2);
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Register a type mapping with the type-checking
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeRegisterTL(swig_type_info **tl, swig_type_info *ti) {
   swig_type_info *tc, *head, *ret, *next;
   /* Check to see if this type has already been registered */
-  tc = *swig_type_list_handle;
+  tc = *tl;
   while (tc) {
-    if (strcmp(tc->name, ti->name) == 0) {
+    /* check simple type equivalence */
+    int typeequiv = (strcmp(tc->name, ti->name) == 0);   
+    /* check full type equivalence, resolving typedefs */
+    if (!typeequiv) {
+      /* only if tc is not a typedef (no '|' on it) */
+      if (tc->str && ti->str && !strstr(tc->str,"|")) {
+	typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
+      }
+    }
+    if (typeequiv) {
       /* Already exists in the table.  Just add additional types to the list */
-      if (tc->clientdata) ti->clientdata = tc->clientdata;
+      if (ti->clientdata) tc->clientdata = ti->clientdata;
       head = tc;
       next = tc->next;
@@ -134,6 +152,6 @@
 
   /* Place in list */
-  ti->prev = *swig_type_list_handle;
-  *swig_type_list_handle = ti;
+  ti->prev = *tl;
+  *tl = ti;
 
   /* Build linked lists */
@@ -150,10 +168,13 @@
   if (next) next->prev = head;
   head->next = next;
+
   return ret;
 }
 
-/* Check the typename */
-SWIGRUNTIME(swig_type_info *) 
-SWIG_TypeCheck(char *c, swig_type_info *ty) {
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
   swig_type_info *s;
   if (!ty) return 0;        /* Void pointer */
@@ -179,13 +200,16 @@
 }
 
-/* Cast a pointer up an inheritance hierarchy */
-SWIGRUNTIME(void *) 
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
 SWIG_TypeCast(swig_type_info *ty, void *ptr) {
-  if ((!ty) || (!ty->converter)) return ptr;
-  return (*ty->converter)(ptr);
-}
-
-/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGRUNTIME(swig_type_info *) 
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
   swig_type_info *lastty = ty;
@@ -198,14 +222,17 @@
 }
 
-/* Return the name associated with this type */
-SWIGRUNTIME(const char *)
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
 SWIG_TypeName(const swig_type_info *ty) {
   return ty->name;
 }
 
-/* Return the pretty name associated with this type,
-   that is an unmangled type name in a form presentable to the user.
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
 */
-SWIGRUNTIME(const char *)
+SWIGRUNTIME const char *
 SWIG_TypePrettyName(const swig_type_info *type) {
   /* The "str" field contains the equivalent pretty names of the
@@ -224,45 +251,10 @@
 }
 
-/* 
-   Compare two type names skipping the space characters, therefore
-   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
-
-   Return 0 when the two name types are equivalent, as in
-   strncmp, but skipping ' '.
+/*
+  Search for a swig_type_info structure
 */
-static int
-SWIG_TypeNameComp(const char *f1, const char *l1,
-		  const char *f2, const char *l2) {
-  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
-    while ((*f1 == ' ') && (f1 != l1)) ++f1;
-    while ((*f2 == ' ') && (f2 != l2)) ++f2;
-    if (*f1 != *f2) return *f1 - *f2;
-  }
-  return (l1 - f1) - (l2 - f2);
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-*/
-static int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv && *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-  
-
-/* Search for a swig_type_info structure */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeQuery(const char *name) {
-  swig_type_info *ty = *swig_type_list_handle;
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryTL(swig_type_info *tl, const char *name) {
+  swig_type_info *ty = tl;
   while (ty) {
     if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
@@ -273,17 +265,20 @@
 }
 
-/* Set the clientdata field for a type */
-SWIGRUNTIME(void)
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) {
   swig_type_info *tc, *equiv;
-  if (ti->clientdata == clientdata) return;
+  if (ti->clientdata) return;
+  /* if (ti->clientdata == clientdata) return; */
   ti->clientdata = clientdata;
   equiv = ti->next;
   while (equiv) {
     if (!equiv->converter) {
-      tc = *swig_type_list_handle;
+      tc = tl;
       while (tc) {
         if ((strcmp(tc->name, equiv->name) == 0))
-          SWIG_TypeClientData(tc,clientdata);
+          SWIG_TypeClientDataTL(tl,tc,clientdata);
         tc = tc->prev;
       }
@@ -293,7 +288,9 @@
 }
 
-/* Pack binary data into a string */
-SWIGRUNTIME(char *)
-SWIG_PackData(char *c, void *ptr, int sz) {
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
   static char hex[17] = "0123456789abcdef";
   unsigned char *u = (unsigned char *) ptr;
@@ -308,17 +305,20 @@
 }
 
-/* Unpack binary data from a string */
-SWIGRUNTIME(char *)
-SWIG_UnpackData(char *c, void *ptr, int sz) {
-  register unsigned char uu = 0;
-  register int d;
-  unsigned char *u = (unsigned char *) ptr;
-  const unsigned char *eu =  u + sz;
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
   for (; u != eu; ++u) {
-    d = *(c++);
+    register int d = *(c++);
+    register unsigned char uu = 0;
     if ((d >= '0') && (d <= '9'))
       uu = ((d - '0') << 4);
     else if ((d >= 'a') && (d <= 'f'))
       uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
     d = *(c++);
     if ((d >= '0') && (d <= '9'))
@@ -326,4 +326,6 @@
     else if ((d >= 'a') && (d <= 'f'))
       uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
     *u = uu;
   }
@@ -331,9 +333,233 @@
 }
 
+/*
+  This function will propagate the clientdata field of type to any new
+  swig_type_info structures that have been added into the list of
+  equivalent types.  It is like calling SWIG_TypeClientData(type,
+  clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
+  swig_type_info *equiv = type->next;
+  swig_type_info *tc;
+  if (!type->clientdata) return;
+  while (equiv) {
+    if (!equiv->converter) {
+      tc = tl;
+      while (tc) {
+        if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
+          SWIG_TypeClientDataTL(tl,tc, type->clientdata);
+        tc = tc->prev;
+      }
+    }
+    equiv = equiv->next;
+  }
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
 #endif
 
+/***********************************************************************
+ * common.swg
+ *
+ *     This file contains generic SWIG runtime support for pointer
+ *     type checking as well as a few commonly used macros to control
+ *     external linkage.
+ *
+ * Author : David Beazley (beazley@cs.uchicago.edu)
+ *
+ * Copyright (c) 1999-2000, The University of Chicago
+ * 
+ * This file may be freely redistributed without license or fee provided
+ * this copyright message remains intact.
+ ************************************************************************/
+
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  if !defined(STATIC_LINKED)
+#    define SWIGEXPORT(a) __declspec(dllexport) a
+#  else
+#    define SWIGEXPORT(a) a
+#  endif
+#else
+#  define SWIGEXPORT(a) a
+#endif
+
 #ifdef __cplusplus
-}
+extern "C" {
 #endif
+
+
+/*************************************************************************/
+
+
+/* The static type info list */
+
+static swig_type_info *swig_type_list = 0;
+static swig_type_info **swig_type_list_handle = &swig_type_list;
+  
+
+/* Register a type mapping with the type-checking */
+static swig_type_info *
+SWIG_TypeRegister(swig_type_info *ti) {
+  return SWIG_TypeRegisterTL(swig_type_list_handle, ti);
+}
+
+/* Search for a swig_type_info structure */
+static swig_type_info *
+SWIG_TypeQuery(const char *name) {
+  return SWIG_TypeQueryTL(*swig_type_list_handle, name);
+}
+
+/* Set the clientdata field for a type */
+static void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientDataTL(*swig_type_list_handle, ti, clientdata);
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+static void
+SWIG_PropagateClientData(swig_type_info *type) {
+  SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * SWIG API. Portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -----------------------------------------------------------------------------
+ * for internal method declarations
+ * ----------------------------------------------------------------------------- */
+
+#ifndef SWIGINTERN
+#define SWIGINTERN static 
+#endif
+
+#ifndef SWIGINTERNSHORT
+#ifdef __cplusplus
+#define SWIGINTERNSHORT static inline 
+#else /* C case */
+#define SWIGINTERNSHORT static 
+#endif /* __cplusplus */
+#endif
+
+
+/*
+  Exception handling in wrappers
+*/
+#define SWIG_fail                goto fail
+#define SWIG_arg_fail(arg)       SWIG_Python_ArgFail(arg)
+#define SWIG_append_errmsg(msg)   SWIG_Python_AddErrMesg(msg,0)
+#define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)
+#define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)
+#define SWIG_null_ref(type)       SWIG_Python_NullRef(type)
+
+/*
+  Contract support
+*/
+#define SWIG_contract_assert(expr, msg) \
+ if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_INT     1
+#define SWIG_PY_FLOAT   2
+#define SWIG_PY_STRING  3
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+    int type;
+    char *name;
+    long lvalue;
+    double dvalue;
+    void   *pvalue;
+    swig_type_info **ptype;
+} swig_const_info;
+
+
+/* -----------------------------------------------------------------------------
+ * Alloc. memory flags
+ * ----------------------------------------------------------------------------- */
+#define SWIG_OLDOBJ  1
+#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
+#define SWIG_PYSTR   SWIG_NEWOBJ + 1
+
+#ifdef __cplusplus
+}
+#endif
+
 
 /***********************************************************************
@@ -347,227 +573,525 @@
  ************************************************************************/
 
+/* Common SWIG API */
+#define SWIG_ConvertPtr(obj, pp, type, flags)    SWIG_Python_ConvertPtr(obj, pp, type, flags)
+#define SWIG_NewPointerObj(p, type, flags)       SWIG_Python_NewPointerObj(p, type, flags)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+ 
+
+/* Python-specific SWIG API */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags)   SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
+#define SWIG_NewPackedObj(ptr, sz, type)              SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+/*
+  Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent
+  C/C++ pointers in the python side. Very useful for debugging, but
+  not always safe.
+*/
+#if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
+#  define SWIG_COBJECT_TYPES
+#endif
+
+/* Flags for pointer conversion */
+#define SWIG_POINTER_EXCEPTION     0x1
+#define SWIG_POINTER_DISOWN        0x2
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#define SWIG_PY_INT     1
-#define SWIG_PY_FLOAT   2
-#define SWIG_PY_STRING  3
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY  5
-
-/* Flags for pointer conversion */
-
-#define SWIG_POINTER_EXCEPTION     0x1
-#define SWIG_POINTER_DISOWN        0x2
-
-/* Exception handling in wrappers */
-#define SWIG_fail   goto fail
-
-/* Constant information structure */
-typedef struct swig_const_info {
-    int type;
-    char *name;
-    long lvalue;
-    double dvalue;
-    void   *pvalue;
-    swig_type_info **ptype;
-} swig_const_info;
-
-/* Common SWIG API */
-#define SWIG_ConvertPtr(obj, pp, type, flags) \
-  SWIG_Python_ConvertPtr(obj, pp, type, flags)
-#define SWIG_NewPointerObj(p, type, flags) \
-  SWIG_Python_NewPointerObj(p, type, flags)
-#define SWIG_MustGetPtr(p, type, argnum, flags) \
-  SWIG_Python_MustGetPtr(p, type, argnum, flags)
- 
-/* Python-specific SWIG API */
-#define SWIG_newvarlink() \
-  SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr) \
-  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
-  SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type) \
-  SWIG_Python_NewPackedObj(ptr, sz, type)
-#define SWIG_InstallConstants(d, constants) \
-  SWIG_Python_InstallConstants(d, constants)
-
-typedef double (*py_objasdbl_conv)(PyObject *obj);
-
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(int)               SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
-SWIGIMPORT(void *)            SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_newvarlink(void);
-SWIGIMPORT(void)              SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-SWIGIMPORT(int)               SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
-SWIGIMPORT(PyObject *)        SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
-SWIGIMPORT(void)              SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
-
-
-#else
-
-
 /* -----------------------------------------------------------------------------
- * global variable support code.
+ * Create a new pointer string 
  * ----------------------------------------------------------------------------- */
 
-typedef struct swig_globalvar {   
-  char       *name;                  /* Name of global variable */
-  PyObject *(*get_attr)(void);       /* Return the current value */
-  int       (*set_attr)(PyObject *); /* Set the value */
-  struct swig_globalvar *next;
-} swig_globalvar;
-
-typedef struct swig_varlinkobject {
+#ifndef SWIG_BUFFER_SIZE
+#define SWIG_BUFFER_SIZE 1024
+#endif
+
+#if defined(SWIG_COBJECT_TYPES)
+#if !defined(SWIG_COBJECT_PYTHON)
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Object type, and use it instead of PyCObject
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
   PyObject_HEAD
-  swig_globalvar *vars;
-} swig_varlinkobject;
-
-static PyObject *
-swig_varlink_repr(swig_varlinkobject *v) {
-  v = v;
-  return PyString_FromString("<Global variables>");
-}
-
-static int
-swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
-  swig_globalvar  *var;
-  flags = flags;
-  fprintf(fp,"Global variables { ");
-  for (var = v->vars; var; var=var->next) {
-    fprintf(fp,"%s", var->name);
-    if (var->next) fprintf(fp,", ");
-  }
-  fprintf(fp," }\n");
-  return 0;
-}
-
-static PyObject *
-swig_varlink_getattr(swig_varlinkobject *v, char *n) {
-  swig_globalvar *var = v->vars;
-  while (var) {
-    if (strcmp(var->name,n) == 0) {
-      return (*var->get_attr)();
-    }
-    var = var->next;
-  }
-  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-  return NULL;
-}
-
-static int
-swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
-  swig_globalvar *var = v->vars;
-  while (var) {
-    if (strcmp(var->name,n) == 0) {
-      return (*var->set_attr)(p);
-    }
-    var = var->next;
-  }
-  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-  return 1;
-}
-
-statichere PyTypeObject varlinktype = {
-  PyObject_HEAD_INIT(0)              
-  0,                                  /* Number of items in variable part (ob_size) */
-  (char *)"swigvarlink",              /* Type name (tp_name) */
-  sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
-  0,                                  /* Itemsize (tp_itemsize) */
-  0,                                  /* Deallocator (tp_dealloc) */ 
-  (printfunc) swig_varlink_print,     /* Print (tp_print) */
-  (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
-  (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
-  0,                                  /* tp_compare */
-  (reprfunc) swig_varlink_repr,       /* tp_repr */
-  0,                                  /* tp_as_number */
-  0,                                  /* tp_as_sequence */
-  0,                                  /* tp_as_mapping */
-  0,                                  /* tp_hash */
-  0,                                  /* tp_call */
-  0,                                  /* tp_str */
-  0,                                  /* tp_getattro */
-  0,                                  /* tp_setattro */
-  0,                                  /* tp_as_buffer */
-  0,                                  /* tp_flags */
-  0,                                  /* tp_doc */
-  0,                                  /* tp_traverse */
-  0,                                  /* tp_clear */
-  0,                                  /* tp_richcompare */
-  0,                                  /* tp_weaklistoffset */
+  void *ptr;
+  const char *desc;
+} PySwigObject;
+
+/* Declarations for objects of type PySwigObject */
+
+SWIGRUNTIME int
+PySwigObject_print(PySwigObject *v, FILE *fp, int flags)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result))) {
+    fputs("<Swig Object at ", fp); fputs(result, fp); fputs(">", fp);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+  
+SWIGRUNTIME PyObject *
+PySwigObject_repr(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ?
+    PyString_FromFormat("<Swig Object at %s>", result) : 0;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_str(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ?
+    PyString_FromString(result) : 0;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_long(PySwigObject *v)
+{
+  return PyLong_FromUnsignedLong((unsigned long) v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_oct(PySwigObject *v)
+{
+  char buf[100];
+  unsigned long x = (unsigned long)v->ptr;
+  if (x == 0)
+    strcpy(buf, "0");
+  else
+    PyOS_snprintf(buf, sizeof(buf), "0%lo", x);
+  return PyString_FromString(buf);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_hex(PySwigObject *v)
+{
+  char buf[100];
+  PyOS_snprintf(buf, sizeof(buf), "0x%lx", (unsigned long)v->ptr);
+  return PyString_FromString(buf);
+}
+
+SWIGRUNTIME int
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+{
+  int c = strcmp(v->desc, w->desc);
+  if (c) {
+    return c;
+  } else {
+    void *i = v->ptr;
+    void *j = w->ptr;
+    return (i < j) ? -1 : (i > j) ? 1 : 0;
+  }
+}
+
+SWIGRUNTIME void
+PySwigObject_dealloc(PySwigObject *self)
+{
+  PyObject_DEL(self);
+}
+
+SWIGRUNTIME PyTypeObject*
+PySwigObject_GetType() {
+  static char PySwigObject_Type__doc__[] = 
+    "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods PySwigObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    (binaryfunc)0, /*nb_divide*/
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+    (coercion)0,   /*nb_coerce*/
+    (unaryfunc)PySwigObject_long, /*nb_int*/
+    (unaryfunc)PySwigObject_long, /*nb_long*/
+    (unaryfunc)0,                 /*nb_float*/
+    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
+    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02000000
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ 
+#endif
+  };
+
+  static int type_init = 0;  
+  static PyTypeObject PySwigObject_Type;
+
+  if (!type_init) {
+    PyTypeObject tmp = {
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,					/*ob_size*/
+    "PySwigObject",			/*tp_name*/
+    sizeof(PySwigObject),		/*tp_basicsize*/
+    0,					/*tp_itemsize*/
+    /* methods */
+    (destructor)PySwigObject_dealloc,	/*tp_dealloc*/
+    (printfunc)PySwigObject_print,	/*tp_print*/
+    (getattrfunc)0,			/*tp_getattr*/
+    (setattrfunc)0,			/*tp_setattr*/
+    (cmpfunc)PySwigObject_compare,	/*tp_compare*/
+    (reprfunc)PySwigObject_repr,	/*tp_repr*/
+    &PySwigObject_as_number,	        /*tp_as_number*/
+    0,					/*tp_as_sequence*/
+    0,					/*tp_as_mapping*/
+    (hashfunc)0,			/*tp_hash*/
+    (ternaryfunc)0,			/*tp_call*/
+    (reprfunc)PySwigObject_str,		/*tp_str*/
+    /* Space for future expansion */
+    0L,0L,0L,0L,
+    PySwigObject_Type__doc__, 	        /* Documentation string */
+#if PY_VERSION_HEX >= 0x02000000
+    0,                                  /* tp_traverse */
+    0,                                  /* tp_clear */
+#endif
+#if PY_VERSION_HEX >= 0x02010000
+    0,                                  /* tp_richcompare */
+    0,                                  /* tp_weaklistoffset */
+#endif
 #if PY_VERSION_HEX >= 0x02020000
-  0,                                  /* tp_iter */
-  0,                                  /* tp_iternext */
-  0,                                  /* tp_methods */
-  0,                                  /* tp_members */
-  0,                                  /* tp_getset */
-  0,                                  /* tp_base */
-  0,                                  /* tp_dict */
-  0,                                  /* tp_descr_get */
-  0,                                  /* tp_descr_set */
-  0,                                  /* tp_dictoffset */
-  0,                                  /* tp_init */
-  0,                                  /* tp_alloc */
-  0,                                  /* tp_new */
-  0,                                  /* tp_free */
-  0,                                  /* tp_is_gc */
-  0,                                  /* tp_bases */
-  0,                                  /* tp_mro */
-  0,                                  /* tp_cache */
-  0,                                  /* tp_subclasses */
-  0,                                  /* tp_weaklist */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
 #endif
-#if PY_VERSION_HEX >= 0x02030200
-  0,                                  /* tp_del */
+#if PY_VERSION_HEX >= 0x02030000
+    0,                                  /* tp_del */
 #endif
 #ifdef COUNT_ALLOCS
-  /* these must be last */
-  0,                                  /* tp_alloc */
-  0,                                  /* tp_free */
-  0,                                  /* tp_maxalloc */
-  0,                                  /*  tp_next */
+    0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
-};
-
-/* Create a variable linking object for use later */
-SWIGRUNTIME(PyObject *)
-SWIG_Python_newvarlink(void) {
-  swig_varlinkobject *result = 0;
-  result = PyMem_NEW(swig_varlinkobject,1);
-  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
-  result->ob_type = &varlinktype;
-  result->vars = 0;
-  result->ob_refcnt = 0;
-  Py_XINCREF((PyObject *) result);
-  return ((PyObject*) result);
-}
-
-SWIGRUNTIME(void)
-SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
-  swig_varlinkobject *v;
-  swig_globalvar *gv;
-  v= (swig_varlinkobject *) p;
-  gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
-  gv->name = (char *) malloc(strlen(name)+1);
-  strcpy(gv->name,name);
-  gv->get_attr = get_attr;
-  gv->set_attr = set_attr;
-  gv->next = v->vars;
-  v->vars = gv;
-}
+    };
+
+    PySwigObject_Type = tmp;
+    type_init = 1;
+  }
+
+  return &PySwigObject_Type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_FromVoidPtrAndDesc(void *ptr, const char *desc)
+{
+  PySwigObject *self = PyObject_NEW(PySwigObject, PySwigObject_GetType());
+  if (self == NULL) return NULL;
+  self->ptr = ptr;
+  self->desc = desc;
+  return (PyObject *)self;
+}
+
+SWIGRUNTIMEINLINE void *
+PySwigObject_AsVoidPtr(PyObject *self)
+{
+  return ((PySwigObject *)self)->ptr;
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigObject_GetDesc(PyObject *self)
+{
+  return ((PySwigObject *)self)->desc;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigObject_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigObject_GetType()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  const char *desc;
+  size_t size;
+} PySwigPacked;
+
+SWIGRUNTIME int
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int flags)
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->desc,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+PySwigPacked_repr(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->desc);
+  } else {
+    return PyString_FromFormat("<Swig Packed %s>", v->desc);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_str(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return PyString_FromFormat("%s%s", result, v->desc);
+  } else {
+    return PyString_FromFormat("%s", v->desc);
+  }  
+}
+
+SWIGRUNTIME int
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+{
+  int c = strcmp(v->desc, w->desc);
+  if (c) {
+    return c;
+  } else {
+    size_t i = v->size;
+    size_t j = w->size;
+    int s = (i < j) ? -1 : (i > j) ? 1 : 0;
+    return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+  }
+}
+
+SWIGRUNTIME void
+PySwigPacked_dealloc(PySwigPacked *self)
+{
+  free(self->pack);
+  PyObject_DEL(self);
+}
+
+SWIGRUNTIME PyTypeObject*
+PySwigPacked_GetType() {
+  static char PySwigPacked_Type__doc__[] = 
+    "Swig object carries a C/C++ instance pointer";
+  static int type_init = 0;
+  
+  static PyTypeObject PySwigPacked_Type;
+  if (!type_init) {
+    PyTypeObject tmp = {
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,					/*ob_size*/
+    "PySwigPacked",			/*tp_name*/
+    sizeof(PySwigPacked),		/*tp_basicsize*/
+    0,					/*tp_itemsize*/
+    /* methods */
+    (destructor)PySwigPacked_dealloc,	/*tp_dealloc*/
+    (printfunc)PySwigPacked_print,	/*tp_print*/
+    (getattrfunc)0,			/*tp_getattr*/
+    (setattrfunc)0,			/*tp_setattr*/
+    (cmpfunc)PySwigPacked_compare,	/*tp_compare*/
+    (reprfunc)PySwigPacked_repr,	/*tp_repr*/
+    0,	                                /*tp_as_number*/
+    0,					/*tp_as_sequence*/
+    0,					/*tp_as_mapping*/
+    (hashfunc)0,			/*tp_hash*/
+    (ternaryfunc)0,			/*tp_call*/
+    (reprfunc)PySwigPacked_str,		/*tp_str*/
+    /* Space for future expansion */
+    0L,0L,0L,0L,
+    PySwigPacked_Type__doc__, 	        /* Documentation string */
+#if PY_VERSION_HEX >= 0x02000000
+    0,                                  /* tp_traverse */
+    0,                                  /* tp_clear */
+#endif
+#if PY_VERSION_HEX >= 0x02010000
+    0,                                  /* tp_richcompare */
+    0,                                  /* tp_weaklistoffset */
+#endif
+#if PY_VERSION_HEX >= 0x02020000         
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+    0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+    0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+    };
+
+    PySwigPacked_Type = tmp;
+    type_init = 1;
+  }
+  
+      
+
+  return &PySwigPacked_Type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_FromDataAndDesc(void *ptr, size_t size, const char *desc)
+{
+  PySwigPacked *self = PyObject_NEW(PySwigPacked, PySwigPacked_GetType());
+  if (self == NULL) {
+    return NULL;
+  } else {
+    void *pack = malloc(size);
+    memcpy(pack, ptr, size);
+    self->pack = pack;
+    self->desc = desc;
+    self->size = size;
+    return (PyObject *) self;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  PySwigPacked *self = (PySwigPacked *)obj;
+  if (self->size != size) return 0;
+  memcpy(ptr, self->pack, size);
+  return self->desc;
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigPacked_GetDesc(PyObject *self)
+{
+  return ((PySwigPacked *)self)->desc;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigPacked_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigPacked_GetType()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+}
+
+#else
+/* -----------------------------------------------------------------------------
+ * Use the old Python PyCObject instead of PySwigObject
+ * ----------------------------------------------------------------------------- */
+
+#define PySwigObject_GetDesc(obj)	           PyCObject_GetDesc(obj)
+#define PySwigObject_Check(obj)	           PyCObject_Check(obj)
+#define PySwigObject_AsVoidPtr(obj)	   PyCObject_AsVoidPtr(obj)
+#define PySwigObject_FromVoidPtrAndDesc(p, d)  PyCObject_FromVoidPtrAndDesc(p, d, NULL)
+
+#endif
+
+#endif
+
+/* -----------------------------------------------------------------------------
+ * errors manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (PySwigObject_Check(obj)) {
+      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? PyString_AsString(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_DECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+SWIGRUNTIMEINLINE void
+SWIG_Python_NullRef(const char *type)
+{
+  if (type) {
+    PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "null reference was received");
+  }
+}
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+      }
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    sprintf(mesg, "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
 
 /* Convert a pointer value */
-SWIGRUNTIME(int)
+SWIGRUNTIME int
 SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
   swig_type_info *tc;
-  char  *c = 0;
+  const char *c = 0;
   static PyObject *SWIG_this = 0;
   int    newref = 0;
   PyObject  *pyobj = 0;
-
+  void *vptr;
+  
   if (!obj) return 0;
   if (obj == Py_None) {
@@ -575,6 +1099,7 @@
     return 0;
   }
+
 #ifdef SWIG_COBJECT_TYPES
-  if (!(PyCObject_Check(obj))) {
+  if (!(PySwigObject_Check(obj))) {
     if (!SWIG_this)
       SWIG_this = PyString_FromString("this");
@@ -583,13 +1108,13 @@
     newref = 1;
     if (!obj) goto type_error;
-    if (!PyCObject_Check(obj)) {
+    if (!PySwigObject_Check(obj)) {
       Py_DECREF(obj);
       goto type_error;
     }
   }  
-  *ptr = PyCObject_AsVoidPtr(obj);
-  c = (char *) PyCObject_GetDesc(obj);
-  if (newref) Py_DECREF(obj);
-  goto cobject;
+  vptr = PySwigObject_AsVoidPtr(obj);
+  c = (const char *) PySwigObject_GetDesc(obj);
+  if (newref) { Py_DECREF(obj); }
+  goto type_check;
 #else
   if (!(PyString_Check(obj))) {
@@ -607,31 +1132,81 @@
   c = PyString_AS_STRING(obj);
   /* Pointer values must start with leading underscore */
-  if (*c != '_') {
-    *ptr = (void *) 0;
-    if (strcmp(c,"NULL") == 0) {
-      if (newref) { Py_DECREF(obj); }
-      return 0;
-    } else {
-      if (newref) { Py_DECREF(obj); }
-      goto type_error;
-    }
-  }
-  c++;
-  c = SWIG_UnpackData(c,ptr,sizeof(void *));
+  c = SWIG_UnpackVoidPtr(c, &vptr, ty->name);
   if (newref) { Py_DECREF(obj); }
+  if (!c) goto type_error;
 #endif
 
-#ifdef SWIG_COBJECT_TYPES
-cobject:
-#endif
+type_check:
 
   if (ty) {
     tc = SWIG_TypeCheck(c,ty);
     if (!tc) goto type_error;
-    *ptr = SWIG_TypeCast(tc,(void*) *ptr);
+    *ptr = SWIG_TypeCast(tc,vptr);
+  } else {
+    *ptr = vptr;
   }
 
   if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
     PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
+  }
+  return 0;
+
+type_error:
+  PyErr_Clear();
+  if (pyobj && !obj) {    
+    obj = pyobj;
+    if (PyCFunction_Check(obj)) {
+      /* here we get the method pointer for callbacks */
+      char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+      c = doc ? strstr(doc, "swig_ptr: ") : 0;
+      if (c) {
+	c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);
+	if (!c) goto type_error;
+	goto type_check;
+      }
+    }
+  }
+  if (flags & SWIG_POINTER_EXCEPTION) {
+    if (ty) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+    } else {
+      SWIG_Python_TypeError("C/C++ pointer", obj);
+    }
+  }
+  return -1;
+}
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+    if (flags & SWIG_POINTER_EXCEPTION) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+  }
+  return result;
+}
+
+/* Convert a packed value value */
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
+  swig_type_info *tc;
+  const char *c = 0;
+
+#if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
+  c = PySwigPacked_UnpackData(obj, ptr, sz);
+#else
+  if ((!obj) || (!PyString_Check(obj))) goto type_error;
+  c = PyString_AS_STRING(obj);
+  /* Pointer values must start with leading underscore */
+  c = SWIG_UnpackDataName(c, ptr, sz, ty->name);
+#endif
+  if (!c) goto type_error;
+  if (ty) {
+    tc = SWIG_TypeCheck(c,ty);
+    if (!tc) goto type_error;
   }
   return 0;
@@ -640,59 +1215,17 @@
   PyErr_Clear();
   if (flags & SWIG_POINTER_EXCEPTION) {
-    if (ty && c) {
-      PyErr_Format(PyExc_TypeError, 
-		   "Type error. Got %s, expected %s",
-		   c, ty->name);
+    if (ty) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
     } else {
-      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
+      SWIG_Python_TypeError("C/C++ packed data", obj);
     }
   }
   return -1;
-}
-
-/* Convert a pointer value, signal an exception on a type mismatch */
-SWIGRUNTIME(void *)
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
-  void *result;
-  SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
-  return result;
-}
-
-/* Convert a packed value value */
-SWIGRUNTIME(int)
-SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
-  swig_type_info *tc;
-  char  *c = 0;
-
-  if ((!obj) || (!PyString_Check(obj))) goto type_error;
-  c = PyString_AS_STRING(obj);
-  /* Pointer values must start with leading underscore */
-  if (*c != '_') goto type_error;
-  c++;
-  c = SWIG_UnpackData(c,ptr,sz);
-  if (ty) {
-    tc = SWIG_TypeCheck(c,ty);
-    if (!tc) goto type_error;
-  }
-  return 0;
-
-type_error:
-
-  if (flags) {
-    if (ty && c) {
-      PyErr_Format(PyExc_TypeError, 
-		   "Type error. Got %s, expected %s",
-		   c, ty->name);
-    } else {
-      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
-    }
-  }
-  return -1;
-}
-
-/* Create a new pointer object */
-SWIGRUNTIME(PyObject *)
+}  
+
+/* Create a new array object */
+SWIGRUNTIME PyObject *
 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
-  PyObject *robj;
+  PyObject *robj = 0;
   if (!ptr) {
     Py_INCREF(Py_None);
@@ -700,13 +1233,10 @@
   }
 #ifdef SWIG_COBJECT_TYPES
-  robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
+  robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name);
 #else
   {
-    char result[1024];
-    char *r = result;
-    *(r++) = '_';
-    r = SWIG_PackData(r,&ptr,sizeof(void *));
-    strcpy(r,type->name);
-    robj = PyString_FromString(result);
+    char result[SWIG_BUFFER_SIZE];
+    robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ?
+      PyString_FromString(result) : 0;
   }
 #endif
@@ -728,58 +1258,60 @@
 }
 
-SWIGRUNTIME(PyObject *)
-SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
-  char result[1024];
-  char *r = result;
-  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,ptr,sz);
-  strcpy(r,type->name);
-  return PyString_FromString(result);
-}
-
-/* Install Constants */
-SWIGRUNTIME(void)
-SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
-  int i;
-  PyObject *obj;
-  for (i = 0; constants[i].type; i++) {
-    switch(constants[i].type) {
-    case SWIG_PY_INT:
-      obj = PyInt_FromLong(constants[i].lvalue);
-      break;
-    case SWIG_PY_FLOAT:
-      obj = PyFloat_FromDouble(constants[i].dvalue);
-      break;
-    case SWIG_PY_STRING:
-      if (constants[i].pvalue) {
-	obj = PyString_FromString((char *) constants[i].pvalue);
-      } else {
-	Py_INCREF(Py_None);
-	obj = Py_None;
-      }
-      break;
-    case SWIG_PY_POINTER:
-      obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
-      break;
-    case SWIG_PY_BINARY:
-      obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
-      break;
-    default:
-      obj = 0;
-      break;
-    }
-    if (obj) {
-      PyDict_SetItemString(d,constants[i].name,obj);
-      Py_DECREF(obj);
-    }
-  }
-}
-
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  PyObject *robj = 0;
+  if (!ptr) {
+    Py_INCREF(Py_None);
+    return Py_None;
+  }
+#if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
+  robj = PySwigPacked_FromDataAndDesc((void *) ptr, sz, (char *)type->name);
+#else
+  {
+    char result[SWIG_BUFFER_SIZE];
+    robj = SWIG_PackDataName(result, ptr, sz, type->name, sizeof(result)) ?
+      PyString_FromString(result) : 0;
+  }
 #endif
-
-/* Contract support */
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
+  return robj;
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_type_info **
+SWIG_Python_GetTypeListHandle() {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+  }
+#endif
+  return (swig_type_info **) type_pointer;
+}
+
+/*
+  Search for a swig_type_info structure
+ */
+SWIGRUNTIMEINLINE swig_type_info *
+SWIG_Python_GetTypeList() {
+  swig_type_info **tlh = SWIG_Python_GetTypeListHandle();
+  return tlh ? *tlh : (swig_type_info*)0;
+}
+
+#define SWIG_Runtime_GetTypeList SWIG_Python_GetTypeList 
 
 #ifdef __cplusplus
@@ -791,12 +1323,13 @@
 
 #define  SWIGTYPE_p_batch_status swig_types[0] 
-#define  SWIGTYPE_p_resource_t swig_types[1] 
-#define  SWIGTYPE_p_char swig_types[2] 
-#define  SWIGTYPE_p_attropl swig_types[3] 
-#define  SWIGTYPE_p_p_char swig_types[4] 
+#define  SWIGTYPE_p_char swig_types[1] 
+#define  SWIGTYPE_p_attropl swig_types[2] 
+#define  SWIGTYPE_p_p_char swig_types[3] 
+#define  SWIGTYPE_size_t swig_types[4] 
 #define  SWIGTYPE_p_attrl swig_types[5] 
 #define  SWIGTYPE_p_long swig_types[6] 
-#define  SWIGTYPE_p_int swig_types[7] 
-static swig_type_info *swig_types[9];
+#define  SWIGTYPE_ptrdiff_t swig_types[7] 
+#define  SWIGTYPE_p_int swig_types[8] 
+static swig_type_info *swig_types[10];
 
 /* -------- TYPES TABLE (END) -------- */
@@ -809,64 +1342,4 @@
 
 #define SWIG_name    "_pbs"
-
-/* Auxiliar swig  macros that appear in the header */
-
-#define SWIG_OLDOBJ  1
-#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
-#define SWIG_PYSTR   SWIG_NEWOBJ + 1
-
-#ifdef __cplusplus
-#define SWIGSTATICINLINE(a) static inline a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) (new Type[(size)])
-#define swig_delete(cptr) delete cptr
-#define swig_delete_array(cptr) delete[] cptr
-#define swig_const_cast(a,Type) const_cast<Type >(a)
-#define swig_static_cast(a,Type) static_cast<Type >(a)
-#define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
-#define swig_new_copy(ptr,Type) (new Type(*ptr))
-#define swig_numeric_cast(a,Type) static_cast<Type >(a)
-
-#else /* C case */
-
-#define SWIGSTATICINLINE(a) static a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
-#define swig_delete(cptr) free((char*)cptr)
-#define swig_delete_array(cptr) free((char*)cptr)
-#define swig_const_cast(a,Type) (Type)(a)
-#define swig_static_cast(a,Type) (Type)(a)
-#define swig_reinterpret_cast(a,Type) (Type)(a)
-#define swig_numeric_cast(a,Type) (Type)(a)
-#define swig_new_copy(ptr,Type)  ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
-
-#endif /* __cplusplus */
-
-
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_signed_SS_char PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_char PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_short PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_short PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_int PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_long PyInt_FromLong
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_float PyFloat_FromDouble
-/*@@*/
-/*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_double PyFloat_FromDouble
-/*@@*/
-
 
 
@@ -1002,5 +1475,5 @@
 
 
-SWIGSTATICINLINE(int)
+SWIGINTERN int
   SWIG_CheckLongInRange(long value, long min_value, long max_value,
 			const char *errmsg)
@@ -1025,5 +1498,5 @@
 
 
-SWIGSTATICINLINE(int)
+SWIGINTERN int
   SWIG_AsVal_long(PyObject * obj, long* val)
 {
@@ -1043,5 +1516,5 @@
   }
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "a long is expected");
+    SWIG_type_error("long", obj);
   }
   return 0;
@@ -1050,12 +1523,12 @@
 
 #if INT_MAX != LONG_MAX
-SWIGSTATICINLINE(int)
+SWIGINTERN int
   SWIG_AsVal_int(PyObject *obj, int *val)
 { 
-  const char* errmsg = val ? "int" : 0;
+  const char* errmsg = val ? "int" : (char*)0;
   long v;
   if (SWIG_AsVal_long(obj, &v)) {
     if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) {
-      if (val) *val = swig_numeric_cast(v, int);
+      if (val) *val = (int)(v);
       return 1;
     } else {
@@ -1066,10 +1539,10 @@
   }
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "an int is expected");
+    SWIG_type_error(errmsg, obj);
   }
   return 0;    
 }
 #else
-SWIGSTATICINLINE(int)
+SWIGINTERNSHORT int
   SWIG_AsVal_int(PyObject *obj, int *val)
 {
@@ -1079,5 +1552,5 @@
 
 
-SWIGSTATICINLINE(int)
+SWIGINTERNSHORT int
 SWIG_As_int(PyObject* obj)
 {
@@ -1085,7 +1558,5 @@
   if (!SWIG_AsVal_int(obj, &v)) {
     /*
-      this is needed to make valgrind/purify happier.  the other
-      solution is throw an exception, but since this code should work
-      with plain C ....
+      this is needed to make valgrind/purify happier. 
      */
     memset((void*)&v, 0, sizeof(int));
@@ -1095,5 +1566,5 @@
 
   
-SWIGSTATICINLINE(int)
+SWIGINTERNSHORT int
 SWIG_Check_int(PyObject* obj)
 {
@@ -1102,5 +1573,10 @@
 
 
-SWIGSTATICINLINE(PyObject *)
+  /*@/usr/share/swig1.3/python/pymacros.swg,66,SWIG_define@*/
+#define SWIG_From_int PyInt_FromLong
+/*@@*/
+
+
+SWIGINTERN PyObject *
 SWIG_FromCharPtr(const char* cptr)
 { 
@@ -1108,5 +1584,5 @@
     size_t size = strlen(cptr);
     if (size > INT_MAX) {
-      return SWIG_NewPointerObj(swig_const_cast(cptr,char*), 
+      return SWIG_NewPointerObj((char*)(cptr), 
 				SWIG_TypeQuery("char *"), 0);
     } else {
@@ -1124,5 +1600,5 @@
 
 /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
-SWIGSTATIC(int)
+SWIGINTERN int
 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
 {
@@ -1135,4 +1611,5 @@
     return SWIG_OLDOBJ;
   } else {
+    PyErr_Clear();
     if (PyString_Check(obj)) {
       if (cptr) {
@@ -1146,5 +1623,5 @@
   }
   if (cptr) {
-    PyErr_SetString(PyExc_TypeError, "a string is expected");
+    SWIG_type_error("char *", obj);
   }
   return 0;
@@ -1152,19 +1629,18 @@
 
 
-SWIGSTATICINLINE(int)
+SWIGINTERNSHORT int
 SWIG_AsCharPtr(PyObject *obj, char **val)
 {
-  char* cptr = 0;
-  if (SWIG_AsCharPtrAndSize(obj, &cptr, (size_t*)(0))) {
-    if (val) *val = cptr;
+  if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
     return 1;
   }
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "a char* is expected");
+    PyErr_Clear();
+    SWIG_type_error("char *", obj);
   }
   return 0;
 }
 
-char *attrl___str__(struct attrl *self){
+static char *attrl___str__(struct attrl *self){
     static char temp[4 * 255] ;
     snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
@@ -1173,5 +1649,5 @@
     return &temp[0];
   }
-char *attropl___str__(struct attropl *self){
+static char *attropl___str__(struct attropl *self){
     static char temp[4 * 255] ;
     snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
@@ -1183,5 +1659,5 @@
 extern char *pbs_server;
 
-SWIGSTATIC(int)
+SWIGINTERN int
 SWIG_AsNewCharPtr(PyObject *obj, char **val)
 {
@@ -1191,9 +1667,9 @@
     if (val) {
       if (csize) {
-	*val = swig_new_array(csize, char);
+	*val = ((char*) malloc((csize)*sizeof(char)));
 	memcpy(*val, cptr, --csize);
 	(*val)[csize] = 0;
       } else if (cptr) {
-	*val = swig_new_array(1, char);
+	*val = ((char*) malloc((1)*sizeof(char)));
 	(*val)[0] = 0;
       } else {
@@ -1204,12 +1680,12 @@
   } 
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "a char* is expected");
+    SWIG_type_error("char *", obj);
   }
   return 0;
 }
 
-extern char avail(int,char *);
-
-SWIGSTATICINLINE(PyObject*)
+char avail(int,char *);
+
+SWIGINTERNSHORT PyObject*
   SWIG_From_char(char c) 
 { 
@@ -1217,38 +1693,38 @@
 }
 
-extern int pbs_asyrunjob(int,char *,char *,char *);
-extern int pbs_alterjob(int,char *,struct attrl *,char *);
-extern int pbs_connect(char *);
-extern int pbs_query_max_connections();
-extern char *pbs_default(void);
-extern int pbs_deljob(int,char *,char *);
-extern int pbs_disconnect(int);
-extern char *pbs_geterrmsg(int);
-extern int pbs_holdjob(int,char *,char *,char *);
-extern char *pbs_locjob(int,char *,char *);
-extern int pbs_manager(int,int,int,char *,struct attropl *,char *);
-extern int pbs_movejob(int,char *,char *,char *);
-extern int pbs_msgjob(int,char *,int,char *,char *);
-extern int pbs_orderjob(int,char *,char *,char *);
-extern int pbs_rescquery(int,char **,int,int *,int *,int *,int *);
-extern int pbs_rescreserve(int,char **,int,resource_t *);
-extern int pbs_rescrelease(int,resource_t);
-extern int pbs_rerunjob(int,char *,char *);
-extern int pbs_rlsjob(int,char *,char *,char *);
-extern int pbs_runjob(int,char *,char *,char *);
-extern char **pbs_selectjob(int,struct attropl *,char *);
-extern int pbs_sigjob(int,char *,char *,char *);
-extern void pbs_statfree(struct batch_status *);
-extern struct batch_status *pbs_statjob(int,char *,struct attrl *,char *);
-extern struct batch_status *pbs_selstat(int,struct attropl *,char *);
-extern struct batch_status *pbs_statque(int,char *,struct attrl *,char *);
-extern struct batch_status *pbs_statserver(int,struct attrl *,char *);
-extern struct batch_status *pbs_statnode(int,char *,struct attrl *,char *);
-extern char *pbs_submit(int,struct attropl *,char *,char *,char *);
-extern int pbs_terminate(int,int,char *);
-extern int totpool(int,int);
-extern int usepool(int,int);
-
-SWIGSTATICINLINE(int)
+int pbs_asyrunjob(int,char *,char *,char *);
+int pbs_alterjob(int,char *,struct attrl *,char *);
+int pbs_connect(char *);
+int pbs_query_max_connections();
+char *pbs_default(void);
+int pbs_deljob(int,char *,char *);
+int pbs_disconnect(int);
+char *pbs_geterrmsg(int);
+int pbs_holdjob(int,char *,char *,char *);
+char *pbs_locjob(int,char *,char *);
+int pbs_manager(int,int,int,char *,struct attropl *,char *);
+int pbs_movejob(int,char *,char *,char *);
+int pbs_msgjob(int,char *,int,char *,char *);
+int pbs_orderjob(int,char *,char *,char *);
+int pbs_rescquery(int,char **,int,int *,int *,int *,int *);
+int pbs_rescreserve(int,char **,int,resource_t *);
+int pbs_rescrelease(int,resource_t);
+int pbs_rerunjob(int,char *,char *);
+int pbs_rlsjob(int,char *,char *,char *);
+int pbs_runjob(int,char *,char *,char *);
+char **pbs_selectjob(int,struct attropl *,char *);
+int pbs_sigjob(int,char *,char *,char *);
+void pbs_statfree(struct batch_status *);
+struct batch_status *pbs_statjob(int,char *,struct attrl *,char *);
+struct batch_status *pbs_selstat(int,struct attropl *,char *);
+struct batch_status *pbs_statque(int,char *,struct attrl *,char *);
+struct batch_status *pbs_statserver(int,struct attrl *,char *);
+struct batch_status *pbs_statnode(int,char *,struct attrl *,char *);
+char *pbs_submit(int,struct attropl *,char *,char *,char *);
+int pbs_terminate(int,int,char *);
+int totpool(int,int);
+int usepool(int,int);
+
+SWIGINTERNSHORT int
   SWIG_CheckUnsignedLongInRange(unsigned long value,
 				unsigned long max_value,
@@ -1258,5 +1734,5 @@
     if (errmsg) {
       PyErr_Format(PyExc_OverflowError,
-		   "value %ld is greater than '%s' minimum %ld",
+		   "value %lu is greater than '%s' minimum %lu",
 		   value, errmsg, max_value);
     }
@@ -1267,6 +1743,6 @@
 
 
-SWIGSTATICINLINE(int)
-  SWIG_AsVal_unsigned_SS_long(PyObject * obj, unsigned long *val) 
+SWIGINTERN int
+  SWIG_AsVal_unsigned_SS_long(PyObject *obj, unsigned long *val) 
 {
   if (PyInt_Check(obj)) {
@@ -1288,5 +1764,5 @@
   } 
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "an unsigned long is expected");
+    SWIG_type_error("unsigned long", obj);
   }
   return 0;
@@ -1295,12 +1771,12 @@
 
 #if UINT_MAX != ULONG_MAX
-SWIGSTATICINLINE(int)
+SWIGINTERN int
   SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val)
 { 
-  const char* errmsg = val ? "unsigned int" : 0;
+  const char* errmsg = val ? "unsigned int" : (char*)0;
   unsigned long v;
   if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
     if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) {
-      if (val) *val = swig_numeric_cast(v, unsigned int);
+      if (val) *val = (unsigned int)(v);
       return 1;
     }
@@ -1309,10 +1785,10 @@
   }
   if (val) {
-    PyErr_SetString(PyExc_TypeError, "an unsigned int is expected");
+    SWIG_type_error(errmsg, obj);
   }
   return 0;    
 }
 #else
-SWIGSTATICINLINE(unsigned int)
+SWIGINTERNSHORT unsigned int
   SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val)
 {
@@ -1322,5 +1798,5 @@
 
 
-SWIGSTATICINLINE(unsigned int)
+SWIGINTERNSHORT unsigned int
 SWIG_As_unsigned_SS_int(PyObject* obj)
 {
@@ -1328,7 +1804,5 @@
   if (!SWIG_AsVal_unsigned_SS_int(obj, &v)) {
     /*
-      this is needed to make valgrind/purify happier.  the other
-      solution is throw an exception, but since this code should work
-      with plain C ....
+      this is needed to make valgrind/purify happier. 
      */
     memset((void*)&v, 0, sizeof(unsigned int));
@@ -1338,5 +1812,5 @@
 
   
-SWIGSTATICINLINE(int)
+SWIGINTERNSHORT int
 SWIG_Check_unsigned_SS_int(PyObject* obj)
 {
@@ -1345,12 +1819,12 @@
 
 extern long *log_event_mask;
-extern void log_close(int);
-extern void log_err(int,char *,char *);
-extern void log_event(int,int,char *,char *);
-extern int log_open(char *,char *);
-extern void log_record(int,int,char *,char *);
+void log_close(int);
+void log_err(int,char *,char *);
+void log_event(int,int,char *,char *);
+int log_open(char *,char *);
+void log_record(int,int,char *,char *);
 extern char log_buffer[4096];
 
-SWIGSTATIC(int)
+SWIGINTERN int
 SWIG_AsCharArray(PyObject *obj, char *val, size_t size)
 { 
@@ -1373,7 +1847,7 @@
   }
   if (val) {
-    PyErr_Format(PyExc_TypeError, 
-		 "a char array of maximum size %ld is expected", 
-		 size);
+    PyErr_Format(PyExc_TypeError,
+		 "a char array of maximum size %lu is expected", 
+		 (unsigned long) size);
   }
   return 0;
@@ -1381,17 +1855,16 @@
 
 
-SWIGSTATICINLINE(PyObject *)
+SWIGINTERNSHORT PyObject *
 SWIG_FromCharArray(const char* carray, size_t size)
 {
   if (size > INT_MAX) {
-    SWIG_NewPointerObj(swig_const_cast(carray,char*), SWIG_TypeQuery("char *"), 0);
     return Py_None;    
   } else {
-    return PyString_FromStringAndSize(carray, swig_numeric_cast(size,int));
-  }
-}
-
-extern int setup_env(char *);
-extern int chk_file_sec(char *,int,int,int,int);
+    return PyString_FromStringAndSize(carray, (int)(size));
+  }
+}
+
+int setup_env(char *);
+int chk_file_sec(char *,int,int,int,int);
 #ifdef __cplusplus
 extern "C" {
@@ -1404,6 +1877,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (struct attrl *)new_attrl(arg1);
     
@@ -1447,6 +1922,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (struct attropl *)new_attropl(arg1);
     
@@ -1534,5 +2011,7 @@
     result = (int)get_error();
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -1544,12 +2023,14 @@
     PyObject *resultobj;
     struct attrl *arg1 = (struct attrl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->name) free((char*)arg1->name);
@@ -1575,6 +2056,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->name);
     
@@ -1589,12 +2070,14 @@
     PyObject *resultobj;
     struct attrl *arg1 = (struct attrl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->resource) free((char*)arg1->resource);
@@ -1620,6 +2103,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->resource);
     
@@ -1634,12 +2117,14 @@
     PyObject *resultobj;
     struct attrl *arg1 = (struct attrl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->value) free((char*)arg1->value);
@@ -1665,6 +2150,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->value);
     
@@ -1679,14 +2164,16 @@
     PyObject *resultobj;
     struct attrl *arg1 = (struct attrl *) 0 ;
-    int arg2 ;
+    enum batch_op arg2 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (arg1) (arg1)->op = (enum batch_op)arg2;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (enum batch_op)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    if (arg1) (arg1)->op = (enum batch_op )arg2;
     
     Py_INCREF(Py_None); resultobj = Py_None;
@@ -1700,13 +2187,13 @@
     PyObject *resultobj;
     struct attrl *arg1 = (struct attrl *) 0 ;
-    int result;
+    enum batch_op result;
     PyObject * obj0 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    result = (int) ((arg1)->op);
-    
-    resultobj = SWIG_From_int((int)result);
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    result = (enum batch_op) ((arg1)->op);
+    
+    resultobj = SWIG_From_int((result));
     return resultobj;
     fail:
@@ -1722,6 +2209,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *)attrl___str__(arg1);
     
@@ -1743,12 +2230,14 @@
     PyObject *resultobj;
     struct attropl *arg1 = (struct attropl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->name) free((char*)arg1->name);
@@ -1774,6 +2263,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->name);
     
@@ -1788,12 +2277,14 @@
     PyObject *resultobj;
     struct attropl *arg1 = (struct attropl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->resource) free((char*)arg1->resource);
@@ -1819,6 +2310,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->resource);
     
@@ -1833,12 +2324,14 @@
     PyObject *resultobj;
     struct attropl *arg1 = (struct attropl *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->value) free((char*)arg1->value);
@@ -1864,6 +2357,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->value);
     
@@ -1878,14 +2371,16 @@
     PyObject *resultobj;
     struct attropl *arg1 = (struct attropl *) 0 ;
-    int arg2 ;
+    enum batch_op arg2 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (arg1) (arg1)->op = (enum batch_op)arg2;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (enum batch_op)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    if (arg1) (arg1)->op = (enum batch_op )arg2;
     
     Py_INCREF(Py_None); resultobj = Py_None;
@@ -1899,13 +2394,13 @@
     PyObject *resultobj;
     struct attropl *arg1 = (struct attropl *) 0 ;
-    int result;
+    enum batch_op result;
     PyObject * obj0 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    result = (int) ((arg1)->op);
-    
-    resultobj = SWIG_From_int((int)result);
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    result = (enum batch_op) ((arg1)->op);
+    
+    resultobj = SWIG_From_int((result));
     return resultobj;
     fail:
@@ -1921,6 +2416,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_attropl,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *)attropl___str__(arg1);
     
@@ -1942,12 +2437,14 @@
     PyObject *resultobj;
     struct batch_status *arg1 = (struct batch_status *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->name) free((char*)arg1->name);
@@ -1973,6 +2470,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->name);
     
@@ -1992,8 +2489,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_attrl,
-    SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN);
+    if (SWIG_arg_fail(2)) SWIG_fail;
     if (arg1) (arg1)->attribs = arg2;
     
@@ -2012,6 +2509,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (struct attrl *) ((arg1)->attribs);
     
@@ -2051,12 +2548,14 @@
     PyObject *resultobj;
     struct batch_status *arg1 = (struct batch_status *) 0 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         if (arg1->text) free((char*)arg1->text);
@@ -2082,6 +2581,6 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_batch_status,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
     result = (char *) ((arg1)->text);
     
@@ -2102,7 +2601,7 @@
 static int _wrap_pbs_errno_set(PyObject *_val) {
     {
-        int temp = (int) SWIG_As_int(_val);  
+        int temp = (int)(SWIG_As_int(_val));
         if (PyErr_Occurred()) {
-            PyErr_SetString(PyExc_TypeError, "C/C++ variable 'pbs_errno (int)'");
+            SWIG_append_errmsg("C/C++ variable 'pbs_errno (int)'");
             return 1;
         }
@@ -2113,8 +2612,10 @@
 
 
-static PyObject *_wrap_pbs_errno_get() {
+static PyObject *_wrap_pbs_errno_get(void) {
     PyObject *pyobj;
     
-    pyobj = SWIG_From_int((int)pbs_errno);
+    {
+        pyobj = SWIG_From_int((int)(pbs_errno)); 
+    }
     return pyobj;
 }
@@ -2125,9 +2626,8 @@
         char *cptr = 0;
         if (!SWIG_AsNewCharPtr(_val, &cptr)) {
-            PyErr_Clear();
-            PyErr_SetString(PyExc_TypeError, "C/C++ variable 'pbs_server (char *)'");
+            SWIG_append_errmsg("C/C++ variable 'pbs_server'");
             return 1;
         }
-        if (pbs_server) swig_delete_array(pbs_server);
+        if (pbs_server) free((char*)pbs_server);
         pbs_server = cptr;
     }
@@ -2136,5 +2636,5 @@
 
 
-static PyObject *_wrap_pbs_server_get() {
+static PyObject *_wrap_pbs_server_get(void) {
     PyObject *pyobj;
     
@@ -2147,5 +2647,5 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     char result;
     PyObject * obj0 = 0 ;
@@ -2153,10 +2653,16 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     result = (char)avail(arg1,arg2);
     
-    resultobj = SWIG_From_char((char)result);
+    {
+        resultobj = SWIG_From_char((char)(result)); 
+    }
     return resultobj;
     fail:
@@ -2168,7 +2674,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2178,12 +2684,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2195,7 +2711,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     struct attrl *arg3 = (struct attrl *) 0 ;
-    char *arg4 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2205,7 +2721,11 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         PyObject	*py_obj;
@@ -2258,8 +2778,12 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2270,13 +2794,17 @@
 static PyObject *_wrap_pbs_connect(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
+    char *arg1 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
     result = (int)pbs_connect(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2292,5 +2820,7 @@
     result = (int)pbs_query_max_connections();
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2316,6 +2846,6 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2324,11 +2854,19 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (int)pbs_deljob(arg1,arg2,arg3);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2344,9 +2882,13 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (int)pbs_disconnect(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2362,6 +2904,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (char *)pbs_geterrmsg(arg1);
     
@@ -2376,7 +2920,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2386,12 +2930,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2403,6 +2957,6 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
     char *result;
     PyObject * obj0 = 0 ;
@@ -2411,8 +2965,14 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (char *)pbs_locjob(arg1,arg2,arg3);
     
@@ -2429,7 +2989,7 @@
     int arg2 ;
     int arg3 ;
-    char *arg4 ;
+    char *arg4 = (char *) 0 ;
     struct attropl *arg5 = (struct attropl *) 0 ;
-    char *arg6 ;
+    char *arg6 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2441,11 +3001,19 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg3 = (int)SWIG_As_int(obj2); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        arg3 = (int)(SWIG_As_int(obj2)); 
+        if (SWIG_arg_fail(3)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     {
         PyObject		*py_obj;
@@ -2498,8 +3066,12 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj5, (char**)&arg6)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj5, (char**)&arg6)) {
+        SWIG_arg_fail(6);SWIG_fail;
+    }
     result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2511,7 +3083,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2521,12 +3093,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2538,8 +3120,8 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     int arg3 ;
-    char *arg4 ;
-    char *arg5 ;
+    char *arg4 = (char *) 0 ;
+    char *arg5 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2550,14 +3132,26 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    arg3 = (int)SWIG_As_int(obj2); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    {
+        arg3 = (int)(SWIG_As_int(obj2)); 
+        if (SWIG_arg_fail(3)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) {
+        SWIG_arg_fail(5);SWIG_fail;
+    }
     result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2569,7 +3163,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2579,12 +3173,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2612,6 +3216,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         int		i=0, size=0;
@@ -2648,17 +3254,21 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    arg3 = (int)SWIG_As_int(obj2); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_int,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_int,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_int,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj6,(void **)(&arg7),SWIGTYPE_p_int,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg3 = (int)(SWIG_As_int(obj2)); 
+        if (SWIG_arg_fail(3)) SWIG_fail;
+    }
+    SWIG_Python_ConvertPtr(obj3, (void **)&arg4, SWIGTYPE_p_int, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(4)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj4, (void **)&arg5, SWIGTYPE_p_int, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(5)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj5, (void **)&arg6, SWIGTYPE_p_int, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(6)) SWIG_fail;
+    SWIG_Python_ConvertPtr(obj6, (void **)&arg7, SWIGTYPE_p_int, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(7)) SWIG_fail;
     result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     {
         free( (char *) arg2);
@@ -2686,6 +3296,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         int		i=0, size=0;
@@ -2722,11 +3334,15 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    arg3 = (int)SWIG_As_int(obj2); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_resource_t,
-    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg3 = (int)(SWIG_As_int(obj2)); 
+        if (SWIG_arg_fail(3)) SWIG_fail;
+    }
+    SWIG_Python_ConvertPtr(obj3, (void **)&arg4, SWIGTYPE_p_int, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(4)) SWIG_fail;
     result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     {
         free( (char *) arg2);
@@ -2750,11 +3366,17 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (resource_t)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (resource_t)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
     result = (int)pbs_rescrelease(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2766,6 +3388,6 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2774,11 +3396,19 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (int)pbs_rerunjob(arg1,arg2,arg3);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2790,7 +3420,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2800,12 +3430,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2817,7 +3457,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2827,12 +3467,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_runjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -2845,5 +3495,5 @@
     int arg1 ;
     struct attropl *arg2 = (struct attropl *) 0 ;
-    char *arg3 ;
+    char *arg3 = (char *) 0 ;
     char **result;
     PyObject * obj0 = 0 ;
@@ -2852,6 +3502,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         PyObject		*py_obj;
@@ -2904,5 +3556,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (char **)pbs_selectjob(arg1,arg2,arg3);
     
@@ -2930,7 +3584,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -2940,12 +3594,22 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (int)pbs_sigjob(arg1,arg2,arg3,arg4);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3024,7 +3688,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     struct attrl *arg3 = (struct attrl *) 0 ;
-    char *arg4 ;
+    char *arg4 = (char *) 0 ;
     struct batch_status *result;
     PyObject * obj0 = 0 ;
@@ -3034,7 +3698,11 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         PyObject	*py_obj;
@@ -3087,5 +3755,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4);
     
@@ -3133,5 +3803,5 @@
     int arg1 ;
     struct attropl *arg2 = (struct attropl *) 0 ;
-    char *arg3 ;
+    char *arg3 = (char *) 0 ;
     struct batch_status *result;
     PyObject * obj0 = 0 ;
@@ -3140,6 +3810,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         PyObject		*py_obj;
@@ -3192,5 +3864,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3);
     
@@ -3237,7 +3911,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     struct attrl *arg3 = (struct attrl *) 0 ;
-    char *arg4 ;
+    char *arg4 = (char *) 0 ;
     struct batch_status *result;
     PyObject * obj0 = 0 ;
@@ -3247,7 +3921,11 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         PyObject	*py_obj;
@@ -3300,5 +3978,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4);
     
@@ -3346,5 +4026,5 @@
     int arg1 ;
     struct attrl *arg2 = (struct attrl *) 0 ;
-    char *arg3 ;
+    char *arg3 = (char *) 0 ;
     struct batch_status *result;
     PyObject * obj0 = 0 ;
@@ -3353,6 +4033,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         PyObject	*py_obj;
@@ -3405,5 +4087,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3);
     
@@ -3450,7 +4134,7 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     struct attrl *arg3 = (struct attrl *) 0 ;
-    char *arg4 ;
+    char *arg4 = (char *) 0 ;
     struct batch_status *result;
     PyObject * obj0 = 0 ;
@@ -3460,7 +4144,11 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     {
         PyObject	*py_obj;
@@ -3513,5 +4201,7 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4);
     
@@ -3559,7 +4249,7 @@
     int arg1 ;
     struct attropl *arg2 = (struct attropl *) 0 ;
-    char *arg3 ;
-    char *arg4 ;
-    char *arg5 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
+    char *arg5 = (char *) 0 ;
     char *result;
     PyObject * obj0 = 0 ;
@@ -3570,6 +4260,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     {
         PyObject		*py_obj;
@@ -3622,7 +4314,13 @@
         if (SARA_DEBUG) printf("\t</Contents>\n");
     }
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) {
+        SWIG_arg_fail(5);SWIG_fail;
+    }
     result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5);
     
@@ -3638,5 +4336,5 @@
     int arg1 ;
     int arg2 ;
-    char *arg3 ;
+    char *arg3 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -3645,12 +4343,20 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     result = (int)pbs_terminate(arg1,arg2,arg3);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3668,11 +4374,17 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
     result = (int)totpool(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3690,11 +4402,17 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
     result = (int)usepool(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3705,5 +4423,5 @@
 static PyObject *_wrap_openrm(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
+    char *arg1 = (char *) 0 ;
     unsigned int arg2 ;
     int result;
@@ -3712,10 +4430,16 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
-    arg2 = (unsigned int)SWIG_As_unsigned_SS_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
+    {
+        arg2 = (unsigned int)(SWIG_As_unsigned_SS_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
     result = (int)openrm(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3731,9 +4455,13 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (int)closerm(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3749,9 +4477,13 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:downrm",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (int)downrm(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3763,5 +4495,5 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -3769,10 +4501,16 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:configrm",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     result = (int)configrm(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3784,5 +4522,5 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
+    char *arg2 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -3790,10 +4528,16 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     result = (int)addreq(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3804,13 +4548,17 @@
 static PyObject *_wrap_allreq(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
+    char *arg1 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
     result = (int)allreq(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3826,5 +4574,7 @@
     result = (int)flushreq();
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3840,5 +4590,7 @@
     result = (int)activereq();
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3853,6 +4605,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     fullresp(arg1);
     
@@ -3871,6 +4625,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     result = (char *)getreq(arg1);
     
@@ -3886,5 +4642,5 @@
         void *temp;
         if ((SWIG_ConvertPtr(_val, &temp, SWIGTYPE_p_long, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) {
-            PyErr_SetString(PyExc_TypeError, "C/C++ variable 'log_event_mask (long *)'");
+            SWIG_append_errmsg("C/C++ variable 'log_event_mask'");
             return 1;
         }
@@ -3895,5 +4651,5 @@
 
 
-static PyObject *_wrap_log_event_mask_get() {
+static PyObject *_wrap_log_event_mask_get(void) {
     PyObject *pyobj;
     
@@ -3909,6 +4665,8 @@
     
     if(!PyArg_ParseTuple(args,(char *)"O:log_close",&obj0)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
     log_close(arg1);
     
@@ -3923,6 +4681,6 @@
     PyObject *resultobj;
     int arg1 ;
-    char *arg2 ;
-    char *arg3 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -3930,8 +4688,14 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
     log_err(arg1,arg2,arg3);
     
@@ -3947,6 +4711,6 @@
     int arg1 ;
     int arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -3955,10 +4719,18 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     log_event(arg1,arg2,arg3,arg4);
     
@@ -3972,6 +4744,6 @@
 static PyObject *_wrap_log_open(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
-    char *arg2 ;
+    char *arg1 = (char *) 0 ;
+    char *arg2 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
@@ -3979,9 +4751,15 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OO:log_open",&obj0,&obj1)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
+        SWIG_arg_fail(2);SWIG_fail;
+    }
     result = (int)log_open(arg1,arg2);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -3994,6 +4772,6 @@
     int arg1 ;
     int arg2 ;
-    char *arg3 ;
-    char *arg4 ;
+    char *arg3 = (char *) 0 ;
+    char *arg4 = (char *) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -4002,10 +4780,18 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    arg1 = (int)SWIG_As_int(obj0); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) SWIG_fail;
-    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) SWIG_fail;
+    {
+        arg1 = (int)(SWIG_As_int(obj0)); 
+        if (SWIG_arg_fail(1)) SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
+        SWIG_arg_fail(3);SWIG_fail;
+    }
+    if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) {
+        SWIG_arg_fail(4);SWIG_fail;
+    }
     log_record(arg1,arg2,arg3,arg4);
     
@@ -4020,6 +4806,5 @@
     {
         if (!SWIG_AsCharArray(_val, log_buffer, 4096)) {
-            PyErr_Clear();
-            PyErr_SetString(PyExc_TypeError, "C/C++ variable 'log_buffer (char *)'");
+            SWIG_append_errmsg("C/C++ variable 'log_buffer'");
             return 1;
         }
@@ -4029,12 +4814,12 @@
 
 
-static PyObject *_wrap_log_buffer_get() {
+static PyObject *_wrap_log_buffer_get(void) {
     PyObject *pyobj;
     
     {
         size_t size = 4096;
-        
+#ifndef SWIG_PRESERVE_CARRAY_SIZE
         while (size && (log_buffer[size - 1] == '\0')) --size;
-        
+#endif
         pyobj = SWIG_FromCharArray(log_buffer, size);
     }
@@ -4045,13 +4830,17 @@
 static PyObject *_wrap_setup_env(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
+    char *arg1 = (char *) 0 ;
     int result;
     PyObject * obj0 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"O:setup_env",&obj0)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
     result = (int)setup_env(arg1);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -4062,5 +4851,5 @@
 static PyObject *_wrap_chk_file_sec(PyObject *self, PyObject *args) {
     PyObject *resultobj;
-    char *arg1 ;
+    char *arg1 = (char *) 0 ;
     int arg2 ;
     int arg3 ;
@@ -4075,16 +4864,28 @@
     
     if(!PyArg_ParseTuple(args,(char *)"OOOOO:chk_file_sec",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
-    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
-    arg2 = (int)SWIG_As_int(obj1); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg3 = (int)SWIG_As_int(obj2); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg4 = (int)SWIG_As_int(obj3); 
-    if (PyErr_Occurred()) SWIG_fail;
-    arg5 = (int)SWIG_As_int(obj4); 
-    if (PyErr_Occurred()) SWIG_fail;
+    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
+        SWIG_arg_fail(1);SWIG_fail;
+    }
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        arg3 = (int)(SWIG_As_int(obj2)); 
+        if (SWIG_arg_fail(3)) SWIG_fail;
+    }
+    {
+        arg4 = (int)(SWIG_As_int(obj3)); 
+        if (SWIG_arg_fail(4)) SWIG_fail;
+    }
+    {
+        arg5 = (int)(SWIG_As_int(obj4)); 
+        if (SWIG_arg_fail(5)) SWIG_fail;
+    }
     result = (int)chk_file_sec(arg1,arg2,arg3,arg4,arg5);
     
-    resultobj = SWIG_From_int((int)result);
+    {
+        resultobj = SWIG_From_int((int)(result)); 
+    }
     return resultobj;
     fail:
@@ -4097,9 +4898,8 @@
         char *cptr = 0;
         if (!SWIG_AsNewCharPtr(_val, &cptr)) {
-            PyErr_Clear();
-            PyErr_SetString(PyExc_TypeError, "C/C++ variable 'msg_daemonname (char *)'");
+            SWIG_append_errmsg("C/C++ variable 'msg_daemonname'");
             return 1;
         }
-        if (msg_daemonname) swig_delete_array(msg_daemonname);
+        if (msg_daemonname) free((char*)msg_daemonname);
         msg_daemonname = cptr;
     }
@@ -4108,5 +4908,5 @@
 
 
-static PyObject *_wrap_msg_daemonname_get() {
+static PyObject *_wrap_msg_daemonname_get(void) {
     PyObject *pyobj;
     
@@ -4117,85 +4917,85 @@
 
 static PyMethodDef SwigMethods[] = {
-	 { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL },
-	 { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL },
-	 { (char *)"new_batch_status", _wrap_new_batch_status, METH_VARARGS, NULL },
-	 { (char *)"get_error", _wrap_get_error, METH_VARARGS, NULL },
-	 { (char *)"attrl_name_set", _wrap_attrl_name_set, METH_VARARGS, NULL },
-	 { (char *)"attrl_name_get", _wrap_attrl_name_get, METH_VARARGS, NULL },
-	 { (char *)"attrl_resource_set", _wrap_attrl_resource_set, METH_VARARGS, NULL },
-	 { (char *)"attrl_resource_get", _wrap_attrl_resource_get, METH_VARARGS, NULL },
-	 { (char *)"attrl_value_set", _wrap_attrl_value_set, METH_VARARGS, NULL },
-	 { (char *)"attrl_value_get", _wrap_attrl_value_get, METH_VARARGS, NULL },
-	 { (char *)"attrl_op_set", _wrap_attrl_op_set, METH_VARARGS, NULL },
-	 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL },
-	 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL },
-	 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL },
-	 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL },
-	 { (char *)"attropl_name_get", _wrap_attropl_name_get, METH_VARARGS, NULL },
-	 { (char *)"attropl_resource_set", _wrap_attropl_resource_set, METH_VARARGS, NULL },
-	 { (char *)"attropl_resource_get", _wrap_attropl_resource_get, METH_VARARGS, NULL },
-	 { (char *)"attropl_value_set", _wrap_attropl_value_set, METH_VARARGS, NULL },
-	 { (char *)"attropl_value_get", _wrap_attropl_value_get, METH_VARARGS, NULL },
-	 { (char *)"attropl_op_set", _wrap_attropl_op_set, METH_VARARGS, NULL },
-	 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL },
-	 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL },
-	 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL },
-	 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL },
-	 { (char *)"batch_status_name_get", _wrap_batch_status_name_get, METH_VARARGS, NULL },
-	 { (char *)"batch_status_attribs_set", _wrap_batch_status_attribs_set, METH_VARARGS, NULL },
-	 { (char *)"batch_status_attribs_get", _wrap_batch_status_attribs_get, METH_VARARGS, NULL },
-	 { (char *)"batch_status_text_set", _wrap_batch_status_text_set, METH_VARARGS, NULL },
-	 { (char *)"batch_status_text_get", _wrap_batch_status_text_get, METH_VARARGS, NULL },
-	 { (char *)"batch_status_swigregister", batch_status_swigregister, METH_VARARGS, NULL },
-	 { (char *)"avail", _wrap_avail, METH_VARARGS, NULL },
-	 { (char *)"pbs_asyrunjob", _wrap_pbs_asyrunjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_alterjob", _wrap_pbs_alterjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_connect", _wrap_pbs_connect, METH_VARARGS, NULL },
-	 { (char *)"pbs_query_max_connections", _wrap_pbs_query_max_connections, METH_VARARGS, NULL },
-	 { (char *)"pbs_default", _wrap_pbs_default, METH_VARARGS, NULL },
-	 { (char *)"pbs_deljob", _wrap_pbs_deljob, METH_VARARGS, NULL },
-	 { (char *)"pbs_disconnect", _wrap_pbs_disconnect, METH_VARARGS, NULL },
-	 { (char *)"pbs_geterrmsg", _wrap_pbs_geterrmsg, METH_VARARGS, NULL },
-	 { (char *)"pbs_holdjob", _wrap_pbs_holdjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_locjob", _wrap_pbs_locjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_manager", _wrap_pbs_manager, METH_VARARGS, NULL },
-	 { (char *)"pbs_movejob", _wrap_pbs_movejob, METH_VARARGS, NULL },
-	 { (char *)"pbs_msgjob", _wrap_pbs_msgjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_orderjob", _wrap_pbs_orderjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_rescquery", _wrap_pbs_rescquery, METH_VARARGS, NULL },
-	 { (char *)"pbs_rescreserve", _wrap_pbs_rescreserve, METH_VARARGS, NULL },
-	 { (char *)"pbs_rescrelease", _wrap_pbs_rescrelease, METH_VARARGS, NULL },
-	 { (char *)"pbs_rerunjob", _wrap_pbs_rerunjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_rlsjob", _wrap_pbs_rlsjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_runjob", _wrap_pbs_runjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_selectjob", _wrap_pbs_selectjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_sigjob", _wrap_pbs_sigjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_statfree", _wrap_pbs_statfree, METH_VARARGS, NULL },
-	 { (char *)"pbs_statjob", _wrap_pbs_statjob, METH_VARARGS, NULL },
-	 { (char *)"pbs_selstat", _wrap_pbs_selstat, METH_VARARGS, NULL },
-	 { (char *)"pbs_statque", _wrap_pbs_statque, METH_VARARGS, NULL },
-	 { (char *)"pbs_statserver", _wrap_pbs_statserver, METH_VARARGS, NULL },
-	 { (char *)"pbs_statnode", _wrap_pbs_statnode, METH_VARARGS, NULL },
-	 { (char *)"pbs_submit", _wrap_pbs_submit, METH_VARARGS, NULL },
-	 { (char *)"pbs_terminate", _wrap_pbs_terminate, METH_VARARGS, NULL },
-	 { (char *)"totpool", _wrap_totpool, METH_VARARGS, NULL },
-	 { (char *)"usepool", _wrap_usepool, METH_VARARGS, NULL },
-	 { (char *)"openrm", _wrap_openrm, METH_VARARGS, NULL },
-	 { (char *)"closerm", _wrap_closerm, METH_VARARGS, NULL },
-	 { (char *)"downrm", _wrap_downrm, METH_VARARGS, NULL },
-	 { (char *)"configrm", _wrap_configrm, METH_VARARGS, NULL },
-	 { (char *)"addreq", _wrap_addreq, METH_VARARGS, NULL },
-	 { (char *)"allreq", _wrap_allreq, METH_VARARGS, NULL },
-	 { (char *)"flushreq", _wrap_flushreq, METH_VARARGS, NULL },
-	 { (char *)"activereq", _wrap_activereq, METH_VARARGS, NULL },
-	 { (char *)"fullresp", _wrap_fullresp, METH_VARARGS, NULL },
-	 { (char *)"getreq", _wrap_getreq, METH_VARARGS, NULL },
-	 { (char *)"log_close", _wrap_log_close, METH_VARARGS, NULL },
-	 { (char *)"log_err", _wrap_log_err, METH_VARARGS, NULL },
-	 { (char *)"log_event", _wrap_log_event, METH_VARARGS, NULL },
-	 { (char *)"log_open", _wrap_log_open, METH_VARARGS, NULL },
-	 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL },
-	 { (char *)"setup_env", _wrap_setup_env, METH_VARARGS, NULL },
-	 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL },
+	 { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
+	 { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
+	 { (char *)"new_batch_status", _wrap_new_batch_status, METH_VARARGS, NULL},
+	 { (char *)"get_error", _wrap_get_error, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_set", _wrap_attrl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_get", _wrap_attrl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_set", _wrap_attrl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_get", _wrap_attrl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_set", _wrap_attrl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_get", _wrap_attrl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_set", _wrap_attrl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL},
+	 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_get", _wrap_attropl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_set", _wrap_attropl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_get", _wrap_attropl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_set", _wrap_attropl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_get", _wrap_attropl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_set", _wrap_attropl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL},
+	 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_get", _wrap_batch_status_name_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_set", _wrap_batch_status_attribs_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_get", _wrap_batch_status_attribs_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_set", _wrap_batch_status_text_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_get", _wrap_batch_status_text_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_swigregister", batch_status_swigregister, METH_VARARGS, NULL},
+	 { (char *)"avail", _wrap_avail, METH_VARARGS, NULL},
+	 { (char *)"pbs_asyrunjob", _wrap_pbs_asyrunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob", _wrap_pbs_alterjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_connect", _wrap_pbs_connect, METH_VARARGS, NULL},
+	 { (char *)"pbs_query_max_connections", _wrap_pbs_query_max_connections, METH_VARARGS, NULL},
+	 { (char *)"pbs_default", _wrap_pbs_default, METH_VARARGS, NULL},
+	 { (char *)"pbs_deljob", _wrap_pbs_deljob, METH_VARARGS, NULL},
+	 { (char *)"pbs_disconnect", _wrap_pbs_disconnect, METH_VARARGS, NULL},
+	 { (char *)"pbs_geterrmsg", _wrap_pbs_geterrmsg, METH_VARARGS, NULL},
+	 { (char *)"pbs_holdjob", _wrap_pbs_holdjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_locjob", _wrap_pbs_locjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_manager", _wrap_pbs_manager, METH_VARARGS, NULL},
+	 { (char *)"pbs_movejob", _wrap_pbs_movejob, METH_VARARGS, NULL},
+	 { (char *)"pbs_msgjob", _wrap_pbs_msgjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_orderjob", _wrap_pbs_orderjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescquery", _wrap_pbs_rescquery, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescreserve", _wrap_pbs_rescreserve, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescrelease", _wrap_pbs_rescrelease, METH_VARARGS, NULL},
+	 { (char *)"pbs_rerunjob", _wrap_pbs_rerunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rlsjob", _wrap_pbs_rlsjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_runjob", _wrap_pbs_runjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selectjob", _wrap_pbs_selectjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjob", _wrap_pbs_sigjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_statfree", _wrap_pbs_statfree, METH_VARARGS, NULL},
+	 { (char *)"pbs_statjob", _wrap_pbs_statjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selstat", _wrap_pbs_selstat, METH_VARARGS, NULL},
+	 { (char *)"pbs_statque", _wrap_pbs_statque, METH_VARARGS, NULL},
+	 { (char *)"pbs_statserver", _wrap_pbs_statserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_statnode", _wrap_pbs_statnode, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit", _wrap_pbs_submit, METH_VARARGS, NULL},
+	 { (char *)"pbs_terminate", _wrap_pbs_terminate, METH_VARARGS, NULL},
+	 { (char *)"totpool", _wrap_totpool, METH_VARARGS, NULL},
+	 { (char *)"usepool", _wrap_usepool, METH_VARARGS, NULL},
+	 { (char *)"openrm", _wrap_openrm, METH_VARARGS, NULL},
+	 { (char *)"closerm", _wrap_closerm, METH_VARARGS, NULL},
+	 { (char *)"downrm", _wrap_downrm, METH_VARARGS, NULL},
+	 { (char *)"configrm", _wrap_configrm, METH_VARARGS, NULL},
+	 { (char *)"addreq", _wrap_addreq, METH_VARARGS, NULL},
+	 { (char *)"allreq", _wrap_allreq, METH_VARARGS, NULL},
+	 { (char *)"flushreq", _wrap_flushreq, METH_VARARGS, NULL},
+	 { (char *)"activereq", _wrap_activereq, METH_VARARGS, NULL},
+	 { (char *)"fullresp", _wrap_fullresp, METH_VARARGS, NULL},
+	 { (char *)"getreq", _wrap_getreq, METH_VARARGS, NULL},
+	 { (char *)"log_close", _wrap_log_close, METH_VARARGS, NULL},
+	 { (char *)"log_err", _wrap_log_err, METH_VARARGS, NULL},
+	 { (char *)"log_event", _wrap_log_event, METH_VARARGS, NULL},
+	 { (char *)"log_open", _wrap_log_open, METH_VARARGS, NULL},
+	 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL},
+	 { (char *)"setup_env", _wrap_setup_env, METH_VARARGS, NULL},
+	 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL},
 	 { NULL, NULL, 0, NULL }
 };
@@ -4205,20 +5005,22 @@
 
 static swig_type_info _swigt__p_batch_status[] = {{"_p_batch_status", 0, "struct batch_status *", 0, 0, 0, 0},{"_p_batch_status", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
-static swig_type_info _swigt__p_resource_t[] = {{"_p_resource_t", 0, "int *|resource_t *", 0, 0, 0, 0},{"_p_resource_t", 0, 0, 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 static swig_type_info _swigt__p_attropl[] = {{"_p_attropl", 0, "struct attropl *", 0, 0, 0, 0},{"_p_attropl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0, 0, 0, 0},{"_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
+static swig_type_info _swigt__size_t[] = {{"_size_t", 0, "size_t", 0, 0, 0, 0},{"_size_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 static swig_type_info _swigt__p_attrl[] = {{"_p_attrl", 0, "struct attrl *", 0, 0, 0, 0},{"_p_attrl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 static swig_type_info _swigt__p_long[] = {{"_p_long", 0, "long *", 0, 0, 0, 0},{"_p_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
-static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_resource_t", 0, 0, 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
+static swig_type_info _swigt__ptrdiff_t[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
+static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *|resource_t *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
 
 static swig_type_info *swig_types_initial[] = {
 _swigt__p_batch_status, 
-_swigt__p_resource_t, 
 _swigt__p_char, 
 _swigt__p_attropl, 
 _swigt__p_p_char, 
+_swigt__size_t, 
 _swigt__p_attrl, 
 _swigt__p_long, 
+_swigt__ptrdiff_t, 
 _swigt__p_int, 
 0
@@ -4365,4 +5167,310 @@
 #endif
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+    /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+    
+    /* -----------------------------------------------------------------------------
+     * global variable support code.
+     * ----------------------------------------------------------------------------- */
+    
+    typedef struct swig_globalvar {
+        char       *name;                  /* Name of global variable */
+        PyObject *(*get_attr)();           /* Return the current value */
+        int       (*set_attr)(PyObject *); /* Set the value */
+        struct swig_globalvar *next;
+    } swig_globalvar;
+    
+    typedef struct swig_varlinkobject {
+        PyObject_HEAD
+        swig_globalvar *vars;
+    } swig_varlinkobject;
+    
+    static PyObject *
+    swig_varlink_repr(swig_varlinkobject *v) {
+        v = v;
+        return PyString_FromString("<Swig global variables>");
+    }
+    
+    static int
+    swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
+        swig_globalvar  *var;
+        flags = flags;
+        fprintf(fp,"Swig global variables { ");
+        for (var = v->vars; var; var=var->next) {
+            fprintf(fp,"%s", var->name);
+            if (var->next) fprintf(fp,", ");
+        }
+        fprintf(fp," }\n");
+        return 0;
+    }
+    
+    static PyObject *
+    swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+        swig_globalvar *var = v->vars;
+        while (var) {
+            if (strcmp(var->name,n) == 0) {
+                return (*var->get_attr)();
+            }
+            var = var->next;
+        }
+        PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+        return NULL;
+    }
+    
+    static int
+    swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+        swig_globalvar *var = v->vars;
+        while (var) {
+            if (strcmp(var->name,n) == 0) {
+                return (*var->set_attr)(p);
+            }
+            var = var->next;
+        }
+        PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+        return 1;
+    }
+    
+    static PyTypeObject varlinktype = {
+        PyObject_HEAD_INIT(0)              
+        0,                                  /* Number of items in variable part (ob_size) */
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        0,                                  /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        0,                                  /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        0,                                  /* tp_doc */
+#if PY_VERSION_HEX >= 0x02000000
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+#endif
+#if PY_VERSION_HEX >= 0x02010000
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#endif
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+    };
+    
+    /* Create a variable linking object for use later */
+    static PyObject *
+    SWIG_Python_newvarlink(void) {
+        swig_varlinkobject *result = 0;
+        result = PyMem_NEW(swig_varlinkobject,1);
+        varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
+        result->ob_type = &varlinktype;
+        result->vars = 0;
+        result->ob_refcnt = 0;
+        Py_XINCREF((PyObject *) result);
+        return ((PyObject*) result);
+    }
+    
+    static void
+    SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+        swig_varlinkobject *v;
+        swig_globalvar *gv;
+        v= (swig_varlinkobject *) p;
+        gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+        gv->name = (char *) malloc(strlen(name)+1);
+        strcpy(gv->name,name);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+        v->vars = gv;
+    }
+    
+    /* -----------------------------------------------------------------------------
+     * constants/methods manipulation
+     * ----------------------------------------------------------------------------- */
+    
+    /* Install Constants */
+    static void
+    SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+        PyObject *obj = 0;
+        size_t i;
+        for (i = 0; constants[i].type; i++) {
+            switch(constants[i].type) {
+                case SWIG_PY_INT:
+                obj = PyInt_FromLong(constants[i].lvalue);
+                break;
+                case SWIG_PY_FLOAT:
+                obj = PyFloat_FromDouble(constants[i].dvalue);
+                break;
+                case SWIG_PY_STRING:
+                if (constants[i].pvalue) {
+                    obj = PyString_FromString((char *) constants[i].pvalue);
+                } else {
+                    Py_INCREF(Py_None);
+                    obj = Py_None;
+                }
+                break;
+                case SWIG_PY_POINTER:
+                obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+                break;
+                case SWIG_PY_BINARY:
+                obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+                break;
+                default:
+                obj = 0;
+                break;
+            }
+            if (obj) {
+                PyDict_SetItemString(d,constants[i].name,obj);
+                Py_DECREF(obj);
+            }
+        }
+    }
+    
+    /* -----------------------------------------------------------------------------*/
+    /* Fix SwigMethods to carry the callback ptrs when needed */
+    /* -----------------------------------------------------------------------------*/
+    
+    static void
+    SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+        size_t i;
+        for (i = 0; methods[i].ml_name; ++i) {
+            char *c = methods[i].ml_doc;
+            if (c && (c = strstr(c, "swig_ptr: "))) {
+                int j;
+                swig_const_info *ci = 0;
+                char *name = c + 10;
+                for (j = 0; const_table[j].type; j++) {
+                    if (strncmp(const_table[j].name, name, 
+                    strlen(const_table[j].name)) == 0) {
+                        ci = &(const_table[j]);
+                        break;
+                    }
+                }
+                if (ci) {
+                    size_t shift = (ci->ptype) - types;
+                    swig_type_info *ty = types_initial[shift];
+                    size_t ldoc = (c - methods[i].ml_doc);
+                    size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+                    char *ndoc = (char*)malloc(ldoc + lptr + 10);
+                    char *buff = ndoc;
+                    void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue: (void *)(ci->lvalue);
+                    strncpy(buff, methods[i].ml_doc, ldoc);
+                    buff += ldoc;
+                    strncpy(buff, "swig_ptr: ", 10);
+                    buff += 10;
+                    SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+                    methods[i].ml_doc = ndoc;
+                }
+            }
+        }
+    }
+    
+    /* -----------------------------------------------------------------------------*
+     *  Initialize type list
+     * -----------------------------------------------------------------------------*/
+    
+#if PY_MAJOR_VERSION < 2
+    /* PyModule_AddObject function was introduced in Python 2.0.  The following function
+    is copied out of Python/modsupport.c in python version 2.3.4 */
+    static int
+    PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+    {
+        PyObject *dict;
+        if (!PyModule_Check(m)) {
+            PyErr_SetString(PyExc_TypeError,
+            "PyModule_AddObject() needs module as first arg");
+            return -1;
+        }
+        if (!o) {
+            PyErr_SetString(PyExc_TypeError,
+            "PyModule_AddObject() needs non-NULL value");
+            return -1;
+        }
+        
+        dict = PyModule_GetDict(m);
+        if (dict == NULL) {
+            /* Internal error -- modules must have a dict! */
+            PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+            PyModule_GetName(m));
+            return -1;
+        }
+        if (PyDict_SetItemString(dict, name, o))
+        return -1;
+        Py_DECREF(o);
+        return 0;
+    }
+#endif
+    
+    static swig_type_info **
+    SWIG_Python_SetTypeListHandle(swig_type_info **type_list_handle) {
+        static PyMethodDef swig_empty_runtime_method_table[] = {
+            {
+                NULL, NULL, 0, NULL
+            } 
+        };/* Sentinel */
+        
+        PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+        swig_empty_runtime_method_table);
+        PyObject *pointer = PyCObject_FromVoidPtr((void *) type_list_handle, NULL);
+        if (pointer && module) {
+            PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+        }
+        return type_list_handle;
+    } 
+    
+    static swig_type_info **
+    SWIG_Python_LookupTypePointer(swig_type_info **type_list_handle) {
+        swig_type_info **type_pointer;
+        
+        /* first check if module already created */
+        type_pointer = SWIG_Python_GetTypeListHandle();
+        if (type_pointer) {
+            return type_pointer;
+        } else {
+            /* create a new module and variable */
+            return SWIG_Python_SetTypeListHandle(type_list_handle);
+        }
+    }
+    
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+#ifdef __cplusplus
+extern "C"
+#endif
+SWIGEXPORT(void *) SWIG_ReturnGlobalTypeList(void *);
+#endif
+
 #ifdef __cplusplus
 extern "C"
@@ -4374,8 +5482,19 @@
     int       i;
     if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
+    
+    /* Fix SwigMethods to carry the callback ptrs when needed */
+    SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_types_initial);
+    
     m = Py_InitModule((char *) SWIG_name, SwigMethods);
     d = PyModule_GetDict(m);
     
     if (!typeinit) {
+#ifdef SWIG_LINK_RUNTIME
+        swig_type_list_handle = (swig_type_info **) SWIG_ReturnGlobalTypeList(swig_type_list_handle);
+#else
+#  ifndef SWIG_STATIC_RUNTIME
+        swig_type_list_handle = SWIG_Python_LookupTypePointer(swig_type_list_handle);
+#  endif
+#endif
         for (i = 0; swig_types_initial[i]; i++) {
             swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
@@ -4508,87 +5627,229 @@
     PyDict_SetItemString(d,"ND_timeshared", SWIG_FromCharPtr("time-shared"));
     PyDict_SetItemString(d,"ND_cluster", SWIG_FromCharPtr("cluster"));
-    PyDict_SetItemString(d,"MAX_ENCODE_BFR", SWIG_From_int((int)100));
-    PyDict_SetItemString(d,"MGR_CMD_CREATE", SWIG_From_int((int)0));
-    PyDict_SetItemString(d,"MGR_CMD_DELETE", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"MGR_CMD_SET", SWIG_From_int((int)2));
-    PyDict_SetItemString(d,"MGR_CMD_UNSET", SWIG_From_int((int)3));
-    PyDict_SetItemString(d,"MGR_CMD_LIST", SWIG_From_int((int)4));
-    PyDict_SetItemString(d,"MGR_CMD_PRINT", SWIG_From_int((int)5));
-    PyDict_SetItemString(d,"MGR_CMD_ACTIVE", SWIG_From_int((int)6));
-    PyDict_SetItemString(d,"MGR_OBJ_NONE", SWIG_From_int((int)-1));
-    PyDict_SetItemString(d,"MGR_OBJ_SERVER", SWIG_From_int((int)0));
-    PyDict_SetItemString(d,"MGR_OBJ_QUEUE", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"MGR_OBJ_JOB", SWIG_From_int((int)2));
-    PyDict_SetItemString(d,"MGR_OBJ_NODE", SWIG_From_int((int)3));
-    PyDict_SetItemString(d,"MSG_OUT", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"MSG_ERR", SWIG_From_int((int)2));
-    PyDict_SetItemString(d,"SHUT_SIG", SWIG_From_int((int)-1));
-    PyDict_SetItemString(d,"SHUT_IMMEDIATE", SWIG_From_int((int)0));
-    PyDict_SetItemString(d,"SHUT_DELAY", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"SHUT_QUICK", SWIG_From_int((int)2));
+    {
+        PyDict_SetItemString(d,"MAX_ENCODE_BFR", SWIG_From_int((int)(100))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_CREATE", SWIG_From_int((int)(0))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_DELETE", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_SET", SWIG_From_int((int)(2))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_UNSET", SWIG_From_int((int)(3))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_LIST", SWIG_From_int((int)(4))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_PRINT", SWIG_From_int((int)(5))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_CMD_ACTIVE", SWIG_From_int((int)(6))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_OBJ_NONE", SWIG_From_int((int)(-1))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_OBJ_SERVER", SWIG_From_int((int)(0))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_OBJ_QUEUE", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_OBJ_JOB", SWIG_From_int((int)(2))); 
+    }
+    {
+        PyDict_SetItemString(d,"MGR_OBJ_NODE", SWIG_From_int((int)(3))); 
+    }
+    {
+        PyDict_SetItemString(d,"MSG_OUT", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"MSG_ERR", SWIG_From_int((int)(2))); 
+    }
+    {
+        PyDict_SetItemString(d,"SHUT_SIG", SWIG_From_int((int)(-1))); 
+    }
+    {
+        PyDict_SetItemString(d,"SHUT_IMMEDIATE", SWIG_From_int((int)(0))); 
+    }
+    {
+        PyDict_SetItemString(d,"SHUT_DELAY", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"SHUT_QUICK", SWIG_From_int((int)(2))); 
+    }
     PyDict_SetItemString(d,"SIG_RESUME", SWIG_FromCharPtr("resume"));
     PyDict_SetItemString(d,"SIG_SUSPEND", SWIG_FromCharPtr("suspend"));
-    PyDict_SetItemString(d,"PBS_MAXHOSTNAME", SWIG_From_int((int)64));
-    PyDict_SetItemString(d,"MAXPATHLEN", SWIG_From_int((int)1024));
-    PyDict_SetItemString(d,"MAXNAMLEN", SWIG_From_int((int)255));
-    PyDict_SetItemString(d,"PBS_MAXUSER", SWIG_From_int((int)16));
-    PyDict_SetItemString(d,"PBS_MAXGRPN", SWIG_From_int((int)16));
-    PyDict_SetItemString(d,"PBS_MAXQUEUENAME", SWIG_From_int((int)15));
-    PyDict_SetItemString(d,"PBS_MAXSERVERNAME", SWIG_From_int((int)64));
-    PyDict_SetItemString(d,"PBS_MAXSEQNUM", SWIG_From_int((int)6));
-    PyDict_SetItemString(d,"PBS_MAXPORTNUM", SWIG_From_int((int)5));
-    PyDict_SetItemString(d,"PBS_MAXSVRJOBID", SWIG_From_int((int)(6+64+5+2)));
-    PyDict_SetItemString(d,"PBS_MAXCLTJOBID", SWIG_From_int((int)((6+64+5+2) +64+5+2)));
-    PyDict_SetItemString(d,"PBS_MAXDEST", SWIG_From_int((int)1024));
-    PyDict_SetItemString(d,"PBS_MAXROUTEDEST", SWIG_From_int((int)(15+64+5+2)));
-    PyDict_SetItemString(d,"PBS_USE_IFF", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"PBS_INTERACTIVE", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"PBS_TERM_BUF_SZ", SWIG_From_int((int)80));
-    PyDict_SetItemString(d,"PBS_TERM_CCA", SWIG_From_int((int)6));
+    {
+        PyDict_SetItemString(d,"PBS_MAXHOSTNAME", SWIG_From_int((int)(64))); 
+    }
+    {
+        PyDict_SetItemString(d,"MAXPATHLEN", SWIG_From_int((int)(1024))); 
+    }
+    {
+        PyDict_SetItemString(d,"MAXNAMLEN", SWIG_From_int((int)(255))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXUSER", SWIG_From_int((int)(16))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXGRPN", SWIG_From_int((int)(16))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXQUEUENAME", SWIG_From_int((int)(15))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXSERVERNAME", SWIG_From_int((int)(64))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXSEQNUM", SWIG_From_int((int)(6))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXPORTNUM", SWIG_From_int((int)(5))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXSVRJOBID", SWIG_From_int((int)((6+64+5+2)))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXCLTJOBID", SWIG_From_int((int)(((6+64+5+2) +64+5+2)))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXDEST", SWIG_From_int((int)(1024))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_MAXROUTEDEST", SWIG_From_int((int)((15+64+5+2)))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_USE_IFF", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_INTERACTIVE", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_TERM_BUF_SZ", SWIG_From_int((int)(80))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_TERM_CCA", SWIG_From_int((int)(6))); 
+    }
     PyDict_SetItemString(d,"PBS_BATCH_SERVICE_NAME", SWIG_FromCharPtr("pbs"));
-    PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT", SWIG_From_int((int)15001));
+    {
+        PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT", SWIG_From_int((int)(15001))); 
+    }
     PyDict_SetItemString(d,"PBS_BATCH_SERVICE_NAME_DIS", SWIG_FromCharPtr("pbs_dis"));
-    PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT_DIS", SWIG_From_int((int)15001));
+    {
+        PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT_DIS", SWIG_From_int((int)(15001))); 
+    }
     PyDict_SetItemString(d,"PBS_MOM_SERVICE_NAME", SWIG_FromCharPtr("pbs_mom"));
-    PyDict_SetItemString(d,"PBS_MOM_SERVICE_PORT", SWIG_From_int((int)15002));
+    {
+        PyDict_SetItemString(d,"PBS_MOM_SERVICE_PORT", SWIG_From_int((int)(15002))); 
+    }
     PyDict_SetItemString(d,"PBS_MANAGER_SERVICE_NAME", SWIG_FromCharPtr("pbs_resmon"));
-    PyDict_SetItemString(d,"PBS_MANAGER_SERVICE_PORT", SWIG_From_int((int)15003));
+    {
+        PyDict_SetItemString(d,"PBS_MANAGER_SERVICE_PORT", SWIG_From_int((int)(15003))); 
+    }
     PyDict_SetItemString(d,"PBS_SCHEDULER_SERVICE_NAME", SWIG_FromCharPtr("pbs_sched"));
-    PyDict_SetItemString(d,"PBS_SCHEDULER_SERVICE_PORT", SWIG_From_int((int)15004));
-    PyDict_SetItemString(d,"SET", SWIG_From_int((int)SET));
-    PyDict_SetItemString(d,"UNSET", SWIG_From_int((int)UNSET));
-    PyDict_SetItemString(d,"INCR", SWIG_From_int((int)INCR));
-    PyDict_SetItemString(d,"DECR", SWIG_From_int((int)DECR));
-    PyDict_SetItemString(d,"EQ", SWIG_From_int((int)EQ));
-    PyDict_SetItemString(d,"NE", SWIG_From_int((int)NE));
-    PyDict_SetItemString(d,"GE", SWIG_From_int((int)GE));
-    PyDict_SetItemString(d,"GT", SWIG_From_int((int)GT));
-    PyDict_SetItemString(d,"LE", SWIG_From_int((int)LE));
-    PyDict_SetItemString(d,"LT", SWIG_From_int((int)LT));
-    PyDict_SetItemString(d,"DFLT", SWIG_From_int((int)DFLT));
+    {
+        PyDict_SetItemString(d,"PBS_SCHEDULER_SERVICE_PORT", SWIG_From_int((int)(15004))); 
+    }
+    {
+        PyDict_SetItemString(d,"SET", SWIG_From_int((int)(SET))); 
+    }
+    {
+        PyDict_SetItemString(d,"UNSET", SWIG_From_int((int)(UNSET))); 
+    }
+    {
+        PyDict_SetItemString(d,"INCR", SWIG_From_int((int)(INCR))); 
+    }
+    {
+        PyDict_SetItemString(d,"DECR", SWIG_From_int((int)(DECR))); 
+    }
+    {
+        PyDict_SetItemString(d,"EQ", SWIG_From_int((int)(EQ))); 
+    }
+    {
+        PyDict_SetItemString(d,"NE", SWIG_From_int((int)(NE))); 
+    }
+    {
+        PyDict_SetItemString(d,"GE", SWIG_From_int((int)(GE))); 
+    }
+    {
+        PyDict_SetItemString(d,"GT", SWIG_From_int((int)(GT))); 
+    }
+    {
+        PyDict_SetItemString(d,"LE", SWIG_From_int((int)(LE))); 
+    }
+    {
+        PyDict_SetItemString(d,"LT", SWIG_From_int((int)(LT))); 
+    }
+    {
+        PyDict_SetItemString(d,"DFLT", SWIG_From_int((int)(DFLT))); 
+    }
     PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
     SWIG_addvarlink(SWIG_globals,(char*)"pbs_errno",_wrap_pbs_errno_get, _wrap_pbs_errno_set);
     SWIG_addvarlink(SWIG_globals,(char*)"pbs_server",_wrap_pbs_server_get, _wrap_pbs_server_set);
-    PyDict_SetItemString(d,"LOG_BUF_SIZE", SWIG_From_int((int)4096));
+    {
+        PyDict_SetItemString(d,"LOG_BUF_SIZE", SWIG_From_int((int)(4096))); 
+    }
     SWIG_addvarlink(SWIG_globals,(char*)"log_event_mask",_wrap_log_event_mask_get, _wrap_log_event_mask_set);
     SWIG_addvarlink(SWIG_globals,(char*)"log_buffer",_wrap_log_buffer_get, _wrap_log_buffer_set);
-    PyDict_SetItemString(d,"PBSEVENT_ERROR", SWIG_From_int((int)0x0001));
-    PyDict_SetItemString(d,"PBSEVENT_SYSTEM", SWIG_From_int((int)0x0002));
-    PyDict_SetItemString(d,"PBSEVENT_ADMIN", SWIG_From_int((int)0x0004));
-    PyDict_SetItemString(d,"PBSEVENT_JOB", SWIG_From_int((int)0x0008));
-    PyDict_SetItemString(d,"PBSEVENT_JOB_USAGE", SWIG_From_int((int)0x0010));
-    PyDict_SetItemString(d,"PBSEVENT_SECURITY", SWIG_From_int((int)0x0020));
-    PyDict_SetItemString(d,"PBSEVENT_SCHED", SWIG_From_int((int)0x0040));
-    PyDict_SetItemString(d,"PBSEVENT_DEBUG", SWIG_From_int((int)0x0080));
-    PyDict_SetItemString(d,"PBSEVENT_DEBUG2", SWIG_From_int((int)0x0100));
-    PyDict_SetItemString(d,"PBSEVENT_FORCE", SWIG_From_int((int)0x8000));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_SERVER", SWIG_From_int((int)1));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_QUEUE", SWIG_From_int((int)2));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_JOB", SWIG_From_int((int)3));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_REQUEST", SWIG_From_int((int)4));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_FILE", SWIG_From_int((int)5));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_ACCT", SWIG_From_int((int)6));
-    PyDict_SetItemString(d,"PBS_EVENTCLASS_NODE", SWIG_From_int((int)7));
-    PyDict_SetItemString(d,"PBSEVENT_MASK", SWIG_From_int((int)0x01ff));
+    {
+        PyDict_SetItemString(d,"PBSEVENT_ERROR", SWIG_From_int((int)(0x0001))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_SYSTEM", SWIG_From_int((int)(0x0002))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_ADMIN", SWIG_From_int((int)(0x0004))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_JOB", SWIG_From_int((int)(0x0008))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_JOB_USAGE", SWIG_From_int((int)(0x0010))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_SECURITY", SWIG_From_int((int)(0x0020))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_SCHED", SWIG_From_int((int)(0x0040))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_DEBUG", SWIG_From_int((int)(0x0080))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_DEBUG2", SWIG_From_int((int)(0x0100))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_FORCE", SWIG_From_int((int)(0x8000))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_SERVER", SWIG_From_int((int)(1))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_QUEUE", SWIG_From_int((int)(2))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_JOB", SWIG_From_int((int)(3))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_REQUEST", SWIG_From_int((int)(4))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_FILE", SWIG_From_int((int)(5))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_ACCT", SWIG_From_int((int)(6))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBS_EVENTCLASS_NODE", SWIG_From_int((int)(7))); 
+    }
+    {
+        PyDict_SetItemString(d,"PBSEVENT_MASK", SWIG_From_int((int)(0x01ff))); 
+    }
     SWIG_addvarlink(SWIG_globals,(char*)"msg_daemonname",_wrap_msg_daemonname_get, _wrap_msg_daemonname_set);
 }
