Changeset 318
- Timestamp:
- 08/28/14 14:53:35 (9 years ago)
- Location:
- devel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/C/pbs_2.1.py
r309 r318 1 1 # This file was automatically generated by SWIG (http://www.swig.org). 2 # Version 1.3.402 # Version 2.0.7 3 3 # 4 4 # Do not make changes to this file unless you know what you are doing--modify 5 5 # the SWIG interface file instead. 6 # This file is compatible with both classic and new-style classes. 6 7 7 8 8 9 from sys import version_info … … 40 41 method = class_type.__swig_setmethods__.get(name,None) 41 42 if method: return method(self,value) 42 if (not static) or hasattr(self,name):43 if (not static): 43 44 self.__dict__[name] = value 44 45 else: … … 102 103 ATTR_v = _pbs.ATTR_v 103 104 ATTR_A = _pbs.ATTR_A 105 ATTR_args = _pbs.ATTR_args 104 106 ATTR_M = _pbs.ATTR_M 105 107 ATTR_N = _pbs.ATTR_N … … 110 112 ATTR_stageout = _pbs.ATTR_stageout 111 113 ATTR_jobtype = _pbs.ATTR_jobtype 114 ATTR_submit_host = _pbs.ATTR_submit_host 115 ATTR_init_work_dir = _pbs.ATTR_init_work_dir 112 116 ATTR_ctime = _pbs.ATTR_ctime 113 117 ATTR_exechost = _pbs.ATTR_exechost … … 152 156 ATTR_reported = _pbs.ATTR_reported 153 157 ATTR_intcmd = _pbs.ATTR_intcmd 158 ATTR_P = _pbs.ATTR_P 159 ATTR_exec_gpus = _pbs.ATTR_exec_gpus 160 ATTR_J = _pbs.ATTR_J 154 161 ATTR_aclgren = _pbs.ATTR_aclgren 155 162 ATTR_aclgroup = _pbs.ATTR_aclgroup … … 160 167 ATTR_altrouter = _pbs.ATTR_altrouter 161 168 ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min 169 ATTR_checkpoint_defaults = _pbs.ATTR_checkpoint_defaults 162 170 ATTR_enable = _pbs.ATTR_enable 163 171 ATTR_fromroute = _pbs.ATTR_fromroute … … 242 250 ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime 243 251 ATTR_npdefault = _pbs.ATTR_npdefault 252 ATTR_clonebatchsize = _pbs.ATTR_clonebatchsize 253 ATTR_clonebatchdelay = _pbs.ATTR_clonebatchdelay 244 254 ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout 255 ATTR_jobforcecanceltime = _pbs.ATTR_jobforcecanceltime 256 ATTR_maxarraysize = _pbs.ATTR_maxarraysize 257 ATTR_maxslotlimit = _pbs.ATTR_maxslotlimit 258 ATTR_recordjobinfo = _pbs.ATTR_recordjobinfo 259 ATTR_recordjobscript = _pbs.ATTR_recordjobscript 260 ATTR_joblogfilemaxsize = _pbs.ATTR_joblogfilemaxsize 261 ATTR_joblogfilerolldepth = _pbs.ATTR_joblogfilerolldepth 262 ATTR_joblogkeepdays = _pbs.ATTR_joblogkeepdays 263 ATTR_moabarraycompatible = _pbs.ATTR_moabarraycompatible 264 ATTR_nomailforce = _pbs.ATTR_nomailforce 245 265 ATTR_NODE_state = _pbs.ATTR_NODE_state 246 266 ATTR_NODE_np = _pbs.ATTR_NODE_np … … 250 270 ATTR_NODE_status = _pbs.ATTR_NODE_status 251 271 ATTR_NODE_note = _pbs.ATTR_NODE_note 272 ATTR_NODE_gpus = _pbs.ATTR_NODE_gpus 273 ATTR_NODE_gpustatus = _pbs.ATTR_NODE_gpustatus 252 274 ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt 253 275 ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt … … 257 279 NO_KEEP = _pbs.NO_KEEP 258 280 MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT 281 ARRAY_RANGE = _pbs.ARRAY_RANGE 259 282 DELDELAY = _pbs.DELDELAY 260 283 DELPURGE = _pbs.DELPURGE 284 DELASYNC = _pbs.DELASYNC 261 285 PURGECOMP = _pbs.PURGECOMP 262 286 EXECQUEONLY = _pbs.EXECQUEONLY … … 274 298 ND_state_unknown = _pbs.ND_state_unknown 275 299 ND_timeshared = _pbs.ND_timeshared 300 ND_active = _pbs.ND_active 301 ND_all = _pbs.ND_all 302 ND_up = _pbs.ND_up 276 303 ND_cluster = _pbs.ND_cluster 277 304 Q_DT_batch = _pbs.Q_DT_batch … … 310 337 PBS_MAXUSER = _pbs.PBS_MAXUSER 311 338 PBS_MAXGRPN = _pbs.PBS_MAXGRPN 339 PBS_MAXGPUID = _pbs.PBS_MAXGPUID 312 340 PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME 313 341 PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME … … 340 368 CHECKPOINTCONT = _pbs.CHECKPOINTCONT 341 369 MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR 370 NO_MOM_RELAY = _pbs.NO_MOM_RELAY 342 371 SET = _pbs.SET 343 372 UNSET = _pbs.UNSET … … 352 381 DFLT = _pbs.DFLT 353 382 MERGE = _pbs.MERGE 383 INCR_OLD = _pbs.INCR_OLD 354 384 class attrl(_object): 355 385 __swig_setmethods__ = {} … … 670 700 FALSE = _pbs.FALSE 671 701 # PBS python interface 672 # Author: Bas van der Vlies <bas v@sara.nl>702 # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> 673 703 # Date : 27 Feb 2002 674 704 # Desc. : This is python wrapper class for getting the resource … … 806 836 version = 'SARA pbs_python version 4.4.0' 807 837 808 # A useful dict with error codes to text 838 ## A useful dict with error codes to text 839 # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> 809 840 # 810 841 # SVN Info: … … 902 933 return (e, "Could not find a text for this error, uhhh") 903 934 935 # This file is compatible with both classic and new-style classes. 904 936 905 937 cvar = _pbs.cvar -
devel/C/pbs_2.4.py
r309 r318 1 1 # This file was automatically generated by SWIG (http://www.swig.org). 2 # Version 1.3.402 # Version 2.0.7 3 3 # 4 4 # Do not make changes to this file unless you know what you are doing--modify 5 5 # the SWIG interface file instead. 6 # This file is compatible with both classic and new-style classes. 6 7 7 8 8 9 from sys import version_info … … 40 41 method = class_type.__swig_setmethods__.get(name,None) 41 42 if method: return method(self,value) 42 if (not static) or hasattr(self,name):43 if (not static): 43 44 self.__dict__[name] = value 44 45 else: … … 102 103 ATTR_v = _pbs.ATTR_v 103 104 ATTR_A = _pbs.ATTR_A 105 ATTR_args = _pbs.ATTR_args 104 106 ATTR_M = _pbs.ATTR_M 105 107 ATTR_N = _pbs.ATTR_N … … 110 112 ATTR_stageout = _pbs.ATTR_stageout 111 113 ATTR_jobtype = _pbs.ATTR_jobtype 114 ATTR_submit_host = _pbs.ATTR_submit_host 115 ATTR_init_work_dir = _pbs.ATTR_init_work_dir 112 116 ATTR_ctime = _pbs.ATTR_ctime 113 117 ATTR_exechost = _pbs.ATTR_exechost … … 152 156 ATTR_reported = _pbs.ATTR_reported 153 157 ATTR_intcmd = _pbs.ATTR_intcmd 158 ATTR_P = _pbs.ATTR_P 159 ATTR_exec_gpus = _pbs.ATTR_exec_gpus 160 ATTR_J = _pbs.ATTR_J 154 161 ATTR_aclgren = _pbs.ATTR_aclgren 155 162 ATTR_aclgroup = _pbs.ATTR_aclgroup … … 160 167 ATTR_altrouter = _pbs.ATTR_altrouter 161 168 ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min 169 ATTR_checkpoint_defaults = _pbs.ATTR_checkpoint_defaults 162 170 ATTR_enable = _pbs.ATTR_enable 163 171 ATTR_fromroute = _pbs.ATTR_fromroute … … 242 250 ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime 243 251 ATTR_npdefault = _pbs.ATTR_npdefault 252 ATTR_clonebatchsize = _pbs.ATTR_clonebatchsize 253 ATTR_clonebatchdelay = _pbs.ATTR_clonebatchdelay 244 254 ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout 255 ATTR_jobforcecanceltime = _pbs.ATTR_jobforcecanceltime 256 ATTR_maxarraysize = _pbs.ATTR_maxarraysize 257 ATTR_maxslotlimit = _pbs.ATTR_maxslotlimit 258 ATTR_recordjobinfo = _pbs.ATTR_recordjobinfo 259 ATTR_recordjobscript = _pbs.ATTR_recordjobscript 260 ATTR_joblogfilemaxsize = _pbs.ATTR_joblogfilemaxsize 261 ATTR_joblogfilerolldepth = _pbs.ATTR_joblogfilerolldepth 262 ATTR_joblogkeepdays = _pbs.ATTR_joblogkeepdays 263 ATTR_moabarraycompatible = _pbs.ATTR_moabarraycompatible 264 ATTR_nomailforce = _pbs.ATTR_nomailforce 245 265 ATTR_NODE_state = _pbs.ATTR_NODE_state 246 266 ATTR_NODE_np = _pbs.ATTR_NODE_np … … 250 270 ATTR_NODE_status = _pbs.ATTR_NODE_status 251 271 ATTR_NODE_note = _pbs.ATTR_NODE_note 272 ATTR_NODE_gpus = _pbs.ATTR_NODE_gpus 273 ATTR_NODE_gpustatus = _pbs.ATTR_NODE_gpustatus 252 274 ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt 253 275 ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt … … 257 279 NO_KEEP = _pbs.NO_KEEP 258 280 MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT 281 ARRAY_RANGE = _pbs.ARRAY_RANGE 259 282 DELDELAY = _pbs.DELDELAY 260 283 DELPURGE = _pbs.DELPURGE 284 DELASYNC = _pbs.DELASYNC 261 285 PURGECOMP = _pbs.PURGECOMP 262 286 EXECQUEONLY = _pbs.EXECQUEONLY … … 274 298 ND_state_unknown = _pbs.ND_state_unknown 275 299 ND_timeshared = _pbs.ND_timeshared 300 ND_active = _pbs.ND_active 301 ND_all = _pbs.ND_all 302 ND_up = _pbs.ND_up 276 303 ND_cluster = _pbs.ND_cluster 277 304 Q_DT_batch = _pbs.Q_DT_batch … … 310 337 PBS_MAXUSER = _pbs.PBS_MAXUSER 311 338 PBS_MAXGRPN = _pbs.PBS_MAXGRPN 339 PBS_MAXGPUID = _pbs.PBS_MAXGPUID 312 340 PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME 313 341 PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME … … 340 368 CHECKPOINTCONT = _pbs.CHECKPOINTCONT 341 369 MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR 370 NO_MOM_RELAY = _pbs.NO_MOM_RELAY 342 371 SET = _pbs.SET 343 372 UNSET = _pbs.UNSET … … 352 381 DFLT = _pbs.DFLT 353 382 MERGE = _pbs.MERGE 383 INCR_OLD = _pbs.INCR_OLD 354 384 class attrl(_object): 355 385 __swig_setmethods__ = {} … … 702 732 FALSE = _pbs.FALSE 703 733 # PBS python interface 704 # Author: Bas van der Vlies <bas v@sara.nl>734 # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> 705 735 # Date : 27 Feb 2002 706 736 # Desc. : This is python wrapper class for getting the resource … … 838 868 version = 'SARA pbs_python version 4.4.0' 839 869 840 # A useful dict with error codes to text 870 ## A useful dict with error codes to text 871 # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> 841 872 # 842 873 # SVN Info: … … 934 965 return (e, "Could not find a text for this error, uhhh") 935 966 967 # This file is compatible with both classic and new-style classes. 936 968 937 969 cvar = _pbs.cvar -
devel/C/pbs_ifl.h
r309 r318 91 91 #define ATTR_v "Variable_List" 92 92 #define ATTR_A "Account_Name" 93 #define ATTR_args "job_arguments" 93 94 #define ATTR_M "Mail_Users" 94 95 #define ATTR_N "Job_Name" … … 99 100 #define ATTR_stageout "stageout" 100 101 #define ATTR_jobtype "jobtype" 102 #define ATTR_submit_host "submit_host" 103 #define ATTR_init_work_dir "init_work_dir" 101 104 102 105 /* additional job and general attribute names */ … … 144 147 #define ATTR_reported "reported" 145 148 #define ATTR_intcmd "inter_cmd" 149 #define ATTR_P "proxy_user" 150 #define ATTR_exec_gpus "exec_gpus" 151 #define ATTR_J "job_id" 146 152 147 153 #ifdef USEJOBCREATE 148 154 #define ATTR_pagg "pagg_id" 149 155 #endif /* USEJOBCREATE */ 156 157 #ifdef NVIDIA_GPUS 158 /* JOB_ATR_gpu_flags */ 159 #define ATTR_gpu_flags "gpu_flags" 160 #endif /* NVIDIA_GPUS */ 150 161 151 162 /* additional queue attributes names */ … … 159 170 #define ATTR_altrouter "alt_router" 160 171 #define ATTR_checkpoint_min "checkpoint_min" 172 #define ATTR_checkpoint_defaults "checkpoint_defaults" 161 173 #define ATTR_enable "enabled" 162 174 #define ATTR_fromroute "from_route_only" … … 253 265 #define ATTR_LockfileCheckTime "lock_file_check_time" 254 266 #define ATTR_npdefault "np_default" 267 #define ATTR_clonebatchsize "clone_batch_size" 268 #define ATTR_clonebatchdelay "clone_batch_delay" 255 269 #define ATTR_jobstarttimeout "job_start_timeout" 270 #define ATTR_jobforcecanceltime "job_force_cancel_time" 271 #define ATTR_maxarraysize "max_job_array_size" 272 #define ATTR_maxslotlimit "max_slot_limit" 273 #define ATTR_recordjobinfo "record_job_info" 274 #define ATTR_recordjobscript "record_job_script" 275 #define ATTR_joblogfilemaxsize "job_log_file_max_size" 276 #define ATTR_joblogfilerolldepth "job_log_file_roll_depth" 277 #define ATTR_joblogkeepdays "job_log_keep_days" 278 #ifdef MUNGE_AUTH 279 #define ATTR_authusers "authorized_users" 280 #endif 281 #define ATTR_moabarraycompatible "moab_array_compatible" 282 #define ATTR_nomailforce "no_mail_force" 256 283 257 284 /* additional node "attributes" names */ … … 264 291 #define ATTR_NODE_status "status" 265 292 #define ATTR_NODE_note "note" 293 #define ATTR_NODE_gpus "gpus" 294 #define ATTR_NODE_gpustatus "gpu_status" 266 295 267 296 /* notification email formating */ … … 278 307 #define MAIL_AT_ABORT "a" 279 308 280 281 #define DELDELAY "deldelay=" /* see qdel.c */ 282 #define DELPURGE "delpurge=" /* see qdel.c */ 283 #define PURGECOMP "purgecomplete=" /* see req_delete.c */ 284 #define EXECQUEONLY "exec_queue_only" /* see req_stat.c */ 309 #define ARRAY_RANGE "array_range=" /* see qdel.c */ 310 #define DELDELAY "deldelay=" /* see qdel.c */ 311 #define DELPURGE "delpurge=" /* see qdel.c */ 312 #define DELASYNC "delasync" /* see qdel.c */ 313 #define PURGECOMP "purgecomplete=" /* see req_delete.c */ 314 #define EXECQUEONLY "exec_queue_only" /* see req_stat.c */ 315 285 316 #define RERUNFORCE "force" 286 317 287 #define USER_HOLD "u"288 #define OTHER_HOLD "o"318 #define USER_HOLD "u" 319 #define OTHER_HOLD "o" 289 320 #define SYSTEM_HOLD "s" 290 321 291 322 /* node-attribute values (state,ntype) */ 292 323 293 #define ND_free "free"294 #define ND_offline "offline"295 #define ND_down "down"296 #define ND_reserve "reserve"324 #define ND_free "free" 325 #define ND_offline "offline" 326 #define ND_down "down" 327 #define ND_reserve "reserve" 297 328 #define ND_job_exclusive "job-exclusive" 298 #define ND_job_sharing "job-sharing"299 #define ND_busy "busy"329 #define ND_job_sharing "job-sharing" 330 #define ND_busy "busy" 300 331 #define ND_state_unknown "state-unknown" 301 #define ND_timeshared "time-shared" 302 #define ND_cluster "cluster" 332 #define ND_timeshared "time-shared" 333 334 /* these are not state values, they describe states and are used in pbsnodes */ 335 /* active = job-exclusive, job-sharing, or busy */ 336 #define ND_active "active" 337 /* all = all */ 338 #define ND_all "all" 339 /* up = job-execlusive, job-sharing, reserve, free, busy and time-shared */ 340 #define ND_up "up" 341 342 /* this specifies the type of node */ 343 #define ND_cluster "cluster" 303 344 304 345 /* queue disallowed types */ … … 360 401 #define PBS_MAXUSER 32 /* max user name length */ 361 402 #define PBS_MAXGRPN 16 /* max group name length */ 403 #define PBS_MAXGPUID 16 /* max gpu id length */ 362 404 #define PBS_MAXQUEUENAME 15 /* max queue name length */ 363 405 #define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */ 364 #define PBS_MAXJOBARRAYLEN 6 /* number of characters allowed in jobarray portion of job id, including '-' */406 #define PBS_MAXJOBARRAYLEN 7 /* number of characters allowed in jobarray portion of job id, including '[]' */ 365 407 #define PBS_MAXSEQNUM 8 /* max sequence number length */ 366 408 #define PBS_MAXPORTNUM 5 /* udp/tcp port numbers max=16 bits */ … … 380 422 which is added to the last version encoded that way */ 381 423 #define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */ 382 #define PBS_QS_VERSION_INT 1/* increment this version number with every change to the ji_qs struct */424 #define PBS_QS_VERSION_INT 2 /* increment this version number with every change to the ji_qs struct */ 383 425 #define PBS_QS_VERSION (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */ 384 426 … … 423 465 #define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$" 424 466 425 426 enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE }; 467 #define NO_MOM_RELAY 1 468 469 enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE, INCR_OLD }; 427 470 428 471 /* -
devel/C/pbs_wrap_2.1.c
r309 r318 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3.403 * Version 2.0.7 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 178 178 Flags/methods for returning states. 179 179 180 The SWIG conversion methods, as ConvertPtr, return an dinteger180 The SWIG conversion methods, as ConvertPtr, return an integer 181 181 that tells if the conversion was successful or not. And if not, 182 182 an error code can be returned (see swigerrors.swg for the codes). … … 733 733 #define PyInt_AsLong(x) PyLong_AsLong(x) 734 734 #define PyInt_FromLong(x) PyLong_FromLong(x) 735 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) 736 #define PyString_Check(name) PyBytes_Check(name) 737 #define PyString_FromString(x) PyUnicode_FromString(x) 735 738 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) 739 #define PyString_AsString(str) PyBytes_AsString(str) 740 #define PyString_Size(str) PyBytes_Size(str) 741 #define PyString_InternFromString(key) PyUnicode_InternFromString(key) 742 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE 743 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) 744 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) 736 745 737 746 #endif … … 873 882 # define PY_SSIZE_T_MAX INT_MAX 874 883 # define PY_SSIZE_T_MIN INT_MIN 884 typedef inquiry lenfunc; 885 typedef intargfunc ssizeargfunc; 886 typedef intintargfunc ssizessizeargfunc; 887 typedef intobjargproc ssizeobjargproc; 888 typedef intintobjargproc ssizessizeobjargproc; 889 typedef getreadbufferproc readbufferproc; 890 typedef getwritebufferproc writebufferproc; 891 typedef getsegcountproc segcountproc; 892 typedef getcharbufferproc charbufferproc; 893 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) 894 { 895 long result = 0; 896 PyObject *i = PyNumber_Int(x); 897 if (i) { 898 result = PyInt_AsLong(i); 899 Py_DECREF(i); 900 } 901 return result; 902 } 903 #endif 904 905 #if PY_VERSION_HEX < 0x02040000 906 #define Py_VISIT(op) \ 907 do { \ 908 if (op) { \ 909 int vret = visit((op), arg); \ 910 if (vret) \ 911 return vret; \ 912 } \ 913 } while (0) 914 #endif 915 916 #if PY_VERSION_HEX < 0x02030000 917 typedef struct { 918 PyTypeObject type; 919 PyNumberMethods as_number; 920 PyMappingMethods as_mapping; 921 PySequenceMethods as_sequence; 922 PyBufferProcs as_buffer; 923 PyObject *name, *slots; 924 } PyHeapTypeObject; 925 #endif 926 927 #if PY_VERSION_HEX < 0x02030000 928 typedef destructor freefunc; 929 #endif 930 931 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ 932 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ 933 (PY_MAJOR_VERSION > 3)) 934 # define SWIGPY_USE_CAPSULE 935 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) 936 #endif 937 938 #if PY_VERSION_HEX < 0x03020000 939 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) 940 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) 875 941 #endif 876 942 … … 1019 1085 #ifdef __cplusplus 1020 1086 extern "C" { 1021 #if 01022 } /* cc-mode */1023 #endif1024 1087 #endif 1025 1088 … … 1047 1110 * It is exported to the generated module, used for -fastproxy 1048 1111 * ----------------------------------------------------------------------------- */ 1049 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) 1112 #if PY_VERSION_HEX >= 0x03000000 1113 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) 1050 1114 { 1051 #if PY_VERSION_HEX >= 0x030000001052 1115 return PyInstanceMethod_New(func); 1116 } 1053 1117 #else 1054 return NULL; 1055 #endif 1056 } 1118 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) 1119 { 1120 return NULL; 1121 } 1122 #endif 1057 1123 1058 1124 #ifdef __cplusplus 1059 #if 01060 { /* cc-mode */1061 #endif1062 1125 } 1063 1126 #endif … … 1065 1128 1066 1129 /* ----------------------------------------------------------------------------- 1067 * See the LICENSE file for information on copyright, usage and redistribution1068 * of SWIG, and the README file for authors - http://www.swig.org/release.html.1069 *1070 1130 * pyrun.swg 1071 1131 * … … 1082 1142 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) 1083 1143 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) 1084 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) 1144 1145 #ifdef SWIGPYTHON_BUILTIN 1146 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) 1147 #else 1148 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1149 #endif 1150 1151 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1152 1085 1153 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) 1086 1154 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) … … 1097 1165 /* for C or C++ function pointers */ 1098 1166 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) 1099 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj( ptr, type, 0)1167 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) 1100 1168 1101 1169 /* for C++ member pointers, ie, member methods */ … … 1132 1200 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { 1133 1201 SWIG_PYTHON_THREAD_BEGIN_BLOCK; 1134 PyErr_SetString(errtype, (char *)msg);1202 PyErr_SetString(errtype, msg); 1135 1203 SWIG_PYTHON_THREAD_END_BLOCK; 1136 1204 } … … 1139 1207 1140 1208 /* Set a constant value */ 1209 1210 #if defined(SWIGPYTHON_BUILTIN) 1211 1212 SWIGINTERN void 1213 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { 1214 PyObject *s = PyString_InternFromString(key); 1215 PyList_Append(seq, s); 1216 Py_DECREF(s); 1217 } 1218 1219 SWIGINTERN void 1220 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { 1221 #if PY_VERSION_HEX < 0x02030000 1222 PyDict_SetItemString(d, (char *)name, obj); 1223 #else 1224 PyDict_SetItemString(d, name, obj); 1225 #endif 1226 Py_DECREF(obj); 1227 if (public_interface) 1228 SwigPyBuiltin_AddPublicSymbol(public_interface, name); 1229 } 1230 1231 #else 1141 1232 1142 1233 SWIGINTERN void 1143 1234 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { 1144 PyDict_SetItemString(d, (char*) name, obj); 1235 #if PY_VERSION_HEX < 0x02030000 1236 PyDict_SetItemString(d, (char *)name, obj); 1237 #else 1238 PyDict_SetItemString(d, name, obj); 1239 #endif 1145 1240 Py_DECREF(obj); 1146 1241 } 1242 1243 #endif 1147 1244 1148 1245 /* Append a value to the result obj */ … … 1206 1303 } 1207 1304 if (!PyTuple_Check(args)) { 1305 if (min <= 1 && max >= 1) { 1306 register int i; 1307 objs[0] = args; 1308 for (i = 1; i < max; ++i) { 1309 objs[i] = 0; 1310 } 1311 return 2; 1312 } 1208 1313 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); 1209 1314 return 0; … … 1258 1363 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) 1259 1364 1365 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) 1366 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) 1367 1260 1368 #ifdef __cplusplus 1261 1369 extern "C" { 1262 #if 01263 } /* cc-mode */1264 #endif1265 1370 #endif 1266 1371 … … 1313 1418 int delargs; 1314 1419 int implicitconv; 1420 PyTypeObject *pytype; 1315 1421 } SwigPyClientData; 1316 1422 … … 1379 1485 } 1380 1486 data->implicitconv = 0; 1487 data->pytype = 0; 1381 1488 return data; 1382 1489 } … … 1384 1491 1385 1492 SWIGRUNTIME void 1386 SwigPyClientData_Del(SwigPyClientData* data) 1387 { 1493 SwigPyClientData_Del(SwigPyClientData *data) { 1388 1494 Py_XDECREF(data->newraw); 1389 1495 Py_XDECREF(data->newargs); … … 1399 1505 int own; 1400 1506 PyObject *next; 1507 #ifdef SWIGPYTHON_BUILTIN 1508 PyObject *dict; 1509 #endif 1401 1510 } SwigPyObject; 1402 1511 … … 1449 1558 { 1450 1559 const char *name = SWIG_TypePrettyName(v->ty); 1451 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name,v);1560 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); 1452 1561 if (v->next) { 1453 # ifdef METH_NOARGS1562 # ifdef METH_NOARGS 1454 1563 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); 1455 # else1564 # else 1456 1565 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); 1457 # endif1458 # if PY_VERSION_HEX >= 0x030000001566 # endif 1567 # if PY_VERSION_HEX >= 0x03000000 1459 1568 PyObject *joined = PyUnicode_Concat(repr, nrep); 1460 1569 Py_DecRef(repr); 1461 1570 Py_DecRef(nrep); 1462 1571 repr = joined; 1463 # else1572 # else 1464 1573 PyString_ConcatAndDel(&repr,nrep); 1465 # endif1574 # endif 1466 1575 } 1467 1576 return repr; … … 1513 1622 return Py_NotImplemented; 1514 1623 } 1515 if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) 1516 res = Py_True; 1517 else 1518 res = Py_False; 1519 Py_INCREF(res); 1624 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); 1520 1625 return res; 1521 1626 } 1522 1627 1523 1628 1524 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); 1525 1629 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); 1630 1631 #ifdef SWIGPYTHON_BUILTIN 1632 static swig_type_info *SwigPyObject_stype = 0; 1526 1633 SWIGRUNTIME PyTypeObject* 1527 1634 SwigPyObject_type(void) { 1528 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); 1635 SwigPyClientData *cd; 1636 assert(SwigPyObject_stype); 1637 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; 1638 assert(cd); 1639 assert(cd->pytype); 1640 return cd->pytype; 1641 } 1642 #else 1643 SWIGRUNTIME PyTypeObject* 1644 SwigPyObject_type(void) { 1645 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); 1529 1646 return type; 1530 1647 } 1648 #endif 1531 1649 1532 1650 SWIGRUNTIMEINLINE int 1533 1651 SwigPyObject_Check(PyObject *op) { 1652 #ifdef SWIGPYTHON_BUILTIN 1653 PyTypeObject *target_tp = SwigPyObject_type(); 1654 if (PyType_IsSubtype(op->ob_type, target_tp)) 1655 return 1; 1656 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); 1657 #else 1534 1658 return (Py_TYPE(op) == SwigPyObject_type()) 1535 1659 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); 1660 #endif 1536 1661 } 1537 1662 … … 1637 1762 #if (PY_VERSION_HEX < 0x02020000) 1638 1763 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) 1764 #elif (PY_VERSION_HEX < 0x02050000) 1765 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 1639 1766 #else 1640 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))1767 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 1641 1768 #endif 1642 1769 { … … 1699 1826 1700 1827 SWIGRUNTIME PyTypeObject* 1701 _PySwigObject_type(void) {1828 SwigPyObject_TypeOnce(void) { 1702 1829 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; 1703 1830 1704 1831 static PyNumberMethods SwigPyObject_as_number = { 1705 1832 (binaryfunc)0, /*nb_add*/ … … 1748 1875 }; 1749 1876 1750 static PyTypeObject swigpyobject_type; 1877 static PyTypeObject swigpyobject_type; 1751 1878 static int type_init = 0; 1752 1879 if (!type_init) { 1753 const PyTypeObject tmp 1754 = { 1755 /* PyObject header changed in Python 3 */ 1880 const PyTypeObject tmp = { 1881 /* PyObject header changed in Python 3 */ 1756 1882 #if PY_VERSION_HEX >= 0x03000000 1757 PyVarObject_HEAD_INIT(&PyType_Type, 0)1758 #else 1759 1760 0,/* ob_size */1761 #endif 1762 (char *)"SwigPyObject",/* tp_name */1763 sizeof(SwigPyObject),/* tp_basicsize */1764 0,/* tp_itemsize */1765 (destructor)SwigPyObject_dealloc,/* tp_dealloc */1766 (printfunc)SwigPyObject_print,/* tp_print */1883 PyVarObject_HEAD_INIT(NULL, 0) 1884 #else 1885 PyObject_HEAD_INIT(NULL) 1886 0, /* ob_size */ 1887 #endif 1888 (char *)"SwigPyObject", /* tp_name */ 1889 sizeof(SwigPyObject), /* tp_basicsize */ 1890 0, /* tp_itemsize */ 1891 (destructor)SwigPyObject_dealloc, /* tp_dealloc */ 1892 (printfunc)SwigPyObject_print, /* tp_print */ 1767 1893 #if PY_VERSION_HEX < 0x02020000 1768 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ 1894 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ 1769 1895 #else 1770 (getattrfunc)0, /* tp_getattr */ 1771 #endif 1772 (setattrfunc)0, /* tp_setattr */ 1896 (getattrfunc)0, /* tp_getattr */ 1897 #endif 1898 (setattrfunc)0, /* tp_setattr */ 1773 1899 #if PY_VERSION_HEX >= 0x03000000 1774 1900 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 1775 1901 #else 1776 (cmpfunc)SwigPyObject_compare,/* tp_compare */1777 #endif 1778 (reprfunc)SwigPyObject_repr, /* tp_repr */ 1779 &SwigPyObject_as_number,/* tp_as_number */1780 0,/* tp_as_sequence */1781 0,/* tp_as_mapping */1782 (hashfunc)0,/* tp_hash */1783 (ternaryfunc)0,/* tp_call */1784 (reprfunc)SwigPyObject_str,/* tp_str */1785 PyObject_GenericGetAttr,/* tp_getattro */1786 0,/* tp_setattro */1787 0,/* tp_as_buffer */1788 Py_TPFLAGS_DEFAULT,/* tp_flags */1789 swigobject_doc, /* tp_doc */ 1790 0,/* tp_traverse */1791 0,/* tp_clear */1792 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */1793 0,/* tp_weaklistoffset */1902 (cmpfunc)SwigPyObject_compare, /* tp_compare */ 1903 #endif 1904 (reprfunc)SwigPyObject_repr, /* tp_repr */ 1905 &SwigPyObject_as_number, /* tp_as_number */ 1906 0, /* tp_as_sequence */ 1907 0, /* tp_as_mapping */ 1908 (hashfunc)0, /* tp_hash */ 1909 (ternaryfunc)0, /* tp_call */ 1910 (reprfunc)SwigPyObject_str, /* tp_str */ 1911 PyObject_GenericGetAttr, /* tp_getattro */ 1912 0, /* tp_setattro */ 1913 0, /* tp_as_buffer */ 1914 Py_TPFLAGS_DEFAULT, /* tp_flags */ 1915 swigobject_doc, /* tp_doc */ 1916 0, /* tp_traverse */ 1917 0, /* tp_clear */ 1918 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 1919 0, /* tp_weaklistoffset */ 1794 1920 #if PY_VERSION_HEX >= 0x02020000 1795 0,/* tp_iter */1796 0,/* tp_iternext */1797 swigobject_methods, /* tp_methods */ 1798 0,/* tp_members */1799 0, /* tp_getset */ 1800 0, /* tp_base */ 1801 0, /* tp_dict */ 1802 0, /* tp_descr_get */ 1803 0, /* tp_descr_set */ 1804 0, /* tp_dictoffset */ 1805 0, /* tp_init */ 1806 0, /* tp_alloc */ 1807 0, /* tp_new */ 1808 0, /* tp_free */ 1809 0, /* tp_is_gc */ 1810 0, /* tp_bases */ 1811 0,/* tp_mro */1812 0, /* tp_cache */ 1813 0,/* tp_subclasses */1814 0,/* tp_weaklist */1921 0, /* tp_iter */ 1922 0, /* tp_iternext */ 1923 swigobject_methods, /* tp_methods */ 1924 0, /* tp_members */ 1925 0, /* tp_getset */ 1926 0, /* tp_base */ 1927 0, /* tp_dict */ 1928 0, /* tp_descr_get */ 1929 0, /* tp_descr_set */ 1930 0, /* tp_dictoffset */ 1931 0, /* tp_init */ 1932 0, /* tp_alloc */ 1933 0, /* tp_new */ 1934 0, /* tp_free */ 1935 0, /* tp_is_gc */ 1936 0, /* tp_bases */ 1937 0, /* tp_mro */ 1938 0, /* tp_cache */ 1939 0, /* tp_subclasses */ 1940 0, /* tp_weaklist */ 1815 1941 #endif 1816 1942 #if PY_VERSION_HEX >= 0x02030000 1817 0, /* tp_del */ 1943 0, /* tp_del */ 1944 #endif 1945 #if PY_VERSION_HEX >= 0x02060000 1946 0, /* tp_version */ 1818 1947 #endif 1819 1948 #ifdef COUNT_ALLOCS 1820 0,0,0,0/* tp_alloc -> tp_next */1821 #endif 1822 1949 0,0,0,0 /* tp_alloc -> tp_next */ 1950 #endif 1951 }; 1823 1952 swigpyobject_type = tmp; 1824 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */1825 #if PY_VERSION_HEX < 0x0 30000001953 type_init = 1; 1954 #if PY_VERSION_HEX < 0x02020000 1826 1955 swigpyobject_type.ob_type = &PyType_Type; 1827 #endif 1828 type_init = 1; 1956 #else 1957 if (PyType_Ready(&swigpyobject_type) < 0) 1958 return NULL; 1959 #endif 1829 1960 } 1830 1961 return &swigpyobject_type; … … 1900 2031 } 1901 2032 1902 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);2033 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); 1903 2034 1904 2035 SWIGRUNTIME PyTypeObject* 1905 2036 SwigPyPacked_type(void) { 1906 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();2037 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); 1907 2038 return type; 1908 2039 } … … 1910 2041 SWIGRUNTIMEINLINE int 1911 2042 SwigPyPacked_Check(PyObject *op) { 1912 return ((op)->ob_type == _PySwigPacked_type())2043 return ((op)->ob_type == SwigPyPacked_TypeOnce()) 1913 2044 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); 1914 2045 } … … 1925 2056 1926 2057 SWIGRUNTIME PyTypeObject* 1927 _PySwigPacked_type(void) {2058 SwigPyPacked_TypeOnce(void) { 1928 2059 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; 1929 2060 static PyTypeObject swigpypacked_type; 1930 static int type_init = 0; 2061 static int type_init = 0; 1931 2062 if (!type_init) { 1932 const PyTypeObject tmp 1933 = { 1934 /* PyObject header changed in Python 3 */ 2063 const PyTypeObject tmp = { 2064 /* PyObject header changed in Python 3 */ 1935 2065 #if PY_VERSION_HEX>=0x03000000 1936 PyVarObject_HEAD_INIT(&PyType_Type, 0)2066 PyVarObject_HEAD_INIT(NULL, 0) 1937 2067 #else 1938 1939 0, /* ob_size */1940 #endif 1941 (char *)"SwigPyPacked", /* tp_name */ 1942 sizeof(SwigPyPacked), /* tp_basicsize */ 1943 0, /* tp_itemsize */ 1944 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ 1945 (printfunc)SwigPyPacked_print, /* tp_print */ 1946 (getattrfunc)0, /* tp_getattr */ 1947 (setattrfunc)0, /* tp_setattr */ 2068 PyObject_HEAD_INIT(NULL) 2069 0, /* ob_size */ 2070 #endif 2071 (char *)"SwigPyPacked", /* tp_name */ 2072 sizeof(SwigPyPacked), /* tp_basicsize */ 2073 0, /* tp_itemsize */ 2074 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ 2075 (printfunc)SwigPyPacked_print, /* tp_print */ 2076 (getattrfunc)0, /* tp_getattr */ 2077 (setattrfunc)0, /* tp_setattr */ 1948 2078 #if PY_VERSION_HEX>=0x03000000 1949 0, /* tp_reserved in 3.0.1 */2079 0, /* tp_reserved in 3.0.1 */ 1950 2080 #else 1951 (cmpfunc)SwigPyPacked_compare,/* tp_compare */1952 #endif 1953 (reprfunc)SwigPyPacked_repr,/* tp_repr */1954 0,/* tp_as_number */1955 0,/* tp_as_sequence */1956 0,/* tp_as_mapping */1957 (hashfunc)0,/* tp_hash */1958 (ternaryfunc)0,/* tp_call */1959 (reprfunc)SwigPyPacked_str,/* tp_str */1960 PyObject_GenericGetAttr,/* tp_getattro */1961 0,/* tp_setattro */1962 0,/* tp_as_buffer */1963 Py_TPFLAGS_DEFAULT,/* tp_flags */1964 swigpacked_doc,/* tp_doc */1965 0,/* tp_traverse */1966 0,/* tp_clear */1967 0,/* tp_richcompare */1968 0,/* tp_weaklistoffset */2081 (cmpfunc)SwigPyPacked_compare, /* tp_compare */ 2082 #endif 2083 (reprfunc)SwigPyPacked_repr, /* tp_repr */ 2084 0, /* tp_as_number */ 2085 0, /* tp_as_sequence */ 2086 0, /* tp_as_mapping */ 2087 (hashfunc)0, /* tp_hash */ 2088 (ternaryfunc)0, /* tp_call */ 2089 (reprfunc)SwigPyPacked_str, /* tp_str */ 2090 PyObject_GenericGetAttr, /* tp_getattro */ 2091 0, /* tp_setattro */ 2092 0, /* tp_as_buffer */ 2093 Py_TPFLAGS_DEFAULT, /* tp_flags */ 2094 swigpacked_doc, /* tp_doc */ 2095 0, /* tp_traverse */ 2096 0, /* tp_clear */ 2097 0, /* tp_richcompare */ 2098 0, /* tp_weaklistoffset */ 1969 2099 #if PY_VERSION_HEX >= 0x02020000 1970 0,/* tp_iter */1971 0,/* tp_iternext */1972 0, /* tp_methods */ 1973 0,/* tp_members */1974 0, /* tp_getset */ 1975 0, /* tp_base */ 1976 0, /* tp_dict */ 1977 0, /* tp_descr_get */ 1978 0, /* tp_descr_set */ 1979 0, /* tp_dictoffset */ 1980 0, /* tp_init */ 1981 0, /* tp_alloc */ 1982 0, /* tp_new */ 1983 0, /* tp_free */ 1984 0, /* tp_is_gc */1985 0, /* tp_bases */ 1986 0,/* tp_mro */1987 0, /* tp_cache */ 1988 0,/* tp_subclasses */1989 0,/* tp_weaklist */2100 0, /* tp_iter */ 2101 0, /* tp_iternext */ 2102 0, /* tp_methods */ 2103 0, /* tp_members */ 2104 0, /* tp_getset */ 2105 0, /* tp_base */ 2106 0, /* tp_dict */ 2107 0, /* tp_descr_get */ 2108 0, /* tp_descr_set */ 2109 0, /* tp_dictoffset */ 2110 0, /* tp_init */ 2111 0, /* tp_alloc */ 2112 0, /* tp_new */ 2113 0, /* tp_free */ 2114 0, /* tp_is_gc */ 2115 0, /* tp_bases */ 2116 0, /* tp_mro */ 2117 0, /* tp_cache */ 2118 0, /* tp_subclasses */ 2119 0, /* tp_weaklist */ 1990 2120 #endif 1991 2121 #if PY_VERSION_HEX >= 0x02030000 1992 0, /* tp_del */ 2122 0, /* tp_del */ 2123 #endif 2124 #if PY_VERSION_HEX >= 0x02060000 2125 0, /* tp_version */ 1993 2126 #endif 1994 2127 #ifdef COUNT_ALLOCS 1995 0,0,0,0/* tp_alloc -> tp_next */1996 #endif 1997 2128 0,0,0,0 /* tp_alloc -> tp_next */ 2129 #endif 2130 }; 1998 2131 swigpypacked_type = tmp; 1999 /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */2000 #if PY_VERSION_HEX < 0x0 30000002132 type_init = 1; 2133 #if PY_VERSION_HEX < 0x02020000 2001 2134 swigpypacked_type.ob_type = &PyType_Type; 2002 #endif 2003 type_init = 1; 2135 #else 2136 if (PyType_Ready(&swigpypacked_type) < 0) 2137 return NULL; 2138 #endif 2004 2139 } 2005 2140 return &swigpypacked_type; … … 2048 2183 } 2049 2184 2185 static PyObject *swig_this = NULL; 2186 2050 2187 SWIGRUNTIME PyObject * 2051 2188 SWIG_This(void) 2052 2189 { 2053 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); 2190 if (swig_this == NULL) 2191 swig_this = _SWIG_This(); 2054 2192 return swig_this; 2055 2193 } … … 2065 2203 SWIG_Python_GetSwigThis(PyObject *pyobj) 2066 2204 { 2067 if (SwigPyObject_Check(pyobj)) { 2205 PyObject *obj; 2206 2207 if (SwigPyObject_Check(pyobj)) 2068 2208 return (SwigPyObject *) pyobj; 2209 2210 #ifdef SWIGPYTHON_BUILTIN 2211 (void)obj; 2212 # ifdef PyWeakref_CheckProxy 2213 if (PyWeakref_CheckProxy(pyobj)) { 2214 pyobj = PyWeakref_GET_OBJECT(pyobj); 2215 if (pyobj && SwigPyObject_Check(pyobj)) 2216 return (SwigPyObject*) pyobj; 2217 } 2218 # endif 2219 return NULL; 2220 #else 2221 2222 obj = 0; 2223 2224 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 2225 if (PyInstance_Check(pyobj)) { 2226 obj = _PyInstance_Lookup(pyobj, SWIG_This()); 2069 2227 } else { 2070 PyObject * obj = 0;2071 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 2072 if (PyInstance_Check(pyobj)) {2073 obj = _PyInstance_Lookup(pyobj, SWIG_This());2228 PyObject **dictptr = _PyObject_GetDictPtr(pyobj); 2229 if (dictptr != NULL) { 2230 PyObject *dict = *dictptr; 2231 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; 2074 2232 } else { 2075 PyObject **dictptr = _PyObject_GetDictPtr(pyobj); 2076 if (dictptr != NULL) { 2077 PyObject *dict = *dictptr; 2078 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; 2233 #ifdef PyWeakref_CheckProxy 2234 if (PyWeakref_CheckProxy(pyobj)) { 2235 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); 2236 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; 2237 } 2238 #endif 2239 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2240 if (obj) { 2241 Py_DECREF(obj); 2079 2242 } else { 2080 #ifdef PyWeakref_CheckProxy 2081 if (PyWeakref_CheckProxy(pyobj)) { 2082 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); 2083 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; 2084 } 2085 #endif 2086 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2087 if (obj) { 2088 Py_DECREF(obj); 2089 } else { 2090 if (PyErr_Occurred()) PyErr_Clear(); 2091 return 0; 2092 } 2243 if (PyErr_Occurred()) PyErr_Clear(); 2244 return 0; 2093 2245 } 2094 2246 } 2247 } 2095 2248 #else 2096 2097 2098 2099 2100 2101 2102 2103 #endif 2104 2105 2106 2107 2108 2109 2110 } 2249 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2250 if (obj) { 2251 Py_DECREF(obj); 2252 } else { 2253 if (PyErr_Occurred()) PyErr_Clear(); 2254 return 0; 2255 } 2256 #endif 2257 if (obj && !SwigPyObject_Check(obj)) { 2258 /* a PyObject is called 'this', try to get the 'real this' 2259 SwigPyObject from it */ 2260 return SWIG_Python_GetSwigThis(obj); 2261 } 2262 return (SwigPyObject *)obj; 2263 #endif 2111 2264 } 2112 2265 … … 2130 2283 SWIGRUNTIME int 2131 2284 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { 2132 if (!obj) return SWIG_ERROR; 2285 int res; 2286 SwigPyObject *sobj; 2287 2288 if (!obj) 2289 return SWIG_ERROR; 2133 2290 if (obj == Py_None) { 2134 if (ptr) *ptr = 0; 2291 if (ptr) 2292 *ptr = 0; 2135 2293 return SWIG_OK; 2294 } 2295 2296 res = SWIG_ERROR; 2297 2298 sobj = SWIG_Python_GetSwigThis(obj); 2299 if (own) 2300 *own = 0; 2301 while (sobj) { 2302 void *vptr = sobj->ptr; 2303 if (ty) { 2304 swig_type_info *to = sobj->ty; 2305 if (to == ty) { 2306 /* no type cast needed */ 2307 if (ptr) *ptr = vptr; 2308 break; 2309 } else { 2310 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 2311 if (!tc) { 2312 sobj = (SwigPyObject *)sobj->next; 2313 } else { 2314 if (ptr) { 2315 int newmemory = 0; 2316 *ptr = SWIG_TypeCast(tc,vptr,&newmemory); 2317 if (newmemory == SWIG_CAST_NEW_MEMORY) { 2318 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ 2319 if (own) 2320 *own = *own | SWIG_CAST_NEW_MEMORY; 2321 } 2322 } 2323 break; 2324 } 2325 } 2326 } else { 2327 if (ptr) *ptr = vptr; 2328 break; 2329 } 2330 } 2331 if (sobj) { 2332 if (own) 2333 *own = *own | sobj->own; 2334 if (flags & SWIG_POINTER_DISOWN) { 2335 sobj->own = 0; 2336 } 2337 res = SWIG_OK; 2136 2338 } else { 2137 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); 2138 if (own) 2139 *own = 0; 2140 while (sobj) { 2141 void *vptr = sobj->ptr; 2142 if (ty) { 2143 swig_type_info *to = sobj->ty; 2144 if (to == ty) { 2145 /* no type cast needed */ 2146 if (ptr) *ptr = vptr; 2147 break; 2148 } else { 2149 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 2150 if (!tc) { 2151 sobj = (SwigPyObject *)sobj->next; 2152 } else { 2153 if (ptr) { 2154 int newmemory = 0; 2155 *ptr = SWIG_TypeCast(tc,vptr,&newmemory); 2156 if (newmemory == SWIG_CAST_NEW_MEMORY) { 2157 assert(own); 2158 if (own) 2159 *own = *own | SWIG_CAST_NEW_MEMORY; 2339 if (flags & SWIG_POINTER_IMPLICIT_CONV) { 2340 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; 2341 if (data && !data->implicitconv) { 2342 PyObject *klass = data->klass; 2343 if (klass) { 2344 PyObject *impconv; 2345 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ 2346 impconv = SWIG_Python_CallFunctor(klass, obj); 2347 data->implicitconv = 0; 2348 if (PyErr_Occurred()) { 2349 PyErr_Clear(); 2350 impconv = 0; 2351 } 2352 if (impconv) { 2353 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); 2354 if (iobj) { 2355 void *vptr; 2356 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); 2357 if (SWIG_IsOK(res)) { 2358 if (ptr) { 2359 *ptr = vptr; 2360 /* transfer the ownership to 'ptr' */ 2361 iobj->own = 0; 2362 res = SWIG_AddCast(res); 2363 res = SWIG_AddNewMask(res); 2364 } else { 2365 res = SWIG_AddCast(res); 2366 } 2160 2367 } 2161 2368 } 2162 break; 2163 } 2164 } 2165 } else { 2166 if (ptr) *ptr = vptr; 2167 break; 2369 Py_DECREF(impconv); 2370 } 2371 } 2168 2372 } 2169 2373 } 2170 if (sobj) { 2171 if (own) 2172 *own = *own | sobj->own; 2173 if (flags & SWIG_POINTER_DISOWN) { 2174 sobj->own = 0; 2175 } 2176 return SWIG_OK; 2177 } else { 2178 int res = SWIG_ERROR; 2179 if (flags & SWIG_POINTER_IMPLICIT_CONV) { 2180 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; 2181 if (data && !data->implicitconv) { 2182 PyObject *klass = data->klass; 2183 if (klass) { 2184 PyObject *impconv; 2185 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ 2186 impconv = SWIG_Python_CallFunctor(klass, obj); 2187 data->implicitconv = 0; 2188 if (PyErr_Occurred()) { 2189 PyErr_Clear(); 2190 impconv = 0; 2191 } 2192 if (impconv) { 2193 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); 2194 if (iobj) { 2195 void *vptr; 2196 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); 2197 if (SWIG_IsOK(res)) { 2198 if (ptr) { 2199 *ptr = vptr; 2200 /* transfer the ownership to 'ptr' */ 2201 iobj->own = 0; 2202 res = SWIG_AddCast(res); 2203 res = SWIG_AddNewMask(res); 2204 } else { 2205 res = SWIG_AddCast(res); 2206 } 2207 } 2208 } 2209 Py_DECREF(impconv); 2210 } 2211 } 2212 } 2213 } 2214 return res; 2215 } 2216 } 2374 } 2375 return res; 2217 2376 } 2218 2377 … … 2368 2527 SWIG_Python_InitShadowInstance(PyObject *args) { 2369 2528 PyObject *obj[2]; 2370 if (!SWIG_Python_UnpackTuple(args, (char*)"swiginit", 2, 2, obj)) {2529 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { 2371 2530 return NULL; 2372 2531 } else { … … 2384 2543 2385 2544 SWIGRUNTIME PyObject * 2386 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { 2387 if (!ptr) { 2545 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { 2546 SwigPyClientData *clientdata; 2547 PyObject * robj; 2548 int own; 2549 2550 if (!ptr) 2388 2551 return SWIG_Py_Void(); 2389 } else { 2390 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; 2391 PyObject *robj = SwigPyObject_New(ptr, type, own); 2392 SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; 2393 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { 2394 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); 2395 if (inst) { 2396 Py_DECREF(robj); 2397 robj = inst; 2552 2553 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; 2554 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; 2555 if (clientdata && clientdata->pytype) { 2556 SwigPyObject *newobj; 2557 if (flags & SWIG_BUILTIN_TP_INIT) { 2558 newobj = (SwigPyObject*) self; 2559 if (newobj->ptr) { 2560 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); 2561 while (newobj->next) 2562 newobj = (SwigPyObject *) newobj->next; 2563 newobj->next = next_self; 2564 newobj = (SwigPyObject *)next_self; 2398 2565 } 2399 } 2400 return robj; 2401 } 2566 } else { 2567 newobj = PyObject_New(SwigPyObject, clientdata->pytype); 2568 } 2569 if (newobj) { 2570 newobj->ptr = ptr; 2571 newobj->ty = type; 2572 newobj->own = own; 2573 newobj->next = 0; 2574 #ifdef SWIGPYTHON_BUILTIN 2575 newobj->dict = 0; 2576 #endif 2577 return (PyObject*) newobj; 2578 } 2579 return SWIG_Py_Void(); 2580 } 2581 2582 assert(!(flags & SWIG_BUILTIN_TP_INIT)); 2583 2584 robj = SwigPyObject_New(ptr, type, own); 2585 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { 2586 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); 2587 if (inst) { 2588 Py_DECREF(robj); 2589 robj = inst; 2590 } 2591 } 2592 return robj; 2402 2593 } 2403 2594 … … 2425 2616 type_pointer = SWIG_ReturnGlobalTypeList((void *)0); 2426 2617 #else 2618 # ifdef SWIGPY_USE_CAPSULE 2619 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); 2620 # else 2427 2621 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2428 2622 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); 2623 # endif 2429 2624 if (PyErr_Occurred()) { 2430 2625 PyErr_Clear(); … … 2469 2664 2470 2665 SWIGRUNTIME void 2666 #ifdef SWIGPY_USE_CAPSULE 2667 SWIG_Python_DestroyModule(PyObject *obj) 2668 #else 2471 2669 SWIG_Python_DestroyModule(void *vptr) 2670 #endif 2472 2671 { 2672 #ifdef SWIGPY_USE_CAPSULE 2673 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); 2674 #else 2473 2675 swig_module_info *swig_module = (swig_module_info *) vptr; 2676 #endif 2474 2677 swig_type_info **types = swig_module->types; 2475 2678 size_t i; … … 2482 2685 } 2483 2686 Py_DECREF(SWIG_This()); 2687 swig_this = NULL; 2484 2688 } 2485 2689 2486 2690 SWIGRUNTIME void 2487 2691 SWIG_Python_SetModule(swig_module_info *swig_module) { 2488 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */2489 2490 2692 #if PY_VERSION_HEX >= 0x03000000 2491 2693 /* Add a dummy module object into sys.modules */ 2492 2694 PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); 2493 2695 #else 2494 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2495 swig_empty_runtime_method_table); 2496 #endif 2696 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ 2697 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); 2698 #endif 2699 #ifdef SWIGPY_USE_CAPSULE 2700 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); 2701 if (pointer && module) { 2702 PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); 2703 } else { 2704 Py_XDECREF(pointer); 2705 } 2706 #else 2497 2707 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); 2498 2708 if (pointer && module) { … … 2501 2711 Py_XDECREF(pointer); 2502 2712 } 2713 #endif 2503 2714 } 2504 2715 … … 2518 2729 swig_type_info *descriptor; 2519 2730 if (obj) { 2731 #ifdef SWIGPY_USE_CAPSULE 2732 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); 2733 #else 2520 2734 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); 2735 #endif 2521 2736 } else { 2522 2737 swig_module_info *swig_module = SWIG_Python_GetModule(); 2523 2738 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); 2524 2739 if (descriptor) { 2740 #ifdef SWIGPY_USE_CAPSULE 2741 obj = PyCapsule_New((void*) descriptor, NULL, NULL); 2742 #else 2525 2743 obj = PyCObject_FromVoidPtr(descriptor, NULL); 2744 #endif 2526 2745 PyDict_SetItem(cache, key, obj); 2527 2746 Py_DECREF(obj); … … 2584 2803 SwigPyObject *v = (SwigPyObject *)self; 2585 2804 swig_type_info *ty = v ? v->ty : 0; 2586 return ty ? ty->str : (char*)"";2805 return ty ? ty->str : ""; 2587 2806 } 2588 2807 … … 2627 2846 /* Convert a pointer value, signal an exception on a type mismatch */ 2628 2847 SWIGRUNTIME void * 2629 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {2848 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { 2630 2849 void *result; 2631 2850 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { … … 2641 2860 } 2642 2861 2862 #ifdef SWIGPYTHON_BUILTIN 2863 SWIGRUNTIME int 2864 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { 2865 PyTypeObject *tp = obj->ob_type; 2866 PyObject *descr; 2867 PyObject *encoded_name; 2868 descrsetfunc f; 2869 int res; 2870 2871 # ifdef Py_USING_UNICODE 2872 if (PyString_Check(name)) { 2873 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); 2874 if (!name) 2875 return -1; 2876 } else if (!PyUnicode_Check(name)) 2877 # else 2878 if (!PyString_Check(name)) 2879 # endif 2880 { 2881 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); 2882 return -1; 2883 } else { 2884 Py_INCREF(name); 2885 } 2886 2887 if (!tp->tp_dict) { 2888 if (PyType_Ready(tp) < 0) 2889 goto done; 2890 } 2891 2892 res = -1; 2893 descr = _PyType_Lookup(tp, name); 2894 f = NULL; 2895 if (descr != NULL) 2896 f = descr->ob_type->tp_descr_set; 2897 if (!f) { 2898 if (PyString_Check(name)) { 2899 encoded_name = name; 2900 Py_INCREF(name); 2901 } else { 2902 encoded_name = PyUnicode_AsUTF8String(name); 2903 } 2904 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); 2905 Py_DECREF(encoded_name); 2906 } else { 2907 res = f(descr, obj, value); 2908 } 2909 2910 done: 2911 Py_DECREF(name); 2912 return res; 2913 } 2914 #endif 2915 2643 2916 2644 2917 #ifdef __cplusplus 2645 #if 02646 { /* cc-mode */2647 #endif2648 2918 } 2649 2919 #endif … … 2691 2961 #define SWIG_name "_pbs" 2692 2962 2693 #define SWIGVERSION 0x0 103402963 #define SWIGVERSION 0x020007 2694 2964 #define SWIG_VERSION SWIGVERSION 2695 2965 … … 2791 3061 bzero( (void*) current->resource, sizeof(current->resource)); 2792 3062 bzero( (void*) current->value, sizeof(current->value)); 2793 current->op = 0;3063 // current->op = 0; 2794 3064 2795 3065 current->next = prev; … … 2971 3241 2972 3242 2973 #define SWIG_From_long PyInt_FromLong 2974 2975 2976 SWIGINTERNINLINE PyObject * 2977 SWIG_From_int (int value) 2978 { 2979 return SWIG_From_long (value); 3243 SWIGINTERNINLINE PyObject* 3244 SWIG_From_int (int value) 3245 { 3246 return PyInt_FromLong((long) value); 2980 3247 } 2981 3248 … … 3001 3268 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); 3002 3269 return pchar_descriptor ? 3003 SWIG_ NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();3270 SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); 3004 3271 } else { 3005 3272 #if PY_VERSION_HEX >= 0x03000000 … … 3189 3456 return res; 3190 3457 } 3458 3459 3460 #define SWIG_From_long PyLong_FromLong 3191 3461 3192 3462 … … 7830 8100 static char varlink__doc__[] = "Swig var link object"; 7831 8101 static PyTypeObject varlink_type; 7832 static int type_init = 0; 8102 static int type_init = 0; 7833 8103 if (!type_init) { 7834 const PyTypeObject tmp 7835 = { 8104 const PyTypeObject tmp = { 7836 8105 /* PyObject header changed in Python 3 */ 7837 8106 #if PY_VERSION_HEX >= 0x03000000 7838 PyVarObject_HEAD_INIT( &PyType_Type, 0)8107 PyVarObject_HEAD_INIT(NULL, 0) 7839 8108 #else 7840 8109 PyObject_HEAD_INIT(NULL) 7841 0, /* Number of items in variable part (ob_size)*/7842 #endif 7843 (char *)"swigvarlink", /* Type name (tp_name)*/7844 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize)*/7845 0, /* Itemsize (tp_itemsize)*/7846 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */7847 (printfunc) swig_varlink_print, /* Print (tp_print)*/7848 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr)*/7849 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr)*/8110 0, /* ob_size */ 8111 #endif 8112 (char *)"swigvarlink", /* tp_name */ 8113 sizeof(swig_varlinkobject), /* tp_basicsize */ 8114 0, /* tp_itemsize */ 8115 (destructor) swig_varlink_dealloc, /* tp_dealloc */ 8116 (printfunc) swig_varlink_print, /* tp_print */ 8117 (getattrfunc) swig_varlink_getattr, /* tp_getattr */ 8118 (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 7850 8119 0, /* tp_compare */ 7851 8120 (reprfunc) swig_varlink_repr, /* tp_repr */ … … 7871 8140 0, /* tp_del */ 7872 8141 #endif 8142 #if PY_VERSION_HEX >= 0x02060000 8143 0, /* tp_version */ 8144 #endif 7873 8145 #ifdef COUNT_ALLOCS 7874 8146 0,0,0,0 /* tp_alloc -> tp_next */ … … 7876 8148 }; 7877 8149 varlink_type = tmp; 7878 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */7879 #if PY_VERSION_HEX < 0x0 30000008150 type_init = 1; 8151 #if PY_VERSION_HEX < 0x02020000 7880 8152 varlink_type.ob_type = &PyType_Type; 7881 #endif 7882 type_init = 1; 8153 #else 8154 if (PyType_Ready(&varlink_type) < 0) 8155 return NULL; 8156 #endif 7883 8157 } 7884 8158 return &varlink_type; … … 7931 8205 switch(constants[i].type) { 7932 8206 case SWIG_PY_POINTER: 7933 obj = SWIG_ NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);8207 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); 7934 8208 break; 7935 8209 case SWIG_PY_BINARY: … … 7971 8245 } 7972 8246 if (ci) { 7973 size_t shift = (ci->ptype) - types;7974 swig_type_info *ty = types_initial[shift];7975 size_t ldoc = (c - methods[i].ml_doc);7976 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;7977 char *ndoc = (char*)malloc(ldoc + lptr + 10);7978 if (ndoc) {7979 char * buff = ndoc;7980 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;7981 if (ptr) {8247 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; 8248 if (ptr) { 8249 size_t shift = (ci->ptype) - types; 8250 swig_type_info *ty = types_initial[shift]; 8251 size_t ldoc = (c - methods[i].ml_doc); 8252 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; 8253 char *ndoc = (char*)malloc(ldoc + lptr + 10); 8254 if (ndoc) { 8255 char *buff = ndoc; 7982 8256 strncpy(buff, methods[i].ml_doc, ldoc); 7983 8257 buff += ldoc; … … 8012 8286 #endif 8013 8287 SWIG_init(void) { 8014 PyObject *m, *d ;8288 PyObject *m, *d, *md; 8015 8289 #if PY_VERSION_HEX >= 0x03000000 8016 8290 static struct PyModuleDef SWIG_module = { 8291 # if PY_VERSION_HEX >= 0x03020000 8017 8292 PyModuleDef_HEAD_INIT, 8293 # else 8294 { 8295 PyObject_HEAD_INIT(NULL) 8296 NULL, /* m_init */ 8297 0, /* m_index */ 8298 NULL, /* m_copy */ 8299 }, 8300 # endif 8018 8301 (char *) SWIG_name, 8019 8302 NULL, … … 8027 8310 #endif 8028 8311 8312 #if defined(SWIGPYTHON_BUILTIN) 8313 static SwigPyClientData SwigPyObject_clientdata = { 8314 0, 0, 0, 0, 0, 0, 0 8315 }; 8316 static PyGetSetDef this_getset_def = { 8317 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL 8318 }; 8319 static SwigPyGetSet thisown_getset_closure = { 8320 (PyCFunction) SwigPyObject_own, 8321 (PyCFunction) SwigPyObject_own 8322 }; 8323 static PyGetSetDef thisown_getset_def = { 8324 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure 8325 }; 8326 PyObject *metatype_args; 8327 PyTypeObject *builtin_pytype; 8328 int builtin_base_count; 8329 swig_type_info *builtin_basetype; 8330 PyObject *tuple; 8331 PyGetSetDescrObject *static_getset; 8332 PyTypeObject *metatype; 8333 SwigPyClientData *cd; 8334 PyObject *public_interface, *public_symbol; 8335 PyObject *this_descr; 8336 PyObject *thisown_descr; 8337 int i; 8338 8339 (void)builtin_pytype; 8340 (void)builtin_base_count; 8341 (void)builtin_basetype; 8342 (void)tuple; 8343 (void)static_getset; 8344 8345 /* metatype is used to implement static member variables. */ 8346 metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); 8347 assert(metatype_args); 8348 metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); 8349 assert(metatype); 8350 Py_DECREF(metatype_args); 8351 metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; 8352 assert(PyType_Ready(metatype) >= 0); 8353 #endif 8354 8029 8355 /* Fix SwigMethods to carry the callback ptrs when needed */ 8030 8356 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); … … 8035 8361 m = Py_InitModule((char *) SWIG_name, SwigMethods); 8036 8362 #endif 8037 d = PyModule_GetDict(m);8363 md = d = PyModule_GetDict(m); 8038 8364 8039 8365 SWIG_InitializeModule(0); 8366 8367 #ifdef SWIGPYTHON_BUILTIN 8368 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); 8369 assert(SwigPyObject_stype); 8370 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; 8371 if (!cd) { 8372 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; 8373 SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); 8374 } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { 8375 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); 8376 # if PY_VERSION_HEX >= 0x03000000 8377 return NULL; 8378 # else 8379 return; 8380 # endif 8381 } 8382 8383 /* All objects have a 'this' attribute */ 8384 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); 8385 (void)this_descr; 8386 8387 /* All objects have a 'thisown' attribute */ 8388 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); 8389 (void)thisown_descr; 8390 8391 public_interface = PyList_New(0); 8392 public_symbol = 0; 8393 (void)public_symbol; 8394 8395 PyDict_SetItemString(md, "__all__", public_interface); 8396 Py_DECREF(public_interface); 8397 for (i = 0; SwigMethods[i].ml_name != NULL; ++i) 8398 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); 8399 for (i = 0; swig_const_table[i].name != 0; ++i) 8400 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); 8401 #endif 8402 8040 8403 SWIG_InstallConstants(d,swig_const_table); 8041 8042 8404 8043 8405 SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time")); … … 8060 8422 SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List")); 8061 8423 SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name")); 8424 SWIG_Python_SetConstant(d, "ATTR_args",SWIG_FromCharPtr("job_arguments")); 8062 8425 SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users")); 8063 8426 SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name")); … … 8068 8431 SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout")); 8069 8432 SWIG_Python_SetConstant(d, "ATTR_jobtype",SWIG_FromCharPtr("jobtype")); 8433 SWIG_Python_SetConstant(d, "ATTR_submit_host",SWIG_FromCharPtr("submit_host")); 8434 SWIG_Python_SetConstant(d, "ATTR_init_work_dir",SWIG_FromCharPtr("init_work_dir")); 8070 8435 SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime")); 8071 8436 SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host")); … … 8110 8475 SWIG_Python_SetConstant(d, "ATTR_reported",SWIG_FromCharPtr("reported")); 8111 8476 SWIG_Python_SetConstant(d, "ATTR_intcmd",SWIG_FromCharPtr("inter_cmd")); 8477 SWIG_Python_SetConstant(d, "ATTR_P",SWIG_FromCharPtr("proxy_user")); 8478 SWIG_Python_SetConstant(d, "ATTR_exec_gpus",SWIG_FromCharPtr("exec_gpus")); 8479 SWIG_Python_SetConstant(d, "ATTR_J",SWIG_FromCharPtr("job_id")); 8112 8480 SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable")); 8113 8481 SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups")); … … 8118 8486 SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router")); 8119 8487 SWIG_Python_SetConstant(d, "ATTR_checkpoint_min",SWIG_FromCharPtr("checkpoint_min")); 8488 SWIG_Python_SetConstant(d, "ATTR_checkpoint_defaults",SWIG_FromCharPtr("checkpoint_defaults")); 8120 8489 SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled")); 8121 8490 SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only")); … … 8200 8569 SWIG_Python_SetConstant(d, "ATTR_LockfileCheckTime",SWIG_FromCharPtr("lock_file_check_time")); 8201 8570 SWIG_Python_SetConstant(d, "ATTR_npdefault",SWIG_FromCharPtr("np_default")); 8571 SWIG_Python_SetConstant(d, "ATTR_clonebatchsize",SWIG_FromCharPtr("clone_batch_size")); 8572 SWIG_Python_SetConstant(d, "ATTR_clonebatchdelay",SWIG_FromCharPtr("clone_batch_delay")); 8202 8573 SWIG_Python_SetConstant(d, "ATTR_jobstarttimeout",SWIG_FromCharPtr("job_start_timeout")); 8574 SWIG_Python_SetConstant(d, "ATTR_jobforcecanceltime",SWIG_FromCharPtr("job_force_cancel_time")); 8575 SWIG_Python_SetConstant(d, "ATTR_maxarraysize",SWIG_FromCharPtr("max_job_array_size")); 8576 SWIG_Python_SetConstant(d, "ATTR_maxslotlimit",SWIG_FromCharPtr("max_slot_limit")); 8577 SWIG_Python_SetConstant(d, "ATTR_recordjobinfo",SWIG_FromCharPtr("record_job_info")); 8578 SWIG_Python_SetConstant(d, "ATTR_recordjobscript",SWIG_FromCharPtr("record_job_script")); 8579 SWIG_Python_SetConstant(d, "ATTR_joblogfilemaxsize",SWIG_FromCharPtr("job_log_file_max_size")); 8580 SWIG_Python_SetConstant(d, "ATTR_joblogfilerolldepth",SWIG_FromCharPtr("job_log_file_roll_depth")); 8581 SWIG_Python_SetConstant(d, "ATTR_joblogkeepdays",SWIG_FromCharPtr("job_log_keep_days")); 8582 SWIG_Python_SetConstant(d, "ATTR_moabarraycompatible",SWIG_FromCharPtr("moab_array_compatible")); 8583 SWIG_Python_SetConstant(d, "ATTR_nomailforce",SWIG_FromCharPtr("no_mail_force")); 8203 8584 SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state")); 8204 8585 SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np")); … … 8208 8589 SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status")); 8209 8590 SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note")); 8591 SWIG_Python_SetConstant(d, "ATTR_NODE_gpus",SWIG_FromCharPtr("gpus")); 8592 SWIG_Python_SetConstant(d, "ATTR_NODE_gpustatus",SWIG_FromCharPtr("gpu_status")); 8210 8593 SWIG_Python_SetConstant(d, "ATTR_mailsubjectfmt",SWIG_FromCharPtr("mail_subject_fmt")); 8211 8594 SWIG_Python_SetConstant(d, "ATTR_mailbodyfmt",SWIG_FromCharPtr("mail_body_fmt")); … … 8215 8598 SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n")); 8216 8599 SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a")); 8600 SWIG_Python_SetConstant(d, "ARRAY_RANGE",SWIG_FromCharPtr("array_range=")); 8217 8601 SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay=")); 8218 8602 SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge=")); 8603 SWIG_Python_SetConstant(d, "DELASYNC",SWIG_FromCharPtr("delasync")); 8219 8604 SWIG_Python_SetConstant(d, "PURGECOMP",SWIG_FromCharPtr("purgecomplete=")); 8220 8605 SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only")); … … 8232 8617 SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown")); 8233 8618 SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared")); 8619 SWIG_Python_SetConstant(d, "ND_active",SWIG_FromCharPtr("active")); 8620 SWIG_Python_SetConstant(d, "ND_all",SWIG_FromCharPtr("all")); 8621 SWIG_Python_SetConstant(d, "ND_up",SWIG_FromCharPtr("up")); 8234 8622 SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster")); 8235 8623 SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch")); … … 8268 8656 SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(32))); 8269 8657 SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16))); 8658 SWIG_Python_SetConstant(d, "PBS_MAXGPUID",SWIG_From_int((int)(16))); 8270 8659 SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15))); 8271 8660 SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(1024))); 8272 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)( 6)));8661 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)(7))); 8273 8662 SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(8))); 8274 8663 SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5))); 8275 8664 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAY",SWIG_From_int((int)(99999))); 8276 SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+ 6+2))));8277 SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+ 6+2) +1024+5+6+2))));8665 SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+7+2)))); 8666 SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+7+2) +1024+5+7+2)))); 8278 8667 SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024))); 8279 8668 SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+1024+5+2)))); … … 8283 8672 SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6))); 8284 8673 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_BASE",SWIG_From_int((int)(0x00020300))); 8285 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)( 1)));8286 SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+ 1))));8674 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)(2))); 8675 SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+2)))); 8287 8676 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs")); 8288 8677 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001))); … … 8298 8687 SWIG_Python_SetConstant(d, "CHECKPOINTCONT",SWIG_FromCharPtr("checkpoint_cont")); 8299 8688 SWIG_Python_SetConstant(d, "MOM_DEFAULT_CHECKPOINT_DIR",SWIG_FromCharPtr("$MOMDEFAULTCHECKPOINTDIR$")); 8689 SWIG_Python_SetConstant(d, "NO_MOM_RELAY",SWIG_From_int((int)(1))); 8300 8690 SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET))); 8301 8691 SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET))); … … 8310 8700 SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT))); 8311 8701 SWIG_Python_SetConstant(d, "MERGE",SWIG_From_int((int)(MERGE))); 8312 PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); 8702 SWIG_Python_SetConstant(d, "INCR_OLD",SWIG_From_int((int)(INCR_OLD))); 8703 PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); 8313 8704 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set); 8314 8705 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",Swig_var_pbs_server_get, Swig_var_pbs_server_set); -
devel/C/pbs_wrap_2.4.c
r309 r318 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3.403 * Version 2.0.7 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 178 178 Flags/methods for returning states. 179 179 180 The SWIG conversion methods, as ConvertPtr, return an dinteger180 The SWIG conversion methods, as ConvertPtr, return an integer 181 181 that tells if the conversion was successful or not. And if not, 182 182 an error code can be returned (see swigerrors.swg for the codes). … … 733 733 #define PyInt_AsLong(x) PyLong_AsLong(x) 734 734 #define PyInt_FromLong(x) PyLong_FromLong(x) 735 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) 736 #define PyString_Check(name) PyBytes_Check(name) 737 #define PyString_FromString(x) PyUnicode_FromString(x) 735 738 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) 739 #define PyString_AsString(str) PyBytes_AsString(str) 740 #define PyString_Size(str) PyBytes_Size(str) 741 #define PyString_InternFromString(key) PyUnicode_InternFromString(key) 742 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE 743 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) 744 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) 736 745 737 746 #endif … … 873 882 # define PY_SSIZE_T_MAX INT_MAX 874 883 # define PY_SSIZE_T_MIN INT_MIN 884 typedef inquiry lenfunc; 885 typedef intargfunc ssizeargfunc; 886 typedef intintargfunc ssizessizeargfunc; 887 typedef intobjargproc ssizeobjargproc; 888 typedef intintobjargproc ssizessizeobjargproc; 889 typedef getreadbufferproc readbufferproc; 890 typedef getwritebufferproc writebufferproc; 891 typedef getsegcountproc segcountproc; 892 typedef getcharbufferproc charbufferproc; 893 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) 894 { 895 long result = 0; 896 PyObject *i = PyNumber_Int(x); 897 if (i) { 898 result = PyInt_AsLong(i); 899 Py_DECREF(i); 900 } 901 return result; 902 } 903 #endif 904 905 #if PY_VERSION_HEX < 0x02040000 906 #define Py_VISIT(op) \ 907 do { \ 908 if (op) { \ 909 int vret = visit((op), arg); \ 910 if (vret) \ 911 return vret; \ 912 } \ 913 } while (0) 914 #endif 915 916 #if PY_VERSION_HEX < 0x02030000 917 typedef struct { 918 PyTypeObject type; 919 PyNumberMethods as_number; 920 PyMappingMethods as_mapping; 921 PySequenceMethods as_sequence; 922 PyBufferProcs as_buffer; 923 PyObject *name, *slots; 924 } PyHeapTypeObject; 925 #endif 926 927 #if PY_VERSION_HEX < 0x02030000 928 typedef destructor freefunc; 929 #endif 930 931 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ 932 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ 933 (PY_MAJOR_VERSION > 3)) 934 # define SWIGPY_USE_CAPSULE 935 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) 936 #endif 937 938 #if PY_VERSION_HEX < 0x03020000 939 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) 940 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) 875 941 #endif 876 942 … … 1019 1085 #ifdef __cplusplus 1020 1086 extern "C" { 1021 #if 01022 } /* cc-mode */1023 #endif1024 1087 #endif 1025 1088 … … 1047 1110 * It is exported to the generated module, used for -fastproxy 1048 1111 * ----------------------------------------------------------------------------- */ 1049 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) 1112 #if PY_VERSION_HEX >= 0x03000000 1113 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) 1050 1114 { 1051 #if PY_VERSION_HEX >= 0x030000001052 1115 return PyInstanceMethod_New(func); 1116 } 1053 1117 #else 1054 return NULL; 1055 #endif 1056 } 1118 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) 1119 { 1120 return NULL; 1121 } 1122 #endif 1057 1123 1058 1124 #ifdef __cplusplus 1059 #if 01060 { /* cc-mode */1061 #endif1062 1125 } 1063 1126 #endif … … 1065 1128 1066 1129 /* ----------------------------------------------------------------------------- 1067 * See the LICENSE file for information on copyright, usage and redistribution1068 * of SWIG, and the README file for authors - http://www.swig.org/release.html.1069 *1070 1130 * pyrun.swg 1071 1131 * … … 1082 1142 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) 1083 1143 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) 1084 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) 1144 1145 #ifdef SWIGPYTHON_BUILTIN 1146 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) 1147 #else 1148 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1149 #endif 1150 1151 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1152 1085 1153 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) 1086 1154 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) … … 1097 1165 /* for C or C++ function pointers */ 1098 1166 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) 1099 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj( ptr, type, 0)1167 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) 1100 1168 1101 1169 /* for C++ member pointers, ie, member methods */ … … 1132 1200 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { 1133 1201 SWIG_PYTHON_THREAD_BEGIN_BLOCK; 1134 PyErr_SetString(errtype, (char *)msg);1202 PyErr_SetString(errtype, msg); 1135 1203 SWIG_PYTHON_THREAD_END_BLOCK; 1136 1204 } … … 1139 1207 1140 1208 /* Set a constant value */ 1209 1210 #if defined(SWIGPYTHON_BUILTIN) 1211 1212 SWIGINTERN void 1213 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { 1214 PyObject *s = PyString_InternFromString(key); 1215 PyList_Append(seq, s); 1216 Py_DECREF(s); 1217 } 1218 1219 SWIGINTERN void 1220 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { 1221 #if PY_VERSION_HEX < 0x02030000 1222 PyDict_SetItemString(d, (char *)name, obj); 1223 #else 1224 PyDict_SetItemString(d, name, obj); 1225 #endif 1226 Py_DECREF(obj); 1227 if (public_interface) 1228 SwigPyBuiltin_AddPublicSymbol(public_interface, name); 1229 } 1230 1231 #else 1141 1232 1142 1233 SWIGINTERN void 1143 1234 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { 1144 PyDict_SetItemString(d, (char*) name, obj); 1235 #if PY_VERSION_HEX < 0x02030000 1236 PyDict_SetItemString(d, (char *)name, obj); 1237 #else 1238 PyDict_SetItemString(d, name, obj); 1239 #endif 1145 1240 Py_DECREF(obj); 1146 1241 } 1242 1243 #endif 1147 1244 1148 1245 /* Append a value to the result obj */ … … 1206 1303 } 1207 1304 if (!PyTuple_Check(args)) { 1305 if (min <= 1 && max >= 1) { 1306 register int i; 1307 objs[0] = args; 1308 for (i = 1; i < max; ++i) { 1309 objs[i] = 0; 1310 } 1311 return 2; 1312 } 1208 1313 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); 1209 1314 return 0; … … 1258 1363 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) 1259 1364 1365 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) 1366 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) 1367 1260 1368 #ifdef __cplusplus 1261 1369 extern "C" { 1262 #if 01263 } /* cc-mode */1264 #endif1265 1370 #endif 1266 1371 … … 1313 1418 int delargs; 1314 1419 int implicitconv; 1420 PyTypeObject *pytype; 1315 1421 } SwigPyClientData; 1316 1422 … … 1379 1485 } 1380 1486 data->implicitconv = 0; 1487 data->pytype = 0; 1381 1488 return data; 1382 1489 } … … 1384 1491 1385 1492 SWIGRUNTIME void 1386 SwigPyClientData_Del(SwigPyClientData* data) 1387 { 1493 SwigPyClientData_Del(SwigPyClientData *data) { 1388 1494 Py_XDECREF(data->newraw); 1389 1495 Py_XDECREF(data->newargs); … … 1399 1505 int own; 1400 1506 PyObject *next; 1507 #ifdef SWIGPYTHON_BUILTIN 1508 PyObject *dict; 1509 #endif 1401 1510 } SwigPyObject; 1402 1511 … … 1449 1558 { 1450 1559 const char *name = SWIG_TypePrettyName(v->ty); 1451 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name,v);1560 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); 1452 1561 if (v->next) { 1453 # ifdef METH_NOARGS1562 # ifdef METH_NOARGS 1454 1563 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); 1455 # else1564 # else 1456 1565 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); 1457 # endif1458 # if PY_VERSION_HEX >= 0x030000001566 # endif 1567 # if PY_VERSION_HEX >= 0x03000000 1459 1568 PyObject *joined = PyUnicode_Concat(repr, nrep); 1460 1569 Py_DecRef(repr); 1461 1570 Py_DecRef(nrep); 1462 1571 repr = joined; 1463 # else1572 # else 1464 1573 PyString_ConcatAndDel(&repr,nrep); 1465 # endif1574 # endif 1466 1575 } 1467 1576 return repr; … … 1513 1622 return Py_NotImplemented; 1514 1623 } 1515 if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) 1516 res = Py_True; 1517 else 1518 res = Py_False; 1519 Py_INCREF(res); 1624 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); 1520 1625 return res; 1521 1626 } 1522 1627 1523 1628 1524 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); 1525 1629 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); 1630 1631 #ifdef SWIGPYTHON_BUILTIN 1632 static swig_type_info *SwigPyObject_stype = 0; 1526 1633 SWIGRUNTIME PyTypeObject* 1527 1634 SwigPyObject_type(void) { 1528 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); 1635 SwigPyClientData *cd; 1636 assert(SwigPyObject_stype); 1637 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; 1638 assert(cd); 1639 assert(cd->pytype); 1640 return cd->pytype; 1641 } 1642 #else 1643 SWIGRUNTIME PyTypeObject* 1644 SwigPyObject_type(void) { 1645 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); 1529 1646 return type; 1530 1647 } 1648 #endif 1531 1649 1532 1650 SWIGRUNTIMEINLINE int 1533 1651 SwigPyObject_Check(PyObject *op) { 1652 #ifdef SWIGPYTHON_BUILTIN 1653 PyTypeObject *target_tp = SwigPyObject_type(); 1654 if (PyType_IsSubtype(op->ob_type, target_tp)) 1655 return 1; 1656 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); 1657 #else 1534 1658 return (Py_TYPE(op) == SwigPyObject_type()) 1535 1659 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); 1660 #endif 1536 1661 } 1537 1662 … … 1637 1762 #if (PY_VERSION_HEX < 0x02020000) 1638 1763 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) 1764 #elif (PY_VERSION_HEX < 0x02050000) 1765 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 1639 1766 #else 1640 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))1767 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 1641 1768 #endif 1642 1769 { … … 1699 1826 1700 1827 SWIGRUNTIME PyTypeObject* 1701 _PySwigObject_type(void) {1828 SwigPyObject_TypeOnce(void) { 1702 1829 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; 1703 1830 1704 1831 static PyNumberMethods SwigPyObject_as_number = { 1705 1832 (binaryfunc)0, /*nb_add*/ … … 1748 1875 }; 1749 1876 1750 static PyTypeObject swigpyobject_type; 1877 static PyTypeObject swigpyobject_type; 1751 1878 static int type_init = 0; 1752 1879 if (!type_init) { 1753 const PyTypeObject tmp 1754 = { 1755 /* PyObject header changed in Python 3 */ 1880 const PyTypeObject tmp = { 1881 /* PyObject header changed in Python 3 */ 1756 1882 #if PY_VERSION_HEX >= 0x03000000 1757 PyVarObject_HEAD_INIT(&PyType_Type, 0)1758 #else 1759 1760 0,/* ob_size */1761 #endif 1762 (char *)"SwigPyObject",/* tp_name */1763 sizeof(SwigPyObject),/* tp_basicsize */1764 0,/* tp_itemsize */1765 (destructor)SwigPyObject_dealloc,/* tp_dealloc */1766 (printfunc)SwigPyObject_print,/* tp_print */1883 PyVarObject_HEAD_INIT(NULL, 0) 1884 #else 1885 PyObject_HEAD_INIT(NULL) 1886 0, /* ob_size */ 1887 #endif 1888 (char *)"SwigPyObject", /* tp_name */ 1889 sizeof(SwigPyObject), /* tp_basicsize */ 1890 0, /* tp_itemsize */ 1891 (destructor)SwigPyObject_dealloc, /* tp_dealloc */ 1892 (printfunc)SwigPyObject_print, /* tp_print */ 1767 1893 #if PY_VERSION_HEX < 0x02020000 1768 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ 1894 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ 1769 1895 #else 1770 (getattrfunc)0, /* tp_getattr */ 1771 #endif 1772 (setattrfunc)0, /* tp_setattr */ 1896 (getattrfunc)0, /* tp_getattr */ 1897 #endif 1898 (setattrfunc)0, /* tp_setattr */ 1773 1899 #if PY_VERSION_HEX >= 0x03000000 1774 1900 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 1775 1901 #else 1776 (cmpfunc)SwigPyObject_compare,/* tp_compare */1777 #endif 1778 (reprfunc)SwigPyObject_repr, /* tp_repr */ 1779 &SwigPyObject_as_number,/* tp_as_number */1780 0,/* tp_as_sequence */1781 0,/* tp_as_mapping */1782 (hashfunc)0,/* tp_hash */1783 (ternaryfunc)0,/* tp_call */1784 (reprfunc)SwigPyObject_str,/* tp_str */1785 PyObject_GenericGetAttr,/* tp_getattro */1786 0,/* tp_setattro */1787 0,/* tp_as_buffer */1788 Py_TPFLAGS_DEFAULT,/* tp_flags */1789 swigobject_doc, /* tp_doc */ 1790 0,/* tp_traverse */1791 0,/* tp_clear */1792 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */1793 0,/* tp_weaklistoffset */1902 (cmpfunc)SwigPyObject_compare, /* tp_compare */ 1903 #endif 1904 (reprfunc)SwigPyObject_repr, /* tp_repr */ 1905 &SwigPyObject_as_number, /* tp_as_number */ 1906 0, /* tp_as_sequence */ 1907 0, /* tp_as_mapping */ 1908 (hashfunc)0, /* tp_hash */ 1909 (ternaryfunc)0, /* tp_call */ 1910 (reprfunc)SwigPyObject_str, /* tp_str */ 1911 PyObject_GenericGetAttr, /* tp_getattro */ 1912 0, /* tp_setattro */ 1913 0, /* tp_as_buffer */ 1914 Py_TPFLAGS_DEFAULT, /* tp_flags */ 1915 swigobject_doc, /* tp_doc */ 1916 0, /* tp_traverse */ 1917 0, /* tp_clear */ 1918 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 1919 0, /* tp_weaklistoffset */ 1794 1920 #if PY_VERSION_HEX >= 0x02020000 1795 0,/* tp_iter */1796 0,/* tp_iternext */1797 swigobject_methods, /* tp_methods */ 1798 0,/* tp_members */1799 0, /* tp_getset */ 1800 0, /* tp_base */ 1801 0, /* tp_dict */ 1802 0, /* tp_descr_get */ 1803 0, /* tp_descr_set */ 1804 0, /* tp_dictoffset */ 1805 0, /* tp_init */ 1806 0, /* tp_alloc */ 1807 0, /* tp_new */ 1808 0, /* tp_free */ 1809 0, /* tp_is_gc */ 1810 0, /* tp_bases */ 1811 0,/* tp_mro */1812 0, /* tp_cache */ 1813 0,/* tp_subclasses */1814 0,/* tp_weaklist */1921 0, /* tp_iter */ 1922 0, /* tp_iternext */ 1923 swigobject_methods, /* tp_methods */ 1924 0, /* tp_members */ 1925 0, /* tp_getset */ 1926 0, /* tp_base */ 1927 0, /* tp_dict */ 1928 0, /* tp_descr_get */ 1929 0, /* tp_descr_set */ 1930 0, /* tp_dictoffset */ 1931 0, /* tp_init */ 1932 0, /* tp_alloc */ 1933 0, /* tp_new */ 1934 0, /* tp_free */ 1935 0, /* tp_is_gc */ 1936 0, /* tp_bases */ 1937 0, /* tp_mro */ 1938 0, /* tp_cache */ 1939 0, /* tp_subclasses */ 1940 0, /* tp_weaklist */ 1815 1941 #endif 1816 1942 #if PY_VERSION_HEX >= 0x02030000 1817 0, /* tp_del */ 1943 0, /* tp_del */ 1944 #endif 1945 #if PY_VERSION_HEX >= 0x02060000 1946 0, /* tp_version */ 1818 1947 #endif 1819 1948 #ifdef COUNT_ALLOCS 1820 0,0,0,0/* tp_alloc -> tp_next */1821 #endif 1822 1949 0,0,0,0 /* tp_alloc -> tp_next */ 1950 #endif 1951 }; 1823 1952 swigpyobject_type = tmp; 1824 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */1825 #if PY_VERSION_HEX < 0x0 30000001953 type_init = 1; 1954 #if PY_VERSION_HEX < 0x02020000 1826 1955 swigpyobject_type.ob_type = &PyType_Type; 1827 #endif 1828 type_init = 1; 1956 #else 1957 if (PyType_Ready(&swigpyobject_type) < 0) 1958 return NULL; 1959 #endif 1829 1960 } 1830 1961 return &swigpyobject_type; … … 1900 2031 } 1901 2032 1902 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);2033 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); 1903 2034 1904 2035 SWIGRUNTIME PyTypeObject* 1905 2036 SwigPyPacked_type(void) { 1906 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();2037 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); 1907 2038 return type; 1908 2039 } … … 1910 2041 SWIGRUNTIMEINLINE int 1911 2042 SwigPyPacked_Check(PyObject *op) { 1912 return ((op)->ob_type == _PySwigPacked_type())2043 return ((op)->ob_type == SwigPyPacked_TypeOnce()) 1913 2044 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); 1914 2045 } … … 1925 2056 1926 2057 SWIGRUNTIME PyTypeObject* 1927 _PySwigPacked_type(void) {2058 SwigPyPacked_TypeOnce(void) { 1928 2059 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; 1929 2060 static PyTypeObject swigpypacked_type; 1930 static int type_init = 0; 2061 static int type_init = 0; 1931 2062 if (!type_init) { 1932 const PyTypeObject tmp 1933 = { 1934 /* PyObject header changed in Python 3 */ 2063 const PyTypeObject tmp = { 2064 /* PyObject header changed in Python 3 */ 1935 2065 #if PY_VERSION_HEX>=0x03000000 1936 PyVarObject_HEAD_INIT(&PyType_Type, 0)2066 PyVarObject_HEAD_INIT(NULL, 0) 1937 2067 #else 1938 1939 0, /* ob_size */1940 #endif 1941 (char *)"SwigPyPacked", /* tp_name */ 1942 sizeof(SwigPyPacked), /* tp_basicsize */ 1943 0, /* tp_itemsize */ 1944 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ 1945 (printfunc)SwigPyPacked_print, /* tp_print */ 1946 (getattrfunc)0, /* tp_getattr */ 1947 (setattrfunc)0, /* tp_setattr */ 2068 PyObject_HEAD_INIT(NULL) 2069 0, /* ob_size */ 2070 #endif 2071 (char *)"SwigPyPacked", /* tp_name */ 2072 sizeof(SwigPyPacked), /* tp_basicsize */ 2073 0, /* tp_itemsize */ 2074 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ 2075 (printfunc)SwigPyPacked_print, /* tp_print */ 2076 (getattrfunc)0, /* tp_getattr */ 2077 (setattrfunc)0, /* tp_setattr */ 1948 2078 #if PY_VERSION_HEX>=0x03000000 1949 0, /* tp_reserved in 3.0.1 */2079 0, /* tp_reserved in 3.0.1 */ 1950 2080 #else 1951 (cmpfunc)SwigPyPacked_compare,/* tp_compare */1952 #endif 1953 (reprfunc)SwigPyPacked_repr,/* tp_repr */1954 0,/* tp_as_number */1955 0,/* tp_as_sequence */1956 0,/* tp_as_mapping */1957 (hashfunc)0,/* tp_hash */1958 (ternaryfunc)0,/* tp_call */1959 (reprfunc)SwigPyPacked_str,/* tp_str */1960 PyObject_GenericGetAttr,/* tp_getattro */1961 0,/* tp_setattro */1962 0,/* tp_as_buffer */1963 Py_TPFLAGS_DEFAULT,/* tp_flags */1964 swigpacked_doc,/* tp_doc */1965 0,/* tp_traverse */1966 0,/* tp_clear */1967 0,/* tp_richcompare */1968 0,/* tp_weaklistoffset */2081 (cmpfunc)SwigPyPacked_compare, /* tp_compare */ 2082 #endif 2083 (reprfunc)SwigPyPacked_repr, /* tp_repr */ 2084 0, /* tp_as_number */ 2085 0, /* tp_as_sequence */ 2086 0, /* tp_as_mapping */ 2087 (hashfunc)0, /* tp_hash */ 2088 (ternaryfunc)0, /* tp_call */ 2089 (reprfunc)SwigPyPacked_str, /* tp_str */ 2090 PyObject_GenericGetAttr, /* tp_getattro */ 2091 0, /* tp_setattro */ 2092 0, /* tp_as_buffer */ 2093 Py_TPFLAGS_DEFAULT, /* tp_flags */ 2094 swigpacked_doc, /* tp_doc */ 2095 0, /* tp_traverse */ 2096 0, /* tp_clear */ 2097 0, /* tp_richcompare */ 2098 0, /* tp_weaklistoffset */ 1969 2099 #if PY_VERSION_HEX >= 0x02020000 1970 0,/* tp_iter */1971 0,/* tp_iternext */1972 0, /* tp_methods */ 1973 0,/* tp_members */1974 0, /* tp_getset */ 1975 0, /* tp_base */ 1976 0, /* tp_dict */ 1977 0, /* tp_descr_get */ 1978 0, /* tp_descr_set */ 1979 0, /* tp_dictoffset */ 1980 0, /* tp_init */ 1981 0, /* tp_alloc */ 1982 0, /* tp_new */ 1983 0, /* tp_free */ 1984 0, /* tp_is_gc */1985 0, /* tp_bases */ 1986 0,/* tp_mro */1987 0, /* tp_cache */ 1988 0,/* tp_subclasses */1989 0,/* tp_weaklist */2100 0, /* tp_iter */ 2101 0, /* tp_iternext */ 2102 0, /* tp_methods */ 2103 0, /* tp_members */ 2104 0, /* tp_getset */ 2105 0, /* tp_base */ 2106 0, /* tp_dict */ 2107 0, /* tp_descr_get */ 2108 0, /* tp_descr_set */ 2109 0, /* tp_dictoffset */ 2110 0, /* tp_init */ 2111 0, /* tp_alloc */ 2112 0, /* tp_new */ 2113 0, /* tp_free */ 2114 0, /* tp_is_gc */ 2115 0, /* tp_bases */ 2116 0, /* tp_mro */ 2117 0, /* tp_cache */ 2118 0, /* tp_subclasses */ 2119 0, /* tp_weaklist */ 1990 2120 #endif 1991 2121 #if PY_VERSION_HEX >= 0x02030000 1992 0, /* tp_del */ 2122 0, /* tp_del */ 2123 #endif 2124 #if PY_VERSION_HEX >= 0x02060000 2125 0, /* tp_version */ 1993 2126 #endif 1994 2127 #ifdef COUNT_ALLOCS 1995 0,0,0,0/* tp_alloc -> tp_next */1996 #endif 1997 2128 0,0,0,0 /* tp_alloc -> tp_next */ 2129 #endif 2130 }; 1998 2131 swigpypacked_type = tmp; 1999 /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */2000 #if PY_VERSION_HEX < 0x0 30000002132 type_init = 1; 2133 #if PY_VERSION_HEX < 0x02020000 2001 2134 swigpypacked_type.ob_type = &PyType_Type; 2002 #endif 2003 type_init = 1; 2135 #else 2136 if (PyType_Ready(&swigpypacked_type) < 0) 2137 return NULL; 2138 #endif 2004 2139 } 2005 2140 return &swigpypacked_type; … … 2048 2183 } 2049 2184 2185 static PyObject *swig_this = NULL; 2186 2050 2187 SWIGRUNTIME PyObject * 2051 2188 SWIG_This(void) 2052 2189 { 2053 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); 2190 if (swig_this == NULL) 2191 swig_this = _SWIG_This(); 2054 2192 return swig_this; 2055 2193 } … … 2065 2203 SWIG_Python_GetSwigThis(PyObject *pyobj) 2066 2204 { 2067 if (SwigPyObject_Check(pyobj)) { 2205 PyObject *obj; 2206 2207 if (SwigPyObject_Check(pyobj)) 2068 2208 return (SwigPyObject *) pyobj; 2209 2210 #ifdef SWIGPYTHON_BUILTIN 2211 (void)obj; 2212 # ifdef PyWeakref_CheckProxy 2213 if (PyWeakref_CheckProxy(pyobj)) { 2214 pyobj = PyWeakref_GET_OBJECT(pyobj); 2215 if (pyobj && SwigPyObject_Check(pyobj)) 2216 return (SwigPyObject*) pyobj; 2217 } 2218 # endif 2219 return NULL; 2220 #else 2221 2222 obj = 0; 2223 2224 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 2225 if (PyInstance_Check(pyobj)) { 2226 obj = _PyInstance_Lookup(pyobj, SWIG_This()); 2069 2227 } else { 2070 PyObject * obj = 0;2071 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 2072 if (PyInstance_Check(pyobj)) {2073 obj = _PyInstance_Lookup(pyobj, SWIG_This());2228 PyObject **dictptr = _PyObject_GetDictPtr(pyobj); 2229 if (dictptr != NULL) { 2230 PyObject *dict = *dictptr; 2231 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; 2074 2232 } else { 2075 PyObject **dictptr = _PyObject_GetDictPtr(pyobj); 2076 if (dictptr != NULL) { 2077 PyObject *dict = *dictptr; 2078 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; 2233 #ifdef PyWeakref_CheckProxy 2234 if (PyWeakref_CheckProxy(pyobj)) { 2235 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); 2236 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; 2237 } 2238 #endif 2239 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2240 if (obj) { 2241 Py_DECREF(obj); 2079 2242 } else { 2080 #ifdef PyWeakref_CheckProxy 2081 if (PyWeakref_CheckProxy(pyobj)) { 2082 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); 2083 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; 2084 } 2085 #endif 2086 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2087 if (obj) { 2088 Py_DECREF(obj); 2089 } else { 2090 if (PyErr_Occurred()) PyErr_Clear(); 2091 return 0; 2092 } 2243 if (PyErr_Occurred()) PyErr_Clear(); 2244 return 0; 2093 2245 } 2094 2246 } 2247 } 2095 2248 #else 2096 2097 2098 2099 2100 2101 2102 2103 #endif 2104 2105 2106 2107 2108 2109 2110 } 2249 obj = PyObject_GetAttr(pyobj,SWIG_This()); 2250 if (obj) { 2251 Py_DECREF(obj); 2252 } else { 2253 if (PyErr_Occurred()) PyErr_Clear(); 2254 return 0; 2255 } 2256 #endif 2257 if (obj && !SwigPyObject_Check(obj)) { 2258 /* a PyObject is called 'this', try to get the 'real this' 2259 SwigPyObject from it */ 2260 return SWIG_Python_GetSwigThis(obj); 2261 } 2262 return (SwigPyObject *)obj; 2263 #endif 2111 2264 } 2112 2265 … … 2130 2283 SWIGRUNTIME int 2131 2284 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { 2132 if (!obj) return SWIG_ERROR; 2285 int res; 2286 SwigPyObject *sobj; 2287 2288 if (!obj) 2289 return SWIG_ERROR; 2133 2290 if (obj == Py_None) { 2134 if (ptr) *ptr = 0; 2291 if (ptr) 2292 *ptr = 0; 2135 2293 return SWIG_OK; 2294 } 2295 2296 res = SWIG_ERROR; 2297 2298 sobj = SWIG_Python_GetSwigThis(obj); 2299 if (own) 2300 *own = 0; 2301 while (sobj) { 2302 void *vptr = sobj->ptr; 2303 if (ty) { 2304 swig_type_info *to = sobj->ty; 2305 if (to == ty) { 2306 /* no type cast needed */ 2307 if (ptr) *ptr = vptr; 2308 break; 2309 } else { 2310 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 2311 if (!tc) { 2312 sobj = (SwigPyObject *)sobj->next; 2313 } else { 2314 if (ptr) { 2315 int newmemory = 0; 2316 *ptr = SWIG_TypeCast(tc,vptr,&newmemory); 2317 if (newmemory == SWIG_CAST_NEW_MEMORY) { 2318 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ 2319 if (own) 2320 *own = *own | SWIG_CAST_NEW_MEMORY; 2321 } 2322 } 2323 break; 2324 } 2325 } 2326 } else { 2327 if (ptr) *ptr = vptr; 2328 break; 2329 } 2330 } 2331 if (sobj) { 2332 if (own) 2333 *own = *own | sobj->own; 2334 if (flags & SWIG_POINTER_DISOWN) { 2335 sobj->own = 0; 2336 } 2337 res = SWIG_OK; 2136 2338 } else { 2137 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); 2138 if (own) 2139 *own = 0; 2140 while (sobj) { 2141 void *vptr = sobj->ptr; 2142 if (ty) { 2143 swig_type_info *to = sobj->ty; 2144 if (to == ty) { 2145 /* no type cast needed */ 2146 if (ptr) *ptr = vptr; 2147 break; 2148 } else { 2149 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 2150 if (!tc) { 2151 sobj = (SwigPyObject *)sobj->next; 2152 } else { 2153 if (ptr) { 2154 int newmemory = 0; 2155 *ptr = SWIG_TypeCast(tc,vptr,&newmemory); 2156 if (newmemory == SWIG_CAST_NEW_MEMORY) { 2157 assert(own); 2158 if (own) 2159 *own = *own | SWIG_CAST_NEW_MEMORY; 2339 if (flags & SWIG_POINTER_IMPLICIT_CONV) { 2340 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; 2341 if (data && !data->implicitconv) { 2342 PyObject *klass = data->klass; 2343 if (klass) { 2344 PyObject *impconv; 2345 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ 2346 impconv = SWIG_Python_CallFunctor(klass, obj); 2347 data->implicitconv = 0; 2348 if (PyErr_Occurred()) { 2349 PyErr_Clear(); 2350 impconv = 0; 2351 } 2352 if (impconv) { 2353 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); 2354 if (iobj) { 2355 void *vptr; 2356 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); 2357 if (SWIG_IsOK(res)) { 2358 if (ptr) { 2359 *ptr = vptr; 2360 /* transfer the ownership to 'ptr' */ 2361 iobj->own = 0; 2362 res = SWIG_AddCast(res); 2363 res = SWIG_AddNewMask(res); 2364 } else { 2365 res = SWIG_AddCast(res); 2366 } 2160 2367 } 2161 2368 } 2162 break; 2163 } 2164 } 2165 } else { 2166 if (ptr) *ptr = vptr; 2167 break; 2369 Py_DECREF(impconv); 2370 } 2371 } 2168 2372 } 2169 2373 } 2170 if (sobj) { 2171 if (own) 2172 *own = *own | sobj->own; 2173 if (flags & SWIG_POINTER_DISOWN) { 2174 sobj->own = 0; 2175 } 2176 return SWIG_OK; 2177 } else { 2178 int res = SWIG_ERROR; 2179 if (flags & SWIG_POINTER_IMPLICIT_CONV) { 2180 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; 2181 if (data && !data->implicitconv) { 2182 PyObject *klass = data->klass; 2183 if (klass) { 2184 PyObject *impconv; 2185 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ 2186 impconv = SWIG_Python_CallFunctor(klass, obj); 2187 data->implicitconv = 0; 2188 if (PyErr_Occurred()) { 2189 PyErr_Clear(); 2190 impconv = 0; 2191 } 2192 if (impconv) { 2193 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); 2194 if (iobj) { 2195 void *vptr; 2196 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); 2197 if (SWIG_IsOK(res)) { 2198 if (ptr) { 2199 *ptr = vptr; 2200 /* transfer the ownership to 'ptr' */ 2201 iobj->own = 0; 2202 res = SWIG_AddCast(res); 2203 res = SWIG_AddNewMask(res); 2204 } else { 2205 res = SWIG_AddCast(res); 2206 } 2207 } 2208 } 2209 Py_DECREF(impconv); 2210 } 2211 } 2212 } 2213 } 2214 return res; 2215 } 2216 } 2374 } 2375 return res; 2217 2376 } 2218 2377 … … 2368 2527 SWIG_Python_InitShadowInstance(PyObject *args) { 2369 2528 PyObject *obj[2]; 2370 if (!SWIG_Python_UnpackTuple(args, (char*)"swiginit", 2, 2, obj)) {2529 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { 2371 2530 return NULL; 2372 2531 } else { … … 2384 2543 2385 2544 SWIGRUNTIME PyObject * 2386 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { 2387 if (!ptr) { 2545 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { 2546 SwigPyClientData *clientdata; 2547 PyObject * robj; 2548 int own; 2549 2550 if (!ptr) 2388 2551 return SWIG_Py_Void(); 2389 } else { 2390 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; 2391 PyObject *robj = SwigPyObject_New(ptr, type, own); 2392 SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; 2393 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { 2394 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); 2395 if (inst) { 2396 Py_DECREF(robj); 2397 robj = inst; 2552 2553 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; 2554 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; 2555 if (clientdata && clientdata->pytype) { 2556 SwigPyObject *newobj; 2557 if (flags & SWIG_BUILTIN_TP_INIT) { 2558 newobj = (SwigPyObject*) self; 2559 if (newobj->ptr) { 2560 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); 2561 while (newobj->next) 2562 newobj = (SwigPyObject *) newobj->next; 2563 newobj->next = next_self; 2564 newobj = (SwigPyObject *)next_self; 2398 2565 } 2399 } 2400 return robj; 2401 } 2566 } else { 2567 newobj = PyObject_New(SwigPyObject, clientdata->pytype); 2568 } 2569 if (newobj) { 2570 newobj->ptr = ptr; 2571 newobj->ty = type; 2572 newobj->own = own; 2573 newobj->next = 0; 2574 #ifdef SWIGPYTHON_BUILTIN 2575 newobj->dict = 0; 2576 #endif 2577 return (PyObject*) newobj; 2578 } 2579 return SWIG_Py_Void(); 2580 } 2581 2582 assert(!(flags & SWIG_BUILTIN_TP_INIT)); 2583 2584 robj = SwigPyObject_New(ptr, type, own); 2585 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { 2586 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); 2587 if (inst) { 2588 Py_DECREF(robj); 2589 robj = inst; 2590 } 2591 } 2592 return robj; 2402 2593 } 2403 2594 … … 2425 2616 type_pointer = SWIG_ReturnGlobalTypeList((void *)0); 2426 2617 #else 2618 # ifdef SWIGPY_USE_CAPSULE 2619 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); 2620 # else 2427 2621 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2428 2622 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); 2623 # endif 2429 2624 if (PyErr_Occurred()) { 2430 2625 PyErr_Clear(); … … 2469 2664 2470 2665 SWIGRUNTIME void 2666 #ifdef SWIGPY_USE_CAPSULE 2667 SWIG_Python_DestroyModule(PyObject *obj) 2668 #else 2471 2669 SWIG_Python_DestroyModule(void *vptr) 2670 #endif 2472 2671 { 2672 #ifdef SWIGPY_USE_CAPSULE 2673 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); 2674 #else 2473 2675 swig_module_info *swig_module = (swig_module_info *) vptr; 2676 #endif 2474 2677 swig_type_info **types = swig_module->types; 2475 2678 size_t i; … … 2482 2685 } 2483 2686 Py_DECREF(SWIG_This()); 2687 swig_this = NULL; 2484 2688 } 2485 2689 2486 2690 SWIGRUNTIME void 2487 2691 SWIG_Python_SetModule(swig_module_info *swig_module) { 2488 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */2489 2490 2692 #if PY_VERSION_HEX >= 0x03000000 2491 2693 /* Add a dummy module object into sys.modules */ 2492 2694 PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); 2493 2695 #else 2494 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2495 swig_empty_runtime_method_table); 2496 #endif 2696 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ 2697 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); 2698 #endif 2699 #ifdef SWIGPY_USE_CAPSULE 2700 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); 2701 if (pointer && module) { 2702 PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); 2703 } else { 2704 Py_XDECREF(pointer); 2705 } 2706 #else 2497 2707 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); 2498 2708 if (pointer && module) { … … 2501 2711 Py_XDECREF(pointer); 2502 2712 } 2713 #endif 2503 2714 } 2504 2715 … … 2518 2729 swig_type_info *descriptor; 2519 2730 if (obj) { 2731 #ifdef SWIGPY_USE_CAPSULE 2732 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); 2733 #else 2520 2734 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); 2735 #endif 2521 2736 } else { 2522 2737 swig_module_info *swig_module = SWIG_Python_GetModule(); 2523 2738 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); 2524 2739 if (descriptor) { 2740 #ifdef SWIGPY_USE_CAPSULE 2741 obj = PyCapsule_New((void*) descriptor, NULL, NULL); 2742 #else 2525 2743 obj = PyCObject_FromVoidPtr(descriptor, NULL); 2744 #endif 2526 2745 PyDict_SetItem(cache, key, obj); 2527 2746 Py_DECREF(obj); … … 2584 2803 SwigPyObject *v = (SwigPyObject *)self; 2585 2804 swig_type_info *ty = v ? v->ty : 0; 2586 return ty ? ty->str : (char*)"";2805 return ty ? ty->str : ""; 2587 2806 } 2588 2807 … … 2627 2846 /* Convert a pointer value, signal an exception on a type mismatch */ 2628 2847 SWIGRUNTIME void * 2629 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {2848 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { 2630 2849 void *result; 2631 2850 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { … … 2641 2860 } 2642 2861 2862 #ifdef SWIGPYTHON_BUILTIN 2863 SWIGRUNTIME int 2864 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { 2865 PyTypeObject *tp = obj->ob_type; 2866 PyObject *descr; 2867 PyObject *encoded_name; 2868 descrsetfunc f; 2869 int res; 2870 2871 # ifdef Py_USING_UNICODE 2872 if (PyString_Check(name)) { 2873 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); 2874 if (!name) 2875 return -1; 2876 } else if (!PyUnicode_Check(name)) 2877 # else 2878 if (!PyString_Check(name)) 2879 # endif 2880 { 2881 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); 2882 return -1; 2883 } else { 2884 Py_INCREF(name); 2885 } 2886 2887 if (!tp->tp_dict) { 2888 if (PyType_Ready(tp) < 0) 2889 goto done; 2890 } 2891 2892 res = -1; 2893 descr = _PyType_Lookup(tp, name); 2894 f = NULL; 2895 if (descr != NULL) 2896 f = descr->ob_type->tp_descr_set; 2897 if (!f) { 2898 if (PyString_Check(name)) { 2899 encoded_name = name; 2900 Py_INCREF(name); 2901 } else { 2902 encoded_name = PyUnicode_AsUTF8String(name); 2903 } 2904 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); 2905 Py_DECREF(encoded_name); 2906 } else { 2907 res = f(descr, obj, value); 2908 } 2909 2910 done: 2911 Py_DECREF(name); 2912 return res; 2913 } 2914 #endif 2915 2643 2916 2644 2917 #ifdef __cplusplus 2645 #if 02646 { /* cc-mode */2647 #endif2648 2918 } 2649 2919 #endif … … 2691 2961 #define SWIG_name "_pbs" 2692 2962 2693 #define SWIGVERSION 0x0 103402963 #define SWIGVERSION 0x020007 2694 2964 #define SWIG_VERSION SWIGVERSION 2695 2965 … … 2791 3061 bzero( (void*) current->resource, sizeof(current->resource)); 2792 3062 bzero( (void*) current->value, sizeof(current->value)); 2793 current->op = 0;3063 // current->op = 0; 2794 3064 2795 3065 current->next = prev; … … 2971 3241 2972 3242 2973 #define SWIG_From_long PyInt_FromLong 2974 2975 2976 SWIGINTERNINLINE PyObject * 2977 SWIG_From_int (int value) 2978 { 2979 return SWIG_From_long (value); 3243 SWIGINTERNINLINE PyObject* 3244 SWIG_From_int (int value) 3245 { 3246 return PyInt_FromLong((long) value); 2980 3247 } 2981 3248 … … 3001 3268 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); 3002 3269 return pchar_descriptor ? 3003 SWIG_ NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();3270 SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); 3004 3271 } else { 3005 3272 #if PY_VERSION_HEX >= 0x03000000 … … 3189 3456 return res; 3190 3457 } 3458 3459 3460 #define SWIG_From_long PyLong_FromLong 3191 3461 3192 3462 … … 8191 8461 static char varlink__doc__[] = "Swig var link object"; 8192 8462 static PyTypeObject varlink_type; 8193 static int type_init = 0; 8463 static int type_init = 0; 8194 8464 if (!type_init) { 8195 const PyTypeObject tmp 8196 = { 8465 const PyTypeObject tmp = { 8197 8466 /* PyObject header changed in Python 3 */ 8198 8467 #if PY_VERSION_HEX >= 0x03000000 8199 PyVarObject_HEAD_INIT( &PyType_Type, 0)8468 PyVarObject_HEAD_INIT(NULL, 0) 8200 8469 #else 8201 8470 PyObject_HEAD_INIT(NULL) 8202 0, /* Number of items in variable part (ob_size)*/8203 #endif 8204 (char *)"swigvarlink", /* Type name (tp_name)*/8205 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize)*/8206 0, /* Itemsize (tp_itemsize)*/8207 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */8208 (printfunc) swig_varlink_print, /* Print (tp_print)*/8209 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr)*/8210 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr)*/8471 0, /* ob_size */ 8472 #endif 8473 (char *)"swigvarlink", /* tp_name */ 8474 sizeof(swig_varlinkobject), /* tp_basicsize */ 8475 0, /* tp_itemsize */ 8476 (destructor) swig_varlink_dealloc, /* tp_dealloc */ 8477 (printfunc) swig_varlink_print, /* tp_print */ 8478 (getattrfunc) swig_varlink_getattr, /* tp_getattr */ 8479 (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 8211 8480 0, /* tp_compare */ 8212 8481 (reprfunc) swig_varlink_repr, /* tp_repr */ … … 8232 8501 0, /* tp_del */ 8233 8502 #endif 8503 #if PY_VERSION_HEX >= 0x02060000 8504 0, /* tp_version */ 8505 #endif 8234 8506 #ifdef COUNT_ALLOCS 8235 8507 0,0,0,0 /* tp_alloc -> tp_next */ … … 8237 8509 }; 8238 8510 varlink_type = tmp; 8239 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */8240 #if PY_VERSION_HEX < 0x0 30000008511 type_init = 1; 8512 #if PY_VERSION_HEX < 0x02020000 8241 8513 varlink_type.ob_type = &PyType_Type; 8242 #endif 8243 type_init = 1; 8514 #else 8515 if (PyType_Ready(&varlink_type) < 0) 8516 return NULL; 8517 #endif 8244 8518 } 8245 8519 return &varlink_type; … … 8292 8566 switch(constants[i].type) { 8293 8567 case SWIG_PY_POINTER: 8294 obj = SWIG_ NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);8568 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); 8295 8569 break; 8296 8570 case SWIG_PY_BINARY: … … 8332 8606 } 8333 8607 if (ci) { 8334 size_t shift = (ci->ptype) - types;8335 swig_type_info *ty = types_initial[shift];8336 size_t ldoc = (c - methods[i].ml_doc);8337 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;8338 char *ndoc = (char*)malloc(ldoc + lptr + 10);8339 if (ndoc) {8340 char * buff = ndoc;8341 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;8342 if (ptr) {8608 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; 8609 if (ptr) { 8610 size_t shift = (ci->ptype) - types; 8611 swig_type_info *ty = types_initial[shift]; 8612 size_t ldoc = (c - methods[i].ml_doc); 8613 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; 8614 char *ndoc = (char*)malloc(ldoc + lptr + 10); 8615 if (ndoc) { 8616 char *buff = ndoc; 8343 8617 strncpy(buff, methods[i].ml_doc, ldoc); 8344 8618 buff += ldoc; … … 8373 8647 #endif 8374 8648 SWIG_init(void) { 8375 PyObject *m, *d ;8649 PyObject *m, *d, *md; 8376 8650 #if PY_VERSION_HEX >= 0x03000000 8377 8651 static struct PyModuleDef SWIG_module = { 8652 # if PY_VERSION_HEX >= 0x03020000 8378 8653 PyModuleDef_HEAD_INIT, 8654 # else 8655 { 8656 PyObject_HEAD_INIT(NULL) 8657 NULL, /* m_init */ 8658 0, /* m_index */ 8659 NULL, /* m_copy */ 8660 }, 8661 # endif 8379 8662 (char *) SWIG_name, 8380 8663 NULL, … … 8388 8671 #endif 8389 8672 8673 #if defined(SWIGPYTHON_BUILTIN) 8674 static SwigPyClientData SwigPyObject_clientdata = { 8675 0, 0, 0, 0, 0, 0, 0 8676 }; 8677 static PyGetSetDef this_getset_def = { 8678 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL 8679 }; 8680 static SwigPyGetSet thisown_getset_closure = { 8681 (PyCFunction) SwigPyObject_own, 8682 (PyCFunction) SwigPyObject_own 8683 }; 8684 static PyGetSetDef thisown_getset_def = { 8685 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure 8686 }; 8687 PyObject *metatype_args; 8688 PyTypeObject *builtin_pytype; 8689 int builtin_base_count; 8690 swig_type_info *builtin_basetype; 8691 PyObject *tuple; 8692 PyGetSetDescrObject *static_getset; 8693 PyTypeObject *metatype; 8694 SwigPyClientData *cd; 8695 PyObject *public_interface, *public_symbol; 8696 PyObject *this_descr; 8697 PyObject *thisown_descr; 8698 int i; 8699 8700 (void)builtin_pytype; 8701 (void)builtin_base_count; 8702 (void)builtin_basetype; 8703 (void)tuple; 8704 (void)static_getset; 8705 8706 /* metatype is used to implement static member variables. */ 8707 metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); 8708 assert(metatype_args); 8709 metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); 8710 assert(metatype); 8711 Py_DECREF(metatype_args); 8712 metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; 8713 assert(PyType_Ready(metatype) >= 0); 8714 #endif 8715 8390 8716 /* Fix SwigMethods to carry the callback ptrs when needed */ 8391 8717 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); … … 8396 8722 m = Py_InitModule((char *) SWIG_name, SwigMethods); 8397 8723 #endif 8398 d = PyModule_GetDict(m);8724 md = d = PyModule_GetDict(m); 8399 8725 8400 8726 SWIG_InitializeModule(0); 8727 8728 #ifdef SWIGPYTHON_BUILTIN 8729 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); 8730 assert(SwigPyObject_stype); 8731 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; 8732 if (!cd) { 8733 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; 8734 SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); 8735 } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { 8736 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); 8737 # if PY_VERSION_HEX >= 0x03000000 8738 return NULL; 8739 # else 8740 return; 8741 # endif 8742 } 8743 8744 /* All objects have a 'this' attribute */ 8745 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); 8746 (void)this_descr; 8747 8748 /* All objects have a 'thisown' attribute */ 8749 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); 8750 (void)thisown_descr; 8751 8752 public_interface = PyList_New(0); 8753 public_symbol = 0; 8754 (void)public_symbol; 8755 8756 PyDict_SetItemString(md, "__all__", public_interface); 8757 Py_DECREF(public_interface); 8758 for (i = 0; SwigMethods[i].ml_name != NULL; ++i) 8759 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); 8760 for (i = 0; swig_const_table[i].name != 0; ++i) 8761 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); 8762 #endif 8763 8401 8764 SWIG_InstallConstants(d,swig_const_table); 8402 8403 8765 8404 8766 SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time")); … … 8421 8783 SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List")); 8422 8784 SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name")); 8785 SWIG_Python_SetConstant(d, "ATTR_args",SWIG_FromCharPtr("job_arguments")); 8423 8786 SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users")); 8424 8787 SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name")); … … 8429 8792 SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout")); 8430 8793 SWIG_Python_SetConstant(d, "ATTR_jobtype",SWIG_FromCharPtr("jobtype")); 8794 SWIG_Python_SetConstant(d, "ATTR_submit_host",SWIG_FromCharPtr("submit_host")); 8795 SWIG_Python_SetConstant(d, "ATTR_init_work_dir",SWIG_FromCharPtr("init_work_dir")); 8431 8796 SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime")); 8432 8797 SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host")); … … 8471 8836 SWIG_Python_SetConstant(d, "ATTR_reported",SWIG_FromCharPtr("reported")); 8472 8837 SWIG_Python_SetConstant(d, "ATTR_intcmd",SWIG_FromCharPtr("inter_cmd")); 8838 SWIG_Python_SetConstant(d, "ATTR_P",SWIG_FromCharPtr("proxy_user")); 8839 SWIG_Python_SetConstant(d, "ATTR_exec_gpus",SWIG_FromCharPtr("exec_gpus")); 8840 SWIG_Python_SetConstant(d, "ATTR_J",SWIG_FromCharPtr("job_id")); 8473 8841 SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable")); 8474 8842 SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups")); … … 8479 8847 SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router")); 8480 8848 SWIG_Python_SetConstant(d, "ATTR_checkpoint_min",SWIG_FromCharPtr("checkpoint_min")); 8849 SWIG_Python_SetConstant(d, "ATTR_checkpoint_defaults",SWIG_FromCharPtr("checkpoint_defaults")); 8481 8850 SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled")); 8482 8851 SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only")); … … 8561 8930 SWIG_Python_SetConstant(d, "ATTR_LockfileCheckTime",SWIG_FromCharPtr("lock_file_check_time")); 8562 8931 SWIG_Python_SetConstant(d, "ATTR_npdefault",SWIG_FromCharPtr("np_default")); 8932 SWIG_Python_SetConstant(d, "ATTR_clonebatchsize",SWIG_FromCharPtr("clone_batch_size")); 8933 SWIG_Python_SetConstant(d, "ATTR_clonebatchdelay",SWIG_FromCharPtr("clone_batch_delay")); 8563 8934 SWIG_Python_SetConstant(d, "ATTR_jobstarttimeout",SWIG_FromCharPtr("job_start_timeout")); 8935 SWIG_Python_SetConstant(d, "ATTR_jobforcecanceltime",SWIG_FromCharPtr("job_force_cancel_time")); 8936 SWIG_Python_SetConstant(d, "ATTR_maxarraysize",SWIG_FromCharPtr("max_job_array_size")); 8937 SWIG_Python_SetConstant(d, "ATTR_maxslotlimit",SWIG_FromCharPtr("max_slot_limit")); 8938 SWIG_Python_SetConstant(d, "ATTR_recordjobinfo",SWIG_FromCharPtr("record_job_info")); 8939 SWIG_Python_SetConstant(d, "ATTR_recordjobscript",SWIG_FromCharPtr("record_job_script")); 8940 SWIG_Python_SetConstant(d, "ATTR_joblogfilemaxsize",SWIG_FromCharPtr("job_log_file_max_size")); 8941 SWIG_Python_SetConstant(d, "ATTR_joblogfilerolldepth",SWIG_FromCharPtr("job_log_file_roll_depth")); 8942 SWIG_Python_SetConstant(d, "ATTR_joblogkeepdays",SWIG_FromCharPtr("job_log_keep_days")); 8943 SWIG_Python_SetConstant(d, "ATTR_moabarraycompatible",SWIG_FromCharPtr("moab_array_compatible")); 8944 SWIG_Python_SetConstant(d, "ATTR_nomailforce",SWIG_FromCharPtr("no_mail_force")); 8564 8945 SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state")); 8565 8946 SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np")); … … 8569 8950 SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status")); 8570 8951 SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note")); 8952 SWIG_Python_SetConstant(d, "ATTR_NODE_gpus",SWIG_FromCharPtr("gpus")); 8953 SWIG_Python_SetConstant(d, "ATTR_NODE_gpustatus",SWIG_FromCharPtr("gpu_status")); 8571 8954 SWIG_Python_SetConstant(d, "ATTR_mailsubjectfmt",SWIG_FromCharPtr("mail_subject_fmt")); 8572 8955 SWIG_Python_SetConstant(d, "ATTR_mailbodyfmt",SWIG_FromCharPtr("mail_body_fmt")); … … 8576 8959 SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n")); 8577 8960 SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a")); 8961 SWIG_Python_SetConstant(d, "ARRAY_RANGE",SWIG_FromCharPtr("array_range=")); 8578 8962 SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay=")); 8579 8963 SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge=")); 8964 SWIG_Python_SetConstant(d, "DELASYNC",SWIG_FromCharPtr("delasync")); 8580 8965 SWIG_Python_SetConstant(d, "PURGECOMP",SWIG_FromCharPtr("purgecomplete=")); 8581 8966 SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only")); … … 8593 8978 SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown")); 8594 8979 SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared")); 8980 SWIG_Python_SetConstant(d, "ND_active",SWIG_FromCharPtr("active")); 8981 SWIG_Python_SetConstant(d, "ND_all",SWIG_FromCharPtr("all")); 8982 SWIG_Python_SetConstant(d, "ND_up",SWIG_FromCharPtr("up")); 8595 8983 SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster")); 8596 8984 SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch")); … … 8629 9017 SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(32))); 8630 9018 SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16))); 9019 SWIG_Python_SetConstant(d, "PBS_MAXGPUID",SWIG_From_int((int)(16))); 8631 9020 SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15))); 8632 9021 SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(1024))); 8633 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)( 6)));9022 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)(7))); 8634 9023 SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(8))); 8635 9024 SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5))); 8636 9025 SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAY",SWIG_From_int((int)(99999))); 8637 SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+ 6+2))));8638 SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+ 6+2) +1024+5+6+2))));9026 SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+7+2)))); 9027 SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+7+2) +1024+5+7+2)))); 8639 9028 SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024))); 8640 9029 SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+1024+5+2)))); … … 8644 9033 SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6))); 8645 9034 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_BASE",SWIG_From_int((int)(0x00020300))); 8646 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)( 1)));8647 SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+ 1))));9035 SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)(2))); 9036 SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+2)))); 8648 9037 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs")); 8649 9038 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001))); … … 8659 9048 SWIG_Python_SetConstant(d, "CHECKPOINTCONT",SWIG_FromCharPtr("checkpoint_cont")); 8660 9049 SWIG_Python_SetConstant(d, "MOM_DEFAULT_CHECKPOINT_DIR",SWIG_FromCharPtr("$MOMDEFAULTCHECKPOINTDIR$")); 9050 SWIG_Python_SetConstant(d, "NO_MOM_RELAY",SWIG_From_int((int)(1))); 8661 9051 SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET))); 8662 9052 SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET))); … … 8671 9061 SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT))); 8672 9062 SWIG_Python_SetConstant(d, "MERGE",SWIG_From_int((int)(MERGE))); 8673 PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); 9063 SWIG_Python_SetConstant(d, "INCR_OLD",SWIG_From_int((int)(INCR_OLD))); 9064 PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); 8674 9065 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set); 8675 9066 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",Swig_var_pbs_server_get, Swig_var_pbs_server_set); -
devel/README
r309 r318 6 6 7 7 If you want to assist in the development of the pbs_python package ask for write access: 8 * email: pbs_python@su srfsara.nl8 * email: pbs_python@surfsara.nl -
devel/pbs_node_info
r309 r318 11 11 12 12 nodes = pbs.pbs_statnode(c, '', 'NULL', 'NULL') 13 e, txt= pbs.error() 14 if e: 15 print txt 16 17 sys.exit(1) 13 18 14 19 for node in nodes:
Note: See TracChangeset
for help on using the changeset viewer.