Changeset 268


Ignore:
Timestamp:
11/24/10 12:53:38 (13 years ago)
Author:
bas
Message:

Mew generated files to support python 3.0

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGES

    r266 r268  
     1=========== 4.X.X
     2 * New generated files for pbs_wrap.c and pbs.py to support python 3.X versions
     3
    14=========== 4.3.0
    25 * new_rack_pbsmon.py: For backward compatibility added -a/--all option.
  • trunk/src/pbs_2.1.py

    r253 r268  
    11# This file was automatically generated by SWIG (http://www.swig.org).
    2 # Version 1.3.36
     2# Version 1.3.40
    33#
    4 # Don't modify this file, modify the SWIG interface instead.
     4# Do not make changes to this file unless you know what you are doing--modify
     5# the SWIG interface file instead.
    56# This file is compatible with both classic and new-style classes.
    67
    7 import _pbs
    8 import new
    9 new_instancemethod = new.instancemethod
     8from sys import version_info
     9if version_info >= (2,6,0):
     10    def swig_import_helper():
     11        from os.path import dirname
     12        import imp
     13        fp = None
     14        try:
     15            fp, pathname, description = imp.find_module('_pbs', [dirname(__file__)])
     16        except ImportError:
     17            import _pbs
     18            return _pbs
     19        if fp is not None:
     20            try:
     21                _mod = imp.load_module('_pbs', fp, pathname, description)
     22            finally:
     23                fp.close()
     24            return _mod
     25    _pbs = swig_import_helper()
     26    del swig_import_helper
     27else:
     28    import _pbs
     29del version_info
    1030try:
    1131    _swig_property = property
     
    1535    if (name == "thisown"): return self.this.own(value)
    1636    if (name == "this"):
    17         if type(value).__name__ == 'PySwigObject':
     37        if type(value).__name__ == 'SwigPyObject':
    1838            self.__dict__[name] = value
    1939            return
     
    3252    method = class_type.__swig_getmethods__.get(name,None)
    3353    if method: return method(self)
    34     raise AttributeError,name
     54    raise AttributeError(name)
    3555
    3656def _swig_repr(self):
     
    3959    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
    4060
    41 import types
    4261try:
    43     _object = types.ObjectType
     62    _object = object
    4463    _newclass = 1
    4564except AttributeError:
    4665    class _object : pass
    4766    _newclass = 0
    48 del types
    49 
    50 
     67
     68
     69
     70def new_attrl(*args):
     71  return _pbs.new_attrl(*args)
    5172new_attrl = _pbs.new_attrl
     73
     74def new_attropl(*args):
     75  return _pbs.new_attropl(*args)
    5276new_attropl = _pbs.new_attropl
     77
     78def new_batch_status():
     79  return _pbs.new_batch_status()
    5380new_batch_status = _pbs.new_batch_status
     81
     82def get_error():
     83  return _pbs.get_error()
    5484get_error = _pbs.get_error
    5585ATTR_a = _pbs.ATTR_a
     
    327357    __swig_getmethods__ = {}
    328358    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
    329     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     359    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    330360    __repr__ = _swig_repr
    331361    __swig_setmethods__["next"] = _pbs.attrl_next_set
     
    344374    __swig_getmethods__["op"] = _pbs.attrl_op_get
    345375    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
    346     def __str__(*args): return _pbs.attrl___str__(*args)
     376    def __str__(self): return _pbs.attrl___str__(self)
    347377    __swig_destroy__ = _pbs.delete_attrl
    348378    __del__ = lambda self : None;
     
    355385    __swig_getmethods__ = {}
    356386    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
    357     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     387    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    358388    __repr__ = _swig_repr
    359389    __swig_setmethods__["next"] = _pbs.attropl_next_set
     
    372402    __swig_getmethods__["op"] = _pbs.attropl_op_get
    373403    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
    374     def __str__(*args): return _pbs.attropl___str__(*args)
     404    def __str__(self): return _pbs.attropl___str__(self)
    375405    __swig_destroy__ = _pbs.delete_attropl
    376406    __del__ = lambda self : None;
     
    383413    __swig_getmethods__ = {}
    384414    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
    385     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     415    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    386416    __repr__ = _swig_repr
    387417    __swig_setmethods__["next"] = _pbs.batch_status_next_set
     
    400430batch_status_swigregister(batch_status)
    401431
     432
     433def avail(*args):
     434  return _pbs.avail(*args)
    402435avail = _pbs.avail
     436
     437def pbs_asyrunjob(*args):
     438  return _pbs.pbs_asyrunjob(*args)
    403439pbs_asyrunjob = _pbs.pbs_asyrunjob
     440
     441def pbs_alterjob(*args):
     442  return _pbs.pbs_alterjob(*args)
    404443pbs_alterjob = _pbs.pbs_alterjob
     444
     445def pbs_connect(*args):
     446  return _pbs.pbs_connect(*args)
    405447pbs_connect = _pbs.pbs_connect
     448
     449def pbs_query_max_connections():
     450  return _pbs.pbs_query_max_connections()
    406451pbs_query_max_connections = _pbs.pbs_query_max_connections
     452
     453def pbs_default():
     454  return _pbs.pbs_default()
    407455pbs_default = _pbs.pbs_default
     456
     457def pbs_deljob(*args):
     458  return _pbs.pbs_deljob(*args)
    408459pbs_deljob = _pbs.pbs_deljob
     460
     461def pbs_disconnect(*args):
     462  return _pbs.pbs_disconnect(*args)
    409463pbs_disconnect = _pbs.pbs_disconnect
     464
     465def pbs_geterrmsg(*args):
     466  return _pbs.pbs_geterrmsg(*args)
    410467pbs_geterrmsg = _pbs.pbs_geterrmsg
     468
     469def pbs_holdjob(*args):
     470  return _pbs.pbs_holdjob(*args)
    411471pbs_holdjob = _pbs.pbs_holdjob
     472
     473def pbs_locjob(*args):
     474  return _pbs.pbs_locjob(*args)
    412475pbs_locjob = _pbs.pbs_locjob
     476
     477def pbs_manager(*args):
     478  return _pbs.pbs_manager(*args)
    413479pbs_manager = _pbs.pbs_manager
     480
     481def pbs_movejob(*args):
     482  return _pbs.pbs_movejob(*args)
    414483pbs_movejob = _pbs.pbs_movejob
     484
     485def pbs_msgjob(*args):
     486  return _pbs.pbs_msgjob(*args)
    415487pbs_msgjob = _pbs.pbs_msgjob
     488
     489def pbs_orderjob(*args):
     490  return _pbs.pbs_orderjob(*args)
    416491pbs_orderjob = _pbs.pbs_orderjob
     492
     493def pbs_rescquery(*args):
     494  return _pbs.pbs_rescquery(*args)
    417495pbs_rescquery = _pbs.pbs_rescquery
     496
     497def pbs_rescreserve(*args):
     498  return _pbs.pbs_rescreserve(*args)
    418499pbs_rescreserve = _pbs.pbs_rescreserve
     500
     501def pbs_rescrelease(*args):
     502  return _pbs.pbs_rescrelease(*args)
    419503pbs_rescrelease = _pbs.pbs_rescrelease
     504
     505def pbs_rerunjob(*args):
     506  return _pbs.pbs_rerunjob(*args)
    420507pbs_rerunjob = _pbs.pbs_rerunjob
     508
     509def pbs_rlsjob(*args):
     510  return _pbs.pbs_rlsjob(*args)
    421511pbs_rlsjob = _pbs.pbs_rlsjob
     512
     513def pbs_runjob(*args):
     514  return _pbs.pbs_runjob(*args)
    422515pbs_runjob = _pbs.pbs_runjob
     516
     517def pbs_selectjob(*args):
     518  return _pbs.pbs_selectjob(*args)
    423519pbs_selectjob = _pbs.pbs_selectjob
     520
     521def pbs_sigjob(*args):
     522  return _pbs.pbs_sigjob(*args)
    424523pbs_sigjob = _pbs.pbs_sigjob
     524
     525def pbs_statfree(*args):
     526  return _pbs.pbs_statfree(*args)
    425527pbs_statfree = _pbs.pbs_statfree
     528
     529def pbs_statjob(*args):
     530  return _pbs.pbs_statjob(*args)
    426531pbs_statjob = _pbs.pbs_statjob
     532
     533def pbs_selstat(*args):
     534  return _pbs.pbs_selstat(*args)
    427535pbs_selstat = _pbs.pbs_selstat
     536
     537def pbs_statque(*args):
     538  return _pbs.pbs_statque(*args)
    428539pbs_statque = _pbs.pbs_statque
     540
     541def pbs_statserver(*args):
     542  return _pbs.pbs_statserver(*args)
    429543pbs_statserver = _pbs.pbs_statserver
     544
     545def pbs_statnode(*args):
     546  return _pbs.pbs_statnode(*args)
    430547pbs_statnode = _pbs.pbs_statnode
     548
     549def pbs_submit(*args):
     550  return _pbs.pbs_submit(*args)
    431551pbs_submit = _pbs.pbs_submit
     552
     553def pbs_terminate(*args):
     554  return _pbs.pbs_terminate(*args)
    432555pbs_terminate = _pbs.pbs_terminate
     556
     557def totpool(*args):
     558  return _pbs.totpool(*args)
    433559totpool = _pbs.totpool
     560
     561def usepool(*args):
     562  return _pbs.usepool(*args)
    434563usepool = _pbs.usepool
     564
     565def openrm(*args):
     566  return _pbs.openrm(*args)
    435567openrm = _pbs.openrm
     568
     569def closerm(*args):
     570  return _pbs.closerm(*args)
    436571closerm = _pbs.closerm
     572
     573def downrm(*args):
     574  return _pbs.downrm(*args)
    437575downrm = _pbs.downrm
     576
     577def configrm(*args):
     578  return _pbs.configrm(*args)
    438579configrm = _pbs.configrm
     580
     581def addreq(*args):
     582  return _pbs.addreq(*args)
    439583addreq = _pbs.addreq
     584
     585def allreq(*args):
     586  return _pbs.allreq(*args)
    440587allreq = _pbs.allreq
     588
     589def getreq(*args):
     590  return _pbs.getreq(*args)
    441591getreq = _pbs.getreq
     592
     593def flushreq():
     594  return _pbs.flushreq()
    442595flushreq = _pbs.flushreq
     596
     597def activereq():
     598  return _pbs.activereq()
    443599activereq = _pbs.activereq
     600
     601def fullresp(*args):
     602  return _pbs.fullresp(*args)
    444603fullresp = _pbs.fullresp
    445604LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
     
    452611LOG_INFO = _pbs.LOG_INFO
    453612LOG_DEBUG = _pbs.LOG_DEBUG
     613
     614def log_close(*args):
     615  return _pbs.log_close(*args)
    454616log_close = _pbs.log_close
     617
     618def log_err(*args):
     619  return _pbs.log_err(*args)
    455620log_err = _pbs.log_err
     621
     622def log_event(*args):
     623  return _pbs.log_event(*args)
    456624log_event = _pbs.log_event
     625
     626def log_open(*args):
     627  return _pbs.log_open(*args)
    457628log_open = _pbs.log_open
     629
     630def log_record(*args):
     631  return _pbs.log_record(*args)
    458632log_record = _pbs.log_record
     633
     634def log_roll(*args):
     635  return _pbs.log_roll(*args)
    459636log_roll = _pbs.log_roll
     637
     638def log_size():
     639  return _pbs.log_size()
    460640log_size = _pbs.log_size
     641
     642def chk_file_sec(*args):
     643  return _pbs.chk_file_sec(*args)
    461644chk_file_sec = _pbs.chk_file_sec
     645
     646def setup_env(*args):
     647  return _pbs.setup_env(*args)
    462648setup_env = _pbs.setup_env
    463649PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
     
    618804
    619805version_info = ( 4, 2, 0 )
    620 version = 'SARA pbs_python version 4.2.0'
     806version = 'SARA pbs_python version 4.1.0'
    621807
    622808# A useful dict with error codes to text
  • trunk/src/pbs_2.4.py

    r253 r268  
    11# This file was automatically generated by SWIG (http://www.swig.org).
    2 # Version 1.3.36
     2# Version 1.3.40
    33#
    4 # Don't modify this file, modify the SWIG interface instead.
     4# Do not make changes to this file unless you know what you are doing--modify
     5# the SWIG interface file instead.
    56# This file is compatible with both classic and new-style classes.
    67
    7 import _pbs
    8 import new
    9 new_instancemethod = new.instancemethod
     8from sys import version_info
     9if version_info >= (2,6,0):
     10    def swig_import_helper():
     11        from os.path import dirname
     12        import imp
     13        fp = None
     14        try:
     15            fp, pathname, description = imp.find_module('_pbs', [dirname(__file__)])
     16        except ImportError:
     17            import _pbs
     18            return _pbs
     19        if fp is not None:
     20            try:
     21                _mod = imp.load_module('_pbs', fp, pathname, description)
     22            finally:
     23                fp.close()
     24            return _mod
     25    _pbs = swig_import_helper()
     26    del swig_import_helper
     27else:
     28    import _pbs
     29del version_info
    1030try:
    1131    _swig_property = property
     
    1535    if (name == "thisown"): return self.this.own(value)
    1636    if (name == "this"):
    17         if type(value).__name__ == 'PySwigObject':
     37        if type(value).__name__ == 'SwigPyObject':
    1838            self.__dict__[name] = value
    1939            return
     
    3252    method = class_type.__swig_getmethods__.get(name,None)
    3353    if method: return method(self)
    34     raise AttributeError,name
     54    raise AttributeError(name)
    3555
    3656def _swig_repr(self):
     
    3959    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
    4060
    41 import types
    4261try:
    43     _object = types.ObjectType
     62    _object = object
    4463    _newclass = 1
    4564except AttributeError:
    4665    class _object : pass
    4766    _newclass = 0
    48 del types
    49 
    50 
     67
     68
     69
     70def new_attrl(*args):
     71  return _pbs.new_attrl(*args)
    5172new_attrl = _pbs.new_attrl
     73
     74def new_attropl(*args):
     75  return _pbs.new_attropl(*args)
    5276new_attropl = _pbs.new_attropl
     77
     78def new_batch_status():
     79  return _pbs.new_batch_status()
    5380new_batch_status = _pbs.new_batch_status
     81
     82def get_error():
     83  return _pbs.get_error()
    5484get_error = _pbs.get_error
    5585ATTR_a = _pbs.ATTR_a
     
    327357    __swig_getmethods__ = {}
    328358    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
    329     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     359    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    330360    __repr__ = _swig_repr
    331361    __swig_setmethods__["next"] = _pbs.attrl_next_set
     
    344374    __swig_getmethods__["op"] = _pbs.attrl_op_get
    345375    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
    346     def __str__(*args): return _pbs.attrl___str__(*args)
     376    def __str__(self): return _pbs.attrl___str__(self)
    347377    __swig_destroy__ = _pbs.delete_attrl
    348378    __del__ = lambda self : None;
     
    355385    __swig_getmethods__ = {}
    356386    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
    357     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     387    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    358388    __repr__ = _swig_repr
    359389    __swig_setmethods__["next"] = _pbs.attropl_next_set
     
    372402    __swig_getmethods__["op"] = _pbs.attropl_op_get
    373403    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
    374     def __str__(*args): return _pbs.attropl___str__(*args)
     404    def __str__(self): return _pbs.attropl___str__(self)
    375405    __swig_destroy__ = _pbs.delete_attropl
    376406    __del__ = lambda self : None;
     
    383413    __swig_getmethods__ = {}
    384414    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
    385     def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
     415    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    386416    __repr__ = _swig_repr
    387417    __swig_setmethods__["next"] = _pbs.batch_status_next_set
     
    400430batch_status_swigregister(batch_status)
    401431
     432
     433def avail(*args):
     434  return _pbs.avail(*args)
    402435avail = _pbs.avail
     436
     437def pbs_asyrunjob(*args):
     438  return _pbs.pbs_asyrunjob(*args)
    403439pbs_asyrunjob = _pbs.pbs_asyrunjob
     440
     441def pbs_alterjob(*args):
     442  return _pbs.pbs_alterjob(*args)
    404443pbs_alterjob = _pbs.pbs_alterjob
     444
     445def pbs_connect(*args):
     446  return _pbs.pbs_connect(*args)
    405447pbs_connect = _pbs.pbs_connect
     448
     449def pbs_query_max_connections():
     450  return _pbs.pbs_query_max_connections()
    406451pbs_query_max_connections = _pbs.pbs_query_max_connections
     452
     453def pbs_default():
     454  return _pbs.pbs_default()
    407455pbs_default = _pbs.pbs_default
     456
     457def pbs_deljob(*args):
     458  return _pbs.pbs_deljob(*args)
    408459pbs_deljob = _pbs.pbs_deljob
     460
     461def pbs_disconnect(*args):
     462  return _pbs.pbs_disconnect(*args)
    409463pbs_disconnect = _pbs.pbs_disconnect
     464
     465def pbs_geterrmsg(*args):
     466  return _pbs.pbs_geterrmsg(*args)
    410467pbs_geterrmsg = _pbs.pbs_geterrmsg
     468
     469def pbs_holdjob(*args):
     470  return _pbs.pbs_holdjob(*args)
    411471pbs_holdjob = _pbs.pbs_holdjob
     472
     473def pbs_locjob(*args):
     474  return _pbs.pbs_locjob(*args)
    412475pbs_locjob = _pbs.pbs_locjob
     476
     477def pbs_manager(*args):
     478  return _pbs.pbs_manager(*args)
    413479pbs_manager = _pbs.pbs_manager
     480
     481def pbs_movejob(*args):
     482  return _pbs.pbs_movejob(*args)
    414483pbs_movejob = _pbs.pbs_movejob
     484
     485def pbs_msgjob(*args):
     486  return _pbs.pbs_msgjob(*args)
    415487pbs_msgjob = _pbs.pbs_msgjob
     488
     489def pbs_orderjob(*args):
     490  return _pbs.pbs_orderjob(*args)
    416491pbs_orderjob = _pbs.pbs_orderjob
     492
     493def pbs_rescquery(*args):
     494  return _pbs.pbs_rescquery(*args)
    417495pbs_rescquery = _pbs.pbs_rescquery
     496
     497def pbs_rescreserve(*args):
     498  return _pbs.pbs_rescreserve(*args)
    418499pbs_rescreserve = _pbs.pbs_rescreserve
     500
     501def pbs_rescrelease(*args):
     502  return _pbs.pbs_rescrelease(*args)
    419503pbs_rescrelease = _pbs.pbs_rescrelease
     504
     505def pbs_rerunjob(*args):
     506  return _pbs.pbs_rerunjob(*args)
    420507pbs_rerunjob = _pbs.pbs_rerunjob
     508
     509def pbs_rlsjob(*args):
     510  return _pbs.pbs_rlsjob(*args)
    421511pbs_rlsjob = _pbs.pbs_rlsjob
     512
     513def pbs_runjob(*args):
     514  return _pbs.pbs_runjob(*args)
    422515pbs_runjob = _pbs.pbs_runjob
     516
     517def pbs_selectjob(*args):
     518  return _pbs.pbs_selectjob(*args)
    423519pbs_selectjob = _pbs.pbs_selectjob
     520
     521def pbs_sigjob(*args):
     522  return _pbs.pbs_sigjob(*args)
    424523pbs_sigjob = _pbs.pbs_sigjob
     524
     525def pbs_statfree(*args):
     526  return _pbs.pbs_statfree(*args)
    425527pbs_statfree = _pbs.pbs_statfree
     528
     529def pbs_statjob(*args):
     530  return _pbs.pbs_statjob(*args)
    426531pbs_statjob = _pbs.pbs_statjob
     532
     533def pbs_selstat(*args):
     534  return _pbs.pbs_selstat(*args)
    427535pbs_selstat = _pbs.pbs_selstat
     536
     537def pbs_statque(*args):
     538  return _pbs.pbs_statque(*args)
    428539pbs_statque = _pbs.pbs_statque
     540
     541def pbs_statserver(*args):
     542  return _pbs.pbs_statserver(*args)
    429543pbs_statserver = _pbs.pbs_statserver
     544
     545def pbs_statnode(*args):
     546  return _pbs.pbs_statnode(*args)
    430547pbs_statnode = _pbs.pbs_statnode
     548
     549def pbs_submit(*args):
     550  return _pbs.pbs_submit(*args)
    431551pbs_submit = _pbs.pbs_submit
     552
     553def pbs_terminate(*args):
     554  return _pbs.pbs_terminate(*args)
    432555pbs_terminate = _pbs.pbs_terminate
     556
     557def totpool(*args):
     558  return _pbs.totpool(*args)
    433559totpool = _pbs.totpool
     560
     561def usepool(*args):
     562  return _pbs.usepool(*args)
    434563usepool = _pbs.usepool
     564
     565def pbs_fbserver():
     566  return _pbs.pbs_fbserver()
    435567pbs_fbserver = _pbs.pbs_fbserver
     568
     569def pbs_get_server_list():
     570  return _pbs.pbs_get_server_list()
    436571pbs_get_server_list = _pbs.pbs_get_server_list
     572
     573def pbs_sigjobasync(*args):
     574  return _pbs.pbs_sigjobasync(*args)
    437575pbs_sigjobasync = _pbs.pbs_sigjobasync
     576
     577def pbs_alterjob_async(*args):
     578  return _pbs.pbs_alterjob_async(*args)
    438579pbs_alterjob_async = _pbs.pbs_alterjob_async
     580
     581def pbs_checkpointjob(*args):
     582  return _pbs.pbs_checkpointjob(*args)
    439583pbs_checkpointjob = _pbs.pbs_checkpointjob
     584
     585def openrm(*args):
     586  return _pbs.openrm(*args)
    440587openrm = _pbs.openrm
     588
     589def closerm(*args):
     590  return _pbs.closerm(*args)
    441591closerm = _pbs.closerm
     592
     593def downrm(*args):
     594  return _pbs.downrm(*args)
    442595downrm = _pbs.downrm
     596
     597def configrm(*args):
     598  return _pbs.configrm(*args)
    443599configrm = _pbs.configrm
     600
     601def addreq(*args):
     602  return _pbs.addreq(*args)
    444603addreq = _pbs.addreq
     604
     605def allreq(*args):
     606  return _pbs.allreq(*args)
    445607allreq = _pbs.allreq
     608
     609def getreq(*args):
     610  return _pbs.getreq(*args)
    446611getreq = _pbs.getreq
     612
     613def flushreq():
     614  return _pbs.flushreq()
    447615flushreq = _pbs.flushreq
     616
     617def activereq():
     618  return _pbs.activereq()
    448619activereq = _pbs.activereq
     620
     621def fullresp(*args):
     622  return _pbs.fullresp(*args)
    449623fullresp = _pbs.fullresp
    450624LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
     
    457631LOG_INFO = _pbs.LOG_INFO
    458632LOG_DEBUG = _pbs.LOG_DEBUG
     633
     634def log_close(*args):
     635  return _pbs.log_close(*args)
    459636log_close = _pbs.log_close
     637
     638def log_err(*args):
     639  return _pbs.log_err(*args)
    460640log_err = _pbs.log_err
     641
     642def log_event(*args):
     643  return _pbs.log_event(*args)
    461644log_event = _pbs.log_event
     645
     646def log_open(*args):
     647  return _pbs.log_open(*args)
    462648log_open = _pbs.log_open
     649
     650def log_record(*args):
     651  return _pbs.log_record(*args)
    463652log_record = _pbs.log_record
     653
     654def log_roll(*args):
     655  return _pbs.log_roll(*args)
    464656log_roll = _pbs.log_roll
     657
     658def log_size():
     659  return _pbs.log_size()
    465660log_size = _pbs.log_size
     661
     662def chk_file_sec(*args):
     663  return _pbs.chk_file_sec(*args)
    466664chk_file_sec = _pbs.chk_file_sec
     665
     666def setup_env(*args):
     667  return _pbs.setup_env(*args)
    467668setup_env = _pbs.setup_env
     669
     670def log_ext(*args):
     671  return _pbs.log_ext(*args)
    468672log_ext = _pbs.log_ext
     673
     674def log_init(*args):
     675  return _pbs.log_init(*args)
    469676log_init = _pbs.log_init
     677
     678def log_remove_old(*args):
     679  return _pbs.log_remove_old(*args)
    470680log_remove_old = _pbs.log_remove_old
    471681PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
     
    626836
    627837version_info = ( 4, 2, 0 )
    628 version = 'SARA pbs_python version 4.2.0'
     838version = 'SARA pbs_python version 4.1.0'
    629839
    630840# A useful dict with error codes to text
  • trunk/src/pbs_wrap_2.1.c

    r215 r268  
    11/* ----------------------------------------------------------------------------
    22 * This file was automatically generated by SWIG (http://www.swig.org).
    3  * Version 1.3.36
     3 * Version 1.3.40
    44 *
    55 * This file is not intended to be easily readable and contains a number of
     
    1111#define SWIGPYTHON
    1212#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
     13
    1314/* -----------------------------------------------------------------------------
    1415 *  This section contains generic SWIG labels for method/variable
     
    127128 * swigrun.swg
    128129 *
    129  * This file contains generic CAPI SWIG runtime support for pointer
     130 * This file contains generic C API SWIG runtime support for pointer
    130131 * type checking.
    131132 * ----------------------------------------------------------------------------- */
     
    146147/*
    147148  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
    148   creating a static or dynamic library from the swig runtime code.
    149   In 99.9% of the cases, swig just needs to declare them as 'static'.
    150  
    151   But only do this if is strictly necessary, ie, if you have problems
    152   with your compiler or so.
     149  creating a static or dynamic library from the SWIG runtime code.
     150  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
     151 
     152  But only do this if strictly necessary, ie, if you have problems
     153  with your compiler or suchlike.
    153154*/
    154155
     
    177178   Flags/methods for returning states.
    178179   
    179    The swig conversion methods, as ConvertPtr, return and integer
     180   The SWIG conversion methods, as ConvertPtr, return and integer
    180181   that tells if the conversion was successful or not. And if not,
    181182   an error code can be returned (see swigerrors.swg for the codes).
     
    184185   states.
    185186   
    186    In old swig versions, you usually write code as:
     187   In old versions of SWIG, code such as the following was usually written:
    187188
    188189     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
     
    192193     }
    193194
    194    Now you can be more explicit as:
     195   Now you can be more explicit:
    195196
    196197    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     
    201202    }
    202203
    203    that seems to be the same, but now you can also do
     204   which is the same really, but now you can also do
    204205
    205206    Type *ptr;
     
    219220   I.e., now SWIG_ConvertPtr can return new objects and you can
    220221   identify the case and take care of the deallocation. Of course that
    221    requires also to SWIG_ConvertPtr to return new result values, as
     222   also requires SWIG_ConvertPtr to return new result values, such as
    222223
    223224      int SWIG_ConvertPtr(obj, ptr,...) {         
     
    237238   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
    238239   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
    239    swig errors code.
     240   SWIG errors code.
    240241
    241242   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
     
    251252
    252253   just use the SWIG_AddCast()/SWIG_CheckState()
    253 
    254 
    255  */
     254*/
     255
    256256#define SWIG_OK                    (0)
    257257#define SWIG_ERROR                 (-1)
     
    278278#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
    279279
    280 
    281280/* Cast-Rank Mode */
    282281#if defined(SWIG_CASTRANK_MODE)
     
    301300
    302301
    303 
    304 
    305302#include <string.h>
    306303
     
    399396
    400397
    401 /* think of this as a c++ template<> or a scheme macro */
    402 #define SWIG_TypeCheck_Template(comparison, ty)         \
    403   if (ty) {                                             \
    404     swig_cast_info *iter = ty->cast;                    \
    405     while (iter) {                                      \
    406       if (comparison) {                                 \
    407         if (iter == ty->cast) return iter;              \
    408         /* Move iter to the top of the linked list */   \
    409         iter->prev->next = iter->next;                  \
    410         if (iter->next)                                 \
    411           iter->next->prev = iter->prev;                \
    412         iter->next = ty->cast;                          \
    413         iter->prev = 0;                                 \
    414         if (ty->cast) ty->cast->prev = iter;            \
    415         ty->cast = iter;                                \
    416         return iter;                                    \
    417       }                                                 \
    418       iter = iter->next;                                \
    419     }                                                   \
    420   }                                                     \
    421   return 0
    422 
    423398/*
    424399  Check the typename
     
    426401SWIGRUNTIME swig_cast_info *
    427402SWIG_TypeCheck(const char *c, swig_type_info *ty) {
    428   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
    429 }
    430 
    431 /* Same as previous function, except strcmp is replaced with a pointer comparison */
     403  if (ty) {
     404    swig_cast_info *iter = ty->cast;
     405    while (iter) {
     406      if (strcmp(iter->type->name, c) == 0) {
     407        if (iter == ty->cast)
     408          return iter;
     409        /* Move iter to the top of the linked list */
     410        iter->prev->next = iter->next;
     411        if (iter->next)
     412          iter->next->prev = iter->prev;
     413        iter->next = ty->cast;
     414        iter->prev = 0;
     415        if (ty->cast) ty->cast->prev = iter;
     416        ty->cast = iter;
     417        return iter;
     418      }
     419      iter = iter->next;
     420    }
     421  }
     422  return 0;
     423}
     424
     425/*
     426  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
     427*/
    432428SWIGRUNTIME swig_cast_info *
    433 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
    434   SWIG_TypeCheck_Template(iter->type == from, into);
     429SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
     430  if (ty) {
     431    swig_cast_info *iter = ty->cast;
     432    while (iter) {
     433      if (iter->type == from) {
     434        if (iter == ty->cast)
     435          return iter;
     436        /* Move iter to the top of the linked list */
     437        iter->prev->next = iter->next;
     438        if (iter->next)
     439          iter->next->prev = iter->prev;
     440        iter->next = ty->cast;
     441        iter->prev = 0;
     442        if (ty->cast) ty->cast->prev = iter;
     443        ty->cast = iter;
     444        return iter;
     445      }
     446      iter = iter->next;
     447    }
     448  }
     449  return 0;
    435450}
    436451
     
    711726
    712727
     728/* Compatibility macros for Python 3 */
     729#if PY_VERSION_HEX >= 0x03000000
     730
     731#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
     732#define PyInt_Check(x) PyLong_Check(x)
     733#define PyInt_AsLong(x) PyLong_AsLong(x)
     734#define PyInt_FromLong(x) PyLong_FromLong(x)
     735#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
     736
     737#endif
     738
     739#ifndef Py_TYPE
     740#  define Py_TYPE(op) ((op)->ob_type)
     741#endif
     742
     743/* SWIG APIs for compatibility of both Python 2 & 3 */
     744
     745#if PY_VERSION_HEX >= 0x03000000
     746#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
     747#else
     748#  define SWIG_Python_str_FromFormat PyString_FromFormat
     749#endif
     750
     751
     752/* Warning: This function will allocate a new string in Python 3,
     753 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
     754 */
     755SWIGINTERN char*
     756SWIG_Python_str_AsChar(PyObject *str)
     757{
     758#if PY_VERSION_HEX >= 0x03000000
     759  char *cstr;
     760  char *newstr;
     761  Py_ssize_t len;
     762  str = PyUnicode_AsUTF8String(str);
     763  PyBytes_AsStringAndSize(str, &cstr, &len);
     764  newstr = (char *) malloc(len+1);
     765  memcpy(newstr, cstr, len+1);
     766  Py_XDECREF(str);
     767  return newstr;
     768#else
     769  return PyString_AsString(str);
     770#endif
     771}
     772
     773#if PY_VERSION_HEX >= 0x03000000
     774#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
     775#else
     776#  define SWIG_Python_str_DelForPy3(x)
     777#endif
     778
     779
     780SWIGINTERN PyObject*
     781SWIG_Python_str_FromChar(const char *c)
     782{
     783#if PY_VERSION_HEX >= 0x03000000
     784  return PyUnicode_FromString(c);
     785#else
     786  return PyString_FromString(c);
     787#endif
     788}
    713789
    714790/* Add PyOS_snprintf for old Pythons */
     
    757833# endif
    758834#endif
     835
    759836/* Py_NotImplemented is defined in 2.1 and up. */
    760837#if PY_VERSION_HEX < 0x02010000
     
    764841#endif
    765842
    766 
    767843/* A crude PyString_AsStringAndSize implementation for old Pythons */
    768844#if PY_VERSION_HEX < 0x02010000
     
    778854# endif
    779855#endif
    780 
    781856
    782857/* PyBool_FromLong for old Pythons */
     
    857932  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
    858933  if (value) {
     934    char *tmp;
    859935    PyObject *old_str = PyObject_Str(value);
    860936    PyErr_Clear();
    861937    Py_XINCREF(type);
    862     PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
     938
     939    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
     940    SWIG_Python_str_DelForPy3(tmp);
    863941    Py_DECREF(old_str);
    864942    Py_DECREF(value);
     
    867945  }
    868946}
    869 
    870 
    871947
    872948#if defined(SWIG_PYTHON_NO_THREADS)
     
    9661042} swig_const_info;
    9671043
     1044
     1045/* -----------------------------------------------------------------------------
     1046 * Wrapper of PyInstanceMethod_New() used in Python 3
     1047 * It is exported to the generated module, used for -fastproxy
     1048 * ----------------------------------------------------------------------------- */
     1049SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
     1050{
     1051#if PY_VERSION_HEX >= 0x03000000
     1052  return PyInstanceMethod_New(func);
     1053#else
     1054  return NULL;
     1055#endif
     1056}
     1057
    9681058#ifdef __cplusplus
    9691059#if 0
     
    10181108#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
    10191109#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
    1020 #define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
     1110#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
    10211111
    10221112#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                           
     
    12141304}
    12151305
    1216 /* PySwigClientData */
     1306/* SwigPyClientData */
    12171307
    12181308typedef struct {
     
    12231313  int delargs;
    12241314  int implicitconv;
    1225 } PySwigClientData;
     1315} SwigPyClientData;
    12261316
    12271317SWIGRUNTIMEINLINE int
    12281318SWIG_Python_CheckImplicit(swig_type_info *ty)
    12291319{
    1230   PySwigClientData *data = (PySwigClientData *)ty->clientdata;
     1320  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
    12311321  return data ? data->implicitconv : 0;
    12321322}
     
    12341324SWIGRUNTIMEINLINE PyObject *
    12351325SWIG_Python_ExceptionType(swig_type_info *desc) {
    1236   PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
     1326  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
    12371327  PyObject *klass = data ? data->klass : 0;
    12381328  return (klass ? klass : PyExc_RuntimeError);
     
    12401330
    12411331
    1242 SWIGRUNTIME PySwigClientData *
    1243 PySwigClientData_New(PyObject* obj)
     1332SWIGRUNTIME SwigPyClientData *
     1333SwigPyClientData_New(PyObject* obj)
    12441334{
    12451335  if (!obj) {
    12461336    return 0;
    12471337  } else {
    1248     PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
     1338    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    12491339    /* the klass element */
    12501340    data->klass = obj;
     
    12941384
    12951385SWIGRUNTIME void
    1296 PySwigClientData_Del(PySwigClientData* data)
     1386SwigPyClientData_Del(SwigPyClientData* data)
    12971387{
    12981388  Py_XDECREF(data->newraw);
     
    13011391}
    13021392
    1303 /* =============== PySwigObject =====================*/
     1393/* =============== SwigPyObject =====================*/
    13041394
    13051395typedef struct {
     
    13091399  int own;
    13101400  PyObject *next;
    1311 } PySwigObject;
     1401} SwigPyObject;
    13121402
    13131403SWIGRUNTIME PyObject *
    1314 PySwigObject_long(PySwigObject *v)
     1404SwigPyObject_long(SwigPyObject *v)
    13151405{
    13161406  return PyLong_FromVoidPtr(v->ptr);
     
    13181408
    13191409SWIGRUNTIME PyObject *
    1320 PySwigObject_format(const char* fmt, PySwigObject *v)
     1410SwigPyObject_format(const char* fmt, SwigPyObject *v)
    13211411{
    13221412  PyObject *res = NULL;
    13231413  PyObject *args = PyTuple_New(1);
    13241414  if (args) {
    1325     if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
    1326       PyObject *ofmt = PyString_FromString(fmt);
     1415    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
     1416      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
    13271417      if (ofmt) {
     1418#if PY_VERSION_HEX >= 0x03000000
     1419        res = PyUnicode_Format(ofmt,args);
     1420#else
    13281421        res = PyString_Format(ofmt,args);
     1422#endif
    13291423        Py_DECREF(ofmt);
    13301424      }
     
    13361430
    13371431SWIGRUNTIME PyObject *
    1338 PySwigObject_oct(PySwigObject *v)
     1432SwigPyObject_oct(SwigPyObject *v)
    13391433{
    1340   return PySwigObject_format("%o",v);
     1434  return SwigPyObject_format("%o",v);
    13411435}
    13421436
    13431437SWIGRUNTIME PyObject *
    1344 PySwigObject_hex(PySwigObject *v)
     1438SwigPyObject_hex(SwigPyObject *v)
    13451439{
    1346   return PySwigObject_format("%x",v);
     1440  return SwigPyObject_format("%x",v);
    13471441}
    13481442
    13491443SWIGRUNTIME PyObject *
    13501444#ifdef METH_NOARGS
    1351 PySwigObject_repr(PySwigObject *v)
     1445SwigPyObject_repr(SwigPyObject *v)
    13521446#else
    1353 PySwigObject_repr(PySwigObject *v, PyObject *args)
     1447SwigPyObject_repr(SwigPyObject *v, PyObject *args)
    13541448#endif
    13551449{
    13561450  const char *name = SWIG_TypePrettyName(v->ty);
    1357   PyObject *hex = PySwigObject_hex(v);   
    1358   PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
    1359   Py_DECREF(hex);
     1451  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
    13601452  if (v->next) {
    13611453#ifdef METH_NOARGS
    1362     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
     1454    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    13631455#else
    1364     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
    1365 #endif
     1456    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
     1457#endif
     1458#if PY_VERSION_HEX >= 0x03000000
     1459    PyObject *joined = PyUnicode_Concat(repr, nrep);
     1460    Py_DecRef(repr);
     1461    Py_DecRef(nrep);
     1462    repr = joined;
     1463#else
    13661464    PyString_ConcatAndDel(&repr,nrep);
     1465#endif
    13671466  }
    13681467  return repr; 
     
    13701469
    13711470SWIGRUNTIME int
    1372 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
     1471SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    13731472{
     1473  char *str;
    13741474#ifdef METH_NOARGS
    1375   PyObject *repr = PySwigObject_repr(v);
     1475  PyObject *repr = SwigPyObject_repr(v);
    13761476#else
    1377   PyObject *repr = PySwigObject_repr(v, NULL);
     1477  PyObject *repr = SwigPyObject_repr(v, NULL);
    13781478#endif
    13791479  if (repr) {
    1380     fputs(PyString_AsString(repr), fp);
     1480    str = SWIG_Python_str_AsChar(repr);
     1481    fputs(str, fp);
     1482    SWIG_Python_str_DelForPy3(str);
    13811483    Py_DECREF(repr);
    13821484    return 0;
     
    13871489
    13881490SWIGRUNTIME PyObject *
    1389 PySwigObject_str(PySwigObject *v)
     1491SwigPyObject_str(SwigPyObject *v)
    13901492{
    13911493  char result[SWIG_BUFFER_SIZE];
    13921494  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
    1393     PyString_FromString(result) : 0;
     1495    SWIG_Python_str_FromChar(result) : 0;
    13941496}
    13951497
    13961498SWIGRUNTIME int
    1397 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
     1499SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
    13981500{
    13991501  void *i = v->ptr;
     
    14021504}
    14031505
     1506/* Added for Python 3.x, would it also be useful for Python 2.x? */
     1507SWIGRUNTIME PyObject*
     1508SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     1509{
     1510  PyObject* res;
     1511  if( op != Py_EQ && op != Py_NE ) {
     1512    Py_INCREF(Py_NotImplemented);
     1513    return Py_NotImplemented;
     1514  }
     1515  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
     1516    res = Py_True;
     1517  else
     1518    res = Py_False;
     1519  Py_INCREF(res);
     1520  return res; 
     1521}
     1522
     1523
    14041524SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
    14051525
    14061526SWIGRUNTIME PyTypeObject*
    1407 PySwigObject_type(void) {
     1527SwigPyObject_type(void) {
    14081528  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    14091529  return type;
     
    14111531
    14121532SWIGRUNTIMEINLINE int
    1413 PySwigObject_Check(PyObject *op) {
    1414   return ((op)->ob_type == PySwigObject_type())
    1415     || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
     1533SwigPyObject_Check(PyObject *op) {
     1534  return (Py_TYPE(op) == SwigPyObject_type())
     1535    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
    14161536}
    14171537
    14181538SWIGRUNTIME PyObject *
    1419 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
     1539SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
    14201540
    14211541SWIGRUNTIME void
    1422 PySwigObject_dealloc(PyObject *v)
     1542SwigPyObject_dealloc(PyObject *v)
    14231543{
    1424   PySwigObject *sobj = (PySwigObject *) v;
     1544  SwigPyObject *sobj = (SwigPyObject *) v;
    14251545  PyObject *next = sobj->next;
    14261546  if (sobj->own == SWIG_POINTER_OWN) {
    14271547    swig_type_info *ty = sobj->ty;
    1428     PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
     1548    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    14291549    PyObject *destroy = data ? data->destroy : 0;
    14301550    if (destroy) {
     
    14321552      PyObject *res;
    14331553      if (data->delargs) {
    1434         /* we need to create a temporal object to carry the destroy operation */
    1435         PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
     1554        /* we need to create a temporary object to carry the destroy operation */
     1555        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    14361556        res = SWIG_Python_CallFunctor(destroy, tmp);
    14371557        Py_DECREF(tmp);
     
    14551575
    14561576SWIGRUNTIME PyObject*
    1457 PySwigObject_append(PyObject* v, PyObject* next)
     1577SwigPyObject_append(PyObject* v, PyObject* next)
    14581578{
    1459   PySwigObject *sobj = (PySwigObject *) v;
     1579  SwigPyObject *sobj = (SwigPyObject *) v;
    14601580#ifndef METH_O
    14611581  PyObject *tmp = 0;
     
    14631583  next = tmp;
    14641584#endif
    1465   if (!PySwigObject_Check(next)) {
     1585  if (!SwigPyObject_Check(next)) {
    14661586    return NULL;
    14671587  }
     
    14731593SWIGRUNTIME PyObject*
    14741594#ifdef METH_NOARGS
    1475 PySwigObject_next(PyObject* v)
     1595SwigPyObject_next(PyObject* v)
    14761596#else
    1477 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1597SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    14781598#endif
    14791599{
    1480   PySwigObject *sobj = (PySwigObject *) v;
     1600  SwigPyObject *sobj = (SwigPyObject *) v;
    14811601  if (sobj->next) {   
    14821602    Py_INCREF(sobj->next);
     
    14891609SWIGINTERN PyObject*
    14901610#ifdef METH_NOARGS
    1491 PySwigObject_disown(PyObject *v)
     1611SwigPyObject_disown(PyObject *v)
    14921612#else
    1493 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1613SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    14941614#endif
    14951615{
    1496   PySwigObject *sobj = (PySwigObject *)v;
     1616  SwigPyObject *sobj = (SwigPyObject *)v;
    14971617  sobj->own = 0;
    14981618  return SWIG_Py_Void();
     
    15011621SWIGINTERN PyObject*
    15021622#ifdef METH_NOARGS
    1503 PySwigObject_acquire(PyObject *v)
     1623SwigPyObject_acquire(PyObject *v)
    15041624#else
    1505 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1625SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    15061626#endif
    15071627{
    1508   PySwigObject *sobj = (PySwigObject *)v;
     1628  SwigPyObject *sobj = (SwigPyObject *)v;
    15091629  sobj->own = SWIG_POINTER_OWN;
    15101630  return SWIG_Py_Void();
     
    15121632
    15131633SWIGINTERN PyObject*
    1514 PySwigObject_own(PyObject *v, PyObject *args)
     1634SwigPyObject_own(PyObject *v, PyObject *args)
    15151635{
    15161636  PyObject *val = 0;
     
    15251645  else
    15261646    {
    1527       PySwigObject *sobj = (PySwigObject *)v;
     1647      SwigPyObject *sobj = (SwigPyObject *)v;
    15281648      PyObject *obj = PyBool_FromLong(sobj->own);
    15291649      if (val) {
    15301650#ifdef METH_NOARGS
    15311651        if (PyObject_IsTrue(val)) {
    1532           PySwigObject_acquire(v);
     1652          SwigPyObject_acquire(v);
    15331653        } else {
    1534           PySwigObject_disown(v);
     1654          SwigPyObject_disown(v);
    15351655        }
    15361656#else
    15371657        if (PyObject_IsTrue(val)) {
    1538           PySwigObject_acquire(v,args);
     1658          SwigPyObject_acquire(v,args);
    15391659        } else {
    1540           PySwigObject_disown(v,args);
     1660          SwigPyObject_disown(v,args);
    15411661        }
    15421662#endif
     
    15491669static PyMethodDef
    15501670swigobject_methods[] = {
    1551   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
    1552   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
    1553   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
    1554   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
    1555   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
    1556   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
     1671  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
     1672  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
     1673  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
     1674  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
     1675  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
     1676  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
    15571677  {0, 0, 0, 0} 
    15581678};
     
    15601680static PyMethodDef
    15611681swigobject_methods[] = {
    1562   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
    1563   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
    1564   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
    1565   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
    1566   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
    1567   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
     1682  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
     1683  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
     1684  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
     1685  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
     1686  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
     1687  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
    15681688  {0, 0, 0, 0} 
    15691689};
     
    15721692#if PY_VERSION_HEX < 0x02020000
    15731693SWIGINTERN PyObject *
    1574 PySwigObject_getattr(PySwigObject *sobj,char *name)
     1694SwigPyObject_getattr(SwigPyObject *sobj,char *name)
    15751695{
    15761696  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
     
    15821702  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    15831703 
    1584   static PyNumberMethods PySwigObject_as_number = {
     1704  static PyNumberMethods SwigPyObject_as_number = {
    15851705    (binaryfunc)0, /*nb_add*/
    15861706    (binaryfunc)0, /*nb_subtract*/
    15871707    (binaryfunc)0, /*nb_multiply*/
     1708    /* nb_divide removed in Python 3 */
     1709#if PY_VERSION_HEX < 0x03000000
    15881710    (binaryfunc)0, /*nb_divide*/
     1711#endif
    15891712    (binaryfunc)0, /*nb_remainder*/
    15901713    (binaryfunc)0, /*nb_divmod*/
     
    16001723    0,             /*nb_xor*/
    16011724    0,             /*nb_or*/
    1602     (coercion)0,   /*nb_coerce*/
    1603     (unaryfunc)PySwigObject_long, /*nb_int*/
    1604     (unaryfunc)PySwigObject_long, /*nb_long*/
     1725#if PY_VERSION_HEX < 0x03000000
     1726    0,   /*nb_coerce*/
     1727#endif
     1728    (unaryfunc)SwigPyObject_long, /*nb_int*/
     1729#if PY_VERSION_HEX < 0x03000000
     1730    (unaryfunc)SwigPyObject_long, /*nb_long*/
     1731#else
     1732    0, /*nb_reserved*/
     1733#endif
    16051734    (unaryfunc)0,                 /*nb_float*/
    1606     (unaryfunc)PySwigObject_oct,  /*nb_oct*/
    1607     (unaryfunc)PySwigObject_hex,  /*nb_hex*/
    1608 #if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
     1735#if PY_VERSION_HEX < 0x03000000
     1736    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
     1737    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
     1738#endif
     1739#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
     1740    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
     1741#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    16091742    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
    16101743#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
     
    16151748  };
    16161749
    1617   static PyTypeObject pyswigobject_type; 
     1750  static PyTypeObject swigpyobject_type; 
    16181751  static int type_init = 0;
    16191752  if (!type_init) {
    16201753    const PyTypeObject tmp
    16211754      = {
     1755        /* PyObject header changed in Python 3 */
     1756#if PY_VERSION_HEX >= 0x03000000
     1757        PyVarObject_HEAD_INIT(&PyType_Type, 0)
     1758#else   
    16221759        PyObject_HEAD_INIT(NULL)
    16231760        0,                                  /* ob_size */
    1624         (char *)"PySwigObject",             /* tp_name */
    1625         sizeof(PySwigObject),               /* tp_basicsize */
     1761#endif
     1762        (char *)"SwigPyObject",             /* tp_name */
     1763        sizeof(SwigPyObject),               /* tp_basicsize */
    16261764        0,                                  /* tp_itemsize */
    1627         (destructor)PySwigObject_dealloc,   /* tp_dealloc */
    1628         (printfunc)PySwigObject_print,      /* tp_print */
     1765        (destructor)SwigPyObject_dealloc,   /* tp_dealloc */
     1766        (printfunc)SwigPyObject_print,      /* tp_print */
    16291767#if PY_VERSION_HEX < 0x02020000
    1630         (getattrfunc)PySwigObject_getattr,  /* tp_getattr */
     1768        (getattrfunc)SwigPyObject_getattr,  /* tp_getattr */
    16311769#else
    16321770        (getattrfunc)0,                     /* tp_getattr */
    16331771#endif
    16341772        (setattrfunc)0,                     /* tp_setattr */
    1635         (cmpfunc)PySwigObject_compare,      /* tp_compare */
    1636         (reprfunc)PySwigObject_repr,        /* tp_repr */   
    1637         &PySwigObject_as_number,            /* tp_as_number */
     1773#if PY_VERSION_HEX >= 0x03000000
     1774    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
     1775#else
     1776        (cmpfunc)SwigPyObject_compare,      /* tp_compare */
     1777#endif
     1778        (reprfunc)SwigPyObject_repr,        /* tp_repr */   
     1779        &SwigPyObject_as_number,            /* tp_as_number */
    16381780        0,                                  /* tp_as_sequence */
    16391781        0,                                  /* tp_as_mapping */
    16401782        (hashfunc)0,                        /* tp_hash */
    16411783        (ternaryfunc)0,                     /* tp_call */
    1642         (reprfunc)PySwigObject_str,         /* tp_str */
     1784        (reprfunc)SwigPyObject_str,         /* tp_str */
    16431785        PyObject_GenericGetAttr,            /* tp_getattro */
    16441786        0,                                  /* tp_setattro */
     
    16481790        0,                                  /* tp_traverse */
    16491791        0,                                  /* tp_clear */
    1650         0,                                  /* tp_richcompare */
     1792        (richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
    16511793        0,                                  /* tp_weaklistoffset */
    16521794#if PY_VERSION_HEX >= 0x02020000
     
    16651807        0,                                  /* tp_new */               
    16661808        0,                                  /* tp_free */         
    1667         0,                                  /* tp_is_gc */ 
     1809        0,                                  /* tp_is_gc */ 
    16681810        0,                                  /* tp_bases */   
    16691811        0,                                  /* tp_mro */
    16701812        0,                                  /* tp_cache */   
    1671         0,                                  /* tp_subclasses */
     1813        0,                                  /* tp_subclasses */
    16721814        0,                                  /* tp_weaklist */
    16731815#endif
     
    16791821#endif
    16801822      };
    1681     pyswigobject_type = tmp;
    1682     pyswigobject_type.ob_type = &PyType_Type;
     1823    swigpyobject_type = tmp;
     1824    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
     1825#if PY_VERSION_HEX < 0x03000000
     1826    swigpyobject_type.ob_type = &PyType_Type;
     1827#endif
    16831828    type_init = 1;
    16841829  }
    1685   return &pyswigobject_type;
     1830  return &swigpyobject_type;
    16861831}
    16871832
    16881833SWIGRUNTIME PyObject *
    1689 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
     1834SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    16901835{
    1691   PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
     1836  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    16921837  if (sobj) {
    16931838    sobj->ptr  = ptr;
     
    17081853  swig_type_info *ty;
    17091854  size_t size;
    1710 } PySwigPacked;
     1855} SwigPyPacked;
    17111856
    17121857SWIGRUNTIME int
    1713 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
     1858SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    17141859{
    17151860  char result[SWIG_BUFFER_SIZE];
     
    17251870 
    17261871SWIGRUNTIME PyObject *
    1727 PySwigPacked_repr(PySwigPacked *v)
     1872SwigPyPacked_repr(SwigPyPacked *v)
    17281873{
    17291874  char result[SWIG_BUFFER_SIZE];
    17301875  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    1731     return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
     1876    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
    17321877  } else {
    1733     return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
     1878    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
    17341879  } 
    17351880}
    17361881
    17371882SWIGRUNTIME PyObject *
    1738 PySwigPacked_str(PySwigPacked *v)
     1883SwigPyPacked_str(SwigPyPacked *v)
    17391884{
    17401885  char result[SWIG_BUFFER_SIZE];
    17411886  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    1742     return PyString_FromFormat("%s%s", result, v->ty->name);
     1887    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
    17431888  } else {
    1744     return PyString_FromString(v->ty->name);
     1889    return SWIG_Python_str_FromChar(v->ty->name);
    17451890  } 
    17461891}
    17471892
    17481893SWIGRUNTIME int
    1749 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
     1894SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
    17501895{
    17511896  size_t i = v->size;
     
    17581903
    17591904SWIGRUNTIME PyTypeObject*
    1760 PySwigPacked_type(void) {
     1905SwigPyPacked_type(void) {
    17611906  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
    17621907  return type;
     
    17641909
    17651910SWIGRUNTIMEINLINE int
    1766 PySwigPacked_Check(PyObject *op) {
     1911SwigPyPacked_Check(PyObject *op) {
    17671912  return ((op)->ob_type == _PySwigPacked_type())
    1768     || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
     1913    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
    17691914}
    17701915
    17711916SWIGRUNTIME void
    1772 PySwigPacked_dealloc(PyObject *v)
     1917SwigPyPacked_dealloc(PyObject *v)
    17731918{
    1774   if (PySwigPacked_Check(v)) {
    1775     PySwigPacked *sobj = (PySwigPacked *) v;
     1919  if (SwigPyPacked_Check(v)) {
     1920    SwigPyPacked *sobj = (SwigPyPacked *) v;
    17761921    free(sobj->pack);
    17771922  }
     
    17821927_PySwigPacked_type(void) {
    17831928  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1784   static PyTypeObject pyswigpacked_type;
     1929  static PyTypeObject swigpypacked_type;
    17851930  static int type_init = 0; 
    17861931  if (!type_init) {
    17871932    const PyTypeObject tmp
    17881933      = {
     1934    /* PyObject header changed in Python 3 */
     1935#if PY_VERSION_HEX>=0x03000000
     1936    PyVarObject_HEAD_INIT(&PyType_Type, 0)
     1937#else
    17891938        PyObject_HEAD_INIT(NULL)
    1790         0,                                  /* ob_size */       
    1791         (char *)"PySwigPacked",             /* tp_name */       
    1792         sizeof(PySwigPacked),               /* tp_basicsize */ 
     1939    0,                              /* ob_size */       
     1940#endif
     1941        (char *)"SwigPyPacked",             /* tp_name */       
     1942        sizeof(SwigPyPacked),               /* tp_basicsize */ 
    17931943        0,                                  /* tp_itemsize */   
    1794         (destructor)PySwigPacked_dealloc,   /* tp_dealloc */   
    1795         (printfunc)PySwigPacked_print,      /* tp_print */     
     1944        (destructor)SwigPyPacked_dealloc,   /* tp_dealloc */   
     1945        (printfunc)SwigPyPacked_print,      /* tp_print */     
    17961946        (getattrfunc)0,                     /* tp_getattr */   
    17971947        (setattrfunc)0,                     /* tp_setattr */   
    1798         (cmpfunc)PySwigPacked_compare,      /* tp_compare */   
    1799         (reprfunc)PySwigPacked_repr,        /* tp_repr */       
    1800         0,                                  /* tp_as_number */ 
     1948#if PY_VERSION_HEX>=0x03000000
     1949    0, /* tp_reserved in 3.0.1 */
     1950#else
     1951    (cmpfunc)SwigPyPacked_compare,          /* tp_compare */
     1952#endif
     1953        (reprfunc)SwigPyPacked_repr,        /* tp_repr */
     1954        0,                                  /* tp_as_number */
    18011955        0,                                  /* tp_as_sequence */
    1802         0,                                  /* tp_as_mapping */ 
    1803         (hashfunc)0,                        /* tp_hash */       
    1804         (ternaryfunc)0,                     /* tp_call */       
    1805         (reprfunc)PySwigPacked_str,         /* tp_str */       
     1956        0,                                  /* tp_as_mapping */
     1957        (hashfunc)0,                        /* tp_hash */
     1958        (ternaryfunc)0,                     /* tp_call */
     1959        (reprfunc)SwigPyPacked_str,         /* tp_str */
    18061960        PyObject_GenericGetAttr,            /* tp_getattro */
    18071961        0,                                  /* tp_setattro */
     
    18421996#endif
    18431997      };
    1844     pyswigpacked_type = tmp;
    1845     pyswigpacked_type.ob_type = &PyType_Type;
     1998    swigpypacked_type = tmp;
     1999    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
     2000#if PY_VERSION_HEX < 0x03000000
     2001    swigpypacked_type.ob_type = &PyType_Type;
     2002#endif
    18462003    type_init = 1;
    18472004  }
    1848   return &pyswigpacked_type;
     2005  return &swigpypacked_type;
    18492006}
    18502007
    18512008SWIGRUNTIME PyObject *
    1852 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
     2009SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
    18532010{
    1854   PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
     2011  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
    18552012  if (sobj) {
    18562013    void *pack = malloc(size);
     
    18692026
    18702027SWIGRUNTIME swig_type_info *
    1871 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
     2028SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
    18722029{
    1873   if (PySwigPacked_Check(obj)) {
    1874     PySwigPacked *sobj = (PySwigPacked *)obj;
     2030  if (SwigPyPacked_Check(obj)) {
     2031    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    18752032    if (sobj->size != size) return 0;
    18762033    memcpy(ptr, sobj->pack, size);
     
    18882045_SWIG_This(void)
    18892046{
    1890   return PyString_FromString("this");
     2047    return SWIG_Python_str_FromChar("this");
    18912048}
    18922049
     
    19002057/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
    19012058
    1902 SWIGRUNTIME PySwigObject *
     2059/* TODO: I don't know how to implement the fast getset in Python 3 right now */
     2060#if PY_VERSION_HEX>=0x03000000
     2061#define SWIG_PYTHON_SLOW_GETSET_THIS
     2062#endif
     2063
     2064SWIGRUNTIME SwigPyObject *
    19032065SWIG_Python_GetSwigThis(PyObject *pyobj)
    19042066{
    1905   if (PySwigObject_Check(pyobj)) {
    1906     return (PySwigObject *) pyobj;
     2067  if (SwigPyObject_Check(pyobj)) {
     2068    return (SwigPyObject *) pyobj;
    19072069  } else {
    19082070    PyObject *obj = 0;
     
    19402102    }
    19412103#endif
    1942     if (obj && !PySwigObject_Check(obj)) {
     2104    if (obj && !SwigPyObject_Check(obj)) {
    19432105      /* a PyObject is called 'this', try to get the 'real this'
    1944          PySwigObject from it */
     2106         SwigPyObject from it */
    19452107      return SWIG_Python_GetSwigThis(obj);
    19462108    }
    1947     return (PySwigObject *)obj;
     2109    return (SwigPyObject *)obj;
    19482110  }
    19492111}
     
    19542116SWIG_Python_AcquirePtr(PyObject *obj, int own) {
    19552117  if (own == SWIG_POINTER_OWN) {
    1956     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
     2118    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    19572119    if (sobj) {
    19582120      int oldown = sobj->own;
     
    19732135    return SWIG_OK;
    19742136  } else {
    1975     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
     2137    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    19762138    if (own)
    19772139      *own = 0;
     
    19872149          swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    19882150          if (!tc) {
    1989             sobj = (PySwigObject *)sobj->next;
     2151            sobj = (SwigPyObject *)sobj->next;
    19902152          } else {
    19912153            if (ptr) {
     
    20162178      int res = SWIG_ERROR;
    20172179      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
    2018         PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
     2180        SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    20192181        if (data && !data->implicitconv) {
    20202182          PyObject *klass = data->klass;
     
    20292191            }
    20302192            if (impconv) {
    2031               PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
     2193              SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
    20322194              if (iobj) {
    20332195                void *vptr;
     
    20672229    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    20682230    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    2069     if (desc) {
     2231    if (desc)
    20702232      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    2071       if (!desc) return SWIG_ERROR;
    2072     }
     2233    if (!desc)
     2234      return SWIG_ERROR;
    20732235    if (ty) {
    20742236      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
     
    20912253SWIGRUNTIME int
    20922254SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
    2093   swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
     2255  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
    20942256  if (!to) return SWIG_ERROR;
    20952257  if (ty) {
     
    21082270
    21092271/*
    2110   Create a new instance object, whitout calling __init__, and set the
     2272  Create a new instance object, without calling __init__, and set the
    21112273  'this' attribute.
    21122274*/
    21132275
    21142276SWIGRUNTIME PyObject*
    2115 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
     2277SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    21162278{
    21172279#if (PY_VERSION_HEX >= 0x02020000)
     
    21372299    }
    21382300  } else {
     2301#if PY_VERSION_HEX >= 0x03000000
     2302    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
     2303    PyObject_SetAttr(inst, SWIG_This(), swig_this);
     2304    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
     2305#else
    21392306    PyObject *dict = PyDict_New();
    21402307    PyDict_SetItem(dict, SWIG_This(), swig_this);
    21412308    inst = PyInstance_NewRaw(data->newargs, dict);
    21422309    Py_DECREF(dict);
     2310#endif
    21432311  }
    21442312  return inst;
     
    22032371    return NULL;
    22042372  } else {
    2205     PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
     2373    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    22062374    if (sthis) {
    2207       PySwigObject_append((PyObject*) sthis, obj[1]);
     2375      SwigPyObject_append((PyObject*) sthis, obj[1]);
    22082376    } else {
    22092377      SWIG_Python_SetSwigThis(obj[0], obj[1]);
     
    22212389  } else {
    22222390    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2223     PyObject *robj = PySwigObject_New(ptr, type, own);
    2224     PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
     2391    PyObject *robj = SwigPyObject_New(ptr, type, own);
     2392    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    22252393    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    22262394      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
     
    22382406SWIGRUNTIMEINLINE PyObject *
    22392407SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
    2240   return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
     2408  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
    22412409}
    22422410
     
    23092477    swig_type_info *ty = types[i];
    23102478    if (ty->owndata) {
    2311       PySwigClientData *data = (PySwigClientData *) ty->clientdata;
    2312       if (data) PySwigClientData_Del(data);
     2479      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
     2480      if (data) SwigPyClientData_Del(data);
    23132481    }
    23142482  }
     
    23202488  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
    23212489
     2490#if PY_VERSION_HEX >= 0x03000000
     2491 /* Add a dummy module object into sys.modules */
     2492  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
     2493#else
    23222494  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
    23232495                                   swig_empty_runtime_method_table);
     2496#endif
    23242497  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
    23252498  if (pointer && module) {
     
    23412514{
    23422515  PyObject *cache = SWIG_Python_TypeCache();
    2343   PyObject *key = PyString_FromString(type);
     2516  PyObject *key = SWIG_Python_str_FromChar(type);
    23442517  PyObject *obj = PyDict_GetItem(cache, key);
    23452518  swig_type_info *descriptor;
     
    23682541SWIGRUNTIME int
    23692542SWIG_Python_AddErrMesg(const char* mesg, int infront)
    2370 {
     2543{ 
    23712544  if (PyErr_Occurred()) {
    23722545    PyObject *type = 0;
     
    23752548    PyErr_Fetch(&type, &value, &traceback);
    23762549    if (value) {
     2550      char *tmp;
    23772551      PyObject *old_str = PyObject_Str(value);
    23782552      Py_XINCREF(type);
    23792553      PyErr_Clear();
    23802554      if (infront) {
    2381         PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
     2555        PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
    23822556      } else {
    2383         PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
     2557        PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    23842558      }
     2559      SWIG_Python_str_DelForPy3(tmp);
    23852560      Py_DECREF(old_str);
    23862561    }
     
    24052580
    24062581SWIGRUNTIMEINLINE const char *
    2407 PySwigObject_GetDesc(PyObject *self)
     2582SwigPyObject_GetDesc(PyObject *self)
    24082583{
    2409   PySwigObject *v = (PySwigObject *)self;
     2584  SwigPyObject *v = (SwigPyObject *)self;
    24102585  swig_type_info *ty = v ? v->ty : 0;
    24112586  return ty ? ty->str : (char*)"";
     
    24172592  if (type) {
    24182593#if defined(SWIG_COBJECT_TYPES)
    2419     if (obj && PySwigObject_Check(obj)) {
    2420       const char *otype = (const char *) PySwigObject_GetDesc(obj);
     2594    if (obj && SwigPyObject_Check(obj)) {
     2595      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
    24212596      if (otype) {
    2422         PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
     2597        PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
    24232598                     type, otype);
    24242599        return;
     
    24302605      if (otype) {
    24312606        PyObject *str = PyObject_Str(obj);
    2432         const char *cstr = str ? PyString_AsString(str) : 0;
     2607        const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
    24332608        if (cstr) {
    24342609          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
    24352610                       type, otype, cstr);
     2611          SWIG_Python_str_DelForPy3(cstr);
    24362612        } else {
    24372613          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
     
    24552631  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    24562632    PyErr_Clear();
    2457     if (flags & SWIG_POINTER_EXCEPTION) {
     2633#if SWIG_POINTER_EXCEPTION
     2634    if (flags) {
    24582635      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    24592636      SWIG_Python_ArgFail(argnum);
    24602637    }
     2638#endif
    24612639  }
    24622640  return result;
     
    25042682              @(target):= _pbs.so
    25052683  ------------------------------------------------*/
    2506 #define SWIG_init    init_pbs
    2507 
     2684#if PY_VERSION_HEX >= 0x03000000
     2685#  define SWIG_init    PyInit__pbs
     2686
     2687#else
     2688#  define SWIG_init    init_pbs
     2689
     2690#endif
    25082691#define SWIG_name    "_pbs"
    25092692
    2510 #define SWIGVERSION 0x010336
     2693#define SWIGVERSION 0x010340
    25112694#define SWIG_VERSION SWIGVERSION
    25122695
     
    28203003        SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    28213004    } else {
     3005#if PY_VERSION_HEX >= 0x03000000
     3006      return PyUnicode_FromStringAndSize(carray, (int)(size));
     3007#else
    28223008      return PyString_FromStringAndSize(carray, (int)(size));
     3009#endif
    28233010    }
    28243011  } else {
     
    28383025SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    28393026{
    2840   if (PyString_Check(obj)) {
     3027#if PY_VERSION_HEX>=0x03000000
     3028  if (PyUnicode_Check(obj))
     3029#else 
     3030  if (PyString_Check(obj))
     3031#endif
     3032  {
    28413033    char *cstr; Py_ssize_t len;
     3034#if PY_VERSION_HEX>=0x03000000
     3035    if (!alloc && cptr) {
     3036        /* We can't allow converting without allocation, since the internal
     3037           representation of string in Python 3 is UCS-2/UCS-4 but we require
     3038           a UTF-8 representation.
     3039           TODO(bhy) More detailed explanation */
     3040        return SWIG_RuntimeError;
     3041    }
     3042    obj = PyUnicode_AsUTF8String(obj);
     3043    PyBytes_AsStringAndSize(obj, &cstr, &len);
     3044    if(alloc) *alloc = SWIG_NEWOBJ;
     3045#else
    28423046    PyString_AsStringAndSize(obj, &cstr, &len);
    2843     if (cptr)  {
     3047#endif
     3048    if (cptr) {
    28443049      if (alloc) {
    28453050        /*
     
    28663071        }
    28673072      } else {
    2868         *cptr = PyString_AsString(obj);
     3073        #if PY_VERSION_HEX>=0x03000000
     3074        assert(0); /* Should never reach here in Python 3 */
     3075        #endif
     3076        *cptr = SWIG_Python_str_AsChar(obj);
    28693077      }
    28703078    }
    28713079    if (psize) *psize = len + 1;
     3080#if PY_VERSION_HEX>=0x03000000
     3081    Py_XDECREF(obj);
     3082#endif
    28723083    return SWIG_OK;
    28733084  } else {
     
    71057316
    71067317static PyMethodDef SwigMethods[] = {
     7318         { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
    71077319         { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
    71087320         { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
     
    75137725  SWIGINTERN PyObject *
    75147726  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
     7727#if PY_VERSION_HEX >= 0x03000000
     7728    return PyUnicode_InternFromString("<Swig global variables>");
     7729#else
    75157730    return PyString_FromString("<Swig global variables>");
     7731#endif
    75167732  }
    75177733 
    75187734  SWIGINTERN PyObject *
    75197735  swig_varlink_str(swig_varlinkobject *v) {
     7736#if PY_VERSION_HEX >= 0x03000000
     7737    PyObject *str = PyUnicode_InternFromString("(");
     7738    PyObject *tail;
     7739    PyObject *joined;
     7740    swig_globalvar *var;
     7741    for (var = v->vars; var; var=var->next) {
     7742      tail = PyUnicode_FromString(var->name);
     7743      joined = PyUnicode_Concat(str, tail);
     7744      Py_DecRef(str);
     7745      Py_DecRef(tail);
     7746      str = joined;
     7747      if (var->next) {
     7748        tail = PyUnicode_InternFromString(", ");
     7749        joined = PyUnicode_Concat(str, tail);
     7750        Py_DecRef(str);
     7751        Py_DecRef(tail);
     7752        str = joined;
     7753      }
     7754    }
     7755    tail = PyUnicode_InternFromString(")");
     7756    joined = PyUnicode_Concat(str, tail);
     7757    Py_DecRef(str);
     7758    Py_DecRef(tail);
     7759    str = joined;
     7760#else
    75207761    PyObject *str = PyString_FromString("(");
    7521     swig_globalvar  *var;
     7762    swig_globalvar *var;
    75227763    for (var = v->vars; var; var=var->next) {
    75237764      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
     
    75257766    }
    75267767    PyString_ConcatAndDel(&str,PyString_FromString(")"));
     7768#endif
    75277769    return str;
    75287770  }
     
    75307772  SWIGINTERN int
    75317773  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
     7774    char *tmp;
    75327775    PyObject *str = swig_varlink_str(v);
    75337776    fprintf(fp,"Swig global variables ");
    7534     fprintf(fp,"%s\n", PyString_AsString(str));
     7777    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
     7778    SWIG_Python_str_DelForPy3(tmp);
    75357779    Py_DECREF(str);
    75367780    return 0;
     
    75907834      const PyTypeObject tmp
    75917835      = {
     7836        /* PyObject header changed in Python 3 */
     7837#if PY_VERSION_HEX >= 0x03000000
     7838        PyVarObject_HEAD_INIT(&PyType_Type, 0)
     7839#else
    75927840        PyObject_HEAD_INIT(NULL)
    75937841        0,                                  /* Number of items in variable part (ob_size) */
     7842#endif
    75947843        (char *)"swigvarlink",              /* Type name (tp_name) */
    75957844        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
    75967845        0,                                  /* Itemsize (tp_itemsize) */
    7597         (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */
     7846        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */
    75987847        (printfunc) swig_varlink_print,     /* Print (tp_print) */
    75997848        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
     
    76067855        0,                                  /* tp_hash */
    76077856        0,                                  /* tp_call */
    7608         (reprfunc)swig_varlink_str,        /* tp_str */
     7857        (reprfunc) swig_varlink_str,        /* tp_str */
    76097858        0,                                  /* tp_getattro */
    76107859        0,                                  /* tp_setattro */
     
    76277876      };
    76287877      varlink_type = tmp;
     7878      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
     7879#if PY_VERSION_HEX < 0x03000000
    76297880      varlink_type.ob_type = &PyType_Type;
     7881#endif
    76307882      type_init = 1;
    76317883    }
     
    77528004extern "C"
    77538005#endif
    7754 SWIGEXPORT void SWIG_init(void) {
    7755   PyObject *m, *d;
     8006
     8007SWIGEXPORT
     8008#if PY_VERSION_HEX >= 0x03000000
     8009PyObject*
     8010#else
     8011void
     8012#endif
     8013SWIG_init(void) {
     8014  PyObject *m, *d; 
     8015#if PY_VERSION_HEX >= 0x03000000
     8016  static struct PyModuleDef SWIG_module = {
     8017    PyModuleDef_HEAD_INIT,
     8018    (char *) SWIG_name,
     8019    NULL,
     8020    -1,
     8021    SwigMethods,
     8022    NULL,
     8023    NULL,
     8024    NULL,
     8025    NULL
     8026  };
     8027#endif
    77568028 
    77578029  /* Fix SwigMethods to carry the callback ptrs when needed */
    77588030  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
    77598031 
     8032#if PY_VERSION_HEX >= 0x03000000
     8033  m = PyModule_Create(&SWIG_module);
     8034#else
    77608035  m = Py_InitModule((char *) SWIG_name, SwigMethods);
     8036#endif
    77618037  d = PyModule_GetDict(m);
    77628038 
     
    80728348  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
    80738349  SWIG_addvarlink(SWIG_globals(),(char*)"msg_daemonname",Swig_var_msg_daemonname_get, Swig_var_msg_daemonname_set);
    8074 }
    8075 
     8350#if PY_VERSION_HEX >= 0x03000000
     8351  return m;
     8352#else
     8353  return;
     8354#endif
     8355}
     8356
  • trunk/src/pbs_wrap_2.4.c

    r215 r268  
    11/* ----------------------------------------------------------------------------
    22 * This file was automatically generated by SWIG (http://www.swig.org).
    3  * Version 1.3.36
     3 * Version 1.3.40
    44 *
    55 * This file is not intended to be easily readable and contains a number of
     
    1111#define SWIGPYTHON
    1212#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
     13
    1314/* -----------------------------------------------------------------------------
    1415 *  This section contains generic SWIG labels for method/variable
     
    127128 * swigrun.swg
    128129 *
    129  * This file contains generic CAPI SWIG runtime support for pointer
     130 * This file contains generic C API SWIG runtime support for pointer
    130131 * type checking.
    131132 * ----------------------------------------------------------------------------- */
     
    146147/*
    147148  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
    148   creating a static or dynamic library from the swig runtime code.
    149   In 99.9% of the cases, swig just needs to declare them as 'static'.
    150  
    151   But only do this if is strictly necessary, ie, if you have problems
    152   with your compiler or so.
     149  creating a static or dynamic library from the SWIG runtime code.
     150  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
     151 
     152  But only do this if strictly necessary, ie, if you have problems
     153  with your compiler or suchlike.
    153154*/
    154155
     
    177178   Flags/methods for returning states.
    178179   
    179    The swig conversion methods, as ConvertPtr, return and integer
     180   The SWIG conversion methods, as ConvertPtr, return and integer
    180181   that tells if the conversion was successful or not. And if not,
    181182   an error code can be returned (see swigerrors.swg for the codes).
     
    184185   states.
    185186   
    186    In old swig versions, you usually write code as:
     187   In old versions of SWIG, code such as the following was usually written:
    187188
    188189     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
     
    192193     }
    193194
    194    Now you can be more explicit as:
     195   Now you can be more explicit:
    195196
    196197    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     
    201202    }
    202203
    203    that seems to be the same, but now you can also do
     204   which is the same really, but now you can also do
    204205
    205206    Type *ptr;
     
    219220   I.e., now SWIG_ConvertPtr can return new objects and you can
    220221   identify the case and take care of the deallocation. Of course that
    221    requires also to SWIG_ConvertPtr to return new result values, as
     222   also requires SWIG_ConvertPtr to return new result values, such as
    222223
    223224      int SWIG_ConvertPtr(obj, ptr,...) {         
     
    237238   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
    238239   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
    239    swig errors code.
     240   SWIG errors code.
    240241
    241242   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
     
    251252
    252253   just use the SWIG_AddCast()/SWIG_CheckState()
    253 
    254 
    255  */
     254*/
     255
    256256#define SWIG_OK                    (0)
    257257#define SWIG_ERROR                 (-1)
     
    278278#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
    279279
    280 
    281280/* Cast-Rank Mode */
    282281#if defined(SWIG_CASTRANK_MODE)
     
    301300
    302301
    303 
    304 
    305302#include <string.h>
    306303
     
    399396
    400397
    401 /* think of this as a c++ template<> or a scheme macro */
    402 #define SWIG_TypeCheck_Template(comparison, ty)         \
    403   if (ty) {                                             \
    404     swig_cast_info *iter = ty->cast;                    \
    405     while (iter) {                                      \
    406       if (comparison) {                                 \
    407         if (iter == ty->cast) return iter;              \
    408         /* Move iter to the top of the linked list */   \
    409         iter->prev->next = iter->next;                  \
    410         if (iter->next)                                 \
    411           iter->next->prev = iter->prev;                \
    412         iter->next = ty->cast;                          \
    413         iter->prev = 0;                                 \
    414         if (ty->cast) ty->cast->prev = iter;            \
    415         ty->cast = iter;                                \
    416         return iter;                                    \
    417       }                                                 \
    418       iter = iter->next;                                \
    419     }                                                   \
    420   }                                                     \
    421   return 0
    422 
    423398/*
    424399  Check the typename
     
    426401SWIGRUNTIME swig_cast_info *
    427402SWIG_TypeCheck(const char *c, swig_type_info *ty) {
    428   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
    429 }
    430 
    431 /* Same as previous function, except strcmp is replaced with a pointer comparison */
     403  if (ty) {
     404    swig_cast_info *iter = ty->cast;
     405    while (iter) {
     406      if (strcmp(iter->type->name, c) == 0) {
     407        if (iter == ty->cast)
     408          return iter;
     409        /* Move iter to the top of the linked list */
     410        iter->prev->next = iter->next;
     411        if (iter->next)
     412          iter->next->prev = iter->prev;
     413        iter->next = ty->cast;
     414        iter->prev = 0;
     415        if (ty->cast) ty->cast->prev = iter;
     416        ty->cast = iter;
     417        return iter;
     418      }
     419      iter = iter->next;
     420    }
     421  }
     422  return 0;
     423}
     424
     425/*
     426  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
     427*/
    432428SWIGRUNTIME swig_cast_info *
    433 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
    434   SWIG_TypeCheck_Template(iter->type == from, into);
     429SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
     430  if (ty) {
     431    swig_cast_info *iter = ty->cast;
     432    while (iter) {
     433      if (iter->type == from) {
     434        if (iter == ty->cast)
     435          return iter;
     436        /* Move iter to the top of the linked list */
     437        iter->prev->next = iter->next;
     438        if (iter->next)
     439          iter->next->prev = iter->prev;
     440        iter->next = ty->cast;
     441        iter->prev = 0;
     442        if (ty->cast) ty->cast->prev = iter;
     443        ty->cast = iter;
     444        return iter;
     445      }
     446      iter = iter->next;
     447    }
     448  }
     449  return 0;
    435450}
    436451
     
    711726
    712727
     728/* Compatibility macros for Python 3 */
     729#if PY_VERSION_HEX >= 0x03000000
     730
     731#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
     732#define PyInt_Check(x) PyLong_Check(x)
     733#define PyInt_AsLong(x) PyLong_AsLong(x)
     734#define PyInt_FromLong(x) PyLong_FromLong(x)
     735#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
     736
     737#endif
     738
     739#ifndef Py_TYPE
     740#  define Py_TYPE(op) ((op)->ob_type)
     741#endif
     742
     743/* SWIG APIs for compatibility of both Python 2 & 3 */
     744
     745#if PY_VERSION_HEX >= 0x03000000
     746#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
     747#else
     748#  define SWIG_Python_str_FromFormat PyString_FromFormat
     749#endif
     750
     751
     752/* Warning: This function will allocate a new string in Python 3,
     753 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
     754 */
     755SWIGINTERN char*
     756SWIG_Python_str_AsChar(PyObject *str)
     757{
     758#if PY_VERSION_HEX >= 0x03000000
     759  char *cstr;
     760  char *newstr;
     761  Py_ssize_t len;
     762  str = PyUnicode_AsUTF8String(str);
     763  PyBytes_AsStringAndSize(str, &cstr, &len);
     764  newstr = (char *) malloc(len+1);
     765  memcpy(newstr, cstr, len+1);
     766  Py_XDECREF(str);
     767  return newstr;
     768#else
     769  return PyString_AsString(str);
     770#endif
     771}
     772
     773#if PY_VERSION_HEX >= 0x03000000
     774#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
     775#else
     776#  define SWIG_Python_str_DelForPy3(x)
     777#endif
     778
     779
     780SWIGINTERN PyObject*
     781SWIG_Python_str_FromChar(const char *c)
     782{
     783#if PY_VERSION_HEX >= 0x03000000
     784  return PyUnicode_FromString(c);
     785#else
     786  return PyString_FromString(c);
     787#endif
     788}
    713789
    714790/* Add PyOS_snprintf for old Pythons */
     
    757833# endif
    758834#endif
     835
    759836/* Py_NotImplemented is defined in 2.1 and up. */
    760837#if PY_VERSION_HEX < 0x02010000
     
    764841#endif
    765842
    766 
    767843/* A crude PyString_AsStringAndSize implementation for old Pythons */
    768844#if PY_VERSION_HEX < 0x02010000
     
    778854# endif
    779855#endif
    780 
    781856
    782857/* PyBool_FromLong for old Pythons */
     
    857932  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
    858933  if (value) {
     934    char *tmp;
    859935    PyObject *old_str = PyObject_Str(value);
    860936    PyErr_Clear();
    861937    Py_XINCREF(type);
    862     PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
     938
     939    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
     940    SWIG_Python_str_DelForPy3(tmp);
    863941    Py_DECREF(old_str);
    864942    Py_DECREF(value);
     
    867945  }
    868946}
    869 
    870 
    871947
    872948#if defined(SWIG_PYTHON_NO_THREADS)
     
    9661042} swig_const_info;
    9671043
     1044
     1045/* -----------------------------------------------------------------------------
     1046 * Wrapper of PyInstanceMethod_New() used in Python 3
     1047 * It is exported to the generated module, used for -fastproxy
     1048 * ----------------------------------------------------------------------------- */
     1049SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
     1050{
     1051#if PY_VERSION_HEX >= 0x03000000
     1052  return PyInstanceMethod_New(func);
     1053#else
     1054  return NULL;
     1055#endif
     1056}
     1057
    9681058#ifdef __cplusplus
    9691059#if 0
     
    10181108#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
    10191109#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
    1020 #define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
     1110#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
    10211111
    10221112#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                           
     
    12141304}
    12151305
    1216 /* PySwigClientData */
     1306/* SwigPyClientData */
    12171307
    12181308typedef struct {
     
    12231313  int delargs;
    12241314  int implicitconv;
    1225 } PySwigClientData;
     1315} SwigPyClientData;
    12261316
    12271317SWIGRUNTIMEINLINE int
    12281318SWIG_Python_CheckImplicit(swig_type_info *ty)
    12291319{
    1230   PySwigClientData *data = (PySwigClientData *)ty->clientdata;
     1320  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
    12311321  return data ? data->implicitconv : 0;
    12321322}
     
    12341324SWIGRUNTIMEINLINE PyObject *
    12351325SWIG_Python_ExceptionType(swig_type_info *desc) {
    1236   PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
     1326  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
    12371327  PyObject *klass = data ? data->klass : 0;
    12381328  return (klass ? klass : PyExc_RuntimeError);
     
    12401330
    12411331
    1242 SWIGRUNTIME PySwigClientData *
    1243 PySwigClientData_New(PyObject* obj)
     1332SWIGRUNTIME SwigPyClientData *
     1333SwigPyClientData_New(PyObject* obj)
    12441334{
    12451335  if (!obj) {
    12461336    return 0;
    12471337  } else {
    1248     PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
     1338    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    12491339    /* the klass element */
    12501340    data->klass = obj;
     
    12941384
    12951385SWIGRUNTIME void
    1296 PySwigClientData_Del(PySwigClientData* data)
     1386SwigPyClientData_Del(SwigPyClientData* data)
    12971387{
    12981388  Py_XDECREF(data->newraw);
     
    13011391}
    13021392
    1303 /* =============== PySwigObject =====================*/
     1393/* =============== SwigPyObject =====================*/
    13041394
    13051395typedef struct {
     
    13091399  int own;
    13101400  PyObject *next;
    1311 } PySwigObject;
     1401} SwigPyObject;
    13121402
    13131403SWIGRUNTIME PyObject *
    1314 PySwigObject_long(PySwigObject *v)
     1404SwigPyObject_long(SwigPyObject *v)
    13151405{
    13161406  return PyLong_FromVoidPtr(v->ptr);
     
    13181408
    13191409SWIGRUNTIME PyObject *
    1320 PySwigObject_format(const char* fmt, PySwigObject *v)
     1410SwigPyObject_format(const char* fmt, SwigPyObject *v)
    13211411{
    13221412  PyObject *res = NULL;
    13231413  PyObject *args = PyTuple_New(1);
    13241414  if (args) {
    1325     if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
    1326       PyObject *ofmt = PyString_FromString(fmt);
     1415    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
     1416      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
    13271417      if (ofmt) {
     1418#if PY_VERSION_HEX >= 0x03000000
     1419        res = PyUnicode_Format(ofmt,args);
     1420#else
    13281421        res = PyString_Format(ofmt,args);
     1422#endif
    13291423        Py_DECREF(ofmt);
    13301424      }
     
    13361430
    13371431SWIGRUNTIME PyObject *
    1338 PySwigObject_oct(PySwigObject *v)
     1432SwigPyObject_oct(SwigPyObject *v)
    13391433{
    1340   return PySwigObject_format("%o",v);
     1434  return SwigPyObject_format("%o",v);
    13411435}
    13421436
    13431437SWIGRUNTIME PyObject *
    1344 PySwigObject_hex(PySwigObject *v)
     1438SwigPyObject_hex(SwigPyObject *v)
    13451439{
    1346   return PySwigObject_format("%x",v);
     1440  return SwigPyObject_format("%x",v);
    13471441}
    13481442
    13491443SWIGRUNTIME PyObject *
    13501444#ifdef METH_NOARGS
    1351 PySwigObject_repr(PySwigObject *v)
     1445SwigPyObject_repr(SwigPyObject *v)
    13521446#else
    1353 PySwigObject_repr(PySwigObject *v, PyObject *args)
     1447SwigPyObject_repr(SwigPyObject *v, PyObject *args)
    13541448#endif
    13551449{
    13561450  const char *name = SWIG_TypePrettyName(v->ty);
    1357   PyObject *hex = PySwigObject_hex(v);   
    1358   PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
    1359   Py_DECREF(hex);
     1451  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
    13601452  if (v->next) {
    13611453#ifdef METH_NOARGS
    1362     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
     1454    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    13631455#else
    1364     PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
    1365 #endif
     1456    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
     1457#endif
     1458#if PY_VERSION_HEX >= 0x03000000
     1459    PyObject *joined = PyUnicode_Concat(repr, nrep);
     1460    Py_DecRef(repr);
     1461    Py_DecRef(nrep);
     1462    repr = joined;
     1463#else
    13661464    PyString_ConcatAndDel(&repr,nrep);
     1465#endif
    13671466  }
    13681467  return repr; 
     
    13701469
    13711470SWIGRUNTIME int
    1372 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
     1471SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    13731472{
     1473  char *str;
    13741474#ifdef METH_NOARGS
    1375   PyObject *repr = PySwigObject_repr(v);
     1475  PyObject *repr = SwigPyObject_repr(v);
    13761476#else
    1377   PyObject *repr = PySwigObject_repr(v, NULL);
     1477  PyObject *repr = SwigPyObject_repr(v, NULL);
    13781478#endif
    13791479  if (repr) {
    1380     fputs(PyString_AsString(repr), fp);
     1480    str = SWIG_Python_str_AsChar(repr);
     1481    fputs(str, fp);
     1482    SWIG_Python_str_DelForPy3(str);
    13811483    Py_DECREF(repr);
    13821484    return 0;
     
    13871489
    13881490SWIGRUNTIME PyObject *
    1389 PySwigObject_str(PySwigObject *v)
     1491SwigPyObject_str(SwigPyObject *v)
    13901492{
    13911493  char result[SWIG_BUFFER_SIZE];
    13921494  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
    1393     PyString_FromString(result) : 0;
     1495    SWIG_Python_str_FromChar(result) : 0;
    13941496}
    13951497
    13961498SWIGRUNTIME int
    1397 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
     1499SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
    13981500{
    13991501  void *i = v->ptr;
     
    14021504}
    14031505
     1506/* Added for Python 3.x, would it also be useful for Python 2.x? */
     1507SWIGRUNTIME PyObject*
     1508SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
     1509{
     1510  PyObject* res;
     1511  if( op != Py_EQ && op != Py_NE ) {
     1512    Py_INCREF(Py_NotImplemented);
     1513    return Py_NotImplemented;
     1514  }
     1515  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
     1516    res = Py_True;
     1517  else
     1518    res = Py_False;
     1519  Py_INCREF(res);
     1520  return res; 
     1521}
     1522
     1523
    14041524SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
    14051525
    14061526SWIGRUNTIME PyTypeObject*
    1407 PySwigObject_type(void) {
     1527SwigPyObject_type(void) {
    14081528  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    14091529  return type;
     
    14111531
    14121532SWIGRUNTIMEINLINE int
    1413 PySwigObject_Check(PyObject *op) {
    1414   return ((op)->ob_type == PySwigObject_type())
    1415     || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
     1533SwigPyObject_Check(PyObject *op) {
     1534  return (Py_TYPE(op) == SwigPyObject_type())
     1535    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
    14161536}
    14171537
    14181538SWIGRUNTIME PyObject *
    1419 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
     1539SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
    14201540
    14211541SWIGRUNTIME void
    1422 PySwigObject_dealloc(PyObject *v)
     1542SwigPyObject_dealloc(PyObject *v)
    14231543{
    1424   PySwigObject *sobj = (PySwigObject *) v;
     1544  SwigPyObject *sobj = (SwigPyObject *) v;
    14251545  PyObject *next = sobj->next;
    14261546  if (sobj->own == SWIG_POINTER_OWN) {
    14271547    swig_type_info *ty = sobj->ty;
    1428     PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
     1548    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    14291549    PyObject *destroy = data ? data->destroy : 0;
    14301550    if (destroy) {
     
    14321552      PyObject *res;
    14331553      if (data->delargs) {
    1434         /* we need to create a temporal object to carry the destroy operation */
    1435         PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
     1554        /* we need to create a temporary object to carry the destroy operation */
     1555        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    14361556        res = SWIG_Python_CallFunctor(destroy, tmp);
    14371557        Py_DECREF(tmp);
     
    14551575
    14561576SWIGRUNTIME PyObject*
    1457 PySwigObject_append(PyObject* v, PyObject* next)
     1577SwigPyObject_append(PyObject* v, PyObject* next)
    14581578{
    1459   PySwigObject *sobj = (PySwigObject *) v;
     1579  SwigPyObject *sobj = (SwigPyObject *) v;
    14601580#ifndef METH_O
    14611581  PyObject *tmp = 0;
     
    14631583  next = tmp;
    14641584#endif
    1465   if (!PySwigObject_Check(next)) {
     1585  if (!SwigPyObject_Check(next)) {
    14661586    return NULL;
    14671587  }
     
    14731593SWIGRUNTIME PyObject*
    14741594#ifdef METH_NOARGS
    1475 PySwigObject_next(PyObject* v)
     1595SwigPyObject_next(PyObject* v)
    14761596#else
    1477 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1597SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    14781598#endif
    14791599{
    1480   PySwigObject *sobj = (PySwigObject *) v;
     1600  SwigPyObject *sobj = (SwigPyObject *) v;
    14811601  if (sobj->next) {   
    14821602    Py_INCREF(sobj->next);
     
    14891609SWIGINTERN PyObject*
    14901610#ifdef METH_NOARGS
    1491 PySwigObject_disown(PyObject *v)
     1611SwigPyObject_disown(PyObject *v)
    14921612#else
    1493 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1613SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    14941614#endif
    14951615{
    1496   PySwigObject *sobj = (PySwigObject *)v;
     1616  SwigPyObject *sobj = (SwigPyObject *)v;
    14971617  sobj->own = 0;
    14981618  return SWIG_Py_Void();
     
    15011621SWIGINTERN PyObject*
    15021622#ifdef METH_NOARGS
    1503 PySwigObject_acquire(PyObject *v)
     1623SwigPyObject_acquire(PyObject *v)
    15041624#else
    1505 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
     1625SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    15061626#endif
    15071627{
    1508   PySwigObject *sobj = (PySwigObject *)v;
     1628  SwigPyObject *sobj = (SwigPyObject *)v;
    15091629  sobj->own = SWIG_POINTER_OWN;
    15101630  return SWIG_Py_Void();
     
    15121632
    15131633SWIGINTERN PyObject*
    1514 PySwigObject_own(PyObject *v, PyObject *args)
     1634SwigPyObject_own(PyObject *v, PyObject *args)
    15151635{
    15161636  PyObject *val = 0;
     
    15251645  else
    15261646    {
    1527       PySwigObject *sobj = (PySwigObject *)v;
     1647      SwigPyObject *sobj = (SwigPyObject *)v;
    15281648      PyObject *obj = PyBool_FromLong(sobj->own);
    15291649      if (val) {
    15301650#ifdef METH_NOARGS
    15311651        if (PyObject_IsTrue(val)) {
    1532           PySwigObject_acquire(v);
     1652          SwigPyObject_acquire(v);
    15331653        } else {
    1534           PySwigObject_disown(v);
     1654          SwigPyObject_disown(v);
    15351655        }
    15361656#else
    15371657        if (PyObject_IsTrue(val)) {
    1538           PySwigObject_acquire(v,args);
     1658          SwigPyObject_acquire(v,args);
    15391659        } else {
    1540           PySwigObject_disown(v,args);
     1660          SwigPyObject_disown(v,args);
    15411661        }
    15421662#endif
     
    15491669static PyMethodDef
    15501670swigobject_methods[] = {
    1551   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
    1552   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
    1553   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
    1554   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
    1555   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
    1556   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
     1671  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
     1672  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
     1673  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
     1674  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
     1675  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
     1676  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
    15571677  {0, 0, 0, 0} 
    15581678};
     
    15601680static PyMethodDef
    15611681swigobject_methods[] = {
    1562   {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
    1563   {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
    1564   {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
    1565   {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
    1566   {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
    1567   {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
     1682  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
     1683  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
     1684  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
     1685  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
     1686  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
     1687  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
    15681688  {0, 0, 0, 0} 
    15691689};
     
    15721692#if PY_VERSION_HEX < 0x02020000
    15731693SWIGINTERN PyObject *
    1574 PySwigObject_getattr(PySwigObject *sobj,char *name)
     1694SwigPyObject_getattr(SwigPyObject *sobj,char *name)
    15751695{
    15761696  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
     
    15821702  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    15831703 
    1584   static PyNumberMethods PySwigObject_as_number = {
     1704  static PyNumberMethods SwigPyObject_as_number = {
    15851705    (binaryfunc)0, /*nb_add*/
    15861706    (binaryfunc)0, /*nb_subtract*/
    15871707    (binaryfunc)0, /*nb_multiply*/
     1708    /* nb_divide removed in Python 3 */
     1709#if PY_VERSION_HEX < 0x03000000
    15881710    (binaryfunc)0, /*nb_divide*/
     1711#endif
    15891712    (binaryfunc)0, /*nb_remainder*/
    15901713    (binaryfunc)0, /*nb_divmod*/
     
    16001723    0,             /*nb_xor*/
    16011724    0,             /*nb_or*/
    1602     (coercion)0,   /*nb_coerce*/
    1603     (unaryfunc)PySwigObject_long, /*nb_int*/
    1604     (unaryfunc)PySwigObject_long, /*nb_long*/
     1725#if PY_VERSION_HEX < 0x03000000
     1726    0,   /*nb_coerce*/
     1727#endif
     1728    (unaryfunc)SwigPyObject_long, /*nb_int*/
     1729#if PY_VERSION_HEX < 0x03000000
     1730    (unaryfunc)SwigPyObject_long, /*nb_long*/
     1731#else
     1732    0, /*nb_reserved*/
     1733#endif
    16051734    (unaryfunc)0,                 /*nb_float*/
    1606     (unaryfunc)PySwigObject_oct,  /*nb_oct*/
    1607     (unaryfunc)PySwigObject_hex,  /*nb_hex*/
    1608 #if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
     1735#if PY_VERSION_HEX < 0x03000000
     1736    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
     1737    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
     1738#endif
     1739#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
     1740    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
     1741#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    16091742    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
    16101743#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
     
    16151748  };
    16161749
    1617   static PyTypeObject pyswigobject_type; 
     1750  static PyTypeObject swigpyobject_type; 
    16181751  static int type_init = 0;
    16191752  if (!type_init) {
    16201753    const PyTypeObject tmp
    16211754      = {
     1755        /* PyObject header changed in Python 3 */
     1756#if PY_VERSION_HEX >= 0x03000000
     1757        PyVarObject_HEAD_INIT(&PyType_Type, 0)
     1758#else   
    16221759        PyObject_HEAD_INIT(NULL)
    16231760        0,                                  /* ob_size */
    1624         (char *)"PySwigObject",             /* tp_name */
    1625         sizeof(PySwigObject),               /* tp_basicsize */
     1761#endif
     1762        (char *)"SwigPyObject",             /* tp_name */
     1763        sizeof(SwigPyObject),               /* tp_basicsize */
    16261764        0,                                  /* tp_itemsize */
    1627         (destructor)PySwigObject_dealloc,   /* tp_dealloc */
    1628         (printfunc)PySwigObject_print,      /* tp_print */
     1765        (destructor)SwigPyObject_dealloc,   /* tp_dealloc */
     1766        (printfunc)SwigPyObject_print,      /* tp_print */
    16291767#if PY_VERSION_HEX < 0x02020000
    1630         (getattrfunc)PySwigObject_getattr,  /* tp_getattr */
     1768        (getattrfunc)SwigPyObject_getattr,  /* tp_getattr */
    16311769#else
    16321770        (getattrfunc)0,                     /* tp_getattr */
    16331771#endif
    16341772        (setattrfunc)0,                     /* tp_setattr */
    1635         (cmpfunc)PySwigObject_compare,      /* tp_compare */
    1636         (reprfunc)PySwigObject_repr,        /* tp_repr */   
    1637         &PySwigObject_as_number,            /* tp_as_number */
     1773#if PY_VERSION_HEX >= 0x03000000
     1774    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
     1775#else
     1776        (cmpfunc)SwigPyObject_compare,      /* tp_compare */
     1777#endif
     1778        (reprfunc)SwigPyObject_repr,        /* tp_repr */   
     1779        &SwigPyObject_as_number,            /* tp_as_number */
    16381780        0,                                  /* tp_as_sequence */
    16391781        0,                                  /* tp_as_mapping */
    16401782        (hashfunc)0,                        /* tp_hash */
    16411783        (ternaryfunc)0,                     /* tp_call */
    1642         (reprfunc)PySwigObject_str,         /* tp_str */
     1784        (reprfunc)SwigPyObject_str,         /* tp_str */
    16431785        PyObject_GenericGetAttr,            /* tp_getattro */
    16441786        0,                                  /* tp_setattro */
     
    16481790        0,                                  /* tp_traverse */
    16491791        0,                                  /* tp_clear */
    1650         0,                                  /* tp_richcompare */
     1792        (richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
    16511793        0,                                  /* tp_weaklistoffset */
    16521794#if PY_VERSION_HEX >= 0x02020000
     
    16651807        0,                                  /* tp_new */               
    16661808        0,                                  /* tp_free */         
    1667         0,                                  /* tp_is_gc */ 
     1809        0,                                  /* tp_is_gc */ 
    16681810        0,                                  /* tp_bases */   
    16691811        0,                                  /* tp_mro */
    16701812        0,                                  /* tp_cache */   
    1671         0,                                  /* tp_subclasses */
     1813        0,                                  /* tp_subclasses */
    16721814        0,                                  /* tp_weaklist */
    16731815#endif
     
    16791821#endif
    16801822      };
    1681     pyswigobject_type = tmp;
    1682     pyswigobject_type.ob_type = &PyType_Type;
     1823    swigpyobject_type = tmp;
     1824    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
     1825#if PY_VERSION_HEX < 0x03000000
     1826    swigpyobject_type.ob_type = &PyType_Type;
     1827#endif
    16831828    type_init = 1;
    16841829  }
    1685   return &pyswigobject_type;
     1830  return &swigpyobject_type;
    16861831}
    16871832
    16881833SWIGRUNTIME PyObject *
    1689 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
     1834SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    16901835{
    1691   PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
     1836  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    16921837  if (sobj) {
    16931838    sobj->ptr  = ptr;
     
    17081853  swig_type_info *ty;
    17091854  size_t size;
    1710 } PySwigPacked;
     1855} SwigPyPacked;
    17111856
    17121857SWIGRUNTIME int
    1713 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
     1858SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    17141859{
    17151860  char result[SWIG_BUFFER_SIZE];
     
    17251870 
    17261871SWIGRUNTIME PyObject *
    1727 PySwigPacked_repr(PySwigPacked *v)
     1872SwigPyPacked_repr(SwigPyPacked *v)
    17281873{
    17291874  char result[SWIG_BUFFER_SIZE];
    17301875  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    1731     return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
     1876    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
    17321877  } else {
    1733     return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
     1878    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
    17341879  } 
    17351880}
    17361881
    17371882SWIGRUNTIME PyObject *
    1738 PySwigPacked_str(PySwigPacked *v)
     1883SwigPyPacked_str(SwigPyPacked *v)
    17391884{
    17401885  char result[SWIG_BUFFER_SIZE];
    17411886  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    1742     return PyString_FromFormat("%s%s", result, v->ty->name);
     1887    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
    17431888  } else {
    1744     return PyString_FromString(v->ty->name);
     1889    return SWIG_Python_str_FromChar(v->ty->name);
    17451890  } 
    17461891}
    17471892
    17481893SWIGRUNTIME int
    1749 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
     1894SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
    17501895{
    17511896  size_t i = v->size;
     
    17581903
    17591904SWIGRUNTIME PyTypeObject*
    1760 PySwigPacked_type(void) {
     1905SwigPyPacked_type(void) {
    17611906  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
    17621907  return type;
     
    17641909
    17651910SWIGRUNTIMEINLINE int
    1766 PySwigPacked_Check(PyObject *op) {
     1911SwigPyPacked_Check(PyObject *op) {
    17671912  return ((op)->ob_type == _PySwigPacked_type())
    1768     || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
     1913    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
    17691914}
    17701915
    17711916SWIGRUNTIME void
    1772 PySwigPacked_dealloc(PyObject *v)
     1917SwigPyPacked_dealloc(PyObject *v)
    17731918{
    1774   if (PySwigPacked_Check(v)) {
    1775     PySwigPacked *sobj = (PySwigPacked *) v;
     1919  if (SwigPyPacked_Check(v)) {
     1920    SwigPyPacked *sobj = (SwigPyPacked *) v;
    17761921    free(sobj->pack);
    17771922  }
     
    17821927_PySwigPacked_type(void) {
    17831928  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1784   static PyTypeObject pyswigpacked_type;
     1929  static PyTypeObject swigpypacked_type;
    17851930  static int type_init = 0; 
    17861931  if (!type_init) {
    17871932    const PyTypeObject tmp
    17881933      = {
     1934    /* PyObject header changed in Python 3 */
     1935#if PY_VERSION_HEX>=0x03000000
     1936    PyVarObject_HEAD_INIT(&PyType_Type, 0)
     1937#else
    17891938        PyObject_HEAD_INIT(NULL)
    1790         0,                                  /* ob_size */       
    1791         (char *)"PySwigPacked",             /* tp_name */       
    1792         sizeof(PySwigPacked),               /* tp_basicsize */ 
     1939    0,                              /* ob_size */       
     1940#endif
     1941        (char *)"SwigPyPacked",             /* tp_name */       
     1942        sizeof(SwigPyPacked),               /* tp_basicsize */ 
    17931943        0,                                  /* tp_itemsize */   
    1794         (destructor)PySwigPacked_dealloc,   /* tp_dealloc */   
    1795         (printfunc)PySwigPacked_print,      /* tp_print */     
     1944        (destructor)SwigPyPacked_dealloc,   /* tp_dealloc */   
     1945        (printfunc)SwigPyPacked_print,      /* tp_print */     
    17961946        (getattrfunc)0,                     /* tp_getattr */   
    17971947        (setattrfunc)0,                     /* tp_setattr */   
    1798         (cmpfunc)PySwigPacked_compare,      /* tp_compare */   
    1799         (reprfunc)PySwigPacked_repr,        /* tp_repr */       
    1800         0,                                  /* tp_as_number */ 
     1948#if PY_VERSION_HEX>=0x03000000
     1949    0, /* tp_reserved in 3.0.1 */
     1950#else
     1951    (cmpfunc)SwigPyPacked_compare,          /* tp_compare */
     1952#endif
     1953        (reprfunc)SwigPyPacked_repr,        /* tp_repr */
     1954        0,                                  /* tp_as_number */
    18011955        0,                                  /* tp_as_sequence */
    1802         0,                                  /* tp_as_mapping */ 
    1803         (hashfunc)0,                        /* tp_hash */       
    1804         (ternaryfunc)0,                     /* tp_call */       
    1805         (reprfunc)PySwigPacked_str,         /* tp_str */       
     1956        0,                                  /* tp_as_mapping */
     1957        (hashfunc)0,                        /* tp_hash */
     1958        (ternaryfunc)0,                     /* tp_call */
     1959        (reprfunc)SwigPyPacked_str,         /* tp_str */
    18061960        PyObject_GenericGetAttr,            /* tp_getattro */
    18071961        0,                                  /* tp_setattro */
     
    18421996#endif
    18431997      };
    1844     pyswigpacked_type = tmp;
    1845     pyswigpacked_type.ob_type = &PyType_Type;
     1998    swigpypacked_type = tmp;
     1999    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
     2000#if PY_VERSION_HEX < 0x03000000
     2001    swigpypacked_type.ob_type = &PyType_Type;
     2002#endif
    18462003    type_init = 1;
    18472004  }
    1848   return &pyswigpacked_type;
     2005  return &swigpypacked_type;
    18492006}
    18502007
    18512008SWIGRUNTIME PyObject *
    1852 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
     2009SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
    18532010{
    1854   PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
     2011  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
    18552012  if (sobj) {
    18562013    void *pack = malloc(size);
     
    18692026
    18702027SWIGRUNTIME swig_type_info *
    1871 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
     2028SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
    18722029{
    1873   if (PySwigPacked_Check(obj)) {
    1874     PySwigPacked *sobj = (PySwigPacked *)obj;
     2030  if (SwigPyPacked_Check(obj)) {
     2031    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    18752032    if (sobj->size != size) return 0;
    18762033    memcpy(ptr, sobj->pack, size);
     
    18882045_SWIG_This(void)
    18892046{
    1890   return PyString_FromString("this");
     2047    return SWIG_Python_str_FromChar("this");
    18912048}
    18922049
     
    19002057/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
    19012058
    1902 SWIGRUNTIME PySwigObject *
     2059/* TODO: I don't know how to implement the fast getset in Python 3 right now */
     2060#if PY_VERSION_HEX>=0x03000000
     2061#define SWIG_PYTHON_SLOW_GETSET_THIS
     2062#endif
     2063
     2064SWIGRUNTIME SwigPyObject *
    19032065SWIG_Python_GetSwigThis(PyObject *pyobj)
    19042066{
    1905   if (PySwigObject_Check(pyobj)) {
    1906     return (PySwigObject *) pyobj;
     2067  if (SwigPyObject_Check(pyobj)) {
     2068    return (SwigPyObject *) pyobj;
    19072069  } else {
    19082070    PyObject *obj = 0;
     
    19402102    }
    19412103#endif
    1942     if (obj && !PySwigObject_Check(obj)) {
     2104    if (obj && !SwigPyObject_Check(obj)) {
    19432105      /* a PyObject is called 'this', try to get the 'real this'
    1944          PySwigObject from it */
     2106         SwigPyObject from it */
    19452107      return SWIG_Python_GetSwigThis(obj);
    19462108    }
    1947     return (PySwigObject *)obj;
     2109    return (SwigPyObject *)obj;
    19482110  }
    19492111}
     
    19542116SWIG_Python_AcquirePtr(PyObject *obj, int own) {
    19552117  if (own == SWIG_POINTER_OWN) {
    1956     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
     2118    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    19572119    if (sobj) {
    19582120      int oldown = sobj->own;
     
    19732135    return SWIG_OK;
    19742136  } else {
    1975     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
     2137    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    19762138    if (own)
    19772139      *own = 0;
     
    19872149          swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    19882150          if (!tc) {
    1989             sobj = (PySwigObject *)sobj->next;
     2151            sobj = (SwigPyObject *)sobj->next;
    19902152          } else {
    19912153            if (ptr) {
     
    20162178      int res = SWIG_ERROR;
    20172179      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
    2018         PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
     2180        SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    20192181        if (data && !data->implicitconv) {
    20202182          PyObject *klass = data->klass;
     
    20292191            }
    20302192            if (impconv) {
    2031               PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
     2193              SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
    20322194              if (iobj) {
    20332195                void *vptr;
     
    20672229    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    20682230    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    2069     if (desc) {
     2231    if (desc)
    20702232      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    2071       if (!desc) return SWIG_ERROR;
    2072     }
     2233    if (!desc)
     2234      return SWIG_ERROR;
    20732235    if (ty) {
    20742236      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
     
    20912253SWIGRUNTIME int
    20922254SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
    2093   swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
     2255  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
    20942256  if (!to) return SWIG_ERROR;
    20952257  if (ty) {
     
    21082270
    21092271/*
    2110   Create a new instance object, whitout calling __init__, and set the
     2272  Create a new instance object, without calling __init__, and set the
    21112273  'this' attribute.
    21122274*/
    21132275
    21142276SWIGRUNTIME PyObject*
    2115 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
     2277SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    21162278{
    21172279#if (PY_VERSION_HEX >= 0x02020000)
     
    21372299    }
    21382300  } else {
     2301#if PY_VERSION_HEX >= 0x03000000
     2302    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
     2303    PyObject_SetAttr(inst, SWIG_This(), swig_this);
     2304    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
     2305#else
    21392306    PyObject *dict = PyDict_New();
    21402307    PyDict_SetItem(dict, SWIG_This(), swig_this);
    21412308    inst = PyInstance_NewRaw(data->newargs, dict);
    21422309    Py_DECREF(dict);
     2310#endif
    21432311  }
    21442312  return inst;
     
    22032371    return NULL;
    22042372  } else {
    2205     PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
     2373    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    22062374    if (sthis) {
    2207       PySwigObject_append((PyObject*) sthis, obj[1]);
     2375      SwigPyObject_append((PyObject*) sthis, obj[1]);
    22082376    } else {
    22092377      SWIG_Python_SetSwigThis(obj[0], obj[1]);
     
    22212389  } else {
    22222390    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2223     PyObject *robj = PySwigObject_New(ptr, type, own);
    2224     PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
     2391    PyObject *robj = SwigPyObject_New(ptr, type, own);
     2392    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    22252393    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    22262394      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
     
    22382406SWIGRUNTIMEINLINE PyObject *
    22392407SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
    2240   return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
     2408  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
    22412409}
    22422410
     
    23092477    swig_type_info *ty = types[i];
    23102478    if (ty->owndata) {
    2311       PySwigClientData *data = (PySwigClientData *) ty->clientdata;
    2312       if (data) PySwigClientData_Del(data);
     2479      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
     2480      if (data) SwigPyClientData_Del(data);
    23132481    }
    23142482  }
     
    23202488  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
    23212489
     2490#if PY_VERSION_HEX >= 0x03000000
     2491 /* Add a dummy module object into sys.modules */
     2492  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
     2493#else
    23222494  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
    23232495                                   swig_empty_runtime_method_table);
     2496#endif
    23242497  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
    23252498  if (pointer && module) {
     
    23412514{
    23422515  PyObject *cache = SWIG_Python_TypeCache();
    2343   PyObject *key = PyString_FromString(type);
     2516  PyObject *key = SWIG_Python_str_FromChar(type);
    23442517  PyObject *obj = PyDict_GetItem(cache, key);
    23452518  swig_type_info *descriptor;
     
    23682541SWIGRUNTIME int
    23692542SWIG_Python_AddErrMesg(const char* mesg, int infront)
    2370 {
     2543{ 
    23712544  if (PyErr_Occurred()) {
    23722545    PyObject *type = 0;
     
    23752548    PyErr_Fetch(&type, &value, &traceback);
    23762549    if (value) {
     2550      char *tmp;
    23772551      PyObject *old_str = PyObject_Str(value);
    23782552      Py_XINCREF(type);
    23792553      PyErr_Clear();
    23802554      if (infront) {
    2381         PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
     2555        PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
    23822556      } else {
    2383         PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
     2557        PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    23842558      }
     2559      SWIG_Python_str_DelForPy3(tmp);
    23852560      Py_DECREF(old_str);
    23862561    }
     
    24052580
    24062581SWIGRUNTIMEINLINE const char *
    2407 PySwigObject_GetDesc(PyObject *self)
     2582SwigPyObject_GetDesc(PyObject *self)
    24082583{
    2409   PySwigObject *v = (PySwigObject *)self;
     2584  SwigPyObject *v = (SwigPyObject *)self;
    24102585  swig_type_info *ty = v ? v->ty : 0;
    24112586  return ty ? ty->str : (char*)"";
     
    24172592  if (type) {
    24182593#if defined(SWIG_COBJECT_TYPES)
    2419     if (obj && PySwigObject_Check(obj)) {
    2420       const char *otype = (const char *) PySwigObject_GetDesc(obj);
     2594    if (obj && SwigPyObject_Check(obj)) {
     2595      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
    24212596      if (otype) {
    2422         PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
     2597        PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
    24232598                     type, otype);
    24242599        return;
     
    24302605      if (otype) {
    24312606        PyObject *str = PyObject_Str(obj);
    2432         const char *cstr = str ? PyString_AsString(str) : 0;
     2607        const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
    24332608        if (cstr) {
    24342609          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
    24352610                       type, otype, cstr);
     2611          SWIG_Python_str_DelForPy3(cstr);
    24362612        } else {
    24372613          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
     
    24552631  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    24562632    PyErr_Clear();
    2457     if (flags & SWIG_POINTER_EXCEPTION) {
     2633#if SWIG_POINTER_EXCEPTION
     2634    if (flags) {
    24582635      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    24592636      SWIG_Python_ArgFail(argnum);
    24602637    }
     2638#endif
    24612639  }
    24622640  return result;
     
    25042682              @(target):= _pbs.so
    25052683  ------------------------------------------------*/
    2506 #define SWIG_init    init_pbs
    2507 
     2684#if PY_VERSION_HEX >= 0x03000000
     2685#  define SWIG_init    PyInit__pbs
     2686
     2687#else
     2688#  define SWIG_init    init_pbs
     2689
     2690#endif
    25082691#define SWIG_name    "_pbs"
    25092692
    2510 #define SWIGVERSION 0x010336
     2693#define SWIGVERSION 0x010340
    25112694#define SWIG_VERSION SWIGVERSION
    25122695
     
    28203003        SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    28213004    } else {
     3005#if PY_VERSION_HEX >= 0x03000000
     3006      return PyUnicode_FromStringAndSize(carray, (int)(size));
     3007#else
    28223008      return PyString_FromStringAndSize(carray, (int)(size));
     3009#endif
    28233010    }
    28243011  } else {
     
    28383025SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    28393026{
    2840   if (PyString_Check(obj)) {
     3027#if PY_VERSION_HEX>=0x03000000
     3028  if (PyUnicode_Check(obj))
     3029#else 
     3030  if (PyString_Check(obj))
     3031#endif
     3032  {
    28413033    char *cstr; Py_ssize_t len;
     3034#if PY_VERSION_HEX>=0x03000000
     3035    if (!alloc && cptr) {
     3036        /* We can't allow converting without allocation, since the internal
     3037           representation of string in Python 3 is UCS-2/UCS-4 but we require
     3038           a UTF-8 representation.
     3039           TODO(bhy) More detailed explanation */
     3040        return SWIG_RuntimeError;
     3041    }
     3042    obj = PyUnicode_AsUTF8String(obj);
     3043    PyBytes_AsStringAndSize(obj, &cstr, &len);
     3044    if(alloc) *alloc = SWIG_NEWOBJ;
     3045#else
    28423046    PyString_AsStringAndSize(obj, &cstr, &len);
    2843     if (cptr)  {
     3047#endif
     3048    if (cptr) {
    28443049      if (alloc) {
    28453050        /*
     
    28663071        }
    28673072      } else {
    2868         *cptr = PyString_AsString(obj);
     3073        #if PY_VERSION_HEX>=0x03000000
     3074        assert(0); /* Should never reach here in Python 3 */
     3075        #endif
     3076        *cptr = SWIG_Python_str_AsChar(obj);
    28693077      }
    28703078    }
    28713079    if (psize) *psize = len + 1;
     3080#if PY_VERSION_HEX>=0x03000000
     3081    Py_XDECREF(obj);
     3082#endif
    28723083    return SWIG_OK;
    28733084  } else {
     
    74587669
    74597670static PyMethodDef SwigMethods[] = {
     7671         { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
    74607672         { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
    74617673         { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
     
    78748086  SWIGINTERN PyObject *
    78758087  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
     8088#if PY_VERSION_HEX >= 0x03000000
     8089    return PyUnicode_InternFromString("<Swig global variables>");
     8090#else
    78768091    return PyString_FromString("<Swig global variables>");
     8092#endif
    78778093  }
    78788094 
    78798095  SWIGINTERN PyObject *
    78808096  swig_varlink_str(swig_varlinkobject *v) {
     8097#if PY_VERSION_HEX >= 0x03000000
     8098    PyObject *str = PyUnicode_InternFromString("(");
     8099    PyObject *tail;
     8100    PyObject *joined;
     8101    swig_globalvar *var;
     8102    for (var = v->vars; var; var=var->next) {
     8103      tail = PyUnicode_FromString(var->name);
     8104      joined = PyUnicode_Concat(str, tail);
     8105      Py_DecRef(str);
     8106      Py_DecRef(tail);
     8107      str = joined;
     8108      if (var->next) {
     8109        tail = PyUnicode_InternFromString(", ");
     8110        joined = PyUnicode_Concat(str, tail);
     8111        Py_DecRef(str);
     8112        Py_DecRef(tail);
     8113        str = joined;
     8114      }
     8115    }
     8116    tail = PyUnicode_InternFromString(")");
     8117    joined = PyUnicode_Concat(str, tail);
     8118    Py_DecRef(str);
     8119    Py_DecRef(tail);
     8120    str = joined;
     8121#else
    78818122    PyObject *str = PyString_FromString("(");
    7882     swig_globalvar  *var;
     8123    swig_globalvar *var;
    78838124    for (var = v->vars; var; var=var->next) {
    78848125      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
     
    78868127    }
    78878128    PyString_ConcatAndDel(&str,PyString_FromString(")"));
     8129#endif
    78888130    return str;
    78898131  }
     
    78918133  SWIGINTERN int
    78928134  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
     8135    char *tmp;
    78938136    PyObject *str = swig_varlink_str(v);
    78948137    fprintf(fp,"Swig global variables ");
    7895     fprintf(fp,"%s\n", PyString_AsString(str));
     8138    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
     8139    SWIG_Python_str_DelForPy3(tmp);
    78968140    Py_DECREF(str);
    78978141    return 0;
     
    79518195      const PyTypeObject tmp
    79528196      = {
     8197        /* PyObject header changed in Python 3 */
     8198#if PY_VERSION_HEX >= 0x03000000
     8199        PyVarObject_HEAD_INIT(&PyType_Type, 0)
     8200#else
    79538201        PyObject_HEAD_INIT(NULL)
    79548202        0,                                  /* Number of items in variable part (ob_size) */
     8203#endif
    79558204        (char *)"swigvarlink",              /* Type name (tp_name) */
    79568205        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
    79578206        0,                                  /* Itemsize (tp_itemsize) */
    7958         (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */
     8207        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */
    79598208        (printfunc) swig_varlink_print,     /* Print (tp_print) */
    79608209        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
     
    79678216        0,                                  /* tp_hash */
    79688217        0,                                  /* tp_call */
    7969         (reprfunc)swig_varlink_str,        /* tp_str */
     8218        (reprfunc) swig_varlink_str,        /* tp_str */
    79708219        0,                                  /* tp_getattro */
    79718220        0,                                  /* tp_setattro */
     
    79888237      };
    79898238      varlink_type = tmp;
     8239      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
     8240#if PY_VERSION_HEX < 0x03000000
    79908241      varlink_type.ob_type = &PyType_Type;
     8242#endif
    79918243      type_init = 1;
    79928244    }
     
    81138365extern "C"
    81148366#endif
    8115 SWIGEXPORT void SWIG_init(void) {
    8116   PyObject *m, *d;
     8367
     8368SWIGEXPORT
     8369#if PY_VERSION_HEX >= 0x03000000
     8370PyObject*
     8371#else
     8372void
     8373#endif
     8374SWIG_init(void) {
     8375  PyObject *m, *d; 
     8376#if PY_VERSION_HEX >= 0x03000000
     8377  static struct PyModuleDef SWIG_module = {
     8378    PyModuleDef_HEAD_INIT,
     8379    (char *) SWIG_name,
     8380    NULL,
     8381    -1,
     8382    SwigMethods,
     8383    NULL,
     8384    NULL,
     8385    NULL,
     8386    NULL
     8387  };
     8388#endif
    81178389 
    81188390  /* Fix SwigMethods to carry the callback ptrs when needed */
    81198391  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
    81208392 
     8393#if PY_VERSION_HEX >= 0x03000000
     8394  m = PyModule_Create(&SWIG_module);
     8395#else
    81218396  m = Py_InitModule((char *) SWIG_name, SwigMethods);
     8397#endif
    81228398  d = PyModule_GetDict(m);
    81238399 
     
    84338709  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
    84348710  SWIG_addvarlink(SWIG_globals(),(char*)"msg_daemonname",Swig_var_msg_daemonname_get, Swig_var_msg_daemonname_set);
    8435 }
    8436 
     8711#if PY_VERSION_HEX >= 0x03000000
     8712  return m;
     8713#else
     8714  return;
     8715#endif
     8716}
     8717
Note: See TracChangeset for help on using the changeset viewer.