/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.21
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

/*************************************************************** -*- c -*-
 * perl5/precommon.swg
 *
 * Rename all exported symbols from common.swg, to avoid symbol
 * clashes if multiple interpreters are included
 *
 ************************************************************************/

#define SWIG_TypeRegister    SWIG_Perl_TypeRegister
#define SWIG_TypeCheck       SWIG_Perl_TypeCheck
#define SWIG_TypeCast        SWIG_Perl_TypeCast
#define SWIG_TypeDynamicCast SWIG_Perl_TypeDynamicCast
#define SWIG_TypeName        SWIG_Perl_TypeName
#define SWIG_TypeQuery       SWIG_Perl_TypeQuery
#define SWIG_TypeClientData  SWIG_Perl_TypeClientData
#define SWIG_PackData        SWIG_Perl_PackData 
#define SWIG_UnpackData      SWIG_Perl_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.
 ************************************************************************/

#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
#else
#  define SWIGEXPORT(a) a
#  define SWIGIMPORT(a) a
#endif

#ifdef SWIG_GLOBAL
#  define SWIGRUNTIME(a) SWIGEXPORT(a)
#else
#  define SWIGRUNTIME(a) static a
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

typedef struct swig_type_info {
  const char             *name;
  swig_converter_func     converter;
  const char             *str;
  void                   *clientdata;
  swig_dycast_func        dcast;
  struct swig_type_info  *next;
  struct swig_type_info  *prev;
} 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(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;

/* Register a type mapping with the type-checking */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeRegister(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;
  while (tc) {
    if (strcmp(tc->name, ti->name) == 0) {
      /* Already exists in the table.  Just add additional types to the list */
      if (tc->clientdata) ti->clientdata = tc->clientdata;
      head = tc;
      next = tc->next;
      goto l1;
    }
    tc = tc->prev;
  }
  head = ti;
  next = 0;

  /* Place in list */
  ti->prev = swig_type_list;
  swig_type_list = ti;

  /* Build linked lists */
  l1:
  ret = head;
  tc = ti + 1;
  /* Patch up the rest of the links */
  while (tc->name) {
    head->next = tc;
    tc->prev = head;
    head = tc;
    tc++;
  }
  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) {
  swig_type_info *s;
  if (!ty) return 0;        /* Void pointer */
  s = ty->next;             /* First element always just a name */
  do {
    if (strcmp(s->name,c) == 0) {
      if (s == ty->next) return s;
      /* Move s to the top of the linked list */
      s->prev->next = s->next;
      if (s->next) {
        s->next->prev = s->prev;
      }
      /* Insert s as second element in the list */
      s->next = ty->next;
      if (ty->next) ty->next->prev = s;
      ty->next = s;
      s->prev = ty;
      return s;
    }
    s = s->next;
  } while (s && (s != ty->next));
  return 0;
}

/* Cast a pointer up an inheritance hierarchy */
SWIGRUNTIME(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 *) 
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/* Return the name associated with this type */
SWIGRUNTIME(const char *)
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/* Search for a swig_type_info structure */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeQuery(const char *name) {
  swig_type_info *ty = swig_type_list;
  while (ty) {
    if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
    ty = ty->prev;
  }
  return 0;
}

/* Set the clientdata field for a type */
SWIGRUNTIME(void)
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_type_info *tc, *equiv;
  if (ti->clientdata == clientdata) return;
  ti->clientdata = clientdata;
  equiv = ti->next;
  while (equiv) {
    if (!equiv->converter) {
      tc = swig_type_list;
      while (tc) {
        if ((strcmp(tc->name, equiv->name) == 0))
          SWIG_TypeClientData(tc,clientdata);
        tc = tc->prev;
      }
    }
    equiv = equiv->next;
  }
}

/* Pack binary data into a string */
SWIGRUNTIME(char *)
SWIG_PackData(char *c, void *ptr, int sz) {
  static char hex[17] = "0123456789abcdef";
  int i;
  unsigned char *u = (unsigned char *) ptr;
  register unsigned char uu;
  for (i = 0; i < sz; i++,u++) {
    uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* 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;
  int i;
  for (i = 0; i < sz; i++, u++) {
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    *u = uu;
  }
  return c;
}

#endif

#ifdef __cplusplus
}
#endif

/* ---------------------------------------------------------------------- -*- c -*-
 * perl5.swg
 *
 * Perl5 runtime library
 * $Header: /cvsroot/SWIG/Lib/perl5/perlrun.swg,v 1.14 2003/12/04 19:14:14 beazley Exp $
 * ----------------------------------------------------------------------------- */

#define SWIGPERL
#define SWIGPERL5
#ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

/* Get rid of free and malloc defined by perl */
#undef free
#undef malloc

#ifndef pTHX_
#define pTHX_
#endif

#include <string.h>
#ifdef __cplusplus
}
#endif

/* Macro to call an XS function */

#ifdef PERL_OBJECT 
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
#else 
#  ifndef MULTIPLICITY 
#    define SWIG_CALLXS(_name) _name(cv) 
#  else 
#    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
#  endif 
#endif 

/* Contract support */

#define SWIG_contract_assert(expr,msg) if (!(expr)) { SWIG_croak(msg); } else

/* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */

#ifdef PERL_OBJECT
#define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);

#ifdef __cplusplus
extern "C" {
#endif
typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
#define SWIGCLASS_STATIC
#else
#define MAGIC_PPERL
#define SWIGCLASS_STATIC static
#ifndef MULTIPLICITY
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
typedef int (*SwigMagicFunc)(SV *, MAGIC *);

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif


#else
#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#endif
#endif

#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
#endif

/* Modifications for newer Perl 5.005 releases */

#if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
#  ifndef PL_sv_yes
#    define PL_sv_yes sv_yes
#  endif
#  ifndef PL_sv_undef
#    define PL_sv_undef sv_undef
#  endif
#  ifndef PL_na
#    define PL_na na
#  endif
#endif

#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_OWNER 1
#define SWIG_SHADOW 2

/* Common SWIG API */

#ifdef PERL_OBJECT
#  define SWIG_ConvertPtr(obj, pp, type, flags) \
     SWIG_Perl_ConvertPtr(pPerl, obj, pp, type, flags)
#  define SWIG_NewPointerObj(p, type, flags) \
     SWIG_Perl_NewPointerObj(pPerl, p, type, flags)
#  define SWIG_MakePackedObj(sv, p, s, type)	\
     SWIG_Perl_MakePackedObj(pPerl, sv, p, s, type)
#  define SWIG_ConvertPacked(obj, p, s, type, flags) \
     SWIG_Perl_ConvertPacked(pPerl, obj, p, s, type, flags)

#else
#  define SWIG_ConvertPtr(obj, pp, type, flags) \
     SWIG_Perl_ConvertPtr(obj, pp, type, flags)
#  define SWIG_NewPointerObj(p, type, flags) \
     SWIG_Perl_NewPointerObj(p, type, flags)
#  define SWIG_MakePackedObj(sv, p, s, type)	\
     SWIG_Perl_MakePackedObj(sv, p, s, type )
#  define SWIG_ConvertPacked(obj, p, s, type, flags) \
     SWIG_Perl_ConvertPacked(obj, p, s, type, flags)
#endif

/* Perl-specific API */
#ifdef PERL_OBJECT
#  define SWIG_MakePtr(sv, ptr, type, flags) \
     SWIG_Perl_MakePtr(pPerl, sv, ptr, type, flags)
#  define SWIG_TypeCheckRV(rv, ty) \
     SWIG_Perl_TypeCheckRV(pPerl, rv, ty)
#  define SWIG_SetError(str) \
     SWIG_Perl_SetError(pPerl, str)
#else
#  define SWIG_MakePtr(sv, ptr, type, flags) \
     SWIG_Perl_MakePtr(sv, ptr, type, flags)
#  define SWIG_TypeCheckRV(rv, ty) \
     SWIG_Perl_TypeCheckRV(rv, ty)
#  define SWIG_SetError(str) \
     SWIG_Perl_SetError(str)
#  define SWIG_SetErrorSV(str) \
     SWIG_Perl_SetErrorSV(str)
#endif

#define SWIG_SetErrorf SWIG_Perl_SetErrorf


#ifdef PERL_OBJECT
#  define SWIG_MAYBE_PERL_OBJECT CPerlObj *pPerl,
#else
#  define SWIG_MAYBE_PERL_OBJECT
#endif

#ifdef SWIG_NOINCLUDE

SWIGIMPORT(int)               SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
SWIGIMPORT(void)              SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *, void *, swig_type_info *, int flags);
SWIGIMPORT(SV *)              SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *, swig_type_info *, int flags);
SWIGIMPORT(void)              SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *);
SWIGIMPORT(int)               SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *, int flags);
SWIGIMPORT(swig_type_info *)  SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty);
SWIGIMPORT(SV *)              SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT char *);

#else

SWIGRUNTIME(swig_type_info *)
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
  swig_type_info *s;
  if (!ty) return 0;        /* Void pointer */
  s = ty->next;             /* First element always just a name */
  do {
    if (sv_derived_from(rv, (char *) s->name)) {
      if (s == ty->next) return s;
      /* Move s to the top of the linked list */
      s->prev->next = s->next;
      if (s->next) {
        s->next->prev = s->prev;
      }
      /* Insert s as second element in the list */
      s->next = ty->next;
      if (ty->next) ty->next->prev = s;
      ty->next = s;
      s->prev = ty;
      return s;
    }
    s = s->next;
  } while (s && (s != ty->next));
  return 0;
}

/* Function for getting a pointer value */

SWIGRUNTIME(int) 
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  swig_type_info *tc;
  void *voidptr = (void *)0;

  /* If magical, apply more magic */
  if (SvGMAGICAL(sv))
    mg_get(sv);

  /* Check to see if this is an object */
  if (sv_isobject(sv)) {
    SV *tsv = (SV*) SvRV(sv);
    IV tmp = 0;
    if ((SvTYPE(tsv) == SVt_PVHV)) {
      MAGIC *mg;
      if (SvMAGICAL(tsv)) {
        mg = mg_find(tsv,'P');
        if (mg) {
          SV *rsv = mg->mg_obj;
          if (sv_isobject(rsv)) {
            tmp = SvIV((SV*)SvRV(rsv));
          }
        }
      } else {
        return -1;
      }
    } else {
      tmp = SvIV((SV*)SvRV(sv));
    }
    voidptr = (void *)tmp;
    if (!_t) {
      *(ptr) = voidptr;
      return 0;
    }
  } else if (! SvOK(sv)) {            /* Check for undef */
    *(ptr) = (void *) 0;
    return 0;
  } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
    *(ptr) = (void *) 0;
    if (!SvROK(sv))
      return 0;
    else
      return -1;
  } else {                            /* Don't know what it is */
    *(ptr) = (void *) 0;
    return -1;
  }
  if (_t) {
    /* Now see if the types match */
    tc = SWIG_TypeCheckRV(sv,_t);
    if (!tc) {
      *ptr = voidptr;
      return -1;
    }
    *ptr = SWIG_TypeCast(tc,voidptr);
    return 0;
  }
  *ptr = voidptr;
  return 0;
}

SWIGRUNTIME(void)
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  if (ptr && (flags & SWIG_SHADOW)) {
    SV *self;
    SV *obj=newSV(0);
    HV *hash=newHV();
    HV *stash;
    sv_setref_pv(obj, (char *) t->name, ptr);
    stash=SvSTASH(SvRV(obj));
    if (flags & SWIG_OWNER) {
      HV *hv;
      GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
      if (!isGV(gv))
        gv_init(gv, stash, "OWNER", 5, FALSE);
      hv=GvHVn(gv);
      hv_store_ent(hv, obj, newSViv(1), 0);
    }
    sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
    SvREFCNT_dec(obj);
    self=newRV_noinc((SV *)hash);
    sv_setsv(sv, self);
    SvREFCNT_dec((SV *)self);
    sv_bless(sv, stash);
  }
  else {
    sv_setref_pv(sv, (char *) t->name, ptr);
  }
}

SWIGRUNTIME(SV *)
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  SV *result = sv_newmortal();
  SWIG_MakePtr(result, ptr, t, flags);
  return result;
}

SWIGRUNTIME(void)
  SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(type->name)) > 1000) return;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,type->name);
  sv_setpv(sv, result);
}

/* Convert a packed value value */
SWIGRUNTIME(int)
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
  swig_type_info *tc;
  char  *c = 0;

  if ((!obj) || (!SvOK(obj))) return -1;
  c = SvPV(obj, PL_na);
  /* Pointer values must start with leading underscore */
  if (*c != '_') return -1;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) return -1;
  }
  return 0;
}

SWIGRUNTIME(void)
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
  if (error) sv_setsv(get_sv("@", TRUE), mess("%s", error));
}

SWIGRUNTIME(void)
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
  if (error) sv_setsv(get_sv("@", TRUE), error);
}

SWIGRUNTIME(void)
SWIG_Perl_SetErrorf(const char *fmt, ...) {
  va_list args;
  va_start(args, fmt);
  sv_setsv(get_sv("@", TRUE), vmess(fmt, &args));
  va_end(args);
}

#endif

/* Macros for low-level exception handling */
#define SWIG_fail       goto fail
#define SWIG_croak(x)   { SWIG_SetError(x); goto fail; }
#define SWIG_croakSV(x) { SWIG_SetErrorSV(x); goto fail; }
/* most preprocessors do not support vararg macros :-( */
/* #define SWIG_croakf(x...) { SWIG_SetErrorf(x); goto fail; } */

/* workaround for bug in perl 5.6.x croak */
#if !defined(PERL_VERSION) || (PERL_VERSION < 8)
static void SWIG_real_croak() {
#if defined(dTHX)
    dTHX;
#endif
    SV *err=get_sv("@", FALSE);
    if ((err!=NULL) && SvOK(err) && !SvROK(err)) croak("%_", err);
    croak(Nullch);
}
#else
#define SWIG_real_croak() croak(Nullch)
#endif

typedef XS(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;

/* Structure for command table */
typedef struct {
  const char         *name;
  SwigPerlWrapperPtr  wrapper;
} swig_command_info;

/* Information for constant table */

#define SWIG_INT     1
#define SWIG_FLOAT   2
#define SWIG_STRING  3
#define SWIG_POINTER 4
#define SWIG_BINARY  5

/* Constant information structure */
typedef struct swig_constant_info {
    int              type;
    const char      *name;
    long             lvalue;
    double           dvalue;
    void            *pvalue;
    swig_type_info **ptype;
} swig_constant_info;

#ifdef __cplusplus
}
#endif

/* Structure for variable table */
typedef struct {
  const char   *name;
  SwigMagicFunc   set;
  SwigMagicFunc   get;
  swig_type_info  **type;
} swig_variable_info;

/* Magic variable code */
#ifndef PERL_OBJECT
#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
  #ifndef MULTIPLICITY
     static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
  #else
     static void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) {
  #endif
#else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) {
#endif
  MAGIC *mg;
  sv_magic(sv,sv,'U',(char *) name,strlen(name));
  mg = mg_find(sv,'U');
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  mg->mg_virtual->svt_get = (SwigMagicFuncHack) get;
  mg->mg_virtual->svt_set = (SwigMagicFuncHack) set;
  mg->mg_virtual->svt_len = 0;
  mg->mg_virtual->svt_clear = 0;
  mg->mg_virtual->svt_free = 0;
}






#ifdef do_open
  #undef do_open
#endif
#ifdef do_close
  #undef do_close
#endif
#ifdef scalar
  #undef scalar
#endif
#ifdef list
  #undef list
#endif
#ifdef apply
  #undef apply
#endif
#ifdef convert
  #undef convert
#endif
#ifdef Error
  #undef Error
#endif
#ifdef form
  #undef form
#endif
#ifdef vform
  #undef vform
#endif
#ifdef LABEL
  #undef LABEL
#endif
#ifdef METHOD
  #undef METHOD
#endif
#ifdef Move
  #undef Move
#endif
#ifdef yylex
  #undef yylex
#endif
#ifdef yyparse
  #undef yyparse
#endif
#ifdef yyerror
  #undef yyerror
#endif
#ifdef invert
  #undef invert
#endif
#ifdef ref
  #undef ref
#endif
#ifdef ENTER
  #undef ENTER
#endif


/* -------- TYPES TABLE (BEGIN) -------- */

#define  SWIGTYPE_p_p_drmaa_job_template_t swig_types[0] 
#define  SWIGTYPE_p_drmaa_job_template_t swig_types[1] 
#define  SWIGTYPE_p_drmaa_attr_values_t swig_types[2] 
#define  SWIGTYPE_p_p_char swig_types[3] 
#define  SWIGTYPE_p_p_drmaa_attr_values_t swig_types[4] 
#define  SWIGTYPE_p_size_t swig_types[5] 
#define  SWIGTYPE_p_unsigned_int swig_types[6] 
#define  SWIGTYPE_p_drmaa_attr_names_t swig_types[7] 
#define  SWIGTYPE_p_drmaa_job_ids_t swig_types[8] 
#define  SWIGTYPE_p_p_drmaa_attr_names_t swig_types[9] 
#define  SWIGTYPE_p_p_drmaa_job_ids_t swig_types[10] 
#define  SWIGTYPE_p_int swig_types[11] 
static swig_type_info *swig_types[13];

/* -------- TYPES TABLE (END) -------- */

#define SWIG_init    boot_Schedule__DRMAAc

#define SWIG_name   "Schedule::DRMAAcc::boot_Schedule__DRMAAc"
#define SWIG_prefix "Schedule::DRMAAcc::"

#ifdef __cplusplus
extern "C"
#endif
#ifndef PERL_OBJECT
#ifndef MULTIPLICITY
SWIGEXPORT(void) SWIG_init (CV* cv);
#else
SWIGEXPORT(void) SWIG_init (pTHXo_ CV* cv);
#endif
#else
SWIGEXPORT(void) SWIG_init (CV *cv, CPerlObj *);
#endif


#include "drmaa.h"


#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_Schedule::DRMAAc_var::
class _wrap_Schedule::DRMAAc_var : public CPerlObj {
public:
#else
#define MAGIC_CLASS
#endif
SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *sv, MAGIC *mg) {
    MAGIC_PPERL
    sv = sv; mg = mg;
    croak("Value is read-only.");
    return 0;
}


#ifdef PERL_OBJECT
};
#endif

#ifdef __cplusplus
extern "C" {
#endif
XS(_wrap_drmaa_get_next_attr_name) {
    {
        drmaa_attr_names_t *arg1 = (drmaa_attr_names_t *) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * value, size_t value_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_get_next_attr_name(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_attr_names_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_get_next_attr_name. Expected _p_drmaa_attr_names_t");
            }
        }
        result = (int)drmaa_get_next_attr_name(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * value
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_next_attr_value) {
    {
        drmaa_attr_values_t *arg1 = (drmaa_attr_values_t *) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * value, size_t value_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_get_next_attr_value(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_attr_values_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_get_next_attr_value. Expected _p_drmaa_attr_values_t");
            }
        }
        result = (int)drmaa_get_next_attr_value(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * value
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_next_job_id) {
    {
        drmaa_job_ids_t *arg1 = (drmaa_job_ids_t *) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * value, size_t value_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_get_next_job_id(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_ids_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_get_next_job_id. Expected _p_drmaa_job_ids_t");
            }
        }
        result = (int)drmaa_get_next_job_id(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * value
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_release_attr_names) {
    {
        drmaa_attr_names_t *arg1 = (drmaa_attr_names_t *) 0 ;
        int argvi = 0;
        dXSARGS;
        
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_release_attr_names(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_attr_names_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_release_attr_names. Expected _p_drmaa_attr_names_t");
            }
        }
        drmaa_release_attr_names(arg1);
        
        
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_release_attr_values) {
    {
        drmaa_attr_values_t *arg1 = (drmaa_attr_values_t *) 0 ;
        int argvi = 0;
        dXSARGS;
        
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_release_attr_values(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_attr_values_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_release_attr_values. Expected _p_drmaa_attr_values_t");
            }
        }
        drmaa_release_attr_values(arg1);
        
        
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_release_job_ids) {
    {
        drmaa_job_ids_t *arg1 = (drmaa_job_ids_t *) 0 ;
        int argvi = 0;
        dXSARGS;
        
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_release_job_ids(values);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_ids_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_release_job_ids. Expected _p_drmaa_job_ids_t");
            }
        }
        drmaa_release_job_ids(arg1);
        
        
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_init) {
    {
        char *arg1 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_init(contact);");
        }
        if (!SvOK((SV*) ST(0))) arg1 = 0;
        else arg1 = (char *) SvPV(ST(0), PL_na);
        result = (int)drmaa_init((char const *)arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_exit) {
    {
        char *arg1 ;
        size_t arg2 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg1 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg2 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_exit();");
        }
        result = (int)drmaa_exit(arg1,arg2);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg1);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_allocate_job_template) {
    {
        drmaa_job_template_t **arg1 = (drmaa_job_template_t **) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        drmaa_job_template_t *keepme1 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in) drmaa_job_template_t ** jt
            keepme1 = NULL;
            
            arg1 = &keepme1;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_allocate_job_template();");
        }
        result = (int)drmaa_allocate_job_template(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) drmaa_job_template_t ** jt
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg1, SWIGTYPE_p_drmaa_job_template_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_delete_job_template) {
    {
        drmaa_job_template_t *arg1 = (drmaa_job_template_t *) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_delete_job_template(jt);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_delete_job_template. Expected _p_drmaa_job_template_t");
            }
        }
        result = (int)drmaa_delete_job_template(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_set_attribute) {
    {
        drmaa_job_template_t *arg1 = (drmaa_job_template_t *) 0 ;
        char *arg2 ;
        char *arg3 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 3) || (items > 3)) {
            SWIG_croak("Usage: drmaa_set_attribute(jt,name,value);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_set_attribute. Expected _p_drmaa_job_template_t");
            }
        }
        if (!SvOK((SV*) ST(1))) arg2 = 0;
        else arg2 = (char *) SvPV(ST(1), PL_na);
        if (!SvOK((SV*) ST(2))) arg3 = 0;
        else arg3 = (char *) SvPV(ST(2), PL_na);
        result = (int)drmaa_set_attribute(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_attribute) {
    {
        drmaa_job_template_t *arg1 = (drmaa_job_template_t *) 0 ;
        char *arg2 ;
        char *arg3 ;
        size_t arg4 ;
        char *arg5 ;
        size_t arg6 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * value, size_t value_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg5 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg6 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 2) || (items > 2)) {
            SWIG_croak("Usage: drmaa_get_attribute(jt,name);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_get_attribute. Expected _p_drmaa_job_template_t");
            }
        }
        if (!SvOK((SV*) ST(1))) arg2 = 0;
        else arg2 = (char *) SvPV(ST(1), PL_na);
        result = (int)drmaa_get_attribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * value
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg5);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_set_vector_attribute) {
    {
        drmaa_job_template_t *arg1 = (drmaa_job_template_t *) 0 ;
        char *arg2 ;
        char **arg3 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 3) || (items > 3)) {
            SWIG_croak("Usage: drmaa_set_vector_attribute(jt,name,value);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_set_vector_attribute. Expected _p_drmaa_job_template_t");
            }
        }
        if (!SvOK((SV*) ST(1))) arg2 = 0;
        else arg2 = (char *) SvPV(ST(1), PL_na);
        {
            // %typemap(argout) char const *[] value
            AV *tempav;
            I32 len;
            int i;
            SV  **tv;
            char *myConst;
            
            if (!SvROK(ST(2))) {
                croak("Error: drmaa_set_vector_attribute: Argument 3 is not a reference ");
            }
            if (SvTYPE(SvRV(ST(2))) != SVt_PVAV) {
                croak("Error: drmaa_set_vector_attribute: Argument 3 is not an array ");
            }
            tempav = (AV*)SvRV(ST(2));
            len = av_len(tempav);
            arg3 = (char **) malloc((len+2)*sizeof(char *));
            for (i = 0; i <= len; i++) {
                tv = av_fetch(tempav, i, 0);	
                arg3[i] = (char *) SvPV(*tv,PL_na);
            }
            arg3[i] = NULL;
        }
        result = (int)drmaa_set_vector_attribute(arg1,(char const *)arg2,(char const *(*))arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_vector_attribute) {
    {
        drmaa_job_template_t *arg1 = (drmaa_job_template_t *) 0 ;
        char *arg2 ;
        drmaa_attr_values_t **arg3 = (drmaa_attr_values_t **) 0 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        drmaa_attr_values_t *keepme3 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in) drmaa_attr_values_t ** values
            keepme3 = NULL;
            
            arg3 = &keepme3;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 2) || (items > 2)) {
            SWIG_croak("Usage: drmaa_get_vector_attribute(jt,name);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 1 of drmaa_get_vector_attribute. Expected _p_drmaa_job_template_t");
            }
        }
        if (!SvOK((SV*) ST(1))) arg2 = 0;
        else arg2 = (char *) SvPV(ST(1), PL_na);
        result = (int)drmaa_get_vector_attribute(arg1,(char const *)arg2,arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) drmaa_attr_values_t ** values
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg3, SWIGTYPE_p_drmaa_attr_values_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_attribute_names) {
    {
        drmaa_attr_names_t **arg1 = (drmaa_attr_names_t **) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        drmaa_attr_names_t *keepme1 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in) drmaa_attr_names_t ** values
            keepme1 = NULL;
            
            arg1 = &keepme1;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_get_attribute_names();");
        }
        result = (int)drmaa_get_attribute_names(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) drmaa_attr_names_t ** values
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg1, SWIGTYPE_p_drmaa_attr_names_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_vector_attribute_names) {
    {
        drmaa_attr_names_t **arg1 = (drmaa_attr_names_t **) 0 ;
        char *arg2 ;
        size_t arg3 ;
        int result;
        drmaa_attr_names_t *keepme1 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in) drmaa_attr_names_t ** values
            keepme1 = NULL;
            
            arg1 = &keepme1;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg2 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg3 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_get_vector_attribute_names();");
        }
        result = (int)drmaa_get_vector_attribute_names(arg1,arg2,arg3);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) drmaa_attr_names_t ** values
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg1, SWIGTYPE_p_drmaa_attr_names_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_run_job) {
    {
        char *arg1 ;
        size_t arg2 ;
        drmaa_job_template_t *arg3 = (drmaa_job_template_t *) 0 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * job_id, size_t job_id_len )
            arg1 = malloc( sizeof(char) * DRMAA_JOBNAME_BUFFER );
            arg2 = DRMAA_JOBNAME_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_run_job(jt);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg3, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 2 of drmaa_run_job. Expected _p_drmaa_job_template_t");
            }
        }
        result = (int)drmaa_run_job(arg1,arg2,(drmaa_job_template_t const *)arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * job_id
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg1);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_run_bulk_jobs) {
    {
        drmaa_job_ids_t **arg1 = (drmaa_job_ids_t **) 0 ;
        drmaa_job_template_t *arg2 = (drmaa_job_template_t *) 0 ;
        int arg3 ;
        int arg4 ;
        int arg5 ;
        char *arg6 ;
        size_t arg7 ;
        int result;
        drmaa_job_ids_t *keepme1 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in) drmaa_job_ids_t ** jobids
            keepme1 = NULL;
            
            arg1 = &keepme1;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg6 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg7 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 4) || (items > 4)) {
            SWIG_croak("Usage: drmaa_run_bulk_jobs(jt,start,end,incr);");
        }
        {
            if (SWIG_ConvertPtr(ST(0), (void **) &arg2, SWIGTYPE_p_drmaa_job_template_t,0) < 0) {
                SWIG_croak("Type error in argument 2 of drmaa_run_bulk_jobs. Expected _p_drmaa_job_template_t");
            }
        }
        arg3 = (int) SvIV(ST(1));
        arg4 = (int) SvIV(ST(2));
        arg5 = (int) SvIV(ST(3));
        result = (int)drmaa_run_bulk_jobs(arg1,(drmaa_job_template_t const *)arg2,arg3,arg4,arg5,arg6,arg7);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) drmaa_job_ids_t ** jobids
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg1, SWIGTYPE_p_drmaa_job_ids_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg6);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_control) {
    {
        char *arg1 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 2) || (items > 2)) {
            SWIG_croak("Usage: drmaa_control(jobid,action);");
        }
        if (!SvOK((SV*) ST(0))) arg1 = 0;
        else arg1 = (char *) SvPV(ST(0), PL_na);
        arg2 = (int) SvIV(ST(1));
        result = (int)drmaa_control((char const *)arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_synchronize) {
    {
        char **arg1 ;
        long arg2 ;
        int arg3 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 3) || (items > 3)) {
            SWIG_croak("Usage: drmaa_synchronize(job_ids,timeout,dispose);");
        }
        {
            // %typemap(argout) char const *[] job_ids
            AV *tempav;
            I32 len;
            int i;
            SV  **tv;
            char *myConst;
            
            if (!SvROK(ST(0))) {
                croak("Error: drmaa_synchronize: Argument 1 is not a reference ");
            }
            if (SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
                croak("Error: drmaa_synchronize: Argument 1 is not an array ");
            }
            tempav = (AV*)SvRV(ST(0));
            len = av_len(tempav);
            arg1 = (char **) malloc((len+2)*sizeof(char *));
            for (i = 0; i <= len; i++) {
                tv = av_fetch(tempav, i, 0);	
                arg1[i] = (char *) SvPV(*tv,PL_na);
            }
            arg1[i] = NULL;
        }
        arg2 = (long) SvIV(ST(1));
        arg3 = (int) SvIV(ST(2));
        result = (int)drmaa_synchronize((char const *(*))arg1,arg2,arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wait) {
    {
        char *arg1 ;
        char *arg2 ;
        size_t arg3 ;
        int *arg4 = (int *) 0 ;
        long arg5 ;
        drmaa_attr_values_t **arg6 = (drmaa_attr_values_t **) 0 ;
        char *arg7 ;
        size_t arg8 ;
        int result;
        int temp3 ;
        drmaa_attr_values_t *keepme5 ;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * job_id_out, size_t job_id_out_len )
            arg2 = malloc( sizeof(char) * DRMAA_JOBNAME_BUFFER );
            arg3 = DRMAA_JOBNAME_BUFFER;
        }
        arg4 = &temp3;
        {
            // %typemap(in) drmaa_attr_values_t ** rusage
            keepme5 = NULL;
            
            arg6 = &keepme5;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg7 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg8 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 2) || (items > 2)) {
            SWIG_croak("Usage: drmaa_wait(job_id,timeout);");
        }
        if (!SvOK((SV*) ST(0))) arg1 = 0;
        else arg1 = (char *) SvPV(ST(0), PL_na);
        arg5 = (long) SvIV(ST(1));
        result = (int)drmaa_wait((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * job_id_out
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg2);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg4));
            argvi++;
        }
        {
            // %typemap(argout) drmaa_attr_values_t ** rusage
            ST(argvi) = sv_newmortal();
            SWIG_MakePtr(ST(argvi++), (void *)*arg6, SWIGTYPE_p_drmaa_attr_values_t, 0);
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg7);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wifexited) {
    {
        int *arg1 = (int *) 0 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp1 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wifexited(stat);");
        }
        arg2 = (int) SvIV(ST(0));
        result = (int)drmaa_wifexited(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg1));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wexitstatus) {
    {
        int *arg1 = (int *) 0 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp1 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wexitstatus(stat);");
        }
        arg2 = (int) SvIV(ST(0));
        result = (int)drmaa_wexitstatus(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg1));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wifsignaled) {
    {
        int *arg1 = (int *) 0 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp1 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wifsignaled(stat);");
        }
        arg2 = (int) SvIV(ST(0));
        result = (int)drmaa_wifsignaled(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg1));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wtermsig) {
    {
        char *arg1 ;
        size_t arg2 ;
        int arg3 ;
        char *arg4 ;
        size_t arg5 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * signal, size_t signal_len )
            arg1 = malloc( sizeof(char) * DRMAA_SIGNAL_BUFFER );
            arg2 = DRMAA_SIGNAL_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg4 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg5 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wtermsig(stat);");
        }
        arg3 = (int) SvIV(ST(0));
        result = (int)drmaa_wtermsig(arg1,arg2,arg3,arg4,arg5);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg4);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wcoredump) {
    {
        int *arg1 = (int *) 0 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp1 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wcoredump(stat);");
        }
        arg2 = (int) SvIV(ST(0));
        result = (int)drmaa_wcoredump(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg1));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_wifaborted) {
    {
        int *arg1 = (int *) 0 ;
        int arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp1 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_wifaborted(stat);");
        }
        arg2 = (int) SvIV(ST(0));
        result = (int)drmaa_wifaborted(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg1));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_job_ps) {
    {
        char *arg1 ;
        int *arg2 = (int *) 0 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int temp2 ;
        int argvi = 0;
        dXSARGS;
        
        arg2 = &temp2;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_job_ps(job_id);");
        }
        if (!SvOK((SV*) ST(0))) arg1 = 0;
        else arg1 = (char *) SvPV(ST(0), PL_na);
        result = (int)drmaa_job_ps((char const *)arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setiv(ST(argvi),(IV) *(arg2));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_strerror) {
    {
        int arg1 ;
        char *result;
        int argvi = 0;
        dXSARGS;
        
        if ((items < 1) || (items > 1)) {
            SWIG_croak("Usage: drmaa_strerror(drmaa_errno);");
        }
        arg1 = (int) SvIV(ST(0));
        result = (char *)drmaa_strerror(arg1);
        
        ST(argvi) = sv_newmortal();
        if (result) {
            sv_setpv((SV*)ST(argvi++), (char *) result);
        } else {
            sv_setsv((SV*)ST(argvi++), &PL_sv_undef);
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_contact) {
    {
        char *arg1 ;
        size_t arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * contact, size_t contact_len )
            arg1 = malloc( sizeof(char) * DRMAA_CONTACT_BUFFER );
            arg2 = DRMAA_CONTACT_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_get_contact();");
        }
        result = (int)drmaa_get_contact(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * contact
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg1);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_version) {
    {
        unsigned int *arg1 = (unsigned int *) 0 ;
        unsigned int *arg2 = (unsigned int *) 0 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        unsigned int temp1 ;
        unsigned int temp2 ;
        int argvi = 0;
        dXSARGS;
        
        arg1 = &temp1;
        arg2 = &temp2;
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_version();");
        }
        result = (int)drmaa_version(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setuv(ST(argvi),(UV) *(arg1));
            argvi++;
        }
        {
            if (argvi >= items) {
                EXTEND(sp,1);
            }
            ST(argvi) = sv_newmortal();
            sv_setuv(ST(argvi),(UV) *(arg2));
            argvi++;
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_DRM_system) {
    {
        char *arg1 ;
        size_t arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * drm_system, size_t drm_system_len )
            arg1 = malloc( sizeof(char) * DRMAA_DRM_SYSTEM_BUFFER );
            arg2 = DRMAA_DRM_SYSTEM_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_get_DRM_system();");
        }
        result = (int)drmaa_get_DRM_system(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * drm_system
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg1);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}


XS(_wrap_drmaa_get_DRMAA_implementation) {
    {
        char *arg1 ;
        size_t arg2 ;
        char *arg3 ;
        size_t arg4 ;
        int result;
        int argvi = 0;
        dXSARGS;
        
        {
            // %typemap(in,numinputs=0) (char * drmaa_impl, size_t drmaa_impl_len )
            arg1 = malloc( sizeof(char) * DRMAA_DRM_SYSTEM_BUFFER );
            arg2 = DRMAA_DRM_SYSTEM_BUFFER;
        }
        {
            // %typemap(in,numinputs=0) (char * error_diagnosis, size_t error_diag_len )
            arg3 = malloc( sizeof(char) * DRMAA_ERROR_STRING_BUFFER );
            arg4 = DRMAA_ERROR_STRING_BUFFER;
        }
        if ((items < 0) || (items > 0)) {
            SWIG_croak("Usage: drmaa_get_DRMAA_implementation();");
        }
        result = (int)drmaa_get_DRMAA_implementation(arg1,arg2,arg3,arg4);
        
        ST(argvi) = sv_newmortal();
        sv_setiv(ST(argvi++), (IV) result);
        {
            // %typemap(argout) char * drmaa_impl
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg1);
            argvi++;                     /* Increment return count -- important! */
        }
        {
            // %typemap(argout) char * error_diagnosis
            ST(argvi) = sv_newmortal();
            sv_setpv(ST(argvi), arg3);
            argvi++;                     /* Increment return count -- important! */
        }
        XSRETURN(argvi);
        fail:
        ;
    }
    SWIG_real_croak();
}



/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static swig_type_info _swigt__p_p_drmaa_job_template_t[] = {{"_p_p_drmaa_job_template_t", 0, "drmaa_job_template_t **", 0},{"_p_p_drmaa_job_template_t"},{0}};
static swig_type_info _swigt__p_drmaa_job_template_t[] = {{"_p_drmaa_job_template_t", 0, "drmaa_job_template_t const *", 0},{"_p_drmaa_job_template_t"},{0}};
static swig_type_info _swigt__p_drmaa_attr_values_t[] = {{"_p_drmaa_attr_values_t", 0, "drmaa_attr_values_t *", 0},{"_p_drmaa_attr_values_t"},{0}};
static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0},{"_p_p_char"},{0}};
static swig_type_info _swigt__p_p_drmaa_attr_values_t[] = {{"_p_p_drmaa_attr_values_t", 0, "drmaa_attr_values_t **", 0},{"_p_p_drmaa_attr_values_t"},{0}};
static swig_type_info _swigt__p_size_t[] = {{"_p_size_t", 0, "size_t *", 0},{"_p_size_t"},{0}};
static swig_type_info _swigt__p_unsigned_int[] = {{"_p_unsigned_int", 0, "unsigned int *", 0},{"_p_unsigned_int"},{0}};
static swig_type_info _swigt__p_drmaa_attr_names_t[] = {{"_p_drmaa_attr_names_t", 0, "drmaa_attr_names_t *", 0},{"_p_drmaa_attr_names_t"},{0}};
static swig_type_info _swigt__p_drmaa_job_ids_t[] = {{"_p_drmaa_job_ids_t", 0, "drmaa_job_ids_t *", 0},{"_p_drmaa_job_ids_t"},{0}};
static swig_type_info _swigt__p_p_drmaa_attr_names_t[] = {{"_p_p_drmaa_attr_names_t", 0, "drmaa_attr_names_t **", 0},{"_p_p_drmaa_attr_names_t"},{0}};
static swig_type_info _swigt__p_p_drmaa_job_ids_t[] = {{"_p_p_drmaa_job_ids_t", 0, "drmaa_job_ids_t **", 0},{"_p_p_drmaa_job_ids_t"},{0}};
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}};

static swig_type_info *swig_types_initial[] = {
_swigt__p_p_drmaa_job_template_t, 
_swigt__p_drmaa_job_template_t, 
_swigt__p_drmaa_attr_values_t, 
_swigt__p_p_char, 
_swigt__p_p_drmaa_attr_values_t, 
_swigt__p_size_t, 
_swigt__p_unsigned_int, 
_swigt__p_drmaa_attr_names_t, 
_swigt__p_drmaa_job_ids_t, 
_swigt__p_p_drmaa_attr_names_t, 
_swigt__p_p_drmaa_job_ids_t, 
_swigt__p_int, 
0
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_constant_info swig_constants[] = {
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ATTR_BUFFER", (long) 1024, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTACT_BUFFER", (long) 1024, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_DRM_SYSTEM_BUFFER", (long) 1024, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERROR_STRING_BUFFER", (long) 1024, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_JOBNAME_BUFFER", (long) 1024, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_SIGNAL_BUFFER", (long) 32, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_TIMEOUT_WAIT_FOREVER", (long) -1, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_TIMEOUT_NO_WAIT", (long) 0, 0, 0, 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JOB_IDS_SESSION_ANY", 0, 0, (void *)"DRMAA_JOB_IDS_SESSION_ANY", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JOB_IDS_SESSION_ALL", 0, 0, (void *)"DRMAA_JOB_IDS_SESSION_ALL", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_SUBMISSION_STATE_ACTIVE", 0, 0, (void *)"drmaa_active", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_SUBMISSION_STATE_HOLD", 0, 0, (void *)"drmaa_hold", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_PLACEHOLDER_INCR", 0, 0, (void *)"$drmaa_incr_ph$", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_PLACEHOLDER_HD", 0, 0, (void *)"$drmaa_hd_ph$", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_PLACEHOLDER_WD", 0, 0, (void *)"$drmaa_wd_ph$", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_REMOTE_COMMAND", 0, 0, (void *)"drmaa_remote_command", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JS_STATE", 0, 0, (void *)"drmaa_js_state", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_WD", 0, 0, (void *)"drmaa_wd", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JOB_CATEGORY", 0, 0, (void *)"drmaa_job_category", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_NATIVE_SPECIFICATION", 0, 0, (void *)"drmaa_native_specification", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_BLOCK_EMAIL", 0, 0, (void *)"drmaa_block_email", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_START_TIME", 0, 0, (void *)"drmaa_start_time", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JOB_NAME", 0, 0, (void *)"drmaa_job_name", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_INPUT_PATH", 0, 0, (void *)"drmaa_input_path", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_OUTPUT_PATH", 0, 0, (void *)"drmaa_output_path", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_ERROR_PATH", 0, 0, (void *)"drmaa_error_path", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_JOIN_FILES", 0, 0, (void *)"drmaa_join_files", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_TRANSFER_FILES", 0, 0, (void *)"drmaa_transfer_files", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_DEADLINE_TIME", 0, 0, (void *)"drmaa_deadline_time", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_WCT_HLIMIT", 0, 0, (void *)"drmaa_wct_hlimit", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_WCT_SLIMIT", 0, 0, (void *)"drmaa_wct_slimit", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_DURATION_HLIMIT", 0, 0, (void *)"drmaa_durartion_hlimit", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_DURATION_SLIMIT", 0, 0, (void *)"drmaa_durartion_slimit", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_V_ARGV", 0, 0, (void *)"drmaa_v_argv", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_V_ENV", 0, 0, (void *)"drmaa_v_env", 0},
{ SWIG_STRING,  (char *) SWIG_prefix "DRMAA_V_EMAIL", 0, 0, (void *)"drmaa_v_email", 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_SUCCESS", (long) DRMAA_ERRNO_SUCCESS, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INTERNAL_ERROR", (long) DRMAA_ERRNO_INTERNAL_ERROR, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE", (long) DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_AUTH_FAILURE", (long) DRMAA_ERRNO_AUTH_FAILURE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INVALID_ARGUMENT", (long) DRMAA_ERRNO_INVALID_ARGUMENT, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_NO_ACTIVE_SESSION", (long) DRMAA_ERRNO_NO_ACTIVE_SESSION, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_NO_MEMORY", (long) DRMAA_ERRNO_NO_MEMORY, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INVALID_CONTACT_STRING", (long) DRMAA_ERRNO_INVALID_CONTACT_STRING, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_DEFAULT_CONTACT_STRING_ERROR", (long) DRMAA_ERRNO_DEFAULT_CONTACT_STRING_ERROR, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_DRMS_INIT_FAILED", (long) DRMAA_ERRNO_DRMS_INIT_FAILED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_ALREADY_ACTIVE_SESSION", (long) DRMAA_ERRNO_ALREADY_ACTIVE_SESSION, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_DRMS_EXIT_ERROR", (long) DRMAA_ERRNO_DRMS_EXIT_ERROR, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INVALID_ATTRIBUTE_FORMAT", (long) DRMAA_ERRNO_INVALID_ATTRIBUTE_FORMAT, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE", (long) DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_CONFLICTING_ATTRIBUTE_VALUES", (long) DRMAA_ERRNO_CONFLICTING_ATTRIBUTE_VALUES, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_TRY_LATER", (long) DRMAA_ERRNO_TRY_LATER, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_DENIED_BY_DRM", (long) DRMAA_ERRNO_DENIED_BY_DRM, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_INVALID_JOB", (long) DRMAA_ERRNO_INVALID_JOB, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_RESUME_INCONSISTENT_STATE", (long) DRMAA_ERRNO_RESUME_INCONSISTENT_STATE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_SUSPEND_INCONSISTENT_STATE", (long) DRMAA_ERRNO_SUSPEND_INCONSISTENT_STATE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_HOLD_INCONSISTENT_STATE", (long) DRMAA_ERRNO_HOLD_INCONSISTENT_STATE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_RELEASE_INCONSISTENT_STATE", (long) DRMAA_ERRNO_RELEASE_INCONSISTENT_STATE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_EXIT_TIMEOUT", (long) DRMAA_ERRNO_EXIT_TIMEOUT, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_ERRNO_NO_RUSAGE", (long) DRMAA_ERRNO_NO_RUSAGE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_NO_ERRNO", (long) DRMAA_NO_ERRNO, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_UNDETERMINED", (long) DRMAA_PS_UNDETERMINED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_QUEUED_ACTIVE", (long) DRMAA_PS_QUEUED_ACTIVE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_SYSTEM_ON_HOLD", (long) DRMAA_PS_SYSTEM_ON_HOLD, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_USER_ON_HOLD", (long) DRMAA_PS_USER_ON_HOLD, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_USER_SYSTEM_ON_HOLD", (long) DRMAA_PS_USER_SYSTEM_ON_HOLD, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_RUNNING", (long) DRMAA_PS_RUNNING, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_SYSTEM_SUSPENDED", (long) DRMAA_PS_SYSTEM_SUSPENDED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_USER_SUSPENDED", (long) DRMAA_PS_USER_SUSPENDED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_USER_SYSTEM_SUSPENDED", (long) DRMAA_PS_USER_SYSTEM_SUSPENDED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_DONE", (long) DRMAA_PS_DONE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_PS_FAILED", (long) DRMAA_PS_FAILED, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTROL_SUSPEND", (long) DRMAA_CONTROL_SUSPEND, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTROL_RESUME", (long) DRMAA_CONTROL_RESUME, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTROL_HOLD", (long) DRMAA_CONTROL_HOLD, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTROL_RELEASE", (long) DRMAA_CONTROL_RELEASE, 0, 0, 0},
{ SWIG_INT,     (char *) SWIG_prefix "DRMAA_CONTROL_TERMINATE", (long) DRMAA_CONTROL_TERMINATE, 0, 0, 0},
{0}
};
#ifdef __cplusplus
}
#endif
static swig_variable_info swig_variables[] = {
{0}
};
static swig_command_info swig_commands[] = {
{"Schedule::DRMAAcc::drmaa_get_next_attr_name", _wrap_drmaa_get_next_attr_name},
{"Schedule::DRMAAcc::drmaa_get_next_attr_value", _wrap_drmaa_get_next_attr_value},
{"Schedule::DRMAAcc::drmaa_get_next_job_id", _wrap_drmaa_get_next_job_id},
{"Schedule::DRMAAcc::drmaa_release_attr_names", _wrap_drmaa_release_attr_names},
{"Schedule::DRMAAcc::drmaa_release_attr_values", _wrap_drmaa_release_attr_values},
{"Schedule::DRMAAcc::drmaa_release_job_ids", _wrap_drmaa_release_job_ids},
{"Schedule::DRMAAcc::drmaa_init", _wrap_drmaa_init},
{"Schedule::DRMAAcc::drmaa_exit", _wrap_drmaa_exit},
{"Schedule::DRMAAcc::drmaa_allocate_job_template", _wrap_drmaa_allocate_job_template},
{"Schedule::DRMAAcc::drmaa_delete_job_template", _wrap_drmaa_delete_job_template},
{"Schedule::DRMAAcc::drmaa_set_attribute", _wrap_drmaa_set_attribute},
{"Schedule::DRMAAcc::drmaa_get_attribute", _wrap_drmaa_get_attribute},
{"Schedule::DRMAAcc::drmaa_set_vector_attribute", _wrap_drmaa_set_vector_attribute},
{"Schedule::DRMAAcc::drmaa_get_vector_attribute", _wrap_drmaa_get_vector_attribute},
{"Schedule::DRMAAcc::drmaa_get_attribute_names", _wrap_drmaa_get_attribute_names},
{"Schedule::DRMAAcc::drmaa_get_vector_attribute_names", _wrap_drmaa_get_vector_attribute_names},
{"Schedule::DRMAAcc::drmaa_run_job", _wrap_drmaa_run_job},
{"Schedule::DRMAAcc::drmaa_run_bulk_jobs", _wrap_drmaa_run_bulk_jobs},
{"Schedule::DRMAAcc::drmaa_control", _wrap_drmaa_control},
{"Schedule::DRMAAcc::drmaa_synchronize", _wrap_drmaa_synchronize},
{"Schedule::DRMAAcc::drmaa_wait", _wrap_drmaa_wait},
{"Schedule::DRMAAcc::drmaa_wifexited", _wrap_drmaa_wifexited},
{"Schedule::DRMAAcc::drmaa_wexitstatus", _wrap_drmaa_wexitstatus},
{"Schedule::DRMAAcc::drmaa_wifsignaled", _wrap_drmaa_wifsignaled},
{"Schedule::DRMAAcc::drmaa_wtermsig", _wrap_drmaa_wtermsig},
{"Schedule::DRMAAcc::drmaa_wcoredump", _wrap_drmaa_wcoredump},
{"Schedule::DRMAAcc::drmaa_wifaborted", _wrap_drmaa_wifaborted},
{"Schedule::DRMAAcc::drmaa_job_ps", _wrap_drmaa_job_ps},
{"Schedule::DRMAAcc::drmaa_strerror", _wrap_drmaa_strerror},
{"Schedule::DRMAAcc::drmaa_get_contact", _wrap_drmaa_get_contact},
{"Schedule::DRMAAcc::drmaa_version", _wrap_drmaa_version},
{"Schedule::DRMAAcc::drmaa_get_DRM_system", _wrap_drmaa_get_DRM_system},
{"Schedule::DRMAAcc::drmaa_get_DRMAA_implementation", _wrap_drmaa_get_DRMAA_implementation},
{0,0}
};

#ifdef __cplusplus
extern "C"
#endif

XS(SWIG_init) {
    dXSARGS;
    int i;
    static int _init = 0;
    if (!_init) {
        for (i = 0; swig_types_initial[i]; i++) {
            swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
        }	
        _init = 1;
    }
    
    /* Install commands */
    for (i = 0; swig_commands[i].name; i++) {
        newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
    }
    
    /* Install variables */
    for (i = 0; swig_variables[i].name; i++) {
        SV *sv;
        sv = perl_get_sv((char*) swig_variables[i].name, TRUE | 0x2);
        if (swig_variables[i].type) {
            SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
        } else {
            sv_setiv(sv,(IV) 0);
        }
        swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
    }
    
    /* Install constant */
    for (i = 0; swig_constants[i].type; i++) {
        SV *sv;
        sv = perl_get_sv((char*)swig_constants[i].name, TRUE | 0x2);
        switch(swig_constants[i].type) {
            case SWIG_INT:
            sv_setiv(sv, (IV) swig_constants[i].lvalue);
            break;
            case SWIG_FLOAT:
            sv_setnv(sv, (double) swig_constants[i].dvalue);
            break;
            case SWIG_STRING:
            sv_setpv(sv, (char *) swig_constants[i].pvalue);
            break;
            case SWIG_POINTER:
            SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
            break;
            case SWIG_BINARY:
            SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
            break;
            default:
            break;
        }
        SvREADONLY_on(sv);
    }
    
    ST(0) = &PL_sv_yes;
    XSRETURN(1);
}

