- Timestamp:
- 09/24/08 12:43:29 (16 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGES
r153 r159 1 =========== 2.9. 61 =========== 2.9.8 2 2 - pbs_python.spec file patch added libdir and python defines so it will 3 3 build for RHEL5.1/CentOS 5.1 … … 5 5 applied by: Bas van der Vlies 6 6 7 - Added two new attributes to the pbs_ifl.h 7 - Updated the header files for pbs_python. So it can use some new 8 defines variables/defines, eg: 8 9 * ATTR_NODE_status 9 10 * ATTR_NODE_note 10 Added by : Dennis Stam <dennis.stam@sara.nl> 11 * ... 12 Added by: Dennis Stam <dennis.stam@sara.nl>, Bas van der Vlies 13 14 - Two new functions to log.h: 15 log_roll(int size); 16 log_size(void); 17 Added by: Bas van der Vlies 11 18 12 19 =========== Version 2.9.4 -
trunk/debian/changelog
r155 r159 1 pbs-python (2.9.8-1) intrepid; urgency=low 2 3 * New version with updated torque header file (version 2.X) 4 5 -- Bas van der Vlies <bas@rc.sara.nl> Wed, 24 Sep 2008 12:32:29 +0200 6 1 7 pbs-python (2.9.6-1) intrepid; urgency=low 2 8 -
trunk/pbs_python.spec
r148 r159 1 1 Summary: This package contains the pbs python module. 2 2 Name: pbs_python 3 Version: 2.9. 43 Version: 2.9.8 4 4 Release: 2anl 5 5 License: See LICENSE -
trunk/setup.py.in
r147 r159 47 47 48 48 setup ( name = 'pbs_python', 49 version = '2.9. 5',49 version = '2.9.8', 50 50 description = 'openpbs/torque python interface', 51 51 author = 'Bas van der Vlies', -
trunk/src/log.h
r52 r159 112 112 extern int log_open(char *name, char *directory); 113 113 extern void log_record(int type, int class_int, char *id, char *text); 114 extern void log_roll(int size); 115 extern long log_size(void); 114 116 extern char log_buffer[LOG_BUF_SIZE]; 115 117 extern int setup_env(char *filename); -
trunk/src/pbs_ifl.h
r149 r159 75 75 #define ATTR_c "Checkpoint" 76 76 #define ATTR_e "Error_Path" 77 #define ATTR_g 77 #define ATTR_g "group_list" 78 78 #define ATTR_h "Hold_Types" 79 79 #define ATTR_j "Join_Path" … … 123 123 #define ATTR_altid "alt_id" 124 124 #define ATTR_etime "etime" 125 #define ATTR_exitstat "exit_status" 126 #define ATTR_forwardx11 "forward_x11" 127 #define ATTR_submit_args "submit_args" 128 #define ATTR_umask "umask" 125 129 126 130 /* additional queue attributes names */ … … 156 160 #define ATTR_count "state_count" 157 161 #define ATTR_number "number_jobs" 158 159 /* HvB 160 * Used by fifo_improv.patch 162 #define ATTR_acllogic "acl_logic_or" 163 #define ATTR_aclgrpslpy "acl_group_sloppy" 164 #define ATTR_keepcompleted "keep_completed" 165 #define ATTR_disallowedtypes "disallowed_types" 166 167 /* additional server attributes names */ 168 169 /* NOTE: steps for adding new attribute described in ??? */ 170 /* - create #define ATTR_* in include/pbs_ifl.h 171 - insert SRV_ATR_* in include/server.h 172 - add SRV_ATR_* in include/qmgr_svr_public.h 173 - insert structure in server/svr_attr_def.c 174 NOTE: structure must be in same relative position as SRV_ATR_* 175 - insert usage code in proper location 161 176 */ 162 #define ATTR_reqprop "required_property" 163 164 /* additional server attributes names */ 165 166 #define ATTR_aclroot "acl_roots" 167 #define ATTR_managers "managers" 168 #define ATTR_dfltque "default_queue" 169 #define ATTR_defnode "default_node" 170 #define ATTR_locsvrs "location_servers" 171 #define ATTR_logevents "log_events" 172 #define ATTR_logfile "log_file" 173 #define ATTR_mailfrom "mail_from" 174 #define ATTR_nodepack "node_pack" 175 #define ATTR_operators "operators" 176 #define ATTR_queryother "query_other_jobs" 177 #define ATTR_resccost "resources_cost" 178 #define ATTR_rescavail "resources_available" 179 #define ATTR_schedit "scheduler_iteration" 180 #define ATTR_scheduling "scheduling" 181 #define ATTR_status "server_state" 182 #define ATTR_syscost "system_cost" 183 184 /* HvB 185 * Used by TORQUE 186 */ 187 #define ATTR_pingrate "node_ping_rate" 188 #define ATTR_ndchkrate "node_check_rate" 189 190 /* HvB 191 * Used by fifo_improv.patch 192 */ 193 #define ATTR_procpack "proc_pack" 194 177 178 #define ATTR_aclroot "acl_roots" 179 #define ATTR_managers "managers" 180 #define ATTR_dfltque "default_queue" 181 #define ATTR_defnode "default_node" 182 #define ATTR_locsvrs "location_servers" 183 #define ATTR_logevents "log_events" 184 #define ATTR_logfile "log_file" 185 #define ATTR_loglevel "log_level" 186 #define ATTR_mailfrom "mail_from" 187 #define ATTR_nodepack "node_pack" 188 #define ATTR_operators "operators" 189 #define ATTR_queryother "query_other_jobs" 190 #define ATTR_resccost "resources_cost" 191 #define ATTR_rescavail "resources_available" 192 #define ATTR_schedit "scheduler_iteration" 193 #define ATTR_scheduling "scheduling" 194 #define ATTR_status "server_state" 195 #define ATTR_syscost "system_cost" 196 #define ATTR_pingrate "node_ping_rate" 197 #define ATTR_ndchkrate "node_check_rate" 198 #define ATTR_tcptimeout "tcp_timeout" 199 #define ATTR_jobstatrate "job_stat_rate" 200 #define ATTR_polljobs "poll_jobs" 201 #define ATTR_downonerror "down_on_error" 202 #define ATTR_jobnanny "job_nanny" 203 #define ATTR_ownerpurge "owner_purge" 204 #define ATTR_qcqlimits "queue_centric_limits" 205 #define ATTR_momjobsync "mom_job_sync" 206 #define ATTR_maildomain "mail_domain" 207 #define ATTR_pbsversion "pbs_version" 208 #define ATTR_submithosts "submit_hosts" 209 #define ATTR_allownodesubmit "allow_node_submit" 210 #define ATTR_autonodenp "auto_node_np" 211 #define ATTR_servername "server_name" 212 #define ATTR_logfilemaxsize "log_file_max_size" 213 #define ATTR_logfilerolldepth "log_file_roll_depth" 214 #define ATTR_nextjobnum "next_job_number" 195 215 196 216 /* additional node "attributes" names */ … … 201 221 #define ATTR_NODE_ntype "ntype" 202 222 #define ATTR_NODE_jobs "jobs" 203 #define ATTR_NODE_status 204 #define ATTR_NODE_note 223 #define ATTR_NODE_status "status" 224 #define ATTR_NODE_note "note" 205 225 206 226 /* various attribute values */ … … 214 234 215 235 #define DELDELAY "deldelay=" /* see qdel.c */ 236 #define DELPURGE "delpurge=" /* see qdel.c */ 237 #define EXECQUEONLY "exec_queue_only" /* see req_stat.c */ 238 216 239 #define USER_HOLD "u" 217 240 #define OTHER_HOLD "o" … … 231 254 #define ND_cluster "cluster" 232 255 256 /* queue disallowed types */ 257 #define Q_DT_batch "batch" 258 #define Q_DT_interactive "interactive" 259 #define Q_DT_rerunable "rerunable" 260 #define Q_DT_nonrerunable "nonrerunable" 261 233 262 /*constant related to sum of string lengths for above strings*/ 234 263 #define MAX_ENCODE_BFR 100 … … 268 297 #define MAXNAMLEN 255 269 298 #endif 299 #define MAX_NOTE 256 /* max node note length */ 300 #define MAX_NOTE_STR "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */ 270 301 271 302 #define PBS_MAXUSER 16 /* max user name length */ … … 277 308 #define PBS_MAXSVRJOBID (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* server job id size */ 278 309 #define PBS_MAXCLTJOBID (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* client job id size */ 279 280 /* HvB281 * TORQUE change used to be 256282 */283 310 #define PBS_MAXDEST 1024 /* destination size -- increased from 256*/ 284 285 311 #define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */ 286 312 #define PBS_USE_IFF 1 /* pbs_connect() to call pbs_iff */ … … 304 330 #define PBS_SCHEDULER_SERVICE_PORT 15004 305 331 306 enum batch_op { SET, UNSET, INCR, DECR, 307 EQ, NE, GE, GT, LE, LT, DFLT 308 }; 332 enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT }; 309 333 310 334 /* … … 357 381 extern int pbs_connect(char *server); 358 382 359 extern int pbs_query_max_connections( );383 extern int pbs_query_max_connections(void); 360 384 361 385 extern char * pbs_default(void); -
trunk/src/pbs_python.h
r125 r159 1 /* 2 * $Id$ 3 * 4 * Portable Batch System (PBS) Software License 5 * 6 * Copyright (c) 1999, MRJ Technology Solutions. 7 * All rights reserved. 8 * 9 * Acknowledgment: The Portable Batch System Software was originally developed 10 * as a joint project between the Numerical Aerospace Simulation (NAS) Systems 11 * Division of NASA Ames Research Center and the National Energy Research 12 * Supercomputer Center (NERSC) of Lawrence Livermore National Laboratory. 13 * 14 * Redistribution of the Portable Batch System Software and use in source 15 * and binary forms, with or without modification, are permitted provided 16 * that the following conditions are met: 17 * 18 * - Redistributions of source code must retain the above copyright and 19 * acknowledgment notices, this list of conditions and the following 20 * disclaimer. 21 * 22 * - Redistributions in binary form must reproduce the above copyright and 23 * acknowledgment notices, this list of conditions and the following 24 * disclaimer in the documentation and/or other materials provided with the 25 * distribution. 26 * 27 * - All advertising materials mentioning features or use of this software must 28 * display the following acknowledgment: 29 * 30 * This product includes software developed by NASA Ames Research Center, 31 * Lawrence Livermore National Laboratory, and MRJ Technology Solutions. 32 * 33 * DISCLAIMER OF WARRANTY 34 * 35 * THIS SOFTWARE IS PROVIDED BY MRJ TECHNOLOGY SOLUTIONS ("MRJ") "AS IS" WITHOUT 36 * WARRANTY OF ANY KIND, AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 37 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS 38 * FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED. 39 * 40 * IN NO EVENT, UNLESS REQUIRED BY APPLICABLE LAW, SHALL MRJ, NASA, NOR 41 * THE U.S. GOVERNMENT BE LIABLE FOR ANY DIRECT DAMAGES WHATSOEVER, 42 * NOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 45 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 47 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 * 49 * This license will be governed by the laws of the Commonwealth of Virginia, 50 * without reference to its choice of law rules. 51 */ 52 1 53 /* 2 54 * @(#) $Id$ 55 */ 56 57 /* 58 * 59 * pbs_ifl.h 60 * 3 61 */ 4 62 … … 7 65 * Desc. : removed the macro definitions so that SWIG can understand 8 66 * the header file syntax 9 * Made some other improvements so that the python shadow10 * classe are created with the right fields and automatic11 * conversion of C-lists and Python-lists.12 67 */ 13 68 … … 20 75 #define ATTR_c "Checkpoint" 21 76 #define ATTR_e "Error_Path" 22 #define ATTR_g 77 #define ATTR_g "group_list" 23 78 #define ATTR_h "Hold_Types" 24 79 #define ATTR_j "Join_Path" … … 68 123 #define ATTR_altid "alt_id" 69 124 #define ATTR_etime "etime" 125 #define ATTR_exitstat "exit_status" 126 #define ATTR_forwardx11 "forward_x11" 127 #define ATTR_submit_args "submit_args" 128 #define ATTR_umask "umask" 70 129 71 130 /* additional queue attributes names */ … … 101 160 #define ATTR_count "state_count" 102 161 #define ATTR_number "number_jobs" 103 104 /* HvB 105 * Used by fifo_improv.patch 162 #define ATTR_acllogic "acl_logic_or" 163 #define ATTR_aclgrpslpy "acl_group_sloppy" 164 #define ATTR_keepcompleted "keep_completed" 165 #define ATTR_disallowedtypes "disallowed_types" 166 167 /* additional server attributes names */ 168 169 /* NOTE: steps for adding new attribute described in ??? */ 170 /* - create #define ATTR_* in include/pbs_ifl.h 171 - insert SRV_ATR_* in include/server.h 172 - add SRV_ATR_* in include/qmgr_svr_public.h 173 - insert structure in server/svr_attr_def.c 174 NOTE: structure must be in same relative position as SRV_ATR_* 175 - insert usage code in proper location 106 176 */ 107 #define ATTR_reqprop "required_property" 108 109 110 /* additional server attributes names */ 111 112 #define ATTR_aclroot "acl_roots" 113 #define ATTR_managers "managers" 114 #define ATTR_dfltque "default_queue" 115 #define ATTR_defnode "default_node" 116 #define ATTR_locsvrs "location_servers" 117 #define ATTR_logevents "log_events" 118 #define ATTR_logfile "log_file" 119 #define ATTR_mailfrom "mail_from" 120 #define ATTR_nodepack "node_pack" 121 #define ATTR_operators "operators" 122 #define ATTR_queryother "query_other_jobs" 123 #define ATTR_resccost "resources_cost" 124 #define ATTR_rescavail "resources_available" 125 #define ATTR_schedit "scheduler_iteration" 126 #define ATTR_scheduling "scheduling" 127 #define ATTR_status "server_state" 128 #define ATTR_syscost "system_cost" 129 130 /* HvB 131 * Used by TORQUE 132 */ 133 #define ATTR_pingrate "node_ping_rate" 134 #define ATTR_ndchkrate "node_check_rate" 135 136 /* HvB 137 * Used by fifo_improv.patch 138 */ 139 #define ATTR_procpack "proc_pack" 140 141 177 178 #define ATTR_aclroot "acl_roots" 179 #define ATTR_managers "managers" 180 #define ATTR_dfltque "default_queue" 181 #define ATTR_defnode "default_node" 182 #define ATTR_locsvrs "location_servers" 183 #define ATTR_logevents "log_events" 184 #define ATTR_logfile "log_file" 185 #define ATTR_loglevel "log_level" 186 #define ATTR_mailfrom "mail_from" 187 #define ATTR_nodepack "node_pack" 188 #define ATTR_operators "operators" 189 #define ATTR_queryother "query_other_jobs" 190 #define ATTR_resccost "resources_cost" 191 #define ATTR_rescavail "resources_available" 192 #define ATTR_schedit "scheduler_iteration" 193 #define ATTR_scheduling "scheduling" 194 #define ATTR_status "server_state" 195 #define ATTR_syscost "system_cost" 196 #define ATTR_pingrate "node_ping_rate" 197 #define ATTR_ndchkrate "node_check_rate" 198 #define ATTR_tcptimeout "tcp_timeout" 199 #define ATTR_jobstatrate "job_stat_rate" 200 #define ATTR_polljobs "poll_jobs" 201 #define ATTR_downonerror "down_on_error" 202 #define ATTR_jobnanny "job_nanny" 203 #define ATTR_ownerpurge "owner_purge" 204 #define ATTR_qcqlimits "queue_centric_limits" 205 #define ATTR_momjobsync "mom_job_sync" 206 #define ATTR_maildomain "mail_domain" 207 #define ATTR_pbsversion "pbs_version" 208 #define ATTR_submithosts "submit_hosts" 209 #define ATTR_allownodesubmit "allow_node_submit" 210 #define ATTR_autonodenp "auto_node_np" 211 #define ATTR_servername "server_name" 212 #define ATTR_logfilemaxsize "log_file_max_size" 213 #define ATTR_logfilerolldepth "log_file_roll_depth" 214 #define ATTR_nextjobnum "next_job_number" 142 215 143 216 /* additional node "attributes" names */ … … 148 221 #define ATTR_NODE_ntype "ntype" 149 222 #define ATTR_NODE_jobs "jobs" 223 #define ATTR_NODE_status "status" 224 #define ATTR_NODE_note "note" 150 225 151 226 /* various attribute values */ … … 159 234 160 235 #define DELDELAY "deldelay=" /* see qdel.c */ 236 #define DELPURGE "delpurge=" /* see qdel.c */ 237 #define EXECQUEONLY "exec_queue_only" /* see req_stat.c */ 238 161 239 #define USER_HOLD "u" 162 240 #define OTHER_HOLD "o" … … 176 254 #define ND_cluster "cluster" 177 255 256 /* queue disallowed types */ 257 #define Q_DT_batch "batch" 258 #define Q_DT_interactive "interactive" 259 #define Q_DT_rerunable "rerunable" 260 #define Q_DT_nonrerunable "nonrerunable" 261 178 262 /*constant related to sum of string lengths for above strings*/ 179 263 #define MAX_ENCODE_BFR 100 … … 213 297 #define MAXNAMLEN 255 214 298 #endif 299 #define MAX_NOTE 256 /* max node note length */ 300 #define MAX_NOTE_STR "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */ 215 301 216 302 #define PBS_MAXUSER 16 /* max user name length */ … … 222 308 #define PBS_MAXSVRJOBID (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* server job id size */ 223 309 #define PBS_MAXCLTJOBID (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* client job id size */ 224 225 /* HvB 226 * TORQUE change used to be 256 227 */ 228 #define PBS_MAXDEST 1024 /* destination size -- increased from 256*/ 229 310 #define PBS_MAXDEST 1024 /* destination size -- increased from 256*/ 230 311 #define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */ 231 312 #define PBS_USE_IFF 1 /* pbs_connect() to call pbs_iff */ … … 249 330 #define PBS_SCHEDULER_SERVICE_PORT 15004 250 331 251 enum batch_op { SET, UNSET, INCR, DECR, 252 EQ, NE, GE, GT, LE, LT, DFLT 253 }; 332 enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT }; 254 333 255 334 /* -
trunk/src/pbs_wrap.c
r127 r159 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3.2 43 * Version 1.3.29 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 10 10 11 11 #define SWIGPYTHON 12 13 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR 14 # if defined(__SUNPRO_CC) 15 # define SWIG_TEMPLATE_DISAMBIGUATOR template 16 # else 17 # define SWIG_TEMPLATE_DISAMBIGUATOR 12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE 13 /* ----------------------------------------------------------------------------- 14 * This section contains generic SWIG labels for method/variable 15 * declarations/attributes, and other compiler dependent labels. 16 * ----------------------------------------------------------------------------- */ 17 18 /* template workaround for compilers that cannot correctly implement the C++ standard */ 19 #ifndef SWIGTEMPLATEDISAMBIGUATOR 20 # if defined(__SUNPRO_CC) 21 # if (__SUNPRO_CC <= 0x560) 22 # define SWIGTEMPLATEDISAMBIGUATOR template 23 # else 24 # define SWIGTEMPLATEDISAMBIGUATOR 25 # endif 26 # else 27 # define SWIGTEMPLATEDISAMBIGUATOR 28 # endif 29 #endif 30 31 /* inline attribute */ 32 #ifndef SWIGINLINE 33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) 34 # define SWIGINLINE inline 35 # else 36 # define SWIGINLINE 37 # endif 38 #endif 39 40 /* attribute recognised by some compilers to avoid 'unused' warnings */ 41 #ifndef SWIGUNUSED 42 # if defined(__GNUC__) 43 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 44 # define SWIGUNUSED __attribute__ ((__unused__)) 45 # else 46 # define SWIGUNUSED 47 # endif 48 # elif defined(__ICC) 49 # define SWIGUNUSED __attribute__ ((__unused__)) 50 # else 51 # define SWIGUNUSED 52 # endif 53 #endif 54 55 #ifndef SWIGUNUSEDPARM 56 # ifdef __cplusplus 57 # define SWIGUNUSEDPARM(p) 58 # else 59 # define SWIGUNUSEDPARM(p) p SWIGUNUSED 60 # endif 61 #endif 62 63 /* internal SWIG method */ 64 #ifndef SWIGINTERN 65 # define SWIGINTERN static SWIGUNUSED 66 #endif 67 68 /* internal inline SWIG method */ 69 #ifndef SWIGINTERNINLINE 70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE 71 #endif 72 73 /* exporting methods */ 74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 75 # ifndef GCC_HASCLASSVISIBILITY 76 # define GCC_HASCLASSVISIBILITY 18 77 # endif 19 78 #endif 20 79 21 80 #ifndef SWIGEXPORT 81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 82 # if defined(STATIC_LINKED) 83 # define SWIGEXPORT 84 # else 85 # define SWIGEXPORT __declspec(dllexport) 86 # endif 87 # else 88 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) 89 # define SWIGEXPORT __attribute__ ((visibility("default"))) 90 # else 91 # define SWIGEXPORT 92 # endif 93 # endif 94 #endif 95 96 /* calling conventions for Windows */ 97 #ifndef SWIGSTDCALL 98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 99 # define SWIGSTDCALL __stdcall 100 # else 101 # define SWIGSTDCALL 102 # endif 103 #endif 104 105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ 106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) 107 # define _CRT_SECURE_NO_DEPRECATE 108 #endif 109 110 111 /* Python.h has to appear first */ 22 112 #include <Python.h> 23 113 24 /* **********************************************************************114 /* ----------------------------------------------------------------------------- 25 115 * swigrun.swg 26 116 * 27 * This file contains generic CAPI SWIG runtime support for pointer 28 * type checking. 29 * 30 ************************************************************************/ 117 * This file contains generic CAPI SWIG runtime support for pointer 118 * type checking. 119 * ----------------------------------------------------------------------------- */ 31 120 32 121 /* This should only be incremented when either the layout of swig_type_info changes, 33 122 or for whatever reason, the runtime changes incompatibly */ 34 #define SWIG_RUNTIME_VERSION " 1"123 #define SWIG_RUNTIME_VERSION "2" 35 124 36 125 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ 37 126 #ifdef SWIG_TYPE_TABLE 38 # define SWIG_QUOTE_STRING(x) #x39 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)40 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)127 # define SWIG_QUOTE_STRING(x) #x 128 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) 129 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) 41 130 #else 42 #define SWIG_TYPE_TABLE_NAME 43 #endif 44 45 #include <string.h> 46 47 #ifndef SWIGINLINE 48 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) 49 # define SWIGINLINE inline 50 #else 51 # define SWIGINLINE 52 #endif 131 # define SWIG_TYPE_TABLE_NAME 53 132 #endif 54 133 … … 61 140 with your compiler or so. 62 141 */ 142 63 143 #ifndef SWIGRUNTIME 64 #define SWIGRUNTIME static 65 #endif 144 # define SWIGRUNTIME SWIGINTERN 145 #endif 146 66 147 #ifndef SWIGRUNTIMEINLINE 67 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE 68 #endif 148 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE 149 #endif 150 151 /* Generic buffer size */ 152 #ifndef SWIG_BUFFER_SIZE 153 # define SWIG_BUFFER_SIZE 1024 154 #endif 155 156 /* Flags for pointer conversions */ 157 #define SWIG_POINTER_DISOWN 0x1 158 159 /* Flags for new pointer objects */ 160 #define SWIG_POINTER_OWN 0x1 161 162 163 /* 164 Flags/methods for returning states. 165 166 The swig conversion methods, as ConvertPtr, return and integer 167 that tells if the conversion was successful or not. And if not, 168 an error code can be returned (see swigerrors.swg for the codes). 169 170 Use the following macros/flags to set or process the returning 171 states. 172 173 In old swig versions, you usually write code as: 174 175 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { 176 // success code 177 } else { 178 //fail code 179 } 180 181 Now you can be more explicit as: 182 183 int res = SWIG_ConvertPtr(obj,vptr,ty.flags); 184 if (SWIG_IsOK(res)) { 185 // success code 186 } else { 187 // fail code 188 } 189 190 that seems to be the same, but now you can also do 191 192 Type *ptr; 193 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); 194 if (SWIG_IsOK(res)) { 195 // success code 196 if (SWIG_IsNewObj(res) { 197 ... 198 delete *ptr; 199 } else { 200 ... 201 } 202 } else { 203 // fail code 204 } 205 206 I.e., now SWIG_ConvertPtr can return new objects and you can 207 identify the case and take care of the deallocation. Of course that 208 requires also to SWIG_ConvertPtr to return new result values, as 209 210 int SWIG_ConvertPtr(obj, ptr,...) { 211 if (<obj is ok>) { 212 if (<need new object>) { 213 *ptr = <ptr to new allocated object>; 214 return SWIG_NEWOBJ; 215 } else { 216 *ptr = <ptr to old object>; 217 return SWIG_OLDOBJ; 218 } 219 } else { 220 return SWIG_BADOBJ; 221 } 222 } 223 224 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be 225 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the 226 swig errors code. 227 228 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code 229 allows to return the 'cast rank', for example, if you have this 230 231 int food(double) 232 int fooi(int); 233 234 and you call 235 236 food(1) // cast rank '1' (1 -> 1.0) 237 fooi(1) // cast rank '0' 238 239 just use the SWIG_AddCast()/SWIG_CheckState() 240 241 242 */ 243 #define SWIG_OK (0) 244 #define SWIG_ERROR (-1) 245 #define SWIG_IsOK(r) (r >= 0) 246 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) 247 248 /* The CastRankLimit says how many bits are used for the cast rank */ 249 #define SWIG_CASTRANKLIMIT (1 << 8) 250 /* The NewMask denotes the object was created (using new/malloc) */ 251 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) 252 /* The TmpMask is for in/out typemaps that use temporal objects */ 253 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) 254 /* Simple returning values */ 255 #define SWIG_BADOBJ (SWIG_ERROR) 256 #define SWIG_OLDOBJ (SWIG_OK) 257 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) 258 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) 259 /* Check, add and del mask methods */ 260 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) 261 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) 262 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) 263 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) 264 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) 265 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) 266 267 268 /* Cast-Rank Mode */ 269 #if defined(SWIG_CASTRANK_MODE) 270 # ifndef SWIG_TypeRank 271 # define SWIG_TypeRank unsigned long 272 # endif 273 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ 274 # define SWIG_MAXCASTRANK (2) 275 # endif 276 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) 277 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) 278 SWIGINTERNINLINE int SWIG_AddCast(int r) { 279 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; 280 } 281 SWIGINTERNINLINE int SWIG_CheckState(int r) { 282 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 283 } 284 #else /* no cast-rank mode */ 285 # define SWIG_AddCast 286 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) 287 #endif 288 289 290 291 292 #include <string.h> 69 293 70 294 #ifdef __cplusplus … … 75 299 typedef struct swig_type_info *(*swig_dycast_func)(void **); 76 300 301 /* Structure to store inforomation on one type */ 77 302 typedef struct swig_type_info { 78 const char *name; 79 swig_converter_func converter; 80 const char *str; 81 void *clientdata; 82 swig_dycast_func dcast; 83 struct swig_type_info *next; 84 struct swig_type_info *prev; 303 const char *name; /* mangled name of this type */ 304 const char *str; /* human readable name of this type */ 305 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ 306 struct swig_cast_info *cast; /* linked list of types that can cast into this type */ 307 void *clientdata; /* language specific type data */ 308 int owndata; /* flag if the structure owns the clientdata */ 85 309 } swig_type_info; 310 311 /* Structure to store a type and conversion function used for casting */ 312 typedef struct swig_cast_info { 313 swig_type_info *type; /* pointer to type that is equivalent to this type */ 314 swig_converter_func converter; /* function to cast the void pointers */ 315 struct swig_cast_info *next; /* pointer to next cast in linked list */ 316 struct swig_cast_info *prev; /* pointer to the previous cast */ 317 } swig_cast_info; 318 319 /* Structure used to store module information 320 * Each module generates one structure like this, and the runtime collects 321 * all of these structures and stores them in a circularly linked list.*/ 322 typedef struct swig_module_info { 323 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ 324 size_t size; /* Number of types in this module */ 325 struct swig_module_info *next; /* Pointer to next element in circularly linked list */ 326 swig_type_info **type_initial; /* Array of initially generated type structures */ 327 swig_cast_info **cast_initial; /* Array of initially generated casting structures */ 328 void *clientdata; /* Language specific module data */ 329 } swig_module_info; 86 330 87 331 /* … … 98 342 while ((*f1 == ' ') && (f1 != l1)) ++f1; 99 343 while ((*f2 == ' ') && (f2 != l2)) ++f2; 100 if (*f1 != *f2) return *f1 - *f2;344 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; 101 345 } 102 346 return (l1 - f1) - (l2 - f2); … … 105 349 /* 106 350 Check type equivalence in a name list like <name1>|<name2>|... 351 Return 0 if not equal, 1 if equal 107 352 */ 108 353 SWIGRUNTIME int … … 115 360 if (*ne == '|') break; 116 361 } 117 equiv = SWIG_TypeNameComp(nb, ne, tb, te) ==0;362 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; 118 363 if (*ne) ++ne; 119 364 } … … 122 367 123 368 /* 124 Register a type mapping with the type-checking 369 Check type equivalence in a name list like <name1>|<name2>|... 370 Return 0 if equal, -1 if nb < tb, 1 if nb > tb 125 371 */ 126 SWIGRUNTIME swig_type_info * 127 SWIG_TypeRegisterTL(swig_type_info **tl, swig_type_info *ti) { 128 swig_type_info *tc, *head, *ret, *next; 129 /* Check to see if this type has already been registered */ 130 tc = *tl; 131 while (tc) { 132 /* check simple type equivalence */ 133 int typeequiv = (strcmp(tc->name, ti->name) == 0); 134 /* check full type equivalence, resolving typedefs */ 135 if (!typeequiv) { 136 /* only if tc is not a typedef (no '|' on it) */ 137 if (tc->str && ti->str && !strstr(tc->str,"|")) { 138 typeequiv = SWIG_TypeEquiv(ti->str,tc->str); 139 } 140 } 141 if (typeequiv) { 142 /* Already exists in the table. Just add additional types to the list */ 143 if (ti->clientdata) tc->clientdata = ti->clientdata; 144 head = tc; 145 next = tc->next; 146 goto l1; 147 } 148 tc = tc->prev; 149 } 150 head = ti; 151 next = 0; 152 153 /* Place in list */ 154 ti->prev = *tl; 155 *tl = ti; 156 157 /* Build linked lists */ 158 l1: 159 ret = head; 160 tc = ti + 1; 161 /* Patch up the rest of the links */ 162 while (tc->name) { 163 head->next = tc; 164 tc->prev = head; 165 head = tc; 166 tc++; 167 } 168 if (next) next->prev = head; 169 head->next = next; 170 171 return ret; 172 } 372 SWIGRUNTIME int 373 SWIG_TypeCompare(const char *nb, const char *tb) { 374 int equiv = 0; 375 const char* te = tb + strlen(tb); 376 const char* ne = nb; 377 while (!equiv && *ne) { 378 for (nb = ne; *ne; ++ne) { 379 if (*ne == '|') break; 380 } 381 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; 382 if (*ne) ++ne; 383 } 384 return equiv; 385 } 386 387 388 /* think of this as a c++ template<> or a scheme macro */ 389 #define SWIG_TypeCheck_Template(comparison, ty) \ 390 if (ty) { \ 391 swig_cast_info *iter = ty->cast; \ 392 while (iter) { \ 393 if (comparison) { \ 394 if (iter == ty->cast) return iter; \ 395 /* Move iter to the top of the linked list */ \ 396 iter->prev->next = iter->next; \ 397 if (iter->next) \ 398 iter->next->prev = iter->prev; \ 399 iter->next = ty->cast; \ 400 iter->prev = 0; \ 401 if (ty->cast) ty->cast->prev = iter; \ 402 ty->cast = iter; \ 403 return iter; \ 404 } \ 405 iter = iter->next; \ 406 } \ 407 } \ 408 return 0 173 409 174 410 /* 175 411 Check the typename 176 412 */ 177 SWIGRUNTIME swig_ type_info *413 SWIGRUNTIME swig_cast_info * 178 414 SWIG_TypeCheck(const char *c, swig_type_info *ty) { 179 swig_type_info *s; 180 if (!ty) return 0; /* Void pointer */ 181 s = ty->next; /* First element always just a name */ 182 do { 183 if (strcmp(s->name,c) == 0) { 184 if (s == ty->next) return s; 185 /* Move s to the top of the linked list */ 186 s->prev->next = s->next; 187 if (s->next) { 188 s->next->prev = s->prev; 189 } 190 /* Insert s as second element in the list */ 191 s->next = ty->next; 192 if (ty->next) ty->next->prev = s; 193 ty->next = s; 194 s->prev = ty; 195 return s; 196 } 197 s = s->next; 198 } while (s && (s != ty->next)); 199 return 0; 415 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); 416 } 417 418 /* Same as previous function, except strcmp is replaced with a pointer comparison */ 419 SWIGRUNTIME swig_cast_info * 420 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { 421 SWIG_TypeCheck_Template(iter->type == from, into); 200 422 } 201 423 … … 204 426 */ 205 427 SWIGRUNTIMEINLINE void * 206 SWIG_TypeCast(swig_ type_info *ty, void *ptr) {428 SWIG_TypeCast(swig_cast_info *ty, void *ptr) { 207 429 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); 208 430 } … … 240 462 to print the last name, as it is often (?) the most 241 463 specific. */ 464 if (!type) return NULL; 242 465 if (type->str != NULL) { 243 466 const char *last_name = type->str; … … 251 474 } 252 475 253 /*254 Search for a swig_type_info structure255 */256 SWIGRUNTIME swig_type_info *257 SWIG_TypeQueryTL(swig_type_info *tl, const char *name) {258 swig_type_info *ty = tl;259 while (ty) {260 if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;261 if (ty->name && (strcmp(name,ty->name) == 0)) return ty;262 ty = ty->prev;263 }264 return 0;265 }266 267 476 /* 268 477 Set the clientdata field for a type 269 478 */ 270 479 SWIGRUNTIME void 271 SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) { 272 swig_type_info *tc, *equiv; 273 if (ti->clientdata) return; 480 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { 481 swig_cast_info *cast = ti->cast; 274 482 /* if (ti->clientdata == clientdata) return; */ 275 483 ti->clientdata = clientdata; 276 equiv = ti->next; 277 while (equiv) { 278 if (!equiv->converter) { 279 tc = tl; 280 while (tc) { 281 if ((strcmp(tc->name, equiv->name) == 0)) 282 SWIG_TypeClientDataTL(tl,tc,clientdata); 283 tc = tc->prev; 484 485 while (cast) { 486 if (!cast->converter) { 487 swig_type_info *tc = cast->type; 488 if (!tc->clientdata) { 489 SWIG_TypeClientData(tc, clientdata); 284 490 } 285 } 286 equiv = equiv->next; 287 } 491 } 492 cast = cast->next; 493 } 494 } 495 SWIGRUNTIME void 496 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { 497 SWIG_TypeClientData(ti, clientdata); 498 ti->owndata = 1; 499 } 500 501 /* 502 Search for a swig_type_info structure only by mangled name 503 Search is a O(log #types) 504 505 We start searching at module start, and finish searching when start == end. 506 Note: if start == end at the beginning of the function, we go all the way around 507 the circular list. 508 */ 509 SWIGRUNTIME swig_type_info * 510 SWIG_MangledTypeQueryModule(swig_module_info *start, 511 swig_module_info *end, 512 const char *name) { 513 swig_module_info *iter = start; 514 do { 515 if (iter->size) { 516 register size_t l = 0; 517 register size_t r = iter->size - 1; 518 do { 519 /* since l+r >= 0, we can (>> 1) instead (/ 2) */ 520 register size_t i = (l + r) >> 1; 521 const char *iname = iter->types[i]->name; 522 if (iname) { 523 register int compare = strcmp(name, iname); 524 if (compare == 0) { 525 return iter->types[i]; 526 } else if (compare < 0) { 527 if (i) { 528 r = i - 1; 529 } else { 530 break; 531 } 532 } else if (compare > 0) { 533 l = i + 1; 534 } 535 } else { 536 break; /* should never happen */ 537 } 538 } while (l <= r); 539 } 540 iter = iter->next; 541 } while (iter != end); 542 return 0; 543 } 544 545 /* 546 Search for a swig_type_info structure for either a mangled name or a human readable name. 547 It first searches the mangled names of the types, which is a O(log #types) 548 If a type is not found it then searches the human readable names, which is O(#types). 549 550 We start searching at module start, and finish searching when start == end. 551 Note: if start == end at the beginning of the function, we go all the way around 552 the circular list. 553 */ 554 SWIGRUNTIME swig_type_info * 555 SWIG_TypeQueryModule(swig_module_info *start, 556 swig_module_info *end, 557 const char *name) { 558 /* STEP 1: Search the name field using binary search */ 559 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); 560 if (ret) { 561 return ret; 562 } else { 563 /* STEP 2: If the type hasn't been found, do a complete search 564 of the str field (the human readable name) */ 565 swig_module_info *iter = start; 566 do { 567 register size_t i = 0; 568 for (; i < iter->size; ++i) { 569 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) 570 return iter->types[i]; 571 } 572 iter = iter->next; 573 } while (iter != end); 574 } 575 576 /* neither found a match */ 577 return 0; 288 578 } 289 579 … … 293 583 SWIGRUNTIME char * 294 584 SWIG_PackData(char *c, void *ptr, size_t sz) { 295 static char hex[17] = "0123456789abcdef"; 296 unsigned char *u = (unsigned char *) ptr; 297 const unsigned char *eu = u + sz; 298 register unsigned char uu; 585 static const char hex[17] = "0123456789abcdef"; 586 register const unsigned char *u = (unsigned char *) ptr; 587 register const unsigned char *eu = u + sz; 299 588 for (; u != eu; ++u) { 300 uu = *u;589 register unsigned char uu = *u; 301 590 *(c++) = hex[(uu & 0xf0) >> 4]; 302 591 *(c++) = hex[uu & 0xf]; … … 311 600 SWIG_UnpackData(const char *c, void *ptr, size_t sz) { 312 601 register unsigned char *u = (unsigned char *) ptr; 313 register const unsigned char *eu = 602 register const unsigned char *eu = u + sz; 314 603 for (; u != eu; ++u) { 315 register intd = *(c++);316 register unsigned char uu = 0;604 register char d = *(c++); 605 register unsigned char uu; 317 606 if ((d >= '0') && (d <= '9')) 318 607 uu = ((d - '0') << 4); … … 333 622 } 334 623 335 /*336 This function will propagate the clientdata field of type to any new337 swig_type_info structures that have been added into the list of338 equivalent types. It is like calling SWIG_TypeClientData(type,339 clientdata) a second time.340 */341 SWIGRUNTIME void342 SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {343 swig_type_info *equiv = type->next;344 swig_type_info *tc;345 if (!type->clientdata) return;346 while (equiv) {347 if (!equiv->converter) {348 tc = tl;349 while (tc) {350 if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)351 SWIG_TypeClientDataTL(tl,tc, type->clientdata);352 tc = tc->prev;353 }354 }355 equiv = equiv->next;356 }357 }358 359 624 /* 360 625 Pack 'void *' into a string buffer. … … 416 681 #endif 417 682 418 /*********************************************************************** 419 * common.swg 420 * 421 * This file contains generic SWIG runtime support for pointer 422 * type checking as well as a few commonly used macros to control 423 * external linkage. 424 * 425 * Author : David Beazley (beazley@cs.uchicago.edu) 426 * 427 * Copyright (c) 1999-2000, The University of Chicago 428 * 429 * This file may be freely redistributed without license or fee provided 430 * this copyright message remains intact. 431 ************************************************************************/ 432 433 434 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 435 # if !defined(STATIC_LINKED) 436 # define SWIGEXPORT(a) __declspec(dllexport) a 437 # else 438 # define SWIGEXPORT(a) a 683 /* Errors in SWIG */ 684 #define SWIG_UnknownError -1 685 #define SWIG_IOError -2 686 #define SWIG_RuntimeError -3 687 #define SWIG_IndexError -4 688 #define SWIG_TypeError -5 689 #define SWIG_DivisionByZero -6 690 #define SWIG_OverflowError -7 691 #define SWIG_SyntaxError -8 692 #define SWIG_ValueError -9 693 #define SWIG_SystemError -10 694 #define SWIG_AttributeError -11 695 #define SWIG_MemoryError -12 696 #define SWIG_NullReferenceError -13 697 698 699 700 /* Python.h has to appear first */ 701 #include <Python.h> 702 703 /* Add PyOS_snprintf for old Pythons */ 704 #if PY_VERSION_HEX < 0x02020000 705 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) 706 # define PyOS_snprintf _snprintf 707 # else 708 # define PyOS_snprintf snprintf 709 # endif 710 #endif 711 712 /* A crude PyString_FromFormat implementation for old Pythons */ 713 #if PY_VERSION_HEX < 0x02020000 714 715 #ifndef SWIG_PYBUFFER_SIZE 716 # define SWIG_PYBUFFER_SIZE 1024 717 #endif 718 719 static PyObject * 720 PyString_FromFormat(const char *fmt, ...) { 721 va_list ap; 722 char buf[SWIG_PYBUFFER_SIZE * 2]; 723 int res; 724 va_start(ap, fmt); 725 res = vsnprintf(buf, sizeof(buf), fmt, ap); 726 va_end(ap); 727 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); 728 } 729 #endif 730 731 /* Add PyObject_Del for old Pythons */ 732 #if PY_VERSION_HEX < 0x01060000 733 # define PyObject_Del(op) PyMem_DEL((op)) 734 #endif 735 #ifndef PyObject_DEL 736 # define PyObject_DEL PyObject_Del 737 #endif 738 739 /* A crude PyExc_StopIteration exception for old Pythons */ 740 #if PY_VERSION_HEX < 0x02020000 741 # ifndef PyExc_StopIteration 742 # define PyExc_StopIteration PyExc_RuntimeError 743 # endif 744 # ifndef PyObject_GenericGetAttr 745 # define PyObject_GenericGetAttr 0 746 # endif 747 #endif 748 /* Py_NotImplemented is defined in 2.1 and up. */ 749 #if PY_VERSION_HEX < 0x02010000 750 # ifndef Py_NotImplemented 751 # define Py_NotImplemented PyExc_RuntimeError 752 # endif 753 #endif 754 755 756 /* A crude PyString_AsStringAndSize implementation for old Pythons */ 757 #if PY_VERSION_HEX < 0x02010000 758 # ifndef PyString_AsStringAndSize 759 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} 760 # endif 761 #endif 762 763 /* PySequence_Size for old Pythons */ 764 #if PY_VERSION_HEX < 0x02000000 765 # ifndef PySequence_Size 766 # define PySequence_Size PySequence_Length 767 # endif 768 #endif 769 770 771 /* PyBool_FromLong for old Pythons */ 772 #if PY_VERSION_HEX < 0x02030000 773 static 774 PyObject *PyBool_FromLong(long ok) 775 { 776 PyObject *result = ok ? Py_True : Py_False; 777 Py_INCREF(result); 778 return result; 779 } 780 #endif 781 782 783 /* ----------------------------------------------------------------------------- 784 * error manipulation 785 * ----------------------------------------------------------------------------- */ 786 787 SWIGRUNTIME PyObject* 788 SWIG_Python_ErrorType(int code) { 789 PyObject* type = 0; 790 switch(code) { 791 case SWIG_MemoryError: 792 type = PyExc_MemoryError; 793 break; 794 case SWIG_IOError: 795 type = PyExc_IOError; 796 break; 797 case SWIG_RuntimeError: 798 type = PyExc_RuntimeError; 799 break; 800 case SWIG_IndexError: 801 type = PyExc_IndexError; 802 break; 803 case SWIG_TypeError: 804 type = PyExc_TypeError; 805 break; 806 case SWIG_DivisionByZero: 807 type = PyExc_ZeroDivisionError; 808 break; 809 case SWIG_OverflowError: 810 type = PyExc_OverflowError; 811 break; 812 case SWIG_SyntaxError: 813 type = PyExc_SyntaxError; 814 break; 815 case SWIG_ValueError: 816 type = PyExc_ValueError; 817 break; 818 case SWIG_SystemError: 819 type = PyExc_SystemError; 820 break; 821 case SWIG_AttributeError: 822 type = PyExc_AttributeError; 823 break; 824 default: 825 type = PyExc_RuntimeError; 826 } 827 return type; 828 } 829 830 831 SWIGRUNTIME void 832 SWIG_Python_AddErrorMsg(const char* mesg) 833 { 834 PyObject *type = 0; 835 PyObject *value = 0; 836 PyObject *traceback = 0; 837 838 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); 839 if (value) { 840 PyObject *old_str = PyObject_Str(value); 841 PyErr_Clear(); 842 Py_XINCREF(type); 843 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); 844 Py_DECREF(old_str); 845 Py_DECREF(value); 846 } else { 847 PyErr_Format(PyExc_RuntimeError, mesg); 848 } 849 } 850 851 852 853 #if defined(SWIG_PYTHON_NO_THREADS) 854 # if defined(SWIG_PYTHON_THREADS) 855 # undef SWIG_PYTHON_THREADS 439 856 # endif 440 #else 441 # define SWIGEXPORT(a) a 442 #endif 857 #endif 858 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ 859 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) 860 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ 861 # define SWIG_PYTHON_USE_GIL 862 # endif 863 # endif 864 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ 865 # ifndef SWIG_PYTHON_INITIALIZE_THREADS 866 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() 867 # endif 868 # ifdef __cplusplus /* C++ code */ 869 class SWIG_Python_Thread_Block { 870 bool status; 871 PyGILState_STATE state; 872 public: 873 void end() { if (status) { PyGILState_Release(state); status = false;} } 874 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} 875 ~SWIG_Python_Thread_Block() { end(); } 876 }; 877 class SWIG_Python_Thread_Allow { 878 bool status; 879 PyThreadState *save; 880 public: 881 void end() { if (status) { PyEval_RestoreThread(save); status = false; }} 882 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} 883 ~SWIG_Python_Thread_Allow() { end(); } 884 }; 885 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block 886 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() 887 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow 888 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() 889 # else /* C code */ 890 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() 891 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) 892 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() 893 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) 894 # endif 895 # else /* Old thread way, not implemented, user must provide it */ 896 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) 897 # define SWIG_PYTHON_INITIALIZE_THREADS 898 # endif 899 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) 900 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 901 # endif 902 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) 903 # define SWIG_PYTHON_THREAD_END_BLOCK 904 # endif 905 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) 906 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 907 # endif 908 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) 909 # define SWIG_PYTHON_THREAD_END_ALLOW 910 # endif 911 # endif 912 #else /* No thread support */ 913 # define SWIG_PYTHON_INITIALIZE_THREADS 914 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 915 # define SWIG_PYTHON_THREAD_END_BLOCK 916 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 917 # define SWIG_PYTHON_THREAD_END_ALLOW 918 #endif 919 920 /* ----------------------------------------------------------------------------- 921 * Python API portion that goes into the runtime 922 * ----------------------------------------------------------------------------- */ 443 923 444 924 #ifdef __cplusplus 445 925 extern "C" { 446 #endif 447 448 449 /*************************************************************************/ 450 451 452 /* The static type info list */ 453 454 static swig_type_info *swig_type_list = 0; 455 static swig_type_info **swig_type_list_handle = &swig_type_list; 456 457 458 /* Register a type mapping with the type-checking */ 459 static swig_type_info * 460 SWIG_TypeRegister(swig_type_info *ti) { 461 return SWIG_TypeRegisterTL(swig_type_list_handle, ti); 462 } 463 464 /* Search for a swig_type_info structure */ 465 static swig_type_info * 466 SWIG_TypeQuery(const char *name) { 467 return SWIG_TypeQueryTL(*swig_type_list_handle, name); 468 } 469 470 /* Set the clientdata field for a type */ 471 static void 472 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { 473 SWIG_TypeClientDataTL(*swig_type_list_handle, ti, clientdata); 474 } 475 476 /* This function will propagate the clientdata field of type to 477 * any new swig_type_info structures that have been added into the list 478 * of equivalent types. It is like calling 479 * SWIG_TypeClientData(type, clientdata) a second time. 480 */ 481 static void 482 SWIG_PropagateClientData(swig_type_info *type) { 483 SWIG_PropagateClientDataTL(*swig_type_list_handle, type); 484 } 485 486 #ifdef __cplusplus 487 } 488 #endif 489 490 /* ----------------------------------------------------------------------------- 491 * SWIG API. Portion that goes into the runtime 492 * ----------------------------------------------------------------------------- */ 493 494 #ifdef __cplusplus 495 extern "C" { 496 #endif 497 498 /* ----------------------------------------------------------------------------- 499 * for internal method declarations 500 * ----------------------------------------------------------------------------- */ 501 502 #ifndef SWIGINTERN 503 #define SWIGINTERN static 504 #endif 505 506 #ifndef SWIGINTERNSHORT 507 #ifdef __cplusplus 508 #define SWIGINTERNSHORT static inline 509 #else /* C case */ 510 #define SWIGINTERNSHORT static 511 #endif /* __cplusplus */ 512 #endif 513 514 515 /* 516 Exception handling in wrappers 517 */ 518 #define SWIG_fail goto fail 519 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) 520 #define SWIG_append_errmsg(msg) SWIG_Python_AddErrMesg(msg,0) 521 #define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1) 522 #define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj) 523 #define SWIG_null_ref(type) SWIG_Python_NullRef(type) 524 525 /* 526 Contract support 527 */ 528 #define SWIG_contract_assert(expr, msg) \ 529 if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else 926 #if 0 927 } /* cc-mode */ 928 #endif 929 #endif 530 930 531 931 /* ----------------------------------------------------------------------------- … … 534 934 535 935 /* Constant Types */ 536 #define SWIG_PY_INT 1537 #define SWIG_PY_FLOAT 2538 #define SWIG_PY_STRING 3539 936 #define SWIG_PY_POINTER 4 540 937 #define SWIG_PY_BINARY 5 … … 542 939 /* Constant information structure */ 543 940 typedef struct swig_const_info { 544 545 546 547 548 549 941 int type; 942 char *name; 943 long lvalue; 944 double dvalue; 945 void *pvalue; 946 swig_type_info **ptype; 550 947 } swig_const_info; 551 948 949 #ifdef __cplusplus 950 #if 0 951 { /* cc-mode */ 952 #endif 953 } 954 #endif 955 552 956 553 957 /* ----------------------------------------------------------------------------- 554 * Alloc. memory flags 555 * ----------------------------------------------------------------------------- */ 556 #define SWIG_OLDOBJ 1 557 #define SWIG_NEWOBJ SWIG_OLDOBJ + 1 558 #define SWIG_PYSTR SWIG_NEWOBJ + 1 559 560 #ifdef __cplusplus 561 } 562 #endif 563 564 565 /*********************************************************************** 958 * See the LICENSE file for information on copyright, usage and redistribution 959 * of SWIG, and the README file for authors - http://www.swig.org/release.html. 960 * 566 961 * pyrun.swg 567 962 * 568 * 569 * 570 * 963 * This file contains the runtime support for Python modules 964 * and includes code for managing global variables and pointer 965 * type checking. 571 966 * 572 * Author : David Beazley (beazley@cs.uchicago.edu) 573 ************************************************************************/ 967 * ----------------------------------------------------------------------------- */ 574 968 575 969 /* Common SWIG API */ 576 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags) 577 #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags) 578 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) 579 580 581 /* Python-specific SWIG API */ 582 #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) 583 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 584 970 971 /* for raw pointers */ 972 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) 973 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) 974 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) 975 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) 976 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) 977 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) 978 #define swig_owntype int 979 980 /* for raw packed data */ 981 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 982 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 983 984 /* for class or struct pointers */ 985 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) 986 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) 987 988 /* for C or C++ function pointers */ 989 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) 990 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) 991 992 /* for C++ member pointers, ie, member methods */ 993 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 994 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 995 996 997 /* Runtime API */ 998 999 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() 1000 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) 1001 #define SWIG_NewClientData(obj) PySwigClientData_New(obj) 1002 1003 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj 1004 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg 1005 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) 1006 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 1007 #define SWIG_fail goto fail 1008 1009 1010 /* Runtime API implementation */ 1011 1012 /* Error manipulation */ 1013 1014 SWIGINTERN void 1015 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { 1016 SWIG_PYTHON_THREAD_BEGIN_BLOCK; 1017 PyErr_SetObject(errtype, obj); 1018 Py_DECREF(obj); 1019 SWIG_PYTHON_THREAD_END_BLOCK; 1020 } 1021 1022 SWIGINTERN void 1023 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { 1024 SWIG_PYTHON_THREAD_BEGIN_BLOCK; 1025 PyErr_SetString(errtype, (char *) msg); 1026 SWIG_PYTHON_THREAD_END_BLOCK; 1027 } 1028 1029 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) 1030 1031 /* Set a constant value */ 1032 1033 SWIGINTERN void 1034 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { 1035 PyDict_SetItemString(d, (char*) name, obj); 1036 Py_DECREF(obj); 1037 } 1038 1039 /* Append a value to the result obj */ 1040 1041 SWIGINTERN PyObject* 1042 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { 1043 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) 1044 if (!result) { 1045 result = obj; 1046 } else if (result == Py_None) { 1047 Py_DECREF(result); 1048 result = obj; 1049 } else { 1050 if (!PyList_Check(result)) { 1051 PyObject *o2 = result; 1052 result = PyList_New(1); 1053 PyList_SetItem(result, 0, o2); 1054 } 1055 PyList_Append(result,obj); 1056 Py_DECREF(obj); 1057 } 1058 return result; 1059 #else 1060 PyObject* o2; 1061 PyObject* o3; 1062 if (!result) { 1063 result = obj; 1064 } else if (result == Py_None) { 1065 Py_DECREF(result); 1066 result = obj; 1067 } else { 1068 if (!PyTuple_Check(result)) { 1069 o2 = result; 1070 result = PyTuple_New(1); 1071 PyTuple_SET_ITEM(result, 0, o2); 1072 } 1073 o3 = PyTuple_New(1); 1074 PyTuple_SET_ITEM(o3, 0, obj); 1075 o2 = result; 1076 result = PySequence_Concat(o2, o3); 1077 Py_DECREF(o2); 1078 Py_DECREF(o3); 1079 } 1080 return result; 1081 #endif 1082 } 1083 1084 /* Unpack the argument tuple */ 1085 1086 SWIGINTERN int 1087 SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) 1088 { 1089 if (!args) { 1090 if (!min && !max) { 1091 return 1; 1092 } else { 1093 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 1094 name, (min == max ? "" : "at least "), min); 1095 return 0; 1096 } 1097 } 1098 if (!PyTuple_Check(args)) { 1099 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); 1100 return 0; 1101 } else { 1102 register int l = PyTuple_GET_SIZE(args); 1103 if (l < min) { 1104 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 1105 name, (min == max ? "" : "at least "), min, l); 1106 return 0; 1107 } else if (l > max) { 1108 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 1109 name, (min == max ? "" : "at most "), max, l); 1110 return 0; 1111 } else { 1112 register int i; 1113 for (i = 0; i < l; ++i) { 1114 objs[i] = PyTuple_GET_ITEM(args, i); 1115 } 1116 for (; l < max; ++l) { 1117 objs[l] = 0; 1118 } 1119 return i + 1; 1120 } 1121 } 1122 } 1123 1124 /* A functor is a function object with one single object argument */ 1125 #if PY_VERSION_HEX >= 0x02020000 1126 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); 1127 #else 1128 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); 1129 #endif 1130 1131 /* 1132 Helper for static pointer initialization for both C and C++ code, for example 1133 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); 1134 */ 1135 #ifdef __cplusplus 1136 #define SWIG_STATIC_POINTER(var) var 1137 #else 1138 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var 1139 #endif 585 1140 586 1141 /* ----------------------------------------------------------------------------- 587 1142 * Pointer declarations 588 1143 * ----------------------------------------------------------------------------- */ 589 /* 590 Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent 591 C/C++ pointers in the python side. Very useful for debugging, but 592 not always safe. 593 */ 594 #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES) 595 # define SWIG_COBJECT_TYPES 596 #endif 597 598 /* Flags for pointer conversion */ 599 #define SWIG_POINTER_EXCEPTION 0x1 600 #define SWIG_POINTER_DISOWN 0x2 601 1144 1145 /* Flags for new pointer objects */ 1146 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) 1147 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) 1148 1149 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) 602 1150 603 1151 #ifdef __cplusplus 604 1152 extern "C" { 605 #endif 606 607 /* ----------------------------------------------------------------------------- 608 * Create a new pointer string 609 * ----------------------------------------------------------------------------- */ 610 611 #ifndef SWIG_BUFFER_SIZE 612 #define SWIG_BUFFER_SIZE 1024 613 #endif 614 615 #if defined(SWIG_COBJECT_TYPES) 616 #if !defined(SWIG_COBJECT_PYTHON) 617 /* ----------------------------------------------------------------------------- 618 * Implements a simple Swig Object type, and use it instead of PyCObject 619 * ----------------------------------------------------------------------------- */ 1153 #if 0 1154 } /* cc-mode */ 1155 #endif 1156 #endif 1157 1158 /* How to access Py_None */ 1159 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 1160 # ifndef SWIG_PYTHON_NO_BUILD_NONE 1161 # ifndef SWIG_PYTHON_BUILD_NONE 1162 # define SWIG_PYTHON_BUILD_NONE 1163 # endif 1164 # endif 1165 #endif 1166 1167 #ifdef SWIG_PYTHON_BUILD_NONE 1168 # ifdef Py_None 1169 # undef Py_None 1170 # define Py_None SWIG_Py_None() 1171 # endif 1172 SWIGRUNTIMEINLINE PyObject * 1173 _SWIG_Py_None(void) 1174 { 1175 PyObject *none = Py_BuildValue(""); 1176 Py_DECREF(none); 1177 return none; 1178 } 1179 SWIGRUNTIME PyObject * 1180 SWIG_Py_None(void) 1181 { 1182 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); 1183 return none; 1184 } 1185 #endif 1186 1187 /* The python void return value */ 1188 1189 SWIGRUNTIMEINLINE PyObject * 1190 SWIG_Py_Void(void) 1191 { 1192 PyObject *none = Py_None; 1193 Py_INCREF(none); 1194 return none; 1195 } 1196 1197 /* PySwigClientData */ 1198 1199 typedef struct { 1200 PyObject *klass; 1201 PyObject *newraw; 1202 PyObject *newargs; 1203 PyObject *destroy; 1204 int delargs; 1205 int implicitconv; 1206 } PySwigClientData; 1207 1208 SWIGRUNTIMEINLINE int 1209 SWIG_Python_CheckImplicit(swig_type_info *ty) 1210 { 1211 PySwigClientData *data = (PySwigClientData *)ty->clientdata; 1212 return data ? data->implicitconv : 0; 1213 } 1214 1215 SWIGRUNTIMEINLINE PyObject * 1216 SWIG_Python_ExceptionType(swig_type_info *desc) { 1217 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; 1218 PyObject *klass = data ? data->klass : 0; 1219 return (klass ? klass : PyExc_RuntimeError); 1220 } 1221 1222 1223 SWIGRUNTIME PySwigClientData * 1224 PySwigClientData_New(PyObject* obj) 1225 { 1226 if (!obj) { 1227 return 0; 1228 } else { 1229 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); 1230 /* the klass element */ 1231 data->klass = obj; 1232 Py_INCREF(data->klass); 1233 /* the newraw method and newargs arguments used to create a new raw instance */ 1234 if (PyClass_Check(obj)) { 1235 data->newraw = 0; 1236 data->newargs = obj; 1237 Py_INCREF(obj); 1238 } else { 1239 #if (PY_VERSION_HEX < 0x02020000) 1240 data->newraw = 0; 1241 #else 1242 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); 1243 #endif 1244 if (data->newraw) { 1245 Py_INCREF(data->newraw); 1246 data->newargs = PyTuple_New(1); 1247 PyTuple_SetItem(data->newargs, 0, obj); 1248 } else { 1249 data->newargs = obj; 1250 } 1251 Py_INCREF(data->newargs); 1252 } 1253 /* the destroy method, aka as the C++ delete method */ 1254 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); 1255 if (PyErr_Occurred()) { 1256 PyErr_Clear(); 1257 data->destroy = 0; 1258 } 1259 if (data->destroy) { 1260 int flags; 1261 Py_INCREF(data->destroy); 1262 flags = PyCFunction_GET_FLAGS(data->destroy); 1263 #ifdef METH_O 1264 data->delargs = !(flags & (METH_O)); 1265 #else 1266 data->delargs = 0; 1267 #endif 1268 } else { 1269 data->delargs = 0; 1270 } 1271 data->implicitconv = 0; 1272 return data; 1273 } 1274 } 1275 1276 SWIGRUNTIME void 1277 PySwigClientData_Del(PySwigClientData* data) 1278 { 1279 Py_XDECREF(data->newraw); 1280 Py_XDECREF(data->newargs); 1281 Py_XDECREF(data->destroy); 1282 } 1283 1284 /* =============== PySwigObject =====================*/ 620 1285 621 1286 typedef struct { 622 1287 PyObject_HEAD 623 1288 void *ptr; 624 const char *desc; 1289 swig_type_info *ty; 1290 int own; 1291 PyObject *next; 625 1292 } PySwigObject; 626 1293 627 /* Declarations for objects of type PySwigObject */ 1294 SWIGRUNTIME PyObject * 1295 PySwigObject_long(PySwigObject *v) 1296 { 1297 return PyLong_FromVoidPtr(v->ptr); 1298 } 1299 1300 SWIGRUNTIME PyObject * 1301 PySwigObject_format(const char* fmt, PySwigObject *v) 1302 { 1303 PyObject *res = NULL; 1304 PyObject *args = PyTuple_New(1); 1305 if (args) { 1306 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { 1307 PyObject *ofmt = PyString_FromString(fmt); 1308 if (ofmt) { 1309 res = PyString_Format(ofmt,args); 1310 Py_DECREF(ofmt); 1311 } 1312 Py_DECREF(args); 1313 } 1314 } 1315 return res; 1316 } 1317 1318 SWIGRUNTIME PyObject * 1319 PySwigObject_oct(PySwigObject *v) 1320 { 1321 return PySwigObject_format("%o",v); 1322 } 1323 1324 SWIGRUNTIME PyObject * 1325 PySwigObject_hex(PySwigObject *v) 1326 { 1327 return PySwigObject_format("%x",v); 1328 } 1329 1330 SWIGRUNTIME PyObject * 1331 #ifdef METH_NOARGS 1332 PySwigObject_repr(PySwigObject *v) 1333 #else 1334 PySwigObject_repr(PySwigObject *v, PyObject *args) 1335 #endif 1336 { 1337 const char *name = SWIG_TypePrettyName(v->ty); 1338 PyObject *hex = PySwigObject_hex(v); 1339 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex)); 1340 Py_DECREF(hex); 1341 if (v->next) { 1342 #ifdef METH_NOARGS 1343 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); 1344 #else 1345 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); 1346 #endif 1347 PyString_ConcatAndDel(&repr,nrep); 1348 } 1349 return repr; 1350 } 628 1351 629 1352 SWIGRUNTIME int 630 PySwigObject_print(PySwigObject *v, FILE *fp, int flags)1353 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) 631 1354 { 632 char result[SWIG_BUFFER_SIZE]; 633 if (SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result))) { 634 fputs("<Swig Object at ", fp); fputs(result, fp); fputs(">", fp); 1355 #ifdef METH_NOARGS 1356 PyObject *repr = PySwigObject_repr(v); 1357 #else 1358 PyObject *repr = PySwigObject_repr(v, NULL); 1359 #endif 1360 if (repr) { 1361 fputs(PyString_AsString(repr), fp); 1362 Py_DECREF(repr); 635 1363 return 0; 636 1364 } else { 637 1365 return 1; 638 1366 } 639 }640 641 SWIGRUNTIME PyObject *642 PySwigObject_repr(PySwigObject *v)643 {644 char result[SWIG_BUFFER_SIZE];645 return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ?646 PyString_FromFormat("<Swig Object at %s>", result) : 0;647 1367 } 648 1368 … … 651 1371 { 652 1372 char result[SWIG_BUFFER_SIZE]; 653 return SWIG_PackVoidPtr(result, v->ptr, v-> desc, sizeof(result)) ?1373 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? 654 1374 PyString_FromString(result) : 0; 655 }656 657 SWIGRUNTIME PyObject *658 PySwigObject_long(PySwigObject *v)659 {660 return PyLong_FromUnsignedLong((unsigned long) v->ptr);661 }662 663 SWIGRUNTIME PyObject *664 PySwigObject_oct(PySwigObject *v)665 {666 char buf[100];667 unsigned long x = (unsigned long)v->ptr;668 if (x == 0)669 strcpy(buf, "0");670 else671 PyOS_snprintf(buf, sizeof(buf), "0%lo", x);672 return PyString_FromString(buf);673 }674 675 SWIGRUNTIME PyObject *676 PySwigObject_hex(PySwigObject *v)677 {678 char buf[100];679 PyOS_snprintf(buf, sizeof(buf), "0x%lx", (unsigned long)v->ptr);680 return PyString_FromString(buf);681 1375 } 682 1376 … … 684 1378 PySwigObject_compare(PySwigObject *v, PySwigObject *w) 685 1379 { 686 int c = strcmp(v->desc, w->desc); 687 if (c) { 688 return c; 1380 void *i = v->ptr; 1381 void *j = w->ptr; 1382 return (i < j) ? -1 : ((i > j) ? 1 : 0); 1383 } 1384 1385 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); 1386 1387 SWIGRUNTIME PyTypeObject* 1388 PySwigObject_type(void) { 1389 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); 1390 return type; 1391 } 1392 1393 SWIGRUNTIMEINLINE int 1394 PySwigObject_Check(PyObject *op) { 1395 return ((op)->ob_type == PySwigObject_type()) 1396 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); 1397 } 1398 1399 SWIGRUNTIME PyObject * 1400 PySwigObject_New(void *ptr, swig_type_info *ty, int own); 1401 1402 SWIGRUNTIME void 1403 PySwigObject_dealloc(PyObject *v) 1404 { 1405 PySwigObject *sobj = (PySwigObject *) v; 1406 PyObject *next = sobj->next; 1407 if (sobj->own) { 1408 swig_type_info *ty = sobj->ty; 1409 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; 1410 PyObject *destroy = data ? data->destroy : 0; 1411 if (destroy) { 1412 /* destroy is always a VARARGS method */ 1413 PyObject *res; 1414 if (data->delargs) { 1415 /* we need to create a temporal object to carry the destroy operation */ 1416 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); 1417 res = SWIG_Python_CallFunctor(destroy, tmp); 1418 Py_DECREF(tmp); 1419 } else { 1420 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); 1421 PyObject *mself = PyCFunction_GET_SELF(destroy); 1422 res = ((*meth)(mself, v)); 1423 } 1424 Py_XDECREF(res); 1425 } else { 1426 const char *name = SWIG_TypePrettyName(ty); 1427 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) 1428 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); 1429 #endif 1430 } 1431 } 1432 Py_XDECREF(next); 1433 PyObject_DEL(v); 1434 } 1435 1436 SWIGRUNTIME PyObject* 1437 PySwigObject_append(PyObject* v, PyObject* next) 1438 { 1439 PySwigObject *sobj = (PySwigObject *) v; 1440 #ifndef METH_O 1441 PyObject *tmp = 0; 1442 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; 1443 next = tmp; 1444 #endif 1445 if (!PySwigObject_Check(next)) { 1446 return NULL; 1447 } 1448 sobj->next = next; 1449 Py_INCREF(next); 1450 return SWIG_Py_Void(); 1451 } 1452 1453 SWIGRUNTIME PyObject* 1454 #ifdef METH_NOARGS 1455 PySwigObject_next(PyObject* v) 1456 #else 1457 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) 1458 #endif 1459 { 1460 PySwigObject *sobj = (PySwigObject *) v; 1461 if (sobj->next) { 1462 Py_INCREF(sobj->next); 1463 return sobj->next; 689 1464 } else { 690 void *i = v->ptr; 691 void *j = w->ptr; 692 return (i < j) ? -1 : (i > j) ? 1 : 0; 693 } 694 } 695 696 SWIGRUNTIME void 697 PySwigObject_dealloc(PySwigObject *self) 1465 return SWIG_Py_Void(); 1466 } 1467 } 1468 1469 SWIGINTERN PyObject* 1470 #ifdef METH_NOARGS 1471 PySwigObject_disown(PyObject *v) 1472 #else 1473 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) 1474 #endif 698 1475 { 699 PyObject_DEL(self); 700 } 1476 PySwigObject *sobj = (PySwigObject *)v; 1477 sobj->own = 0; 1478 return SWIG_Py_Void(); 1479 } 1480 1481 SWIGINTERN PyObject* 1482 #ifdef METH_NOARGS 1483 PySwigObject_acquire(PyObject *v) 1484 #else 1485 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) 1486 #endif 1487 { 1488 PySwigObject *sobj = (PySwigObject *)v; 1489 sobj->own = SWIG_POINTER_OWN; 1490 return SWIG_Py_Void(); 1491 } 1492 1493 SWIGINTERN PyObject* 1494 PySwigObject_own(PyObject *v, PyObject *args) 1495 { 1496 PyObject *val = 0; 1497 #if (PY_VERSION_HEX < 0x02020000) 1498 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) 1499 #else 1500 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 1501 #endif 1502 { 1503 return NULL; 1504 } 1505 else 1506 { 1507 PySwigObject *sobj = (PySwigObject *)v; 1508 PyObject *obj = PyBool_FromLong(sobj->own); 1509 if (val) { 1510 #ifdef METH_NOARGS 1511 if (PyObject_IsTrue(val)) { 1512 PySwigObject_acquire(v); 1513 } else { 1514 PySwigObject_disown(v); 1515 } 1516 #else 1517 if (PyObject_IsTrue(val)) { 1518 PySwigObject_acquire(v,args); 1519 } else { 1520 PySwigObject_disown(v,args); 1521 } 1522 #endif 1523 } 1524 return obj; 1525 } 1526 } 1527 1528 #ifdef METH_O 1529 static PyMethodDef 1530 swigobject_methods[] = { 1531 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, 1532 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, 1533 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, 1534 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, 1535 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, 1536 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, 1537 {0, 0, 0, 0} 1538 }; 1539 #else 1540 static PyMethodDef 1541 swigobject_methods[] = { 1542 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, 1543 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, 1544 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, 1545 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, 1546 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, 1547 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, 1548 {0, 0, 0, 0} 1549 }; 1550 #endif 1551 1552 #if PY_VERSION_HEX < 0x02020000 1553 SWIGINTERN PyObject * 1554 PySwigObject_getattr(PySwigObject *sobj,char *name) 1555 { 1556 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); 1557 } 1558 #endif 701 1559 702 1560 SWIGRUNTIME PyTypeObject* 703 PySwigObject_GetType() { 704 static char PySwigObject_Type__doc__[] = 705 "Swig object carries a C/C++ instance pointer"; 1561 _PySwigObject_type(void) { 1562 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; 706 1563 707 1564 static PyNumberMethods PySwigObject_as_number = { … … 729 1586 (unaryfunc)PySwigObject_oct, /*nb_oct*/ 730 1587 (unaryfunc)PySwigObject_hex, /*nb_hex*/ 731 #if PY_VERSION_HEX >= 0x020 000001588 #if PY_VERSION_HEX >= 0x02020000 732 1589 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ 1590 #elif PY_VERSION_HEX >= 0x02000000 1591 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ 733 1592 #endif 734 1593 }; 735 1594 736 static int type_init = 0; 737 static PyTypeObject PySwigObject_Type; 738 1595 static PyTypeObject pyswigobject_type; 1596 static int type_init = 0; 739 1597 if (!type_init) { 740 PyTypeObject tmp = { 741 PyObject_HEAD_INIT(&PyType_Type) 742 0, /*ob_size*/ 743 "PySwigObject", /*tp_name*/ 744 sizeof(PySwigObject), /*tp_basicsize*/ 745 0, /*tp_itemsize*/ 746 /* methods */ 747 (destructor)PySwigObject_dealloc, /*tp_dealloc*/ 748 (printfunc)PySwigObject_print, /*tp_print*/ 749 (getattrfunc)0, /*tp_getattr*/ 750 (setattrfunc)0, /*tp_setattr*/ 751 (cmpfunc)PySwigObject_compare, /*tp_compare*/ 752 (reprfunc)PySwigObject_repr, /*tp_repr*/ 753 &PySwigObject_as_number, /*tp_as_number*/ 754 0, /*tp_as_sequence*/ 755 0, /*tp_as_mapping*/ 756 (hashfunc)0, /*tp_hash*/ 757 (ternaryfunc)0, /*tp_call*/ 758 (reprfunc)PySwigObject_str, /*tp_str*/ 759 /* Space for future expansion */ 760 0L,0L,0L,0L, 761 PySwigObject_Type__doc__, /* Documentation string */ 762 #if PY_VERSION_HEX >= 0x02000000 763 0, /* tp_traverse */ 764 0, /* tp_clear */ 765 #endif 766 #if PY_VERSION_HEX >= 0x02010000 767 0, /* tp_richcompare */ 768 0, /* tp_weaklistoffset */ 769 #endif 1598 const PyTypeObject tmp 1599 = { 1600 PyObject_HEAD_INIT(NULL) 1601 0, /* ob_size */ 1602 (char *)"PySwigObject", /* tp_name */ 1603 sizeof(PySwigObject), /* tp_basicsize */ 1604 0, /* tp_itemsize */ 1605 (destructor)PySwigObject_dealloc, /* tp_dealloc */ 1606 (printfunc)PySwigObject_print, /* tp_print */ 1607 #if PY_VERSION_HEX < 0x02020000 1608 (getattrfunc)PySwigObject_getattr, /* tp_getattr */ 1609 #else 1610 (getattrfunc)0, /* tp_getattr */ 1611 #endif 1612 (setattrfunc)0, /* tp_setattr */ 1613 (cmpfunc)PySwigObject_compare, /* tp_compare */ 1614 (reprfunc)PySwigObject_repr, /* tp_repr */ 1615 &PySwigObject_as_number, /* tp_as_number */ 1616 0, /* tp_as_sequence */ 1617 0, /* tp_as_mapping */ 1618 (hashfunc)0, /* tp_hash */ 1619 (ternaryfunc)0, /* tp_call */ 1620 (reprfunc)PySwigObject_str, /* tp_str */ 1621 PyObject_GenericGetAttr, /* tp_getattro */ 1622 0, /* tp_setattro */ 1623 0, /* tp_as_buffer */ 1624 Py_TPFLAGS_DEFAULT, /* tp_flags */ 1625 swigobject_doc, /* tp_doc */ 1626 0, /* tp_traverse */ 1627 0, /* tp_clear */ 1628 0, /* tp_richcompare */ 1629 0, /* tp_weaklistoffset */ 770 1630 #if PY_VERSION_HEX >= 0x02020000 771 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 1631 0, /* tp_iter */ 1632 0, /* tp_iternext */ 1633 swigobject_methods, /* tp_methods */ 1634 0, /* tp_members */ 1635 0, /* tp_getset */ 1636 0, /* tp_base */ 1637 0, /* tp_dict */ 1638 0, /* tp_descr_get */ 1639 0, /* tp_descr_set */ 1640 0, /* tp_dictoffset */ 1641 0, /* tp_init */ 1642 0, /* tp_alloc */ 1643 0, /* tp_new */ 1644 0, /* tp_free */ 1645 0, /* tp_is_gc */ 1646 0, /* tp_bases */ 1647 0, /* tp_mro */ 1648 0, /* tp_cache */ 1649 0, /* tp_subclasses */ 1650 0, /* tp_weaklist */ 772 1651 #endif 773 1652 #if PY_VERSION_HEX >= 0x02030000 774 1653 0, /* tp_del */ 775 1654 #endif 776 1655 #ifdef COUNT_ALLOCS 777 778 #endif 779 };780 781 PySwigObject_Type = tmp;1656 0,0,0,0 /* tp_alloc -> tp_next */ 1657 #endif 1658 }; 1659 pyswigobject_type = tmp; 1660 pyswigobject_type.ob_type = &PyType_Type; 782 1661 type_init = 1; 783 1662 } 784 785 return &PySwigObject_Type; 1663 return &pyswigobject_type; 786 1664 } 787 1665 788 1666 SWIGRUNTIME PyObject * 789 PySwigObject_ FromVoidPtrAndDesc(void *ptr, const char *desc)1667 PySwigObject_New(void *ptr, swig_type_info *ty, int own) 790 1668 { 791 PySwigObject *self = PyObject_NEW(PySwigObject, PySwigObject_GetType()); 792 if (self == NULL) return NULL; 793 self->ptr = ptr; 794 self->desc = desc; 795 return (PyObject *)self; 796 } 797 798 SWIGRUNTIMEINLINE void * 799 PySwigObject_AsVoidPtr(PyObject *self) 800 { 801 return ((PySwigObject *)self)->ptr; 802 } 803 804 SWIGRUNTIMEINLINE const char * 805 PySwigObject_GetDesc(PyObject *self) 806 { 807 return ((PySwigObject *)self)->desc; 808 } 809 810 SWIGRUNTIMEINLINE int 811 PySwigObject_Check(PyObject *op) { 812 return ((op)->ob_type == PySwigObject_GetType()) 813 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); 1669 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); 1670 if (sobj) { 1671 sobj->ptr = ptr; 1672 sobj->ty = ty; 1673 sobj->own = own; 1674 sobj->next = 0; 1675 } 1676 return (PyObject *)sobj; 814 1677 } 815 1678 … … 821 1684 PyObject_HEAD 822 1685 void *pack; 823 const char *desc;1686 swig_type_info *ty; 824 1687 size_t size; 825 1688 } PySwigPacked; 826 1689 827 1690 SWIGRUNTIME int 828 PySwigPacked_print(PySwigPacked *v, FILE *fp, int flags)1691 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) 829 1692 { 830 1693 char result[SWIG_BUFFER_SIZE]; … … 834 1697 fputs(result, fp); 835 1698 } 836 fputs(v-> desc,fp);1699 fputs(v->ty->name,fp); 837 1700 fputs(">", fp); 838 1701 return 0; … … 844 1707 char result[SWIG_BUFFER_SIZE]; 845 1708 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { 846 return PyString_FromFormat("<Swig Packed at %s%s>", result, v-> desc);1709 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); 847 1710 } else { 848 return PyString_FromFormat("<Swig Packed %s>", v-> desc);1711 return PyString_FromFormat("<Swig Packed %s>", v->ty->name); 849 1712 } 850 1713 } … … 855 1718 char result[SWIG_BUFFER_SIZE]; 856 1719 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ 857 return PyString_FromFormat("%s%s", result, v-> desc);1720 return PyString_FromFormat("%s%s", result, v->ty->name); 858 1721 } else { 859 return PyString_From Format("%s", v->desc);1722 return PyString_FromString(v->ty->name); 860 1723 } 861 1724 } … … 864 1727 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) 865 1728 { 866 int c = strcmp(v->desc, w->desc); 867 if (c) { 868 return c; 1729 size_t i = v->size; 1730 size_t j = w->size; 1731 int s = (i < j) ? -1 : ((i > j) ? 1 : 0); 1732 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); 1733 } 1734 1735 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); 1736 1737 SWIGRUNTIME PyTypeObject* 1738 PySwigPacked_type(void) { 1739 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); 1740 return type; 1741 } 1742 1743 SWIGRUNTIMEINLINE int 1744 PySwigPacked_Check(PyObject *op) { 1745 return ((op)->ob_type == _PySwigPacked_type()) 1746 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); 1747 } 1748 1749 SWIGRUNTIME void 1750 PySwigPacked_dealloc(PyObject *v) 1751 { 1752 if (PySwigPacked_Check(v)) { 1753 PySwigPacked *sobj = (PySwigPacked *) v; 1754 free(sobj->pack); 1755 } 1756 PyObject_DEL(v); 1757 } 1758 1759 SWIGRUNTIME PyTypeObject* 1760 _PySwigPacked_type(void) { 1761 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; 1762 static PyTypeObject pyswigpacked_type; 1763 static int type_init = 0; 1764 if (!type_init) { 1765 const PyTypeObject tmp 1766 = { 1767 PyObject_HEAD_INIT(NULL) 1768 0, /* ob_size */ 1769 (char *)"PySwigPacked", /* tp_name */ 1770 sizeof(PySwigPacked), /* tp_basicsize */ 1771 0, /* tp_itemsize */ 1772 (destructor)PySwigPacked_dealloc, /* tp_dealloc */ 1773 (printfunc)PySwigPacked_print, /* tp_print */ 1774 (getattrfunc)0, /* tp_getattr */ 1775 (setattrfunc)0, /* tp_setattr */ 1776 (cmpfunc)PySwigPacked_compare, /* tp_compare */ 1777 (reprfunc)PySwigPacked_repr, /* tp_repr */ 1778 0, /* tp_as_number */ 1779 0, /* tp_as_sequence */ 1780 0, /* tp_as_mapping */ 1781 (hashfunc)0, /* tp_hash */ 1782 (ternaryfunc)0, /* tp_call */ 1783 (reprfunc)PySwigPacked_str, /* tp_str */ 1784 PyObject_GenericGetAttr, /* tp_getattro */ 1785 0, /* tp_setattro */ 1786 0, /* tp_as_buffer */ 1787 Py_TPFLAGS_DEFAULT, /* tp_flags */ 1788 swigpacked_doc, /* tp_doc */ 1789 0, /* tp_traverse */ 1790 0, /* tp_clear */ 1791 0, /* tp_richcompare */ 1792 0, /* tp_weaklistoffset */ 1793 #if PY_VERSION_HEX >= 0x02020000 1794 0, /* tp_iter */ 1795 0, /* tp_iternext */ 1796 0, /* tp_methods */ 1797 0, /* tp_members */ 1798 0, /* tp_getset */ 1799 0, /* tp_base */ 1800 0, /* tp_dict */ 1801 0, /* tp_descr_get */ 1802 0, /* tp_descr_set */ 1803 0, /* tp_dictoffset */ 1804 0, /* tp_init */ 1805 0, /* tp_alloc */ 1806 0, /* tp_new */ 1807 0, /* tp_free */ 1808 0, /* tp_is_gc */ 1809 0, /* tp_bases */ 1810 0, /* tp_mro */ 1811 0, /* tp_cache */ 1812 0, /* tp_subclasses */ 1813 0, /* tp_weaklist */ 1814 #endif 1815 #if PY_VERSION_HEX >= 0x02030000 1816 0, /* tp_del */ 1817 #endif 1818 #ifdef COUNT_ALLOCS 1819 0,0,0,0 /* tp_alloc -> tp_next */ 1820 #endif 1821 }; 1822 pyswigpacked_type = tmp; 1823 pyswigpacked_type.ob_type = &PyType_Type; 1824 type_init = 1; 1825 } 1826 return &pyswigpacked_type; 1827 } 1828 1829 SWIGRUNTIME PyObject * 1830 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) 1831 { 1832 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); 1833 if (sobj) { 1834 void *pack = malloc(size); 1835 if (pack) { 1836 memcpy(pack, ptr, size); 1837 sobj->pack = pack; 1838 sobj->ty = ty; 1839 sobj->size = size; 1840 } else { 1841 PyObject_DEL((PyObject *) sobj); 1842 sobj = 0; 1843 } 1844 } 1845 return (PyObject *) sobj; 1846 } 1847 1848 SWIGRUNTIME swig_type_info * 1849 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) 1850 { 1851 if (PySwigPacked_Check(obj)) { 1852 PySwigPacked *sobj = (PySwigPacked *)obj; 1853 if (sobj->size != size) return 0; 1854 memcpy(ptr, sobj->pack, size); 1855 return sobj->ty; 869 1856 } else { 870 size_t i = v->size; 871 size_t j = w->size; 872 int s = (i < j) ? -1 : (i > j) ? 1 : 0; 873 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); 874 } 1857 return 0; 1858 } 1859 } 1860 1861 /* ----------------------------------------------------------------------------- 1862 * pointers/data manipulation 1863 * ----------------------------------------------------------------------------- */ 1864 1865 SWIGRUNTIMEINLINE PyObject * 1866 _SWIG_This(void) 1867 { 1868 return PyString_FromString("this"); 1869 } 1870 1871 SWIGRUNTIME PyObject * 1872 SWIG_This(void) 1873 { 1874 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); 1875 return swig_this; 1876 } 1877 1878 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ 1879 1880 SWIGRUNTIME PySwigObject * 1881 SWIG_Python_GetSwigThis(PyObject *pyobj) 1882 { 1883 if (PySwigObject_Check(pyobj)) { 1884 return (PySwigObject *) pyobj; 1885 } else { 1886 PyObject *obj = 0; 1887 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 1888 if (PyInstance_Check(pyobj)) { 1889 obj = _PyInstance_Lookup(pyobj, SWIG_This()); 1890 } else { 1891 PyObject **dictptr = _PyObject_GetDictPtr(pyobj); 1892 if (dictptr != NULL) { 1893 PyObject *dict = *dictptr; 1894 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; 1895 } else { 1896 #ifdef PyWeakref_CheckProxy 1897 if (PyWeakref_CheckProxy(pyobj)) { 1898 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); 1899 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; 1900 } 1901 #endif 1902 obj = PyObject_GetAttr(pyobj,SWIG_This()); 1903 if (obj) { 1904 Py_DECREF(obj); 1905 } else { 1906 if (PyErr_Occurred()) PyErr_Clear(); 1907 return 0; 1908 } 1909 } 1910 } 1911 #else 1912 obj = PyObject_GetAttr(pyobj,SWIG_This()); 1913 if (obj) { 1914 Py_DECREF(obj); 1915 } else { 1916 if (PyErr_Occurred()) PyErr_Clear(); 1917 return 0; 1918 } 1919 #endif 1920 if (obj && !PySwigObject_Check(obj)) { 1921 /* a PyObject is called 'this', try to get the 'real this' 1922 PySwigObject from it */ 1923 return SWIG_Python_GetSwigThis(obj); 1924 } 1925 return (PySwigObject *)obj; 1926 } 1927 } 1928 1929 /* Acquire a pointer value */ 1930 1931 SWIGRUNTIME int 1932 SWIG_Python_AcquirePtr(PyObject *obj, int own) { 1933 if (own) { 1934 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); 1935 if (sobj) { 1936 int oldown = sobj->own; 1937 sobj->own = own; 1938 return oldown; 1939 } 1940 } 1941 return 0; 1942 } 1943 1944 /* Convert a pointer value */ 1945 1946 SWIGRUNTIME int 1947 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { 1948 if (!obj) return SWIG_ERROR; 1949 if (obj == Py_None) { 1950 if (ptr) *ptr = 0; 1951 return SWIG_OK; 1952 } else { 1953 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); 1954 while (sobj) { 1955 void *vptr = sobj->ptr; 1956 if (ty) { 1957 swig_type_info *to = sobj->ty; 1958 if (to == ty) { 1959 /* no type cast needed */ 1960 if (ptr) *ptr = vptr; 1961 break; 1962 } else { 1963 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 1964 if (!tc) { 1965 sobj = (PySwigObject *)sobj->next; 1966 } else { 1967 if (ptr) *ptr = SWIG_TypeCast(tc,vptr); 1968 break; 1969 } 1970 } 1971 } else { 1972 if (ptr) *ptr = vptr; 1973 break; 1974 } 1975 } 1976 if (sobj) { 1977 if (own) *own = sobj->own; 1978 if (flags & SWIG_POINTER_DISOWN) { 1979 sobj->own = 0; 1980 } 1981 return SWIG_OK; 1982 } else { 1983 int res = SWIG_ERROR; 1984 if (flags & SWIG_POINTER_IMPLICIT_CONV) { 1985 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; 1986 if (data && !data->implicitconv) { 1987 PyObject *klass = data->klass; 1988 if (klass) { 1989 PyObject *impconv; 1990 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ 1991 impconv = SWIG_Python_CallFunctor(klass, obj); 1992 data->implicitconv = 0; 1993 if (PyErr_Occurred()) { 1994 PyErr_Clear(); 1995 impconv = 0; 1996 } 1997 if (impconv) { 1998 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); 1999 if (iobj) { 2000 void *vptr; 2001 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); 2002 if (SWIG_IsOK(res)) { 2003 if (ptr) { 2004 *ptr = vptr; 2005 /* transfer the ownership to 'ptr' */ 2006 iobj->own = 0; 2007 res = SWIG_AddCast(res); 2008 res = SWIG_AddNewMask(res); 2009 } else { 2010 res = SWIG_AddCast(res); 2011 } 2012 } 2013 } 2014 Py_DECREF(impconv); 2015 } 2016 } 2017 } 2018 } 2019 return res; 2020 } 2021 } 2022 } 2023 2024 /* Convert a function ptr value */ 2025 2026 SWIGRUNTIME int 2027 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { 2028 if (!PyCFunction_Check(obj)) { 2029 return SWIG_ConvertPtr(obj, ptr, ty, 0); 2030 } else { 2031 void *vptr = 0; 2032 2033 /* here we get the method pointer for callbacks */ 2034 char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 2035 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 2036 if (desc) { 2037 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; 2038 if (!desc) return SWIG_ERROR; 2039 } 2040 if (ty) { 2041 swig_cast_info *tc = SWIG_TypeCheck(desc,ty); 2042 if (!tc) return SWIG_ERROR; 2043 *ptr = SWIG_TypeCast(tc,vptr); 2044 } else { 2045 *ptr = vptr; 2046 } 2047 return SWIG_OK; 2048 } 2049 } 2050 2051 /* Convert a packed value value */ 2052 2053 SWIGRUNTIME int 2054 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { 2055 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); 2056 if (!to) return SWIG_ERROR; 2057 if (ty) { 2058 if (to != ty) { 2059 /* check type cast? */ 2060 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); 2061 if (!tc) return SWIG_ERROR; 2062 } 2063 } 2064 return SWIG_OK; 2065 } 2066 2067 /* ----------------------------------------------------------------------------- 2068 * Create a new pointer object 2069 * ----------------------------------------------------------------------------- */ 2070 2071 /* 2072 Create a new instance object, whitout calling __init__, and set the 2073 'this' attribute. 2074 */ 2075 2076 SWIGRUNTIME PyObject* 2077 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) 2078 { 2079 #if (PY_VERSION_HEX >= 0x02020000) 2080 PyObject *inst = 0; 2081 PyObject *newraw = data->newraw; 2082 if (newraw) { 2083 inst = PyObject_Call(newraw, data->newargs, NULL); 2084 if (inst) { 2085 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2086 PyObject **dictptr = _PyObject_GetDictPtr(inst); 2087 if (dictptr != NULL) { 2088 PyObject *dict = *dictptr; 2089 if (dict == NULL) { 2090 dict = PyDict_New(); 2091 *dictptr = dict; 2092 PyDict_SetItem(dict, SWIG_This(), swig_this); 2093 } 2094 } 2095 #else 2096 PyObject *key = SWIG_This(); 2097 PyObject_SetAttr(inst, key, swig_this); 2098 #endif 2099 } 2100 } else { 2101 PyObject *dict = PyDict_New(); 2102 PyDict_SetItem(dict, SWIG_This(), swig_this); 2103 inst = PyInstance_NewRaw(data->newargs, dict); 2104 Py_DECREF(dict); 2105 } 2106 return inst; 2107 #else 2108 #if (PY_VERSION_HEX >= 0x02010000) 2109 PyObject *inst; 2110 PyObject *dict = PyDict_New(); 2111 PyDict_SetItem(dict, SWIG_This(), swig_this); 2112 inst = PyInstance_NewRaw(data->newargs, dict); 2113 Py_DECREF(dict); 2114 return (PyObject *) inst; 2115 #else 2116 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); 2117 if (inst == NULL) { 2118 return NULL; 2119 } 2120 inst->in_class = (PyClassObject *)data->newargs; 2121 Py_INCREF(inst->in_class); 2122 inst->in_dict = PyDict_New(); 2123 if (inst->in_dict == NULL) { 2124 Py_DECREF(inst); 2125 return NULL; 2126 } 2127 #ifdef Py_TPFLAGS_HAVE_WEAKREFS 2128 inst->in_weakreflist = NULL; 2129 #endif 2130 #ifdef Py_TPFLAGS_GC 2131 PyObject_GC_Init(inst); 2132 #endif 2133 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); 2134 return (PyObject *) inst; 2135 #endif 2136 #endif 875 2137 } 876 2138 877 2139 SWIGRUNTIME void 878 PySwigPacked_dealloc(PySwigPacked *self)2140 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) 879 2141 { 880 free(self->pack); 881 PyObject_DEL(self); 882 } 883 884 SWIGRUNTIME PyTypeObject* 885 PySwigPacked_GetType() { 886 static char PySwigPacked_Type__doc__[] = 887 "Swig object carries a C/C++ instance pointer"; 888 static int type_init = 0; 889 890 static PyTypeObject PySwigPacked_Type; 891 if (!type_init) { 892 PyTypeObject tmp = { 893 PyObject_HEAD_INIT(&PyType_Type) 894 0, /*ob_size*/ 895 "PySwigPacked", /*tp_name*/ 896 sizeof(PySwigPacked), /*tp_basicsize*/ 897 0, /*tp_itemsize*/ 898 /* methods */ 899 (destructor)PySwigPacked_dealloc, /*tp_dealloc*/ 900 (printfunc)PySwigPacked_print, /*tp_print*/ 901 (getattrfunc)0, /*tp_getattr*/ 902 (setattrfunc)0, /*tp_setattr*/ 903 (cmpfunc)PySwigPacked_compare, /*tp_compare*/ 904 (reprfunc)PySwigPacked_repr, /*tp_repr*/ 905 0, /*tp_as_number*/ 906 0, /*tp_as_sequence*/ 907 0, /*tp_as_mapping*/ 908 (hashfunc)0, /*tp_hash*/ 909 (ternaryfunc)0, /*tp_call*/ 910 (reprfunc)PySwigPacked_str, /*tp_str*/ 911 /* Space for future expansion */ 912 0L,0L,0L,0L, 913 PySwigPacked_Type__doc__, /* Documentation string */ 914 #if PY_VERSION_HEX >= 0x02000000 915 0, /* tp_traverse */ 916 0, /* tp_clear */ 917 #endif 918 #if PY_VERSION_HEX >= 0x02010000 919 0, /* tp_richcompare */ 920 0, /* tp_weaklistoffset */ 921 #endif 922 #if PY_VERSION_HEX >= 0x02020000 923 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 924 #endif 925 #if PY_VERSION_HEX >= 0x02030000 926 0, /* tp_del */ 927 #endif 928 #ifdef COUNT_ALLOCS 929 0,0,0,0 /* tp_alloc -> tp_next */ 930 #endif 931 }; 932 933 PySwigPacked_Type = tmp; 934 type_init = 1; 935 } 936 937 938 939 return &PySwigPacked_Type; 940 } 941 942 SWIGRUNTIME PyObject * 943 PySwigPacked_FromDataAndDesc(void *ptr, size_t size, const char *desc) 944 { 945 PySwigPacked *self = PyObject_NEW(PySwigPacked, PySwigPacked_GetType()); 946 if (self == NULL) { 2142 PyObject *dict; 2143 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2144 PyObject **dictptr = _PyObject_GetDictPtr(inst); 2145 if (dictptr != NULL) { 2146 dict = *dictptr; 2147 if (dict == NULL) { 2148 dict = PyDict_New(); 2149 *dictptr = dict; 2150 } 2151 PyDict_SetItem(dict, SWIG_This(), swig_this); 2152 return; 2153 } 2154 #endif 2155 dict = PyObject_GetAttrString(inst, "__dict__"); 2156 PyDict_SetItem(dict, SWIG_This(), swig_this); 2157 Py_DECREF(dict); 2158 } 2159 2160 2161 SWIGINTERN PyObject * 2162 SWIG_Python_InitShadowInstance(PyObject *args) { 2163 PyObject *obj[2]; 2164 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { 947 2165 return NULL; 948 2166 } else { 949 void *pack = malloc(size); 950 memcpy(pack, ptr, size); 951 self->pack = pack; 952 self->desc = desc; 953 self->size = size; 954 return (PyObject *) self; 2167 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); 2168 if (sthis) { 2169 PySwigObject_append((PyObject*) sthis, obj[1]); 2170 } else { 2171 SWIG_Python_SetSwigThis(obj[0], obj[1]); 2172 } 2173 return SWIG_Py_Void(); 2174 } 2175 } 2176 2177 /* Create a new pointer object */ 2178 2179 SWIGRUNTIME PyObject * 2180 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { 2181 if (!ptr) { 2182 return SWIG_Py_Void(); 2183 } else { 2184 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; 2185 PyObject *robj = PySwigObject_New(ptr, type, own); 2186 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; 2187 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { 2188 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); 2189 if (inst) { 2190 Py_DECREF(robj); 2191 robj = inst; 2192 } 2193 } 2194 return robj; 2195 } 2196 } 2197 2198 /* Create a new packed object */ 2199 2200 SWIGRUNTIMEINLINE PyObject * 2201 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { 2202 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); 2203 } 2204 2205 /* -----------------------------------------------------------------------------* 2206 * Get type list 2207 * -----------------------------------------------------------------------------*/ 2208 2209 #ifdef SWIG_LINK_RUNTIME 2210 void *SWIG_ReturnGlobalTypeList(void *); 2211 #endif 2212 2213 SWIGRUNTIME swig_module_info * 2214 SWIG_Python_GetModule(void) { 2215 static void *type_pointer = (void *)0; 2216 /* first check if module already created */ 2217 if (!type_pointer) { 2218 #ifdef SWIG_LINK_RUNTIME 2219 type_pointer = SWIG_ReturnGlobalTypeList((void *)0); 2220 #else 2221 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2222 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); 2223 if (PyErr_Occurred()) { 2224 PyErr_Clear(); 2225 type_pointer = (void *)0; 2226 } 2227 #endif 2228 } 2229 return (swig_module_info *) type_pointer; 2230 } 2231 2232 #if PY_MAJOR_VERSION < 2 2233 /* PyModule_AddObject function was introduced in Python 2.0. The following function 2234 is copied out of Python/modsupport.c in python version 2.3.4 */ 2235 SWIGINTERN int 2236 PyModule_AddObject(PyObject *m, char *name, PyObject *o) 2237 { 2238 PyObject *dict; 2239 if (!PyModule_Check(m)) { 2240 PyErr_SetString(PyExc_TypeError, 2241 "PyModule_AddObject() needs module as first arg"); 2242 return SWIG_ERROR; 2243 } 2244 if (!o) { 2245 PyErr_SetString(PyExc_TypeError, 2246 "PyModule_AddObject() needs non-NULL value"); 2247 return SWIG_ERROR; 2248 } 2249 2250 dict = PyModule_GetDict(m); 2251 if (dict == NULL) { 2252 /* Internal error -- modules must have a dict! */ 2253 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", 2254 PyModule_GetName(m)); 2255 return SWIG_ERROR; 2256 } 2257 if (PyDict_SetItemString(dict, name, o)) 2258 return SWIG_ERROR; 2259 Py_DECREF(o); 2260 return SWIG_OK; 2261 } 2262 #endif 2263 2264 SWIGRUNTIME void 2265 SWIG_Python_DestroyModule(void *vptr) 2266 { 2267 swig_module_info *swig_module = (swig_module_info *) vptr; 2268 swig_type_info **types = swig_module->types; 2269 size_t i; 2270 for (i =0; i < swig_module->size; ++i) { 2271 swig_type_info *ty = types[i]; 2272 if (ty->owndata) { 2273 PySwigClientData *data = (PySwigClientData *) ty->clientdata; 2274 if (data) PySwigClientData_Del(data); 2275 } 2276 } 2277 Py_DECREF(SWIG_This()); 2278 } 2279 2280 SWIGRUNTIME void 2281 SWIG_Python_SetModule(swig_module_info *swig_module) { 2282 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ 2283 2284 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 2285 swig_empty_runtime_method_table); 2286 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); 2287 if (pointer && module) { 2288 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); 2289 } else { 2290 Py_XDECREF(pointer); 2291 } 2292 } 2293 2294 /* The python cached type query */ 2295 SWIGRUNTIME PyObject * 2296 SWIG_Python_TypeCache() { 2297 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); 2298 return cache; 2299 } 2300 2301 SWIGRUNTIME swig_type_info * 2302 SWIG_Python_TypeQuery(const char *type) 2303 { 2304 PyObject *cache = SWIG_Python_TypeCache(); 2305 PyObject *key = PyString_FromString(type); 2306 PyObject *obj = PyDict_GetItem(cache, key); 2307 swig_type_info *descriptor; 2308 if (obj) { 2309 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); 2310 } else { 2311 swig_module_info *swig_module = SWIG_Python_GetModule(); 2312 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); 2313 if (descriptor) { 2314 obj = PyCObject_FromVoidPtr(descriptor, NULL); 2315 PyDict_SetItem(cache, key, obj); 2316 Py_DECREF(obj); 2317 } 2318 } 2319 Py_DECREF(key); 2320 return descriptor; 2321 } 2322 2323 /* 2324 For backward compatibility only 2325 */ 2326 #define SWIG_POINTER_EXCEPTION 0 2327 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) 2328 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) 2329 2330 SWIGRUNTIME int 2331 SWIG_Python_AddErrMesg(const char* mesg, int infront) 2332 { 2333 if (PyErr_Occurred()) { 2334 PyObject *type = 0; 2335 PyObject *value = 0; 2336 PyObject *traceback = 0; 2337 PyErr_Fetch(&type, &value, &traceback); 2338 if (value) { 2339 PyObject *old_str = PyObject_Str(value); 2340 Py_XINCREF(type); 2341 PyErr_Clear(); 2342 if (infront) { 2343 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); 2344 } else { 2345 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); 2346 } 2347 Py_DECREF(old_str); 2348 } 2349 return 1; 2350 } else { 2351 return 0; 2352 } 2353 } 2354 2355 SWIGRUNTIME int 2356 SWIG_Python_ArgFail(int argnum) 2357 { 2358 if (PyErr_Occurred()) { 2359 /* add information about failing argument */ 2360 char mesg[256]; 2361 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); 2362 return SWIG_Python_AddErrMesg(mesg, 1); 2363 } else { 2364 return 0; 955 2365 } 956 2366 } 957 2367 958 2368 SWIGRUNTIMEINLINE const char * 959 PySwig Packed_UnpackData(PyObject *obj, void *ptr, size_t size)2369 PySwigObject_GetDesc(PyObject *self) 960 2370 { 961 PySwigPacked *self = (PySwigPacked *)obj; 962 if (self->size != size) return 0; 963 memcpy(ptr, self->pack, size); 964 return self->desc; 965 } 966 967 SWIGRUNTIMEINLINE const char * 968 PySwigPacked_GetDesc(PyObject *self) 969 { 970 return ((PySwigPacked *)self)->desc; 971 } 972 973 SWIGRUNTIMEINLINE int 974 PySwigPacked_Check(PyObject *op) { 975 return ((op)->ob_type == PySwigPacked_GetType()) 976 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); 977 } 978 979 #else 980 /* ----------------------------------------------------------------------------- 981 * Use the old Python PyCObject instead of PySwigObject 982 * ----------------------------------------------------------------------------- */ 983 984 #define PySwigObject_GetDesc(obj) PyCObject_GetDesc(obj) 985 #define PySwigObject_Check(obj) PyCObject_Check(obj) 986 #define PySwigObject_AsVoidPtr(obj) PyCObject_AsVoidPtr(obj) 987 #define PySwigObject_FromVoidPtrAndDesc(p, d) PyCObject_FromVoidPtrAndDesc(p, d, NULL) 988 989 #endif 990 991 #endif 992 993 /* ----------------------------------------------------------------------------- 994 * errors manipulation 995 * ----------------------------------------------------------------------------- */ 2371 PySwigObject *v = (PySwigObject *)self; 2372 swig_type_info *ty = v ? v->ty : 0; 2373 return ty ? ty->str : (char*)""; 2374 } 996 2375 997 2376 SWIGRUNTIME void … … 1000 2379 if (type) { 1001 2380 #if defined(SWIG_COBJECT_TYPES) 1002 if ( PySwigObject_Check(obj)) {2381 if (obj && PySwigObject_Check(obj)) { 1003 2382 const char *otype = (const char *) PySwigObject_GetDesc(obj); 1004 2383 if (otype) { … … 1021 2400 type, otype); 1022 2401 } 1023 Py_ DECREF(str);2402 Py_XDECREF(str); 1024 2403 return; 1025 2404 } … … 1031 2410 } 1032 2411 1033 SWIGRUNTIMEINLINE void1034 SWIG_Python_NullRef(const char *type)1035 {1036 if (type) {1037 PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type);1038 } else {1039 PyErr_Format(PyExc_TypeError, "null reference was received");1040 }1041 }1042 1043 SWIGRUNTIME int1044 SWIG_Python_AddErrMesg(const char* mesg, int infront)1045 {1046 if (PyErr_Occurred()) {1047 PyObject *type = 0;1048 PyObject *value = 0;1049 PyObject *traceback = 0;1050 PyErr_Fetch(&type, &value, &traceback);1051 if (value) {1052 PyObject *old_str = PyObject_Str(value);1053 Py_XINCREF(type);1054 PyErr_Clear();1055 if (infront) {1056 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));1057 } else {1058 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);1059 }1060 Py_DECREF(old_str);1061 }1062 return 1;1063 } else {1064 return 0;1065 }1066 }1067 1068 SWIGRUNTIME int1069 SWIG_Python_ArgFail(int argnum)1070 {1071 if (PyErr_Occurred()) {1072 /* add information about failing argument */1073 char mesg[256];1074 sprintf(mesg, "argument number %d:", argnum);1075 return SWIG_Python_AddErrMesg(mesg, 1);1076 } else {1077 return 0;1078 }1079 }1080 1081 1082 /* -----------------------------------------------------------------------------1083 * pointers/data manipulation1084 * ----------------------------------------------------------------------------- */1085 1086 /* Convert a pointer value */1087 SWIGRUNTIME int1088 SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {1089 swig_type_info *tc;1090 const char *c = 0;1091 static PyObject *SWIG_this = 0;1092 int newref = 0;1093 PyObject *pyobj = 0;1094 void *vptr;1095 1096 if (!obj) return 0;1097 if (obj == Py_None) {1098 *ptr = 0;1099 return 0;1100 }1101 1102 #ifdef SWIG_COBJECT_TYPES1103 if (!(PySwigObject_Check(obj))) {1104 if (!SWIG_this)1105 SWIG_this = PyString_FromString("this");1106 pyobj = obj;1107 obj = PyObject_GetAttr(obj,SWIG_this);1108 newref = 1;1109 if (!obj) goto type_error;1110 if (!PySwigObject_Check(obj)) {1111 Py_DECREF(obj);1112 goto type_error;1113 }1114 }1115 vptr = PySwigObject_AsVoidPtr(obj);1116 c = (const char *) PySwigObject_GetDesc(obj);1117 if (newref) { Py_DECREF(obj); }1118 goto type_check;1119 #else1120 if (!(PyString_Check(obj))) {1121 if (!SWIG_this)1122 SWIG_this = PyString_FromString("this");1123 pyobj = obj;1124 obj = PyObject_GetAttr(obj,SWIG_this);1125 newref = 1;1126 if (!obj) goto type_error;1127 if (!PyString_Check(obj)) {1128 Py_DECREF(obj);1129 goto type_error;1130 }1131 }1132 c = PyString_AS_STRING(obj);1133 /* Pointer values must start with leading underscore */1134 c = SWIG_UnpackVoidPtr(c, &vptr, ty->name);1135 if (newref) { Py_DECREF(obj); }1136 if (!c) goto type_error;1137 #endif1138 1139 type_check:1140 1141 if (ty) {1142 tc = SWIG_TypeCheck(c,ty);1143 if (!tc) goto type_error;1144 *ptr = SWIG_TypeCast(tc,vptr);1145 } else {1146 *ptr = vptr;1147 }1148 1149 if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {1150 PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);1151 }1152 return 0;1153 1154 type_error:1155 PyErr_Clear();1156 if (pyobj && !obj) {1157 obj = pyobj;1158 if (PyCFunction_Check(obj)) {1159 /* here we get the method pointer for callbacks */1160 char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);1161 c = doc ? strstr(doc, "swig_ptr: ") : 0;1162 if (c) {1163 c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);1164 if (!c) goto type_error;1165 goto type_check;1166 }1167 }1168 }1169 if (flags & SWIG_POINTER_EXCEPTION) {1170 if (ty) {1171 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);1172 } else {1173 SWIG_Python_TypeError("C/C++ pointer", obj);1174 }1175 }1176 return -1;1177 }1178 2412 1179 2413 /* Convert a pointer value, signal an exception on a type mismatch */ … … 1191 2425 } 1192 2426 1193 /* Convert a packed value value */1194 SWIGRUNTIME int1195 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {1196 swig_type_info *tc;1197 const char *c = 0;1198 1199 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)1200 c = PySwigPacked_UnpackData(obj, ptr, sz);1201 #else1202 if ((!obj) || (!PyString_Check(obj))) goto type_error;1203 c = PyString_AS_STRING(obj);1204 /* Pointer values must start with leading underscore */1205 c = SWIG_UnpackDataName(c, ptr, sz, ty->name);1206 #endif1207 if (!c) goto type_error;1208 if (ty) {1209 tc = SWIG_TypeCheck(c,ty);1210 if (!tc) goto type_error;1211 }1212 return 0;1213 1214 type_error:1215 PyErr_Clear();1216 if (flags & SWIG_POINTER_EXCEPTION) {1217 if (ty) {1218 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);1219 } else {1220 SWIG_Python_TypeError("C/C++ packed data", obj);1221 }1222 }1223 return -1;1224 }1225 1226 /* Create a new array object */1227 SWIGRUNTIME PyObject *1228 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {1229 PyObject *robj = 0;1230 if (!ptr) {1231 Py_INCREF(Py_None);1232 return Py_None;1233 }1234 #ifdef SWIG_COBJECT_TYPES1235 robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name);1236 #else1237 {1238 char result[SWIG_BUFFER_SIZE];1239 robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ?1240 PyString_FromString(result) : 0;1241 }1242 #endif1243 if (!robj || (robj == Py_None)) return robj;1244 if (type->clientdata) {1245 PyObject *inst;1246 PyObject *args = Py_BuildValue((char*)"(O)", robj);1247 Py_DECREF(robj);1248 inst = PyObject_CallObject((PyObject *) type->clientdata, args);1249 Py_DECREF(args);1250 if (inst) {1251 if (own) {1252 PyObject_SetAttrString(inst,(char*)"thisown",Py_True);1253 }1254 robj = inst;1255 }1256 }1257 return robj;1258 }1259 1260 SWIGRUNTIME PyObject *1261 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {1262 PyObject *robj = 0;1263 if (!ptr) {1264 Py_INCREF(Py_None);1265 return Py_None;1266 }1267 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)1268 robj = PySwigPacked_FromDataAndDesc((void *) ptr, sz, (char *)type->name);1269 #else1270 {1271 char result[SWIG_BUFFER_SIZE];1272 robj = SWIG_PackDataName(result, ptr, sz, type->name, sizeof(result)) ?1273 PyString_FromString(result) : 0;1274 }1275 #endif1276 return robj;1277 }1278 1279 /* -----------------------------------------------------------------------------*1280 * Get type list1281 * -----------------------------------------------------------------------------*/1282 1283 #ifdef SWIG_LINK_RUNTIME1284 void *SWIG_ReturnGlobalTypeList(void *);1285 #endif1286 1287 SWIGRUNTIME swig_type_info **1288 SWIG_Python_GetTypeListHandle() {1289 static void *type_pointer = (void *)0;1290 /* first check if module already created */1291 if (!type_pointer) {1292 #ifdef SWIG_LINK_RUNTIME1293 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);1294 #else1295 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,1296 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);1297 if (PyErr_Occurred()) {1298 PyErr_Clear();1299 type_pointer = (void *)0;1300 }1301 }1302 #endif1303 return (swig_type_info **) type_pointer;1304 }1305 1306 /*1307 Search for a swig_type_info structure1308 */1309 SWIGRUNTIMEINLINE swig_type_info *1310 SWIG_Python_GetTypeList() {1311 swig_type_info **tlh = SWIG_Python_GetTypeListHandle();1312 return tlh ? *tlh : (swig_type_info*)0;1313 }1314 1315 #define SWIG_Runtime_GetTypeList SWIG_Python_GetTypeList1316 2427 1317 2428 #ifdef __cplusplus 1318 } 1319 #endif 2429 #if 0 2430 { /* cc-mode */ 2431 #endif 2432 } 2433 #endif 2434 2435 2436 2437 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 2438 2439 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 2440 1320 2441 1321 2442 1322 2443 /* -------- TYPES TABLE (BEGIN) -------- */ 1323 2444 1324 #define SWIGTYPE_p_batch_status swig_types[0] 1325 #define SWIGTYPE_p_char swig_types[1] 1326 #define SWIGTYPE_p_attropl swig_types[2] 1327 #define SWIGTYPE_p_p_char swig_types[3] 1328 #define SWIGTYPE_size_t swig_types[4] 1329 #define SWIGTYPE_p_attrl swig_types[5] 1330 #define SWIGTYPE_p_long swig_types[6] 1331 #define SWIGTYPE_ptrdiff_t swig_types[7] 1332 #define SWIGTYPE_p_int swig_types[8] 1333 static swig_type_info *swig_types[10]; 2445 #define SWIGTYPE_p_attrl swig_types[0] 2446 #define SWIGTYPE_p_attropl swig_types[1] 2447 #define SWIGTYPE_p_batch_status swig_types[2] 2448 #define SWIGTYPE_p_char swig_types[3] 2449 #define SWIGTYPE_p_int swig_types[4] 2450 #define SWIGTYPE_p_long swig_types[5] 2451 #define SWIGTYPE_p_p_char swig_types[6] 2452 static swig_type_info *swig_types[8]; 2453 static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0}; 2454 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) 2455 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) 1334 2456 1335 2457 /* -------- TYPES TABLE (END) -------- */ 1336 2458 2459 #if (PY_VERSION_HEX <= 0x02000000) 2460 # if !defined(SWIG_PYTHON_CLASSIC) 2461 # error "This python version requires to use swig with the '-classic' option" 2462 # endif 2463 #endif 1337 2464 1338 2465 /*----------------------------------------------- … … 1342 2469 1343 2470 #define SWIG_name "_pbs" 2471 2472 #define SWIGVERSION 0x010329 2473 2474 2475 #define SWIG_as_voidptr(a) (void *)((const void *)(a)) 2476 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 2477 1344 2478 1345 2479 … … 1408 2542 1409 2543 2544 1410 2545 // The default constructor for struct attropl 1411 2546 // … … 1470 2605 1471 2606 #include <limits.h> 2607 #ifndef LLONG_MIN 2608 # define LLONG_MIN LONG_LONG_MIN 2609 #endif 2610 #ifndef LLONG_MAX 2611 # define LLONG_MAX LONG_LONG_MAX 2612 #endif 2613 #ifndef ULLONG_MAX 2614 # define ULLONG_MAX ULONG_LONG_MAX 2615 #endif 1472 2616 1473 2617 1474 2618 SWIGINTERN int 1475 SWIG_CheckLongInRange(long value, long min_value, long max_value, 1476 const char *errmsg) 2619 SWIG_AsVal_double (PyObject *obj, double *val) 1477 2620 { 1478 if (value < min_value) { 1479 if (errmsg) { 1480 PyErr_Format(PyExc_OverflowError, 1481 "value %ld is less than '%s' minimum %ld", 1482 value, errmsg, min_value); 1483 } 1484 return 0; 1485 } else if (value > max_value) { 1486 if (errmsg) { 1487 PyErr_Format(PyExc_OverflowError, 1488 "value %ld is greater than '%s' maximum %ld", 1489 value, errmsg, max_value); 1490 } 1491 return 0; 1492 } 1493 return 1; 2621 int res = SWIG_TypeError; 2622 if (PyFloat_Check(obj)) { 2623 if (val) *val = PyFloat_AsDouble(obj); 2624 return SWIG_OK; 2625 } else if (PyInt_Check(obj)) { 2626 if (val) *val = PyInt_AsLong(obj); 2627 return SWIG_OK; 2628 } else if (PyLong_Check(obj)) { 2629 double v = PyLong_AsDouble(obj); 2630 if (!PyErr_Occurred()) { 2631 if (val) *val = v; 2632 return SWIG_OK; 2633 } else { 2634 PyErr_Clear(); 2635 } 2636 } 2637 #ifdef SWIG_PYTHON_CAST_MODE 2638 { 2639 int dispatch = 0; 2640 double d = PyFloat_AsDouble(obj); 2641 if (!PyErr_Occurred()) { 2642 if (val) *val = d; 2643 return SWIG_AddCast(SWIG_OK); 2644 } else { 2645 PyErr_Clear(); 2646 } 2647 if (!dispatch) { 2648 long v = PyLong_AsLong(obj); 2649 if (!PyErr_Occurred()) { 2650 if (val) *val = v; 2651 return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); 2652 } else { 2653 PyErr_Clear(); 2654 } 2655 } 2656 } 2657 #endif 2658 return res; 2659 } 2660 2661 2662 #include <float.h> 2663 2664 2665 #include <math.h> 2666 2667 2668 SWIGINTERNINLINE int 2669 SWIG_CanCastAsInteger(double *d, double min, double max) { 2670 double x = *d; 2671 if ((min <= x && x <= max)) { 2672 double fx = floor(x); 2673 double cx = ceil(x); 2674 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ 2675 if ((errno == EDOM) || (errno == ERANGE)) { 2676 errno = 0; 2677 } else { 2678 double summ, reps, diff; 2679 if (rd < x) { 2680 diff = x - rd; 2681 } else if (rd > x) { 2682 diff = rd - x; 2683 } else { 2684 return 1; 2685 } 2686 summ = rd + x; 2687 reps = diff/summ; 2688 if (reps < 8*DBL_EPSILON) { 2689 *d = rd; 2690 return 1; 2691 } 2692 } 2693 } 2694 return 0; 1494 2695 } 1495 2696 1496 2697 1497 2698 SWIGINTERN int 1498 SWIG_AsVal_long(PyObject *obj, long* val)2699 SWIG_AsVal_long (PyObject *obj, long* val) 1499 2700 { 1500 2701 if (PyInt_Check(obj)) { 1501 if (val) *val = PyInt_AS_LONG(obj); 1502 return 1; 1503 } 1504 if (PyLong_Check(obj)) { 2702 if (val) *val = PyInt_AsLong(obj); 2703 return SWIG_OK; 2704 } else if (PyLong_Check(obj)) { 1505 2705 long v = PyLong_AsLong(obj); 1506 2706 if (!PyErr_Occurred()) { 1507 2707 if (val) *val = v; 1508 return 1;2708 return SWIG_OK; 1509 2709 } else { 1510 if (!val) PyErr_Clear(); 1511 return 0; 1512 } 1513 } 1514 if (val) { 1515 SWIG_type_error("long", obj); 1516 } 1517 return 0; 1518 } 1519 1520 1521 #if INT_MAX != LONG_MAX 2710 PyErr_Clear(); 2711 } 2712 } 2713 #ifdef SWIG_PYTHON_CAST_MODE 2714 { 2715 int dispatch = 0; 2716 long v = PyInt_AsLong(obj); 2717 if (!PyErr_Occurred()) { 2718 if (val) *val = v; 2719 return SWIG_AddCast(SWIG_OK); 2720 } else { 2721 PyErr_Clear(); 2722 } 2723 if (!dispatch) { 2724 double d; 2725 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); 2726 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { 2727 if (val) *val = (long)(d); 2728 return res; 2729 } 2730 } 2731 } 2732 #endif 2733 return SWIG_TypeError; 2734 } 2735 2736 1522 2737 SWIGINTERN int 1523 SWIG_AsVal_int(PyObject *obj, int *val) 2738 SWIG_AsVal_int (PyObject * obj, int *val) 2739 { 2740 long v; 2741 int res = SWIG_AsVal_long (obj, &v); 2742 if (SWIG_IsOK(res)) { 2743 if ((v < INT_MIN || v > INT_MAX)) { 2744 return SWIG_OverflowError; 2745 } else { 2746 if (val) *val = (int)(v); 2747 } 2748 } 2749 return res; 2750 } 2751 2752 2753 #define SWIG_From_long PyInt_FromLong 2754 2755 2756 SWIGINTERNINLINE PyObject * 2757 SWIG_From_int (int value) 2758 { 2759 return SWIG_From_long (value); 2760 } 2761 2762 2763 SWIGINTERN swig_type_info* 2764 SWIG_pchar_descriptor() 2765 { 2766 static int init = 0; 2767 static swig_type_info* info = 0; 2768 if (!init) { 2769 info = SWIG_TypeQuery("_p_char"); 2770 init = 1; 2771 } 2772 return info; 2773 } 2774 2775 2776 SWIGINTERNINLINE PyObject * 2777 SWIG_FromCharPtrAndSize(const char* carray, size_t size) 2778 { 2779 if (carray) { 2780 if (size > INT_MAX) { 2781 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); 2782 return pchar_descriptor ? 2783 SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); 2784 } else { 2785 return PyString_FromStringAndSize(carray, (int)(size)); 2786 } 2787 } else { 2788 return SWIG_Py_Void(); 2789 } 2790 } 2791 2792 2793 SWIGINTERNINLINE PyObject * 2794 SWIG_FromCharPtr(const char *cptr) 1524 2795 { 1525 const char* errmsg = val ? "int" : (char*)0; 1526 long v; 1527 if (SWIG_AsVal_long(obj, &v)) { 1528 if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) { 1529 if (val) *val = (int)(v); 1530 return 1; 1531 } else { 1532 return 0; 1533 } 2796 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); 2797 } 2798 2799 2800 SWIGINTERN int 2801 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) 2802 { 2803 if (PyString_Check(obj)) { 2804 char *cstr; int len; 2805 PyString_AsStringAndSize(obj, &cstr, &len); 2806 if (cptr) { 2807 if (alloc) { 2808 /* 2809 In python the user should not be able to modify the inner 2810 string representation. To warranty that, if you define 2811 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string 2812 buffer is always returned. 2813 2814 The default behavior is just to return the pointer value, 2815 so, be careful. 2816 */ 2817 #if defined(SWIG_PYTHON_SAFE_CSTRINGS) 2818 if (*alloc != SWIG_OLDOBJ) 2819 #else 2820 if (*alloc == SWIG_NEWOBJ) 2821 #endif 2822 { 2823 *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); 2824 *alloc = SWIG_NEWOBJ; 2825 } 2826 else { 2827 *cptr = cstr; 2828 *alloc = SWIG_OLDOBJ; 2829 } 2830 } else { 2831 *cptr = PyString_AsString(obj); 2832 } 2833 } 2834 if (psize) *psize = len + 1; 2835 return SWIG_OK; 1534 2836 } else { 1535 PyErr_Clear(); 1536 } 1537 if (val) { 1538 SWIG_type_error(errmsg, obj); 1539 } 1540 return 0; 1541 } 1542 #else 1543 SWIGINTERNSHORT int 1544 SWIG_AsVal_int(PyObject *obj, int *val) 1545 { 1546 return SWIG_AsVal_long(obj,(long*)val); 1547 } 1548 #endif 1549 1550 1551 SWIGINTERNSHORT int 1552 SWIG_As_int(PyObject* obj) 1553 { 1554 int v; 1555 if (!SWIG_AsVal_int(obj, &v)) { 1556 /* 1557 this is needed to make valgrind/purify happier. 1558 */ 1559 memset((void*)&v, 0, sizeof(int)); 1560 } 1561 return v; 1562 } 1563 1564 1565 SWIGINTERNSHORT int 1566 SWIG_Check_int(PyObject* obj) 1567 { 1568 return SWIG_AsVal_int(obj, (int*)0); 1569 } 1570 1571 1572 /*@/usr/share/swig1.3/python/pymacros.swg,66,SWIG_define@*/ 1573 #define SWIG_From_int PyInt_FromLong 1574 /*@@*/ 1575 1576 1577 SWIGINTERN PyObject * 1578 SWIG_FromCharPtr(const char* cptr) 1579 { 1580 if (cptr) { 1581 size_t size = strlen(cptr); 1582 if (size > INT_MAX) { 1583 return SWIG_NewPointerObj((char*)(cptr), 1584 SWIG_TypeQuery("char *"), 0); 1585 } else { 1586 if (size != 0) { 1587 return PyString_FromStringAndSize(cptr, size); 1588 } else { 1589 return PyString_FromString(cptr); 2837 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); 2838 if (pchar_descriptor) { 2839 void* vptr = 0; 2840 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { 2841 if (cptr) *cptr = (char *) vptr; 2842 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; 2843 if (alloc) *alloc = SWIG_OLDOBJ; 2844 return SWIG_OK; 1590 2845 } 1591 2846 } 1592 2847 } 1593 Py_INCREF(Py_None); 1594 return Py_None; 1595 } 1596 1597 1598 /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */ 1599 SWIGINTERN int 1600 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize) 1601 { 1602 static swig_type_info* pchar_info = 0; 1603 char* vptr = 0; 1604 if (!pchar_info) pchar_info = SWIG_TypeQuery("char *"); 1605 if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) { 1606 if (cptr) *cptr = vptr; 1607 if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; 1608 return SWIG_OLDOBJ; 1609 } else { 1610 PyErr_Clear(); 1611 if (PyString_Check(obj)) { 1612 if (cptr) { 1613 *cptr = PyString_AS_STRING(obj); 1614 if (psize) { 1615 *psize = PyString_GET_SIZE(obj) + 1; 1616 } 1617 } 1618 return SWIG_PYSTR; 1619 } 1620 } 1621 if (cptr) { 1622 SWIG_type_error("char *", obj); 1623 } 1624 return 0; 1625 } 1626 1627 1628 SWIGINTERNSHORT int 1629 SWIG_AsCharPtr(PyObject *obj, char **val) 1630 { 1631 if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) { 1632 return 1; 1633 } 1634 if (val) { 1635 PyErr_Clear(); 1636 SWIG_type_error("char *", obj); 1637 } 1638 return 0; 1639 } 1640 1641 static char *attrl___str__(struct attrl *self){ 2848 return SWIG_TypeError; 2849 } 2850 2851 2852 2853 2854 SWIGINTERN char *attrl___str__(struct attrl *self){ 1642 2855 static char temp[4 * 255] ; 1643 2856 snprintf(temp, sizeof(temp), "(%s,%s,%s)", … … 1646 2859 return &temp[0]; 1647 2860 } 1648 static char *attropl___str__(struct attropl *self){ 2861 SWIGINTERN void delete_attrl(struct attrl *self){ 2862 free(self); 2863 } 2864 SWIGINTERN char *attropl___str__(struct attropl *self){ 1649 2865 static char temp[4 * 255] ; 1650 2866 snprintf(temp, sizeof(temp), "(%s,%s,%s)", … … 1653 2869 return &temp[0]; 1654 2870 } 1655 extern int pbs_errno; 1656 extern char *pbs_server; 2871 SWIGINTERN void delete_attropl(struct attropl *self){ 2872 free(self); 2873 } 1657 2874 1658 2875 SWIGINTERN int 1659 SWIG_AsNewCharPtr(PyObject *obj, char **val) 1660 { 1661 char* cptr = 0; size_t csize = 0; 1662 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize); 1663 if (res) { 1664 if (val) { 1665 if (csize) { 1666 *val = ((char*) malloc((csize)*sizeof(char))); 1667 memcpy(*val, cptr, --csize); 1668 (*val)[csize] = 0; 1669 } else if (cptr) { 1670 *val = ((char*) malloc((1)*sizeof(char))); 1671 (*val)[0] = 0; 1672 } else { 1673 *val = 0; 1674 } 1675 } 1676 return SWIG_NEWOBJ; 1677 } 1678 if (val) { 1679 SWIG_type_error("char *", obj); 1680 } 1681 return 0; 1682 } 1683 1684 char *avail(int,char *); 1685 int pbs_asyrunjob(int,char *,char *,char *); 1686 int pbs_alterjob(int,char *,struct attrl *,char *); 1687 int pbs_connect(char *); 1688 int pbs_query_max_connections(); 1689 char *pbs_default(void); 1690 int pbs_deljob(int,char *,char *); 1691 int pbs_disconnect(int); 1692 int pbs_holdjob(int,char *,char *,char *); 1693 char *pbs_locjob(int,char *,char *); 1694 int pbs_manager(int,int,int,char *,struct attropl *,char *); 1695 int pbs_movejob(int,char *,char *,char *); 1696 int pbs_msgjob(int,char *,int,char *,char *); 1697 int pbs_orderjob(int,char *,char *,char *); 1698 int pbs_rescquery(int,char **,int,int *,int *,int *,int *); 1699 1700 SWIGINTERN PyObject* 1701 t_output_helper(PyObject* target, PyObject* o) { 1702 if (!target) { 1703 target = o; 1704 } else if (target == Py_None) { 1705 Py_DECREF(target); 1706 target = o; 1707 } else { 1708 if (!PyList_Check(target)) { 1709 PyObject *o2 = target; 1710 target = PyList_New(1); 1711 PyList_SetItem(target, 0, o2); 1712 } 1713 PyList_Append(target,o); 1714 } 1715 return target; 1716 } 1717 1718 1719 int pbs_rescreserve(int,char **,int,int *); 1720 int pbs_rescrelease(int,int); 1721 int pbs_rerunjob(int,char *,char *); 1722 int pbs_rlsjob(int,char *,char *,char *); 1723 int pbs_runjob(int,char *,char *,char *); 1724 char **pbs_selectjob(int,struct attropl *,char *); 1725 int pbs_sigjob(int,char *,char *,char *); 1726 void pbs_statfree(struct batch_status *); 1727 struct batch_status *pbs_statjob(int,char *,struct attrl *,char *); 1728 struct batch_status *pbs_selstat(int,struct attropl *,char *); 1729 struct batch_status *pbs_statque(int,char *,struct attrl *,char *); 1730 struct batch_status *pbs_statserver(int,struct attrl *,char *); 1731 struct batch_status *pbs_statnode(int,char *,struct attrl *,char *); 1732 char *pbs_submit(int,struct attropl *,char *,char *,char *); 1733 int pbs_terminate(int,int,char *); 1734 int totpool(int,int); 1735 int usepool(int,int); 1736 1737 SWIGINTERNSHORT int 1738 SWIG_CheckUnsignedLongInRange(unsigned long value, 1739 unsigned long max_value, 1740 const char *errmsg) 1741 { 1742 if (value > max_value) { 1743 if (errmsg) { 1744 PyErr_Format(PyExc_OverflowError, 1745 "value %lu is greater than '%s' minimum %lu", 1746 value, errmsg, max_value); 1747 } 1748 return 0; 1749 } 1750 return 1; 1751 } 1752 1753 1754 SWIGINTERN int 1755 SWIG_AsVal_unsigned_SS_long(PyObject *obj, unsigned long *val) 2876 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 1756 2877 { 1757 2878 if (PyInt_Check(obj)) { 1758 long v = PyInt_A S_LONG(obj);2879 long v = PyInt_AsLong(obj); 1759 2880 if (v >= 0) { 1760 2881 if (val) *val = v; 1761 return 1; 1762 } 1763 } 1764 if (PyLong_Check(obj)) { 2882 return SWIG_OK; 2883 } else { 2884 return SWIG_OverflowError; 2885 } 2886 } else if (PyLong_Check(obj)) { 1765 2887 unsigned long v = PyLong_AsUnsignedLong(obj); 1766 2888 if (!PyErr_Occurred()) { 1767 2889 if (val) *val = v; 1768 return 1;2890 return SWIG_OK; 1769 2891 } else { 1770 if (!val) PyErr_Clear(); 1771 return 0; 1772 } 1773 } 1774 if (val) { 1775 SWIG_type_error("unsigned long", obj); 1776 } 1777 return 0; 1778 } 1779 1780 1781 #if UINT_MAX != ULONG_MAX 2892 PyErr_Clear(); 2893 } 2894 } 2895 #ifdef SWIG_PYTHON_CAST_MODE 2896 { 2897 int dispatch = 0; 2898 unsigned long v = PyLong_AsUnsignedLong(obj); 2899 if (!PyErr_Occurred()) { 2900 if (val) *val = v; 2901 return SWIG_AddCast(SWIG_OK); 2902 } else { 2903 PyErr_Clear(); 2904 } 2905 if (!dispatch) { 2906 double d; 2907 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); 2908 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { 2909 if (val) *val = (unsigned long)(d); 2910 return res; 2911 } 2912 } 2913 } 2914 #endif 2915 return SWIG_TypeError; 2916 } 2917 2918 1782 2919 SWIGINTERN int 1783 SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) 2920 SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) 2921 { 2922 unsigned long v; 2923 int res = SWIG_AsVal_unsigned_SS_long (obj, &v); 2924 if (SWIG_IsOK(res)) { 2925 if ((v > UINT_MAX)) { 2926 return SWIG_OverflowError; 2927 } else { 2928 if (val) *val = (unsigned int)(v); 2929 } 2930 } 2931 return res; 2932 } 2933 2934 2935 SWIGINTERN int 2936 SWIG_AsCharArray(PyObject * obj, char *val, size_t size) 1784 2937 { 1785 const char* errmsg = val ? "unsigned int" : (char*)0; 1786 unsigned long v; 1787 if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { 1788 if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) { 1789 if (val) *val = (unsigned int)(v); 1790 return 1; 1791 } 1792 } else { 1793 PyErr_Clear(); 1794 } 1795 if (val) { 1796 SWIG_type_error(errmsg, obj); 1797 } 1798 return 0; 1799 } 1800 #else 1801 SWIGINTERNSHORT unsigned int 1802 SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) 1803 { 1804 return SWIG_AsVal_unsigned_SS_long(obj,(unsigned long *)val); 1805 } 1806 #endif 1807 1808 1809 SWIGINTERNSHORT unsigned int 1810 SWIG_As_unsigned_SS_int(PyObject* obj) 1811 { 1812 unsigned int v; 1813 if (!SWIG_AsVal_unsigned_SS_int(obj, &v)) { 1814 /* 1815 this is needed to make valgrind/purify happier. 1816 */ 1817 memset((void*)&v, 0, sizeof(unsigned int)); 1818 } 1819 return v; 1820 } 1821 1822 1823 SWIGINTERNSHORT int 1824 SWIG_Check_unsigned_SS_int(PyObject* obj) 1825 { 1826 return SWIG_AsVal_unsigned_SS_int(obj, (unsigned int*)0); 1827 } 1828 1829 extern long *log_event_mask; 1830 void log_close(int); 1831 void log_err(int,char *,char *); 1832 void log_event(int,int,char *,char *); 1833 int log_open(char *,char *); 1834 void log_record(int,int,char *,char *); 1835 extern char log_buffer[4096]; 1836 1837 SWIGINTERN int 1838 SWIG_AsCharArray(PyObject *obj, char *val, size_t size) 1839 { 1840 char* cptr; size_t csize; 1841 if (SWIG_AsCharPtrAndSize(obj, &cptr, &csize)) { 1842 /* in C you can do: 1843 1844 char x[5] = "hello"; 1845 1846 ie, assing the array using an extra '0' char. 1847 */ 1848 if ((csize == size + 1) && !(cptr[csize-1])) --csize; 2938 char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; 2939 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); 2940 if (SWIG_IsOK(res)) { 2941 if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; 1849 2942 if (csize <= size) { 1850 2943 if (val) { 1851 if (csize) memcpy(val, cptr, csize );1852 if (csize < size) memset(val + csize, 0, size - csize);2944 if (csize) memcpy(val, cptr, csize*sizeof(char)); 2945 if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); 1853 2946 } 1854 return 1; 1855 } 1856 } 1857 if (val) { 1858 PyErr_Format(PyExc_TypeError, 1859 "a char array of maximum size %lu is expected", 1860 (unsigned long) size); 1861 } 1862 return 0; 1863 } 1864 1865 1866 SWIGINTERNSHORT PyObject * 1867 SWIG_FromCharArray(const char* carray, size_t size) 1868 { 1869 if (size > INT_MAX) { 1870 return Py_None; 1871 } else { 1872 return PyString_FromStringAndSize(carray, (int)(size)); 1873 } 1874 } 1875 1876 int setup_env(char *); 1877 int chk_file_sec(char *,int,int,int,int); 2947 if (alloc == SWIG_NEWOBJ) { 2948 free((char*)cptr); 2949 res = SWIG_DelNewMask(res); 2950 } 2951 return res; 2952 } 2953 if (alloc == SWIG_NEWOBJ) free((char*)cptr); 2954 } 2955 return SWIG_TypeError; 2956 } 2957 1878 2958 #ifdef __cplusplus 1879 2959 extern "C" { 1880 2960 #endif 1881 static PyObject *_wrap_new_attrl(PyObject *self, PyObject *args) { 1882 PyObject *resultobj; 1883 int arg1 ; 1884 struct attrl *result; 1885 PyObject * obj0 = 0 ; 1886 1887 if(!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) goto fail; 1888 { 1889 arg1 = (int)(SWIG_As_int(obj0)); 1890 if (SWIG_arg_fail(1)) SWIG_fail; 1891 } 1892 result = (struct attrl *)new_attrl(arg1); 1893 1894 { 1895 PyObject *obj_batch; 1896 struct attrl *ptr; 1897 int i=0, len=0; 2961 SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 2962 PyObject *resultobj = 0; 2963 int arg1 ; 2964 struct attrl *result = 0 ; 2965 int val1 ; 2966 int ecode1 = 0 ; 2967 PyObject * obj0 = 0 ; 2968 2969 if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail; 2970 ecode1 = SWIG_AsVal_int(obj0, &val1); 2971 if (!SWIG_IsOK(ecode1)) { 2972 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'"); 2973 } 2974 arg1 = (int)(val1); 2975 result = (struct attrl *)new_attrl(arg1); 2976 { 2977 PyObject *obj_batch; 2978 struct attrl *ptr; 2979 int i=0, len=0; 2980 2981 if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); 2982 2983 ptr = result; 2984 while (ptr != NULL) { 2985 len++; 2986 ptr = ptr->next; 2987 } 2988 resultobj = PyList_New(len); 2989 2990 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 2991 2992 if (SARA_DEBUG) printf("\t<Contents>\n"); 2993 ptr = result; 2994 for (i=0; i < len; i++) { 2995 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 2996 PyList_SetItem(resultobj, i, obj_batch); 2997 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 2998 ptr = ptr->next; 2999 } 3000 if (SARA_DEBUG) printf("\t</Contents>\n"); 3001 } 3002 return resultobj; 3003 fail: 3004 return NULL; 3005 } 3006 3007 3008 SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3009 PyObject *resultobj = 0; 3010 int arg1 ; 3011 struct attropl *result = 0 ; 3012 int val1 ; 3013 int ecode1 = 0 ; 3014 PyObject * obj0 = 0 ; 3015 3016 if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail; 3017 ecode1 = SWIG_AsVal_int(obj0, &val1); 3018 if (!SWIG_IsOK(ecode1)) { 3019 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'"); 3020 } 3021 arg1 = (int)(val1); 3022 result = (struct attropl *)new_attropl(arg1); 3023 { 3024 PyObject *obj_batch; 3025 struct attropl *ptr; 3026 int i=0, len=0; 3027 3028 if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n"); 3029 3030 ptr = result; 3031 while (ptr != NULL) { 3032 len++; 3033 ptr = ptr->next; 3034 } 3035 resultobj = PyList_New(len); 3036 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 3037 3038 if (SARA_DEBUG) printf("\t<Contents>\n"); 3039 ptr = result; 3040 for (i=0; i < len; i++) { 3041 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 3042 PyList_SetItem(resultobj, i, obj_batch); 3043 ptr = ptr->next; 3044 } 3045 if (SARA_DEBUG) printf("\t</Contents>\n"); 3046 } 3047 return resultobj; 3048 fail: 3049 return NULL; 3050 } 3051 3052 3053 SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3054 PyObject *resultobj = 0; 3055 struct batch_status *result = 0 ; 3056 3057 if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail; 3058 result = (struct batch_status *)new_batch_status(); 3059 { 3060 PyObject *obj_batch; 3061 struct batch_status *ptr; 3062 int i=0, len=0; 3063 3064 // printf("Ja we are in bussniss\n"); 3065 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 3066 3067 // Deterime length of list 3068 // 3069 ptr = result; 3070 while (ptr != NULL) { 3071 len++; 3072 ptr = ptr->next; 3073 } 3074 resultobj = PyList_New(len); 3075 3076 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 3077 3078 // Make a list of batch_status pointers 3079 // 3080 if (SARA_DEBUG) printf("\t<Contents>\n"); 3081 ptr = result; 3082 for (i=0; i < len; i++) { 3083 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 3084 PyList_SetItem(resultobj, i, obj_batch); 3085 if (SARA_DEBUG) { 3086 printf("\t\t- %s\n", ptr->name); 3087 } 3088 ptr = ptr->next; 3089 } 3090 if (SARA_DEBUG) printf("\t</Contents>\n"); 3091 } 3092 return resultobj; 3093 fail: 3094 return NULL; 3095 } 3096 3097 3098 SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3099 PyObject *resultobj = 0; 3100 int result; 3101 3102 if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail; 3103 result = (int)get_error(); 3104 resultobj = SWIG_From_int((int)(result)); 3105 return resultobj; 3106 fail: 3107 return NULL; 3108 } 3109 3110 3111 SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3112 PyObject *resultobj = 0; 3113 struct attrl *arg1 = (struct attrl *) 0 ; 3114 char *arg2 = (char *) 0 ; 3115 void *argp1 = 0 ; 3116 int res1 = 0 ; 3117 int res2 ; 3118 char *buf2 = 0 ; 3119 int alloc2 = 0 ; 3120 PyObject * obj0 = 0 ; 3121 PyObject * obj1 = 0 ; 3122 3123 if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail; 3124 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3125 if (!SWIG_IsOK(res1)) { 3126 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 3127 } 3128 arg1 = (struct attrl *)(argp1); 3129 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3130 if (!SWIG_IsOK(res2)) { 3131 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'"); 3132 } 3133 arg2 = buf2; 3134 if (arg1->name) free((char*)arg1->name); 3135 if (arg2) { 3136 size_t size = strlen(arg2) + 1; 3137 arg1->name = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3138 } else { 3139 arg1->name = 0; 3140 } 3141 resultobj = SWIG_Py_Void(); 3142 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3143 return resultobj; 3144 fail: 3145 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3146 return NULL; 3147 } 3148 3149 3150 SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3151 PyObject *resultobj = 0; 3152 struct attrl *arg1 = (struct attrl *) 0 ; 3153 char *result = 0 ; 3154 void *argp1 = 0 ; 3155 int res1 = 0 ; 3156 PyObject * obj0 = 0 ; 3157 3158 if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail; 3159 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3160 if (!SWIG_IsOK(res1)) { 3161 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 3162 } 3163 arg1 = (struct attrl *)(argp1); 3164 result = (char *) ((arg1)->name); 3165 resultobj = SWIG_FromCharPtr(result); 3166 return resultobj; 3167 fail: 3168 return NULL; 3169 } 3170 3171 3172 SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3173 PyObject *resultobj = 0; 3174 struct attrl *arg1 = (struct attrl *) 0 ; 3175 char *arg2 = (char *) 0 ; 3176 void *argp1 = 0 ; 3177 int res1 = 0 ; 3178 int res2 ; 3179 char *buf2 = 0 ; 3180 int alloc2 = 0 ; 3181 PyObject * obj0 = 0 ; 3182 PyObject * obj1 = 0 ; 3183 3184 if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail; 3185 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3186 if (!SWIG_IsOK(res1)) { 3187 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 3188 } 3189 arg1 = (struct attrl *)(argp1); 3190 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3191 if (!SWIG_IsOK(res2)) { 3192 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'"); 3193 } 3194 arg2 = buf2; 3195 if (arg1->resource) free((char*)arg1->resource); 3196 if (arg2) { 3197 size_t size = strlen(arg2) + 1; 3198 arg1->resource = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3199 } else { 3200 arg1->resource = 0; 3201 } 3202 resultobj = SWIG_Py_Void(); 3203 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3204 return resultobj; 3205 fail: 3206 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3207 return NULL; 3208 } 3209 3210 3211 SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3212 PyObject *resultobj = 0; 3213 struct attrl *arg1 = (struct attrl *) 0 ; 3214 char *result = 0 ; 3215 void *argp1 = 0 ; 3216 int res1 = 0 ; 3217 PyObject * obj0 = 0 ; 3218 3219 if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail; 3220 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3221 if (!SWIG_IsOK(res1)) { 3222 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 3223 } 3224 arg1 = (struct attrl *)(argp1); 3225 result = (char *) ((arg1)->resource); 3226 resultobj = SWIG_FromCharPtr(result); 3227 return resultobj; 3228 fail: 3229 return NULL; 3230 } 3231 3232 3233 SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3234 PyObject *resultobj = 0; 3235 struct attrl *arg1 = (struct attrl *) 0 ; 3236 char *arg2 = (char *) 0 ; 3237 void *argp1 = 0 ; 3238 int res1 = 0 ; 3239 int res2 ; 3240 char *buf2 = 0 ; 3241 int alloc2 = 0 ; 3242 PyObject * obj0 = 0 ; 3243 PyObject * obj1 = 0 ; 3244 3245 if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail; 3246 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3247 if (!SWIG_IsOK(res1)) { 3248 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 3249 } 3250 arg1 = (struct attrl *)(argp1); 3251 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3252 if (!SWIG_IsOK(res2)) { 3253 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'"); 3254 } 3255 arg2 = buf2; 3256 if (arg1->value) free((char*)arg1->value); 3257 if (arg2) { 3258 size_t size = strlen(arg2) + 1; 3259 arg1->value = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3260 } else { 3261 arg1->value = 0; 3262 } 3263 resultobj = SWIG_Py_Void(); 3264 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3265 return resultobj; 3266 fail: 3267 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3268 return NULL; 3269 } 3270 3271 3272 SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3273 PyObject *resultobj = 0; 3274 struct attrl *arg1 = (struct attrl *) 0 ; 3275 char *result = 0 ; 3276 void *argp1 = 0 ; 3277 int res1 = 0 ; 3278 PyObject * obj0 = 0 ; 3279 3280 if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail; 3281 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3282 if (!SWIG_IsOK(res1)) { 3283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 3284 } 3285 arg1 = (struct attrl *)(argp1); 3286 result = (char *) ((arg1)->value); 3287 resultobj = SWIG_FromCharPtr(result); 3288 return resultobj; 3289 fail: 3290 return NULL; 3291 } 3292 3293 3294 SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3295 PyObject *resultobj = 0; 3296 struct attrl *arg1 = (struct attrl *) 0 ; 3297 enum batch_op arg2 ; 3298 void *argp1 = 0 ; 3299 int res1 = 0 ; 3300 int val2 ; 3301 int ecode2 = 0 ; 3302 PyObject * obj0 = 0 ; 3303 PyObject * obj1 = 0 ; 3304 3305 if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail; 3306 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3307 if (!SWIG_IsOK(res1)) { 3308 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 3309 } 3310 arg1 = (struct attrl *)(argp1); 3311 ecode2 = SWIG_AsVal_int(obj1, &val2); 3312 if (!SWIG_IsOK(ecode2)) { 3313 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'"); 3314 } 3315 arg2 = (enum batch_op)(val2); 3316 if (arg1) (arg1)->op = arg2; 3317 3318 resultobj = SWIG_Py_Void(); 3319 return resultobj; 3320 fail: 3321 return NULL; 3322 } 3323 3324 3325 SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3326 PyObject *resultobj = 0; 3327 struct attrl *arg1 = (struct attrl *) 0 ; 3328 enum batch_op result; 3329 void *argp1 = 0 ; 3330 int res1 = 0 ; 3331 PyObject * obj0 = 0 ; 3332 3333 if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail; 3334 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3335 if (!SWIG_IsOK(res1)) { 3336 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 3337 } 3338 arg1 = (struct attrl *)(argp1); 3339 result = (enum batch_op) ((arg1)->op); 3340 resultobj = SWIG_From_int((int)(result)); 3341 return resultobj; 3342 fail: 3343 return NULL; 3344 } 3345 3346 3347 SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3348 PyObject *resultobj = 0; 3349 struct attrl *arg1 = (struct attrl *) 0 ; 3350 char *result = 0 ; 3351 void *argp1 = 0 ; 3352 int res1 = 0 ; 3353 PyObject * obj0 = 0 ; 3354 3355 if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail; 3356 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); 3357 if (!SWIG_IsOK(res1)) { 3358 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 3359 } 3360 arg1 = (struct attrl *)(argp1); 3361 result = (char *)attrl___str__(arg1); 3362 resultobj = SWIG_FromCharPtr(result); 3363 return resultobj; 3364 fail: 3365 return NULL; 3366 } 3367 3368 3369 SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3370 PyObject *resultobj = 0; 3371 struct attrl *arg1 = (struct attrl *) 0 ; 3372 void *argp1 = 0 ; 3373 int res1 = 0 ; 3374 PyObject * obj0 = 0 ; 3375 3376 if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail; 3377 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN | 0 ); 3378 if (!SWIG_IsOK(res1)) { 3379 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 3380 } 3381 arg1 = (struct attrl *)(argp1); 3382 delete_attrl(arg1); 3383 3384 resultobj = SWIG_Py_Void(); 3385 return resultobj; 3386 fail: 3387 return NULL; 3388 } 3389 3390 3391 SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3392 PyObject *obj; 3393 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; 3394 SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj)); 3395 return SWIG_Py_Void(); 3396 } 3397 3398 SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3399 PyObject *resultobj = 0; 3400 struct attropl *arg1 = (struct attropl *) 0 ; 3401 char *arg2 = (char *) 0 ; 3402 void *argp1 = 0 ; 3403 int res1 = 0 ; 3404 int res2 ; 3405 char *buf2 = 0 ; 3406 int alloc2 = 0 ; 3407 PyObject * obj0 = 0 ; 3408 PyObject * obj1 = 0 ; 3409 3410 if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail; 3411 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3412 if (!SWIG_IsOK(res1)) { 3413 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 3414 } 3415 arg1 = (struct attropl *)(argp1); 3416 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3417 if (!SWIG_IsOK(res2)) { 3418 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'"); 3419 } 3420 arg2 = buf2; 3421 if (arg1->name) free((char*)arg1->name); 3422 if (arg2) { 3423 size_t size = strlen(arg2) + 1; 3424 arg1->name = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3425 } else { 3426 arg1->name = 0; 3427 } 3428 resultobj = SWIG_Py_Void(); 3429 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3430 return resultobj; 3431 fail: 3432 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3433 return NULL; 3434 } 3435 3436 3437 SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3438 PyObject *resultobj = 0; 3439 struct attropl *arg1 = (struct attropl *) 0 ; 3440 char *result = 0 ; 3441 void *argp1 = 0 ; 3442 int res1 = 0 ; 3443 PyObject * obj0 = 0 ; 3444 3445 if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail; 3446 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3447 if (!SWIG_IsOK(res1)) { 3448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 3449 } 3450 arg1 = (struct attropl *)(argp1); 3451 result = (char *) ((arg1)->name); 3452 resultobj = SWIG_FromCharPtr(result); 3453 return resultobj; 3454 fail: 3455 return NULL; 3456 } 3457 3458 3459 SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3460 PyObject *resultobj = 0; 3461 struct attropl *arg1 = (struct attropl *) 0 ; 3462 char *arg2 = (char *) 0 ; 3463 void *argp1 = 0 ; 3464 int res1 = 0 ; 3465 int res2 ; 3466 char *buf2 = 0 ; 3467 int alloc2 = 0 ; 3468 PyObject * obj0 = 0 ; 3469 PyObject * obj1 = 0 ; 3470 3471 if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail; 3472 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3473 if (!SWIG_IsOK(res1)) { 3474 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 3475 } 3476 arg1 = (struct attropl *)(argp1); 3477 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3478 if (!SWIG_IsOK(res2)) { 3479 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'"); 3480 } 3481 arg2 = buf2; 3482 if (arg1->resource) free((char*)arg1->resource); 3483 if (arg2) { 3484 size_t size = strlen(arg2) + 1; 3485 arg1->resource = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3486 } else { 3487 arg1->resource = 0; 3488 } 3489 resultobj = SWIG_Py_Void(); 3490 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3491 return resultobj; 3492 fail: 3493 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3494 return NULL; 3495 } 3496 3497 3498 SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3499 PyObject *resultobj = 0; 3500 struct attropl *arg1 = (struct attropl *) 0 ; 3501 char *result = 0 ; 3502 void *argp1 = 0 ; 3503 int res1 = 0 ; 3504 PyObject * obj0 = 0 ; 3505 3506 if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail; 3507 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3508 if (!SWIG_IsOK(res1)) { 3509 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 3510 } 3511 arg1 = (struct attropl *)(argp1); 3512 result = (char *) ((arg1)->resource); 3513 resultobj = SWIG_FromCharPtr(result); 3514 return resultobj; 3515 fail: 3516 return NULL; 3517 } 3518 3519 3520 SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3521 PyObject *resultobj = 0; 3522 struct attropl *arg1 = (struct attropl *) 0 ; 3523 char *arg2 = (char *) 0 ; 3524 void *argp1 = 0 ; 3525 int res1 = 0 ; 3526 int res2 ; 3527 char *buf2 = 0 ; 3528 int alloc2 = 0 ; 3529 PyObject * obj0 = 0 ; 3530 PyObject * obj1 = 0 ; 3531 3532 if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail; 3533 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3534 if (!SWIG_IsOK(res1)) { 3535 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 3536 } 3537 arg1 = (struct attropl *)(argp1); 3538 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3539 if (!SWIG_IsOK(res2)) { 3540 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'"); 3541 } 3542 arg2 = buf2; 3543 if (arg1->value) free((char*)arg1->value); 3544 if (arg2) { 3545 size_t size = strlen(arg2) + 1; 3546 arg1->value = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3547 } else { 3548 arg1->value = 0; 3549 } 3550 resultobj = SWIG_Py_Void(); 3551 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3552 return resultobj; 3553 fail: 3554 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3555 return NULL; 3556 } 3557 3558 3559 SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3560 PyObject *resultobj = 0; 3561 struct attropl *arg1 = (struct attropl *) 0 ; 3562 char *result = 0 ; 3563 void *argp1 = 0 ; 3564 int res1 = 0 ; 3565 PyObject * obj0 = 0 ; 3566 3567 if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail; 3568 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3569 if (!SWIG_IsOK(res1)) { 3570 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 3571 } 3572 arg1 = (struct attropl *)(argp1); 3573 result = (char *) ((arg1)->value); 3574 resultobj = SWIG_FromCharPtr(result); 3575 return resultobj; 3576 fail: 3577 return NULL; 3578 } 3579 3580 3581 SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3582 PyObject *resultobj = 0; 3583 struct attropl *arg1 = (struct attropl *) 0 ; 3584 enum batch_op arg2 ; 3585 void *argp1 = 0 ; 3586 int res1 = 0 ; 3587 int val2 ; 3588 int ecode2 = 0 ; 3589 PyObject * obj0 = 0 ; 3590 PyObject * obj1 = 0 ; 3591 3592 if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail; 3593 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3594 if (!SWIG_IsOK(res1)) { 3595 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 3596 } 3597 arg1 = (struct attropl *)(argp1); 3598 ecode2 = SWIG_AsVal_int(obj1, &val2); 3599 if (!SWIG_IsOK(ecode2)) { 3600 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'"); 3601 } 3602 arg2 = (enum batch_op)(val2); 3603 if (arg1) (arg1)->op = arg2; 3604 3605 resultobj = SWIG_Py_Void(); 3606 return resultobj; 3607 fail: 3608 return NULL; 3609 } 3610 3611 3612 SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3613 PyObject *resultobj = 0; 3614 struct attropl *arg1 = (struct attropl *) 0 ; 3615 enum batch_op result; 3616 void *argp1 = 0 ; 3617 int res1 = 0 ; 3618 PyObject * obj0 = 0 ; 3619 3620 if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail; 3621 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3622 if (!SWIG_IsOK(res1)) { 3623 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 3624 } 3625 arg1 = (struct attropl *)(argp1); 3626 result = (enum batch_op) ((arg1)->op); 3627 resultobj = SWIG_From_int((int)(result)); 3628 return resultobj; 3629 fail: 3630 return NULL; 3631 } 3632 3633 3634 SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3635 PyObject *resultobj = 0; 3636 struct attropl *arg1 = (struct attropl *) 0 ; 3637 char *result = 0 ; 3638 void *argp1 = 0 ; 3639 int res1 = 0 ; 3640 PyObject * obj0 = 0 ; 3641 3642 if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail; 3643 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); 3644 if (!SWIG_IsOK(res1)) { 3645 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 3646 } 3647 arg1 = (struct attropl *)(argp1); 3648 result = (char *)attropl___str__(arg1); 3649 resultobj = SWIG_FromCharPtr(result); 3650 return resultobj; 3651 fail: 3652 return NULL; 3653 } 3654 3655 3656 SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3657 PyObject *resultobj = 0; 3658 struct attropl *arg1 = (struct attropl *) 0 ; 3659 void *argp1 = 0 ; 3660 int res1 = 0 ; 3661 PyObject * obj0 = 0 ; 3662 3663 if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail; 3664 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN | 0 ); 3665 if (!SWIG_IsOK(res1)) { 3666 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 3667 } 3668 arg1 = (struct attropl *)(argp1); 3669 delete_attropl(arg1); 3670 3671 resultobj = SWIG_Py_Void(); 3672 return resultobj; 3673 fail: 3674 return NULL; 3675 } 3676 3677 3678 SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3679 PyObject *obj; 3680 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; 3681 SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj)); 3682 return SWIG_Py_Void(); 3683 } 3684 3685 SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3686 PyObject *resultobj = 0; 3687 struct batch_status *arg1 = (struct batch_status *) 0 ; 3688 char *arg2 = (char *) 0 ; 3689 void *argp1 = 0 ; 3690 int res1 = 0 ; 3691 int res2 ; 3692 char *buf2 = 0 ; 3693 int alloc2 = 0 ; 3694 PyObject * obj0 = 0 ; 3695 PyObject * obj1 = 0 ; 3696 3697 if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail; 3698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3699 if (!SWIG_IsOK(res1)) { 3700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 3701 } 3702 arg1 = (struct batch_status *)(argp1); 3703 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3704 if (!SWIG_IsOK(res2)) { 3705 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'"); 3706 } 3707 arg2 = buf2; 3708 if (arg1->name) free((char*)arg1->name); 3709 if (arg2) { 3710 size_t size = strlen(arg2) + 1; 3711 arg1->name = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3712 } else { 3713 arg1->name = 0; 3714 } 3715 resultobj = SWIG_Py_Void(); 3716 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3717 return resultobj; 3718 fail: 3719 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3720 return NULL; 3721 } 3722 3723 3724 SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3725 PyObject *resultobj = 0; 3726 struct batch_status *arg1 = (struct batch_status *) 0 ; 3727 char *result = 0 ; 3728 void *argp1 = 0 ; 3729 int res1 = 0 ; 3730 PyObject * obj0 = 0 ; 3731 3732 if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail; 3733 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3734 if (!SWIG_IsOK(res1)) { 3735 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 3736 } 3737 arg1 = (struct batch_status *)(argp1); 3738 result = (char *) ((arg1)->name); 3739 resultobj = SWIG_FromCharPtr(result); 3740 return resultobj; 3741 fail: 3742 return NULL; 3743 } 3744 3745 3746 SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3747 PyObject *resultobj = 0; 3748 struct batch_status *arg1 = (struct batch_status *) 0 ; 3749 struct attrl *arg2 = (struct attrl *) 0 ; 3750 void *argp1 = 0 ; 3751 int res1 = 0 ; 3752 void *argp2 = 0 ; 3753 int res2 = 0 ; 3754 PyObject * obj0 = 0 ; 3755 PyObject * obj1 = 0 ; 3756 3757 if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail; 3758 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3759 if (!SWIG_IsOK(res1)) { 3760 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 3761 } 3762 arg1 = (struct batch_status *)(argp1); 3763 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN | 0 ); 3764 if (!SWIG_IsOK(res2)) { 3765 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 3766 } 3767 arg2 = (struct attrl *)(argp2); 3768 if (arg1) (arg1)->attribs = arg2; 3769 3770 resultobj = SWIG_Py_Void(); 3771 return resultobj; 3772 fail: 3773 return NULL; 3774 } 3775 3776 3777 SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3778 PyObject *resultobj = 0; 3779 struct batch_status *arg1 = (struct batch_status *) 0 ; 3780 struct attrl *result = 0 ; 3781 void *argp1 = 0 ; 3782 int res1 = 0 ; 3783 PyObject * obj0 = 0 ; 3784 3785 if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail; 3786 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3787 if (!SWIG_IsOK(res1)) { 3788 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 3789 } 3790 arg1 = (struct batch_status *)(argp1); 3791 result = (struct attrl *) ((arg1)->attribs); 3792 { 3793 PyObject *obj_batch; 3794 struct attrl *ptr; 3795 int i=0, len=0; 3796 3797 if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); 3798 3799 ptr = result; 3800 while (ptr != NULL) { 3801 len++; 3802 ptr = ptr->next; 3803 } 3804 resultobj = PyList_New(len); 3805 3806 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 3807 3808 if (SARA_DEBUG) printf("\t<Contents>\n"); 3809 ptr = result; 3810 for (i=0; i < len; i++) { 3811 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 3812 PyList_SetItem(resultobj, i, obj_batch); 3813 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 3814 ptr = ptr->next; 3815 } 3816 if (SARA_DEBUG) printf("\t</Contents>\n"); 3817 } 3818 return resultobj; 3819 fail: 3820 return NULL; 3821 } 3822 3823 3824 SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3825 PyObject *resultobj = 0; 3826 struct batch_status *arg1 = (struct batch_status *) 0 ; 3827 char *arg2 = (char *) 0 ; 3828 void *argp1 = 0 ; 3829 int res1 = 0 ; 3830 int res2 ; 3831 char *buf2 = 0 ; 3832 int alloc2 = 0 ; 3833 PyObject * obj0 = 0 ; 3834 PyObject * obj1 = 0 ; 3835 3836 if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail; 3837 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3838 if (!SWIG_IsOK(res1)) { 3839 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 3840 } 3841 arg1 = (struct batch_status *)(argp1); 3842 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3843 if (!SWIG_IsOK(res2)) { 3844 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'"); 3845 } 3846 arg2 = buf2; 3847 if (arg1->text) free((char*)arg1->text); 3848 if (arg2) { 3849 size_t size = strlen(arg2) + 1; 3850 arg1->text = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); 3851 } else { 3852 arg1->text = 0; 3853 } 3854 resultobj = SWIG_Py_Void(); 3855 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3856 return resultobj; 3857 fail: 3858 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3859 return NULL; 3860 } 3861 3862 3863 SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3864 PyObject *resultobj = 0; 3865 struct batch_status *arg1 = (struct batch_status *) 0 ; 3866 char *result = 0 ; 3867 void *argp1 = 0 ; 3868 int res1 = 0 ; 3869 PyObject * obj0 = 0 ; 3870 3871 if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail; 3872 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 3873 if (!SWIG_IsOK(res1)) { 3874 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 3875 } 3876 arg1 = (struct batch_status *)(argp1); 3877 result = (char *) ((arg1)->text); 3878 resultobj = SWIG_FromCharPtr(result); 3879 return resultobj; 3880 fail: 3881 return NULL; 3882 } 3883 3884 3885 SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3886 PyObject *obj; 3887 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; 3888 SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj)); 3889 return SWIG_Py_Void(); 3890 } 3891 3892 SWIGINTERN int pbs_errno_set(PyObject *_val) { 3893 { 3894 int val; 3895 int res = SWIG_AsVal_int(_val, &val); 3896 if (!SWIG_IsOK(res)) { 3897 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'"); 3898 } 3899 pbs_errno = (int)(val); 3900 } 3901 return 0; 3902 fail: 3903 return 1; 3904 } 3905 3906 3907 SWIGINTERN PyObject *pbs_errno_get(void) { 3908 PyObject *pyobj = 0; 3909 3910 pyobj = SWIG_From_int((int)(pbs_errno)); 3911 return pyobj; 3912 } 3913 3914 3915 SWIGINTERN int pbs_server_set(PyObject *_val) { 3916 { 3917 char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ; 3918 int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc); 3919 if (!SWIG_IsOK(res)) { 3920 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'"); 3921 } 3922 if (pbs_server) free((char*)pbs_server); 3923 if (alloc == SWIG_NEWOBJ) { 3924 pbs_server = cptr; 3925 } else { 3926 pbs_server = csize ? (char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0; 3927 } 3928 } 3929 return 0; 3930 fail: 3931 return 1; 3932 } 3933 3934 3935 SWIGINTERN PyObject *pbs_server_get(void) { 3936 PyObject *pyobj = 0; 3937 3938 pyobj = SWIG_FromCharPtr(pbs_server); 3939 return pyobj; 3940 } 3941 3942 3943 SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3944 PyObject *resultobj = 0; 3945 int arg1 ; 3946 char *arg2 = (char *) 0 ; 3947 char *result = 0 ; 3948 int val1 ; 3949 int ecode1 = 0 ; 3950 int res2 ; 3951 char *buf2 = 0 ; 3952 int alloc2 = 0 ; 3953 PyObject * obj0 = 0 ; 3954 PyObject * obj1 = 0 ; 3955 3956 if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail; 3957 ecode1 = SWIG_AsVal_int(obj0, &val1); 3958 if (!SWIG_IsOK(ecode1)) { 3959 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'"); 3960 } 3961 arg1 = (int)(val1); 3962 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3963 if (!SWIG_IsOK(res2)) { 3964 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'"); 3965 } 3966 arg2 = buf2; 3967 result = (char *)avail(arg1,arg2); 3968 resultobj = SWIG_FromCharPtr(result); 3969 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3970 return resultobj; 3971 fail: 3972 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3973 return NULL; 3974 } 3975 3976 3977 SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3978 PyObject *resultobj = 0; 3979 int arg1 ; 3980 char *arg2 = (char *) 0 ; 3981 char *arg3 = (char *) 0 ; 3982 char *arg4 = (char *) 0 ; 3983 int result; 3984 int val1 ; 3985 int ecode1 = 0 ; 3986 int res2 ; 3987 char *buf2 = 0 ; 3988 int alloc2 = 0 ; 3989 int res3 ; 3990 char *buf3 = 0 ; 3991 int alloc3 = 0 ; 3992 int res4 ; 3993 char *buf4 = 0 ; 3994 int alloc4 = 0 ; 3995 PyObject * obj0 = 0 ; 3996 PyObject * obj1 = 0 ; 3997 PyObject * obj2 = 0 ; 3998 PyObject * obj3 = 0 ; 3999 4000 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4001 ecode1 = SWIG_AsVal_int(obj0, &val1); 4002 if (!SWIG_IsOK(ecode1)) { 4003 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'"); 4004 } 4005 arg1 = (int)(val1); 4006 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4007 if (!SWIG_IsOK(res2)) { 4008 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'"); 4009 } 4010 arg2 = buf2; 4011 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4012 if (!SWIG_IsOK(res3)) { 4013 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'"); 4014 } 4015 arg3 = buf3; 4016 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4017 if (!SWIG_IsOK(res4)) { 4018 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'"); 4019 } 4020 arg4 = buf4; 4021 result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4); 4022 resultobj = SWIG_From_int((int)(result)); 4023 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4024 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4025 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4026 return resultobj; 4027 fail: 4028 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4029 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4030 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4031 return NULL; 4032 } 4033 4034 4035 SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4036 PyObject *resultobj = 0; 4037 int arg1 ; 4038 char *arg2 = (char *) 0 ; 4039 struct attrl *arg3 = (struct attrl *) 0 ; 4040 char *arg4 = (char *) 0 ; 4041 int result; 4042 int val1 ; 4043 int ecode1 = 0 ; 4044 int res2 ; 4045 char *buf2 = 0 ; 4046 int alloc2 = 0 ; 4047 int res4 ; 4048 char *buf4 = 0 ; 4049 int alloc4 = 0 ; 4050 PyObject * obj0 = 0 ; 4051 PyObject * obj1 = 0 ; 4052 PyObject * obj2 = 0 ; 4053 PyObject * obj3 = 0 ; 4054 4055 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4056 ecode1 = SWIG_AsVal_int(obj0, &val1); 4057 if (!SWIG_IsOK(ecode1)) { 4058 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'"); 4059 } 4060 arg1 = (int)(val1); 4061 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4062 if (!SWIG_IsOK(res2)) { 4063 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'"); 4064 } 4065 arg2 = buf2; 4066 { 4067 PyObject *py_obj; 4068 struct attrl *ptr, *prev; 4069 char s[255]; 4070 int i=0, size=0; 4071 4072 // printf("Python --> C\n"); 4073 4074 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 4075 4076 size = Get_List_Size(obj2); 4077 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4078 4079 if ( size == -1 ) { 4080 PyErr_SetString(PyExc_TypeError, "not a list"); 4081 return NULL; 4082 } 4083 4084 if (SARA_DEBUG) printf("\t<Contents>\n"); 4085 4086 arg3 = prev = NULL; 4087 for ( i=0; i < size; i++ ) { 4088 py_obj = PyList_GetItem(obj2, i); 4089 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 4090 sprintf(s,"list item %d has wrong type", i); 4091 PyErr_SetString(PyExc_TypeError, s); 4092 return NULL; 1898 4093 1899 if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); 4094 // This will skipp the wrong entry 4095 // continue; 4096 } 4097 4098 /* 4099 * Make first entry head of C linked list 4100 */ 4101 if ( i == 0) { 4102 arg3 = ptr; 4103 ptr->next = prev; 4104 } 4105 else { 4106 prev->next = ptr; 4107 ptr->next = NULL; 4108 } 4109 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 4110 4111 prev = ptr; 4112 4113 } // end for 4114 if (SARA_DEBUG) printf("\t</Contents>\n"); 4115 } 4116 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4117 if (!SWIG_IsOK(res4)) { 4118 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'"); 4119 } 4120 arg4 = buf4; 4121 result = (int)pbs_alterjob(arg1,arg2,arg3,arg4); 4122 resultobj = SWIG_From_int((int)(result)); 4123 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4124 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4125 return resultobj; 4126 fail: 4127 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4128 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4129 return NULL; 4130 } 4131 4132 4133 SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4134 PyObject *resultobj = 0; 4135 char *arg1 = (char *) 0 ; 4136 int result; 4137 int res1 ; 4138 char *buf1 = 0 ; 4139 int alloc1 = 0 ; 4140 PyObject * obj0 = 0 ; 4141 4142 if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail; 4143 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 4144 if (!SWIG_IsOK(res1)) { 4145 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'"); 4146 } 4147 arg1 = buf1; 4148 result = (int)pbs_connect(arg1); 4149 resultobj = SWIG_From_int((int)(result)); 4150 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 4151 return resultobj; 4152 fail: 4153 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 4154 return NULL; 4155 } 4156 4157 4158 SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4159 PyObject *resultobj = 0; 4160 int result; 4161 4162 if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail; 4163 result = (int)pbs_query_max_connections(); 4164 resultobj = SWIG_From_int((int)(result)); 4165 return resultobj; 4166 fail: 4167 return NULL; 4168 } 4169 4170 4171 SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4172 PyObject *resultobj = 0; 4173 char *result = 0 ; 4174 4175 if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail; 4176 result = (char *)pbs_default(); 4177 resultobj = SWIG_FromCharPtr(result); 4178 return resultobj; 4179 fail: 4180 return NULL; 4181 } 4182 4183 4184 SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4185 PyObject *resultobj = 0; 4186 int arg1 ; 4187 char *arg2 = (char *) 0 ; 4188 char *arg3 = (char *) 0 ; 4189 int result; 4190 int val1 ; 4191 int ecode1 = 0 ; 4192 int res2 ; 4193 char *buf2 = 0 ; 4194 int alloc2 = 0 ; 4195 int res3 ; 4196 char *buf3 = 0 ; 4197 int alloc3 = 0 ; 4198 PyObject * obj0 = 0 ; 4199 PyObject * obj1 = 0 ; 4200 PyObject * obj2 = 0 ; 4201 4202 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail; 4203 ecode1 = SWIG_AsVal_int(obj0, &val1); 4204 if (!SWIG_IsOK(ecode1)) { 4205 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'"); 4206 } 4207 arg1 = (int)(val1); 4208 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4209 if (!SWIG_IsOK(res2)) { 4210 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'"); 4211 } 4212 arg2 = buf2; 4213 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4214 if (!SWIG_IsOK(res3)) { 4215 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'"); 4216 } 4217 arg3 = buf3; 4218 result = (int)pbs_deljob(arg1,arg2,arg3); 4219 resultobj = SWIG_From_int((int)(result)); 4220 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4221 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4222 return resultobj; 4223 fail: 4224 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4225 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4226 return NULL; 4227 } 4228 4229 4230 SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4231 PyObject *resultobj = 0; 4232 int arg1 ; 4233 int result; 4234 int val1 ; 4235 int ecode1 = 0 ; 4236 PyObject * obj0 = 0 ; 4237 4238 if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail; 4239 ecode1 = SWIG_AsVal_int(obj0, &val1); 4240 if (!SWIG_IsOK(ecode1)) { 4241 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'"); 4242 } 4243 arg1 = (int)(val1); 4244 result = (int)pbs_disconnect(arg1); 4245 resultobj = SWIG_From_int((int)(result)); 4246 return resultobj; 4247 fail: 4248 return NULL; 4249 } 4250 4251 4252 SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4253 PyObject *resultobj = 0; 4254 int arg1 ; 4255 char *arg2 = (char *) 0 ; 4256 char *arg3 = (char *) 0 ; 4257 char *arg4 = (char *) 0 ; 4258 int result; 4259 int val1 ; 4260 int ecode1 = 0 ; 4261 int res2 ; 4262 char *buf2 = 0 ; 4263 int alloc2 = 0 ; 4264 int res3 ; 4265 char *buf3 = 0 ; 4266 int alloc3 = 0 ; 4267 int res4 ; 4268 char *buf4 = 0 ; 4269 int alloc4 = 0 ; 4270 PyObject * obj0 = 0 ; 4271 PyObject * obj1 = 0 ; 4272 PyObject * obj2 = 0 ; 4273 PyObject * obj3 = 0 ; 4274 4275 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4276 ecode1 = SWIG_AsVal_int(obj0, &val1); 4277 if (!SWIG_IsOK(ecode1)) { 4278 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'"); 4279 } 4280 arg1 = (int)(val1); 4281 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4282 if (!SWIG_IsOK(res2)) { 4283 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'"); 4284 } 4285 arg2 = buf2; 4286 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4287 if (!SWIG_IsOK(res3)) { 4288 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'"); 4289 } 4290 arg3 = buf3; 4291 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4292 if (!SWIG_IsOK(res4)) { 4293 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'"); 4294 } 4295 arg4 = buf4; 4296 result = (int)pbs_holdjob(arg1,arg2,arg3,arg4); 4297 resultobj = SWIG_From_int((int)(result)); 4298 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4299 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4300 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4301 return resultobj; 4302 fail: 4303 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4304 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4305 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4306 return NULL; 4307 } 4308 4309 4310 SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4311 PyObject *resultobj = 0; 4312 int arg1 ; 4313 char *arg2 = (char *) 0 ; 4314 char *arg3 = (char *) 0 ; 4315 char *result = 0 ; 4316 int val1 ; 4317 int ecode1 = 0 ; 4318 int res2 ; 4319 char *buf2 = 0 ; 4320 int alloc2 = 0 ; 4321 int res3 ; 4322 char *buf3 = 0 ; 4323 int alloc3 = 0 ; 4324 PyObject * obj0 = 0 ; 4325 PyObject * obj1 = 0 ; 4326 PyObject * obj2 = 0 ; 4327 4328 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail; 4329 ecode1 = SWIG_AsVal_int(obj0, &val1); 4330 if (!SWIG_IsOK(ecode1)) { 4331 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'"); 4332 } 4333 arg1 = (int)(val1); 4334 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4335 if (!SWIG_IsOK(res2)) { 4336 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'"); 4337 } 4338 arg2 = buf2; 4339 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4340 if (!SWIG_IsOK(res3)) { 4341 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'"); 4342 } 4343 arg3 = buf3; 4344 result = (char *)pbs_locjob(arg1,arg2,arg3); 4345 resultobj = SWIG_FromCharPtr(result); 4346 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4347 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4348 return resultobj; 4349 fail: 4350 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4351 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4352 return NULL; 4353 } 4354 4355 4356 SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4357 PyObject *resultobj = 0; 4358 int arg1 ; 4359 int arg2 ; 4360 int arg3 ; 4361 char *arg4 = (char *) 0 ; 4362 struct attropl *arg5 = (struct attropl *) 0 ; 4363 char *arg6 = (char *) 0 ; 4364 int result; 4365 int val1 ; 4366 int ecode1 = 0 ; 4367 int val2 ; 4368 int ecode2 = 0 ; 4369 int val3 ; 4370 int ecode3 = 0 ; 4371 int res4 ; 4372 char *buf4 = 0 ; 4373 int alloc4 = 0 ; 4374 int res6 ; 4375 char *buf6 = 0 ; 4376 int alloc6 = 0 ; 4377 PyObject * obj0 = 0 ; 4378 PyObject * obj1 = 0 ; 4379 PyObject * obj2 = 0 ; 4380 PyObject * obj3 = 0 ; 4381 PyObject * obj4 = 0 ; 4382 PyObject * obj5 = 0 ; 4383 4384 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; 4385 ecode1 = SWIG_AsVal_int(obj0, &val1); 4386 if (!SWIG_IsOK(ecode1)) { 4387 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'"); 4388 } 4389 arg1 = (int)(val1); 4390 ecode2 = SWIG_AsVal_int(obj1, &val2); 4391 if (!SWIG_IsOK(ecode2)) { 4392 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'"); 4393 } 4394 arg2 = (int)(val2); 4395 ecode3 = SWIG_AsVal_int(obj2, &val3); 4396 if (!SWIG_IsOK(ecode3)) { 4397 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'"); 4398 } 4399 arg3 = (int)(val3); 4400 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4401 if (!SWIG_IsOK(res4)) { 4402 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'"); 4403 } 4404 arg4 = buf4; 4405 { 4406 PyObject *py_obj; 4407 struct attropl *ptr, *prev; 4408 char s[255]; 4409 int i=0, size=0; 4410 4411 // printf("Python --> C\n"); 4412 4413 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 4414 4415 size = Get_List_Size(obj4); 4416 4417 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4418 4419 if ( size == -1 ) { 4420 PyErr_SetString(PyExc_TypeError, "not a list"); 4421 return NULL; 4422 } 4423 //printf("Size = %d\n", size); 4424 4425 if (SARA_DEBUG) printf("\t<Contents>\n"); 4426 4427 arg5 = prev = NULL; 4428 for ( i=0; i < size; i++ ) { 4429 py_obj = PyList_GetItem(obj4, i); 4430 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 4431 sprintf(s,"list item %d has wrong type", i); 4432 PyErr_SetString(PyExc_TypeError, s); 4433 return NULL; 1900 4434 1901 ptr = result; 1902 while (ptr != NULL) { 1903 len++; 1904 ptr = ptr->next; 1905 } 1906 resultobj = PyList_New(len); 4435 // This will skipp the wrong entry 4436 // continue; 4437 } 4438 4439 /* 4440 * Make first entry head of C linked list 4441 */ 4442 if ( i == 0) { 4443 arg5 = ptr; 4444 ptr->next = prev; 4445 } 4446 else { 4447 prev->next = ptr; 4448 ptr->next = NULL; 4449 } 4450 prev = ptr; 4451 4452 } // end for 4453 if (SARA_DEBUG) printf("\t</Contents>\n"); 4454 } 4455 res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); 4456 if (!SWIG_IsOK(res6)) { 4457 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'"); 4458 } 4459 arg6 = buf6; 4460 result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6); 4461 resultobj = SWIG_From_int((int)(result)); 4462 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4463 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); 4464 return resultobj; 4465 fail: 4466 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4467 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); 4468 return NULL; 4469 } 4470 4471 4472 SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4473 PyObject *resultobj = 0; 4474 int arg1 ; 4475 char *arg2 = (char *) 0 ; 4476 char *arg3 = (char *) 0 ; 4477 char *arg4 = (char *) 0 ; 4478 int result; 4479 int val1 ; 4480 int ecode1 = 0 ; 4481 int res2 ; 4482 char *buf2 = 0 ; 4483 int alloc2 = 0 ; 4484 int res3 ; 4485 char *buf3 = 0 ; 4486 int alloc3 = 0 ; 4487 int res4 ; 4488 char *buf4 = 0 ; 4489 int alloc4 = 0 ; 4490 PyObject * obj0 = 0 ; 4491 PyObject * obj1 = 0 ; 4492 PyObject * obj2 = 0 ; 4493 PyObject * obj3 = 0 ; 4494 4495 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4496 ecode1 = SWIG_AsVal_int(obj0, &val1); 4497 if (!SWIG_IsOK(ecode1)) { 4498 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'"); 4499 } 4500 arg1 = (int)(val1); 4501 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4502 if (!SWIG_IsOK(res2)) { 4503 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'"); 4504 } 4505 arg2 = buf2; 4506 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4507 if (!SWIG_IsOK(res3)) { 4508 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'"); 4509 } 4510 arg3 = buf3; 4511 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4512 if (!SWIG_IsOK(res4)) { 4513 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'"); 4514 } 4515 arg4 = buf4; 4516 result = (int)pbs_movejob(arg1,arg2,arg3,arg4); 4517 resultobj = SWIG_From_int((int)(result)); 4518 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4519 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4520 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4521 return resultobj; 4522 fail: 4523 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4524 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4525 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4526 return NULL; 4527 } 4528 4529 4530 SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4531 PyObject *resultobj = 0; 4532 int arg1 ; 4533 char *arg2 = (char *) 0 ; 4534 int arg3 ; 4535 char *arg4 = (char *) 0 ; 4536 char *arg5 = (char *) 0 ; 4537 int result; 4538 int val1 ; 4539 int ecode1 = 0 ; 4540 int res2 ; 4541 char *buf2 = 0 ; 4542 int alloc2 = 0 ; 4543 int val3 ; 4544 int ecode3 = 0 ; 4545 int res4 ; 4546 char *buf4 = 0 ; 4547 int alloc4 = 0 ; 4548 int res5 ; 4549 char *buf5 = 0 ; 4550 int alloc5 = 0 ; 4551 PyObject * obj0 = 0 ; 4552 PyObject * obj1 = 0 ; 4553 PyObject * obj2 = 0 ; 4554 PyObject * obj3 = 0 ; 4555 PyObject * obj4 = 0 ; 4556 4557 if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; 4558 ecode1 = SWIG_AsVal_int(obj0, &val1); 4559 if (!SWIG_IsOK(ecode1)) { 4560 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'"); 4561 } 4562 arg1 = (int)(val1); 4563 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4564 if (!SWIG_IsOK(res2)) { 4565 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'"); 4566 } 4567 arg2 = buf2; 4568 ecode3 = SWIG_AsVal_int(obj2, &val3); 4569 if (!SWIG_IsOK(ecode3)) { 4570 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'"); 4571 } 4572 arg3 = (int)(val3); 4573 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4574 if (!SWIG_IsOK(res4)) { 4575 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'"); 4576 } 4577 arg4 = buf4; 4578 res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); 4579 if (!SWIG_IsOK(res5)) { 4580 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'"); 4581 } 4582 arg5 = buf5; 4583 result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5); 4584 resultobj = SWIG_From_int((int)(result)); 4585 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4586 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4587 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); 4588 return resultobj; 4589 fail: 4590 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4591 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4592 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); 4593 return NULL; 4594 } 4595 4596 4597 SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4598 PyObject *resultobj = 0; 4599 int arg1 ; 4600 char *arg2 = (char *) 0 ; 4601 char *arg3 = (char *) 0 ; 4602 char *arg4 = (char *) 0 ; 4603 int result; 4604 int val1 ; 4605 int ecode1 = 0 ; 4606 int res2 ; 4607 char *buf2 = 0 ; 4608 int alloc2 = 0 ; 4609 int res3 ; 4610 char *buf3 = 0 ; 4611 int alloc3 = 0 ; 4612 int res4 ; 4613 char *buf4 = 0 ; 4614 int alloc4 = 0 ; 4615 PyObject * obj0 = 0 ; 4616 PyObject * obj1 = 0 ; 4617 PyObject * obj2 = 0 ; 4618 PyObject * obj3 = 0 ; 4619 4620 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4621 ecode1 = SWIG_AsVal_int(obj0, &val1); 4622 if (!SWIG_IsOK(ecode1)) { 4623 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'"); 4624 } 4625 arg1 = (int)(val1); 4626 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4627 if (!SWIG_IsOK(res2)) { 4628 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'"); 4629 } 4630 arg2 = buf2; 4631 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4632 if (!SWIG_IsOK(res3)) { 4633 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'"); 4634 } 4635 arg3 = buf3; 4636 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4637 if (!SWIG_IsOK(res4)) { 4638 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'"); 4639 } 4640 arg4 = buf4; 4641 result = (int)pbs_orderjob(arg1,arg2,arg3,arg4); 4642 resultobj = SWIG_From_int((int)(result)); 4643 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4644 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4645 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4646 return resultobj; 4647 fail: 4648 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4649 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4650 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4651 return NULL; 4652 } 4653 4654 4655 SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4656 PyObject *resultobj = 0; 4657 int arg1 ; 4658 char **arg2 = (char **) 0 ; 4659 int arg3 ; 4660 int *arg4 = (int *) 0 ; 4661 int *arg5 = (int *) 0 ; 4662 int *arg6 = (int *) 0 ; 4663 int *arg7 = (int *) 0 ; 4664 int result; 4665 int val1 ; 4666 int ecode1 = 0 ; 4667 int val3 ; 4668 int ecode3 = 0 ; 4669 int temp4 ; 4670 int res4 = SWIG_TMPOBJ ; 4671 int temp5 ; 4672 int res5 = SWIG_TMPOBJ ; 4673 int temp6 ; 4674 int res6 = SWIG_TMPOBJ ; 4675 int temp7 ; 4676 int res7 = SWIG_TMPOBJ ; 4677 PyObject * obj0 = 0 ; 4678 PyObject * obj1 = 0 ; 4679 PyObject * obj2 = 0 ; 4680 4681 arg4 = &temp4; 4682 arg5 = &temp5; 4683 arg6 = &temp6; 4684 arg7 = &temp7; 4685 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rescquery",&obj0,&obj1,&obj2)) SWIG_fail; 4686 ecode1 = SWIG_AsVal_int(obj0, &val1); 4687 if (!SWIG_IsOK(ecode1)) { 4688 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'"); 4689 } 4690 arg1 = (int)(val1); 4691 { 4692 int i=0, size=0; 4693 PyObject *py_obj; 4694 4695 if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); 4696 4697 size = Get_List_Size(obj1); 4698 4699 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4700 4701 if ( size == -1 ) { 4702 PyErr_SetString(PyExc_TypeError, "not a list"); 4703 return NULL; 4704 } 4705 // printf("Size = %d\n", size); 4706 4707 if (SARA_DEBUG) printf("\t<Contents>\n"); 4708 4709 arg2 = (char **) malloc( (size+1) * sizeof(char *)); 4710 for (i=0; i < size; i++) { 4711 py_obj = PyList_GetItem(obj1, i); 4712 if (PyString_Check(py_obj)) { 4713 arg2[i] = PyString_AsString(py_obj); 4714 if (SARA_DEBUG) printf("%s", arg2[i]); 4715 } 4716 else { 4717 PyErr_SetString(PyExc_TypeError, "not a list of strings"); 4718 free(arg2); 4719 return NULL; 4720 } 4721 } // end for 4722 arg2[i] = 0; 4723 if (SARA_DEBUG) printf("\t</Contents>\n"); 4724 } 4725 ecode3 = SWIG_AsVal_int(obj2, &val3); 4726 if (!SWIG_IsOK(ecode3)) { 4727 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'"); 4728 } 4729 arg3 = (int)(val3); 4730 result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7); 4731 resultobj = SWIG_From_int((int)(result)); 4732 if (SWIG_IsTmpObj(res4)) { 4733 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); 4734 } else { 4735 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 4736 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 4737 } 4738 if (SWIG_IsTmpObj(res5)) { 4739 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); 4740 } else { 4741 int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 4742 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); 4743 } 4744 if (SWIG_IsTmpObj(res6)) { 4745 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); 4746 } else { 4747 int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 4748 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); 4749 } 4750 if (SWIG_IsTmpObj(res7)) { 4751 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); 4752 } else { 4753 int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 4754 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); 4755 } 4756 { 4757 free( (char *) arg2); 4758 } 4759 return resultobj; 4760 fail: 4761 { 4762 free( (char *) arg2); 4763 } 4764 return NULL; 4765 } 4766 4767 4768 SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4769 PyObject *resultobj = 0; 4770 int arg1 ; 4771 char **arg2 = (char **) 0 ; 4772 int arg3 ; 4773 int *arg4 = (int *) 0 ; 4774 int result; 4775 int val1 ; 4776 int ecode1 = 0 ; 4777 int val3 ; 4778 int ecode3 = 0 ; 4779 int temp4 ; 4780 int res4 = SWIG_TMPOBJ ; 4781 PyObject * obj0 = 0 ; 4782 PyObject * obj1 = 0 ; 4783 PyObject * obj2 = 0 ; 4784 4785 arg4 = &temp4; 4786 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rescreserve",&obj0,&obj1,&obj2)) SWIG_fail; 4787 ecode1 = SWIG_AsVal_int(obj0, &val1); 4788 if (!SWIG_IsOK(ecode1)) { 4789 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'"); 4790 } 4791 arg1 = (int)(val1); 4792 { 4793 int i=0, size=0; 4794 PyObject *py_obj; 4795 4796 if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); 4797 4798 size = Get_List_Size(obj1); 4799 4800 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4801 4802 if ( size == -1 ) { 4803 PyErr_SetString(PyExc_TypeError, "not a list"); 4804 return NULL; 4805 } 4806 // printf("Size = %d\n", size); 4807 4808 if (SARA_DEBUG) printf("\t<Contents>\n"); 4809 4810 arg2 = (char **) malloc( (size+1) * sizeof(char *)); 4811 for (i=0; i < size; i++) { 4812 py_obj = PyList_GetItem(obj1, i); 4813 if (PyString_Check(py_obj)) { 4814 arg2[i] = PyString_AsString(py_obj); 4815 if (SARA_DEBUG) printf("%s", arg2[i]); 4816 } 4817 else { 4818 PyErr_SetString(PyExc_TypeError, "not a list of strings"); 4819 free(arg2); 4820 return NULL; 4821 } 4822 } // end for 4823 arg2[i] = 0; 4824 if (SARA_DEBUG) printf("\t</Contents>\n"); 4825 } 4826 ecode3 = SWIG_AsVal_int(obj2, &val3); 4827 if (!SWIG_IsOK(ecode3)) { 4828 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'"); 4829 } 4830 arg3 = (int)(val3); 4831 result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4); 4832 resultobj = SWIG_From_int((int)(result)); 4833 if (SWIG_IsTmpObj(res4)) { 4834 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); 4835 } else { 4836 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 4837 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 4838 } 4839 { 4840 free( (char *) arg2); 4841 } 4842 return resultobj; 4843 fail: 4844 { 4845 free( (char *) arg2); 4846 } 4847 return NULL; 4848 } 4849 4850 4851 SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4852 PyObject *resultobj = 0; 4853 int arg1 ; 4854 int arg2 ; 4855 int result; 4856 int val1 ; 4857 int ecode1 = 0 ; 4858 int val2 ; 4859 int ecode2 = 0 ; 4860 PyObject * obj0 = 0 ; 4861 PyObject * obj1 = 0 ; 4862 4863 if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail; 4864 ecode1 = SWIG_AsVal_int(obj0, &val1); 4865 if (!SWIG_IsOK(ecode1)) { 4866 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'"); 4867 } 4868 arg1 = (int)(val1); 4869 ecode2 = SWIG_AsVal_int(obj1, &val2); 4870 if (!SWIG_IsOK(ecode2)) { 4871 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "int""'"); 4872 } 4873 arg2 = (int)(val2); 4874 result = (int)pbs_rescrelease(arg1,arg2); 4875 resultobj = SWIG_From_int((int)(result)); 4876 return resultobj; 4877 fail: 4878 return NULL; 4879 } 4880 4881 4882 SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4883 PyObject *resultobj = 0; 4884 int arg1 ; 4885 char *arg2 = (char *) 0 ; 4886 char *arg3 = (char *) 0 ; 4887 int result; 4888 int val1 ; 4889 int ecode1 = 0 ; 4890 int res2 ; 4891 char *buf2 = 0 ; 4892 int alloc2 = 0 ; 4893 int res3 ; 4894 char *buf3 = 0 ; 4895 int alloc3 = 0 ; 4896 PyObject * obj0 = 0 ; 4897 PyObject * obj1 = 0 ; 4898 PyObject * obj2 = 0 ; 4899 4900 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail; 4901 ecode1 = SWIG_AsVal_int(obj0, &val1); 4902 if (!SWIG_IsOK(ecode1)) { 4903 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'"); 4904 } 4905 arg1 = (int)(val1); 4906 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4907 if (!SWIG_IsOK(res2)) { 4908 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'"); 4909 } 4910 arg2 = buf2; 4911 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4912 if (!SWIG_IsOK(res3)) { 4913 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'"); 4914 } 4915 arg3 = buf3; 4916 result = (int)pbs_rerunjob(arg1,arg2,arg3); 4917 resultobj = SWIG_From_int((int)(result)); 4918 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4919 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4920 return resultobj; 4921 fail: 4922 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4923 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4924 return NULL; 4925 } 4926 4927 4928 SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4929 PyObject *resultobj = 0; 4930 int arg1 ; 4931 char *arg2 = (char *) 0 ; 4932 char *arg3 = (char *) 0 ; 4933 char *arg4 = (char *) 0 ; 4934 int result; 4935 int val1 ; 4936 int ecode1 = 0 ; 4937 int res2 ; 4938 char *buf2 = 0 ; 4939 int alloc2 = 0 ; 4940 int res3 ; 4941 char *buf3 = 0 ; 4942 int alloc3 = 0 ; 4943 int res4 ; 4944 char *buf4 = 0 ; 4945 int alloc4 = 0 ; 4946 PyObject * obj0 = 0 ; 4947 PyObject * obj1 = 0 ; 4948 PyObject * obj2 = 0 ; 4949 PyObject * obj3 = 0 ; 4950 4951 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 4952 ecode1 = SWIG_AsVal_int(obj0, &val1); 4953 if (!SWIG_IsOK(ecode1)) { 4954 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'"); 4955 } 4956 arg1 = (int)(val1); 4957 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 4958 if (!SWIG_IsOK(res2)) { 4959 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'"); 4960 } 4961 arg2 = buf2; 4962 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 4963 if (!SWIG_IsOK(res3)) { 4964 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'"); 4965 } 4966 arg3 = buf3; 4967 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 4968 if (!SWIG_IsOK(res4)) { 4969 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'"); 4970 } 4971 arg4 = buf4; 4972 result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4); 4973 resultobj = SWIG_From_int((int)(result)); 4974 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4975 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4976 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4977 return resultobj; 4978 fail: 4979 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 4980 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 4981 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 4982 return NULL; 4983 } 4984 4985 4986 SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4987 PyObject *resultobj = 0; 4988 int arg1 ; 4989 char *arg2 = (char *) 0 ; 4990 char *arg3 = (char *) 0 ; 4991 char *arg4 = (char *) 0 ; 4992 int result; 4993 int val1 ; 4994 int ecode1 = 0 ; 4995 int res2 ; 4996 char *buf2 = 0 ; 4997 int alloc2 = 0 ; 4998 int res3 ; 4999 char *buf3 = 0 ; 5000 int alloc3 = 0 ; 5001 int res4 ; 5002 char *buf4 = 0 ; 5003 int alloc4 = 0 ; 5004 PyObject * obj0 = 0 ; 5005 PyObject * obj1 = 0 ; 5006 PyObject * obj2 = 0 ; 5007 PyObject * obj3 = 0 ; 5008 5009 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 5010 ecode1 = SWIG_AsVal_int(obj0, &val1); 5011 if (!SWIG_IsOK(ecode1)) { 5012 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'"); 5013 } 5014 arg1 = (int)(val1); 5015 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 5016 if (!SWIG_IsOK(res2)) { 5017 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'"); 5018 } 5019 arg2 = buf2; 5020 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5021 if (!SWIG_IsOK(res3)) { 5022 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_runjob" "', argument " "3"" of type '" "char *""'"); 5023 } 5024 arg3 = buf3; 5025 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5026 if (!SWIG_IsOK(res4)) { 5027 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_runjob" "', argument " "4"" of type '" "char *""'"); 5028 } 5029 arg4 = buf4; 5030 result = (int)pbs_runjob(arg1,arg2,arg3,arg4); 5031 resultobj = SWIG_From_int((int)(result)); 5032 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5033 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5034 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5035 return resultobj; 5036 fail: 5037 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5038 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5039 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5040 return NULL; 5041 } 5042 5043 5044 SWIGINTERN PyObject *_wrap_pbs_selectjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5045 PyObject *resultobj = 0; 5046 int arg1 ; 5047 struct attropl *arg2 = (struct attropl *) 0 ; 5048 char *arg3 = (char *) 0 ; 5049 char **result = 0 ; 5050 int val1 ; 5051 int ecode1 = 0 ; 5052 int res3 ; 5053 char *buf3 = 0 ; 5054 int alloc3 = 0 ; 5055 PyObject * obj0 = 0 ; 5056 PyObject * obj1 = 0 ; 5057 PyObject * obj2 = 0 ; 5058 5059 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) SWIG_fail; 5060 ecode1 = SWIG_AsVal_int(obj0, &val1); 5061 if (!SWIG_IsOK(ecode1)) { 5062 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selectjob" "', argument " "1"" of type '" "int""'"); 5063 } 5064 arg1 = (int)(val1); 5065 { 5066 PyObject *py_obj; 5067 struct attropl *ptr, *prev; 5068 char s[255]; 5069 int i=0, size=0; 5070 5071 // printf("Python --> C\n"); 5072 5073 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 5074 5075 size = Get_List_Size(obj1); 5076 5077 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5078 5079 if ( size == -1 ) { 5080 PyErr_SetString(PyExc_TypeError, "not a list"); 5081 return NULL; 5082 } 5083 //printf("Size = %d\n", size); 5084 5085 if (SARA_DEBUG) printf("\t<Contents>\n"); 5086 5087 arg2 = prev = NULL; 5088 for ( i=0; i < size; i++ ) { 5089 py_obj = PyList_GetItem(obj1, i); 5090 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 5091 sprintf(s,"list item %d has wrong type", i); 5092 PyErr_SetString(PyExc_TypeError, s); 5093 return NULL; 1907 5094 1908 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5095 // This will skipp the wrong entry 5096 // continue; 5097 } 5098 5099 /* 5100 * Make first entry head of C linked list 5101 */ 5102 if ( i == 0) { 5103 arg2 = ptr; 5104 ptr->next = prev; 5105 } 5106 else { 5107 prev->next = ptr; 5108 ptr->next = NULL; 5109 } 5110 prev = ptr; 5111 5112 } // end for 5113 if (SARA_DEBUG) printf("\t</Contents>\n"); 5114 } 5115 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5116 if (!SWIG_IsOK(res3)) { 5117 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selectjob" "', argument " "3"" of type '" "char *""'"); 5118 } 5119 arg3 = buf3; 5120 result = (char **)pbs_selectjob(arg1,arg2,arg3); 5121 { 5122 int len=0, i; 5123 5124 if (SARA_DEBUG) 5125 printf("Converteren char ** -> python list\n"); 5126 5127 5128 if (result == NULL) 5129 resultobj = PyList_New(0); 5130 else { 5131 while (result[len]) 5132 len++; 5133 } 5134 5135 if (SARA_DEBUG) 5136 printf("\tSize of List: %d\n", len); 5137 5138 resultobj = PyList_New(len); 5139 if (SARA_DEBUG) 5140 printf("\t<Contents>\n"); 5141 for (i=0; i < len; i++ ) { 5142 PyList_SetItem(resultobj, i , PyString_FromString(result[i])); 5143 if (SARA_DEBUG) 5144 printf("\t\t- %s\n", result[i]); 5145 } 5146 if (SARA_DEBUG) 5147 printf("\t</Contents>\n"); 5148 } 5149 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5150 return resultobj; 5151 fail: 5152 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5153 return NULL; 5154 } 5155 5156 5157 SWIGINTERN PyObject *_wrap_pbs_sigjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5158 PyObject *resultobj = 0; 5159 int arg1 ; 5160 char *arg2 = (char *) 0 ; 5161 char *arg3 = (char *) 0 ; 5162 char *arg4 = (char *) 0 ; 5163 int result; 5164 int val1 ; 5165 int ecode1 = 0 ; 5166 int res2 ; 5167 char *buf2 = 0 ; 5168 int alloc2 = 0 ; 5169 int res3 ; 5170 char *buf3 = 0 ; 5171 int alloc3 = 0 ; 5172 int res4 ; 5173 char *buf4 = 0 ; 5174 int alloc4 = 0 ; 5175 PyObject * obj0 = 0 ; 5176 PyObject * obj1 = 0 ; 5177 PyObject * obj2 = 0 ; 5178 PyObject * obj3 = 0 ; 5179 5180 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 5181 ecode1 = SWIG_AsVal_int(obj0, &val1); 5182 if (!SWIG_IsOK(ecode1)) { 5183 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjob" "', argument " "1"" of type '" "int""'"); 5184 } 5185 arg1 = (int)(val1); 5186 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 5187 if (!SWIG_IsOK(res2)) { 5188 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjob" "', argument " "2"" of type '" "char *""'"); 5189 } 5190 arg2 = buf2; 5191 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5192 if (!SWIG_IsOK(res3)) { 5193 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjob" "', argument " "3"" of type '" "char *""'"); 5194 } 5195 arg3 = buf3; 5196 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5197 if (!SWIG_IsOK(res4)) { 5198 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjob" "', argument " "4"" of type '" "char *""'"); 5199 } 5200 arg4 = buf4; 5201 result = (int)pbs_sigjob(arg1,arg2,arg3,arg4); 5202 resultobj = SWIG_From_int((int)(result)); 5203 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5204 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5205 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5206 return resultobj; 5207 fail: 5208 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5209 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5210 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5211 return NULL; 5212 } 5213 5214 5215 SWIGINTERN PyObject *_wrap_pbs_statfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5216 PyObject *resultobj = 0; 5217 struct batch_status *arg1 = (struct batch_status *) 0 ; 5218 PyObject * obj0 = 0 ; 5219 5220 if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail; 5221 { 5222 PyObject *py_obj; 5223 struct batch_status *ptr, *prev; 5224 char s[255]; 5225 int i=0, size=0; 5226 5227 // printf("Python --> C\n"); 5228 5229 if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n"); 5230 5231 size = Get_List_Size(obj0); 5232 if (SARA_DEBUG) printf("\tSize of list: %d\n", size); 5233 5234 if ( size == -1 ) { 5235 PyErr_SetString(PyExc_TypeError, "not a list"); 5236 return NULL; 5237 } 5238 // printf("Size = %d\n", size); 5239 5240 if (SARA_DEBUG) printf("\t<Contents>\n"); 5241 5242 arg1 = prev = NULL; 5243 for ( i=0; i < size; i++ ) { 5244 py_obj = PyList_GetItem(obj0, i); 5245 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) { 5246 sprintf(s,"list item %d has wrong type", i); 5247 PyErr_SetString(PyExc_TypeError, s); 5248 return NULL; 1909 5249 1910 if (SARA_DEBUG) printf("\t<Contents>\n"); 1911 ptr = result; 1912 for (i=0; i < len; i++) { 1913 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 1914 PyList_SetItem(resultobj, i, obj_batch); 1915 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 1916 ptr = ptr->next; 1917 } 1918 if (SARA_DEBUG) printf("\t</Contents>\n"); 1919 } 1920 return resultobj; 1921 fail: 1922 return NULL; 1923 } 1924 1925 1926 static PyObject *_wrap_new_attropl(PyObject *self, PyObject *args) { 1927 PyObject *resultobj; 1928 int arg1 ; 1929 struct attropl *result; 1930 PyObject * obj0 = 0 ; 1931 1932 if(!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) goto fail; 1933 { 1934 arg1 = (int)(SWIG_As_int(obj0)); 1935 if (SWIG_arg_fail(1)) SWIG_fail; 1936 } 1937 result = (struct attropl *)new_attropl(arg1); 1938 1939 { 1940 PyObject *obj_batch; 1941 struct attropl *ptr; 1942 int i=0, len=0; 5250 // This will skipp the wrong entry 5251 // continue; 5252 } 5253 5254 /* 5255 * Make first entry head of C linked list 5256 */ 5257 if ( i == 0) { 5258 arg1 = ptr; 5259 ptr->next = prev; 5260 } 5261 else { 5262 prev->next = ptr; 5263 ptr->next = NULL; 5264 } 5265 5266 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 5267 prev = ptr; 5268 5269 } // end for 5270 5271 if (SARA_DEBUG) printf("\t</Contents>\n"); 5272 } 5273 pbs_statfree(arg1); 5274 resultobj = SWIG_Py_Void(); 5275 return resultobj; 5276 fail: 5277 return NULL; 5278 } 5279 5280 5281 SWIGINTERN PyObject *_wrap_pbs_statjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5282 PyObject *resultobj = 0; 5283 int arg1 ; 5284 char *arg2 = (char *) 0 ; 5285 struct attrl *arg3 = (struct attrl *) 0 ; 5286 char *arg4 = (char *) 0 ; 5287 struct batch_status *result = 0 ; 5288 int val1 ; 5289 int ecode1 = 0 ; 5290 int res2 ; 5291 char *buf2 = 0 ; 5292 int alloc2 = 0 ; 5293 int res4 ; 5294 char *buf4 = 0 ; 5295 int alloc4 = 0 ; 5296 PyObject * obj0 = 0 ; 5297 PyObject * obj1 = 0 ; 5298 PyObject * obj2 = 0 ; 5299 PyObject * obj3 = 0 ; 5300 5301 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 5302 ecode1 = SWIG_AsVal_int(obj0, &val1); 5303 if (!SWIG_IsOK(ecode1)) { 5304 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statjob" "', argument " "1"" of type '" "int""'"); 5305 } 5306 arg1 = (int)(val1); 5307 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 5308 if (!SWIG_IsOK(res2)) { 5309 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statjob" "', argument " "2"" of type '" "char *""'"); 5310 } 5311 arg2 = buf2; 5312 { 5313 PyObject *py_obj; 5314 struct attrl *ptr, *prev; 5315 char s[255]; 5316 int i=0, size=0; 5317 5318 // printf("Python --> C\n"); 5319 5320 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 5321 5322 size = Get_List_Size(obj2); 5323 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5324 5325 if ( size == -1 ) { 5326 PyErr_SetString(PyExc_TypeError, "not a list"); 5327 return NULL; 5328 } 5329 5330 if (SARA_DEBUG) printf("\t<Contents>\n"); 5331 5332 arg3 = prev = NULL; 5333 for ( i=0; i < size; i++ ) { 5334 py_obj = PyList_GetItem(obj2, i); 5335 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 5336 sprintf(s,"list item %d has wrong type", i); 5337 PyErr_SetString(PyExc_TypeError, s); 5338 return NULL; 1943 5339 1944 if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n"); 5340 // This will skipp the wrong entry 5341 // continue; 5342 } 5343 5344 /* 5345 * Make first entry head of C linked list 5346 */ 5347 if ( i == 0) { 5348 arg3 = ptr; 5349 ptr->next = prev; 5350 } 5351 else { 5352 prev->next = ptr; 5353 ptr->next = NULL; 5354 } 5355 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 5356 5357 prev = ptr; 5358 5359 } // end for 5360 if (SARA_DEBUG) printf("\t</Contents>\n"); 5361 } 5362 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5363 if (!SWIG_IsOK(res4)) { 5364 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statjob" "', argument " "4"" of type '" "char *""'"); 5365 } 5366 arg4 = buf4; 5367 result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4); 5368 { 5369 PyObject *obj_batch; 5370 struct batch_status *ptr; 5371 int i=0, len=0; 5372 5373 // printf("Ja we are in bussniss\n"); 5374 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5375 5376 // Deterime length of list 5377 // 5378 ptr = result; 5379 while (ptr != NULL) { 5380 len++; 5381 ptr = ptr->next; 5382 } 5383 resultobj = PyList_New(len); 5384 5385 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5386 5387 // Make a list of batch_status pointers 5388 // 5389 if (SARA_DEBUG) printf("\t<Contents>\n"); 5390 ptr = result; 5391 for (i=0; i < len; i++) { 5392 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 5393 PyList_SetItem(resultobj, i, obj_batch); 5394 if (SARA_DEBUG) { 5395 printf("\t\t- %s\n", ptr->name); 5396 } 5397 ptr = ptr->next; 5398 } 5399 if (SARA_DEBUG) printf("\t</Contents>\n"); 5400 } 5401 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5402 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5403 return resultobj; 5404 fail: 5405 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5406 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5407 return NULL; 5408 } 5409 5410 5411 SWIGINTERN PyObject *_wrap_pbs_selstat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5412 PyObject *resultobj = 0; 5413 int arg1 ; 5414 struct attropl *arg2 = (struct attropl *) 0 ; 5415 char *arg3 = (char *) 0 ; 5416 struct batch_status *result = 0 ; 5417 int val1 ; 5418 int ecode1 = 0 ; 5419 int res3 ; 5420 char *buf3 = 0 ; 5421 int alloc3 = 0 ; 5422 PyObject * obj0 = 0 ; 5423 PyObject * obj1 = 0 ; 5424 PyObject * obj2 = 0 ; 5425 5426 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) SWIG_fail; 5427 ecode1 = SWIG_AsVal_int(obj0, &val1); 5428 if (!SWIG_IsOK(ecode1)) { 5429 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selstat" "', argument " "1"" of type '" "int""'"); 5430 } 5431 arg1 = (int)(val1); 5432 { 5433 PyObject *py_obj; 5434 struct attropl *ptr, *prev; 5435 char s[255]; 5436 int i=0, size=0; 5437 5438 // printf("Python --> C\n"); 5439 5440 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 5441 5442 size = Get_List_Size(obj1); 5443 5444 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5445 5446 if ( size == -1 ) { 5447 PyErr_SetString(PyExc_TypeError, "not a list"); 5448 return NULL; 5449 } 5450 //printf("Size = %d\n", size); 5451 5452 if (SARA_DEBUG) printf("\t<Contents>\n"); 5453 5454 arg2 = prev = NULL; 5455 for ( i=0; i < size; i++ ) { 5456 py_obj = PyList_GetItem(obj1, i); 5457 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 5458 sprintf(s,"list item %d has wrong type", i); 5459 PyErr_SetString(PyExc_TypeError, s); 5460 return NULL; 1945 5461 1946 ptr = result; 1947 while (ptr != NULL) { 1948 len++; 1949 ptr = ptr->next; 1950 } 1951 resultobj = PyList_New(len); 1952 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5462 // This will skipp the wrong entry 5463 // continue; 5464 } 5465 5466 /* 5467 * Make first entry head of C linked list 5468 */ 5469 if ( i == 0) { 5470 arg2 = ptr; 5471 ptr->next = prev; 5472 } 5473 else { 5474 prev->next = ptr; 5475 ptr->next = NULL; 5476 } 5477 prev = ptr; 5478 5479 } // end for 5480 if (SARA_DEBUG) printf("\t</Contents>\n"); 5481 } 5482 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5483 if (!SWIG_IsOK(res3)) { 5484 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selstat" "', argument " "3"" of type '" "char *""'"); 5485 } 5486 arg3 = buf3; 5487 result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3); 5488 { 5489 PyObject *obj_batch; 5490 struct batch_status *ptr; 5491 int i=0, len=0; 5492 5493 // printf("Ja we are in bussniss\n"); 5494 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5495 5496 // Deterime length of list 5497 // 5498 ptr = result; 5499 while (ptr != NULL) { 5500 len++; 5501 ptr = ptr->next; 5502 } 5503 resultobj = PyList_New(len); 5504 5505 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5506 5507 // Make a list of batch_status pointers 5508 // 5509 if (SARA_DEBUG) printf("\t<Contents>\n"); 5510 ptr = result; 5511 for (i=0; i < len; i++) { 5512 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 5513 PyList_SetItem(resultobj, i, obj_batch); 5514 if (SARA_DEBUG) { 5515 printf("\t\t- %s\n", ptr->name); 5516 } 5517 ptr = ptr->next; 5518 } 5519 if (SARA_DEBUG) printf("\t</Contents>\n"); 5520 } 5521 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5522 return resultobj; 5523 fail: 5524 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5525 return NULL; 5526 } 5527 5528 5529 SWIGINTERN PyObject *_wrap_pbs_statque(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5530 PyObject *resultobj = 0; 5531 int arg1 ; 5532 char *arg2 = (char *) 0 ; 5533 struct attrl *arg3 = (struct attrl *) 0 ; 5534 char *arg4 = (char *) 0 ; 5535 struct batch_status *result = 0 ; 5536 int val1 ; 5537 int ecode1 = 0 ; 5538 int res2 ; 5539 char *buf2 = 0 ; 5540 int alloc2 = 0 ; 5541 int res4 ; 5542 char *buf4 = 0 ; 5543 int alloc4 = 0 ; 5544 PyObject * obj0 = 0 ; 5545 PyObject * obj1 = 0 ; 5546 PyObject * obj2 = 0 ; 5547 PyObject * obj3 = 0 ; 5548 5549 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 5550 ecode1 = SWIG_AsVal_int(obj0, &val1); 5551 if (!SWIG_IsOK(ecode1)) { 5552 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statque" "', argument " "1"" of type '" "int""'"); 5553 } 5554 arg1 = (int)(val1); 5555 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 5556 if (!SWIG_IsOK(res2)) { 5557 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statque" "', argument " "2"" of type '" "char *""'"); 5558 } 5559 arg2 = buf2; 5560 { 5561 PyObject *py_obj; 5562 struct attrl *ptr, *prev; 5563 char s[255]; 5564 int i=0, size=0; 5565 5566 // printf("Python --> C\n"); 5567 5568 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 5569 5570 size = Get_List_Size(obj2); 5571 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5572 5573 if ( size == -1 ) { 5574 PyErr_SetString(PyExc_TypeError, "not a list"); 5575 return NULL; 5576 } 5577 5578 if (SARA_DEBUG) printf("\t<Contents>\n"); 5579 5580 arg3 = prev = NULL; 5581 for ( i=0; i < size; i++ ) { 5582 py_obj = PyList_GetItem(obj2, i); 5583 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 5584 sprintf(s,"list item %d has wrong type", i); 5585 PyErr_SetString(PyExc_TypeError, s); 5586 return NULL; 1953 5587 1954 if (SARA_DEBUG) printf("\t<Contents>\n"); 1955 ptr = result; 1956 for (i=0; i < len; i++) { 1957 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 1958 PyList_SetItem(resultobj, i, obj_batch); 1959 ptr = ptr->next; 1960 } 1961 if (SARA_DEBUG) printf("\t</Contents>\n"); 1962 } 1963 return resultobj; 1964 fail: 1965 return NULL; 1966 } 1967 1968 1969 static PyObject *_wrap_new_batch_status(PyObject *self, PyObject *args) { 1970 PyObject *resultobj; 1971 struct batch_status *result; 1972 1973 if(!PyArg_ParseTuple(args,(char *)":new_batch_status")) goto fail; 1974 result = (struct batch_status *)new_batch_status(); 1975 1976 { 1977 PyObject *obj_batch; 1978 struct batch_status *ptr; 1979 int i=0, len=0; 5588 // This will skipp the wrong entry 5589 // continue; 5590 } 5591 5592 /* 5593 * Make first entry head of C linked list 5594 */ 5595 if ( i == 0) { 5596 arg3 = ptr; 5597 ptr->next = prev; 5598 } 5599 else { 5600 prev->next = ptr; 5601 ptr->next = NULL; 5602 } 5603 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 5604 5605 prev = ptr; 5606 5607 } // end for 5608 if (SARA_DEBUG) printf("\t</Contents>\n"); 5609 } 5610 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5611 if (!SWIG_IsOK(res4)) { 5612 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statque" "', argument " "4"" of type '" "char *""'"); 5613 } 5614 arg4 = buf4; 5615 result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4); 5616 { 5617 PyObject *obj_batch; 5618 struct batch_status *ptr; 5619 int i=0, len=0; 5620 5621 // printf("Ja we are in bussniss\n"); 5622 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5623 5624 // Deterime length of list 5625 // 5626 ptr = result; 5627 while (ptr != NULL) { 5628 len++; 5629 ptr = ptr->next; 5630 } 5631 resultobj = PyList_New(len); 5632 5633 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5634 5635 // Make a list of batch_status pointers 5636 // 5637 if (SARA_DEBUG) printf("\t<Contents>\n"); 5638 ptr = result; 5639 for (i=0; i < len; i++) { 5640 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 5641 PyList_SetItem(resultobj, i, obj_batch); 5642 if (SARA_DEBUG) { 5643 printf("\t\t- %s\n", ptr->name); 5644 } 5645 ptr = ptr->next; 5646 } 5647 if (SARA_DEBUG) printf("\t</Contents>\n"); 5648 } 5649 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5650 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5651 return resultobj; 5652 fail: 5653 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5654 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5655 return NULL; 5656 } 5657 5658 5659 SWIGINTERN PyObject *_wrap_pbs_statserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5660 PyObject *resultobj = 0; 5661 int arg1 ; 5662 struct attrl *arg2 = (struct attrl *) 0 ; 5663 char *arg3 = (char *) 0 ; 5664 struct batch_status *result = 0 ; 5665 int val1 ; 5666 int ecode1 = 0 ; 5667 int res3 ; 5668 char *buf3 = 0 ; 5669 int alloc3 = 0 ; 5670 PyObject * obj0 = 0 ; 5671 PyObject * obj1 = 0 ; 5672 PyObject * obj2 = 0 ; 5673 5674 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) SWIG_fail; 5675 ecode1 = SWIG_AsVal_int(obj0, &val1); 5676 if (!SWIG_IsOK(ecode1)) { 5677 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statserver" "', argument " "1"" of type '" "int""'"); 5678 } 5679 arg1 = (int)(val1); 5680 { 5681 PyObject *py_obj; 5682 struct attrl *ptr, *prev; 5683 char s[255]; 5684 int i=0, size=0; 5685 5686 // printf("Python --> C\n"); 5687 5688 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 5689 5690 size = Get_List_Size(obj1); 5691 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5692 5693 if ( size == -1 ) { 5694 PyErr_SetString(PyExc_TypeError, "not a list"); 5695 return NULL; 5696 } 5697 5698 if (SARA_DEBUG) printf("\t<Contents>\n"); 5699 5700 arg2 = prev = NULL; 5701 for ( i=0; i < size; i++ ) { 5702 py_obj = PyList_GetItem(obj1, i); 5703 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 5704 sprintf(s,"list item %d has wrong type", i); 5705 PyErr_SetString(PyExc_TypeError, s); 5706 return NULL; 1980 5707 1981 // printf("Ja we are in bussniss\n"); 1982 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5708 // This will skipp the wrong entry 5709 // continue; 5710 } 5711 5712 /* 5713 * Make first entry head of C linked list 5714 */ 5715 if ( i == 0) { 5716 arg2 = ptr; 5717 ptr->next = prev; 5718 } 5719 else { 5720 prev->next = ptr; 5721 ptr->next = NULL; 5722 } 5723 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 5724 5725 prev = ptr; 5726 5727 } // end for 5728 if (SARA_DEBUG) printf("\t</Contents>\n"); 5729 } 5730 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5731 if (!SWIG_IsOK(res3)) { 5732 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_statserver" "', argument " "3"" of type '" "char *""'"); 5733 } 5734 arg3 = buf3; 5735 result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3); 5736 { 5737 PyObject *obj_batch; 5738 struct batch_status *ptr; 5739 int i=0, len=0; 5740 5741 // printf("Ja we are in bussniss\n"); 5742 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5743 5744 // Deterime length of list 5745 // 5746 ptr = result; 5747 while (ptr != NULL) { 5748 len++; 5749 ptr = ptr->next; 5750 } 5751 resultobj = PyList_New(len); 5752 5753 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5754 5755 // Make a list of batch_status pointers 5756 // 5757 if (SARA_DEBUG) printf("\t<Contents>\n"); 5758 ptr = result; 5759 for (i=0; i < len; i++) { 5760 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 5761 PyList_SetItem(resultobj, i, obj_batch); 5762 if (SARA_DEBUG) { 5763 printf("\t\t- %s\n", ptr->name); 5764 } 5765 ptr = ptr->next; 5766 } 5767 if (SARA_DEBUG) printf("\t</Contents>\n"); 5768 } 5769 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5770 return resultobj; 5771 fail: 5772 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 5773 return NULL; 5774 } 5775 5776 5777 SWIGINTERN PyObject *_wrap_pbs_statnode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5778 PyObject *resultobj = 0; 5779 int arg1 ; 5780 char *arg2 = (char *) 0 ; 5781 struct attrl *arg3 = (struct attrl *) 0 ; 5782 char *arg4 = (char *) 0 ; 5783 struct batch_status *result = 0 ; 5784 int val1 ; 5785 int ecode1 = 0 ; 5786 int res2 ; 5787 char *buf2 = 0 ; 5788 int alloc2 = 0 ; 5789 int res4 ; 5790 char *buf4 = 0 ; 5791 int alloc4 = 0 ; 5792 PyObject * obj0 = 0 ; 5793 PyObject * obj1 = 0 ; 5794 PyObject * obj2 = 0 ; 5795 PyObject * obj3 = 0 ; 5796 5797 if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 5798 ecode1 = SWIG_AsVal_int(obj0, &val1); 5799 if (!SWIG_IsOK(ecode1)) { 5800 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statnode" "', argument " "1"" of type '" "int""'"); 5801 } 5802 arg1 = (int)(val1); 5803 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 5804 if (!SWIG_IsOK(res2)) { 5805 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statnode" "', argument " "2"" of type '" "char *""'"); 5806 } 5807 arg2 = buf2; 5808 { 5809 PyObject *py_obj; 5810 struct attrl *ptr, *prev; 5811 char s[255]; 5812 int i=0, size=0; 5813 5814 // printf("Python --> C\n"); 5815 5816 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 5817 5818 size = Get_List_Size(obj2); 5819 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5820 5821 if ( size == -1 ) { 5822 PyErr_SetString(PyExc_TypeError, "not a list"); 5823 return NULL; 5824 } 5825 5826 if (SARA_DEBUG) printf("\t<Contents>\n"); 5827 5828 arg3 = prev = NULL; 5829 for ( i=0; i < size; i++ ) { 5830 py_obj = PyList_GetItem(obj2, i); 5831 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 5832 sprintf(s,"list item %d has wrong type", i); 5833 PyErr_SetString(PyExc_TypeError, s); 5834 return NULL; 1983 5835 1984 // Deterime length of list 1985 // 1986 ptr = result; 1987 while (ptr != NULL) { 1988 len++; 1989 ptr = ptr->next; 1990 } 1991 resultobj = PyList_New(len); 5836 // This will skipp the wrong entry 5837 // continue; 5838 } 5839 5840 /* 5841 * Make first entry head of C linked list 5842 */ 5843 if ( i == 0) { 5844 arg3 = ptr; 5845 ptr->next = prev; 5846 } 5847 else { 5848 prev->next = ptr; 5849 ptr->next = NULL; 5850 } 5851 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 5852 5853 prev = ptr; 5854 5855 } // end for 5856 if (SARA_DEBUG) printf("\t</Contents>\n"); 5857 } 5858 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5859 if (!SWIG_IsOK(res4)) { 5860 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statnode" "', argument " "4"" of type '" "char *""'"); 5861 } 5862 arg4 = buf4; 5863 result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4); 5864 { 5865 PyObject *obj_batch; 5866 struct batch_status *ptr; 5867 int i=0, len=0; 5868 5869 // printf("Ja we are in bussniss\n"); 5870 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 5871 5872 // Deterime length of list 5873 // 5874 ptr = result; 5875 while (ptr != NULL) { 5876 len++; 5877 ptr = ptr->next; 5878 } 5879 resultobj = PyList_New(len); 5880 5881 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 5882 5883 // Make a list of batch_status pointers 5884 // 5885 if (SARA_DEBUG) printf("\t<Contents>\n"); 5886 ptr = result; 5887 for (i=0; i < len; i++) { 5888 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 5889 PyList_SetItem(resultobj, i, obj_batch); 5890 if (SARA_DEBUG) { 5891 printf("\t\t- %s\n", ptr->name); 5892 } 5893 ptr = ptr->next; 5894 } 5895 if (SARA_DEBUG) printf("\t</Contents>\n"); 5896 } 5897 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5898 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5899 return resultobj; 5900 fail: 5901 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 5902 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 5903 return NULL; 5904 } 5905 5906 5907 SWIGINTERN PyObject *_wrap_pbs_submit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 5908 PyObject *resultobj = 0; 5909 int arg1 ; 5910 struct attropl *arg2 = (struct attropl *) 0 ; 5911 char *arg3 = (char *) 0 ; 5912 char *arg4 = (char *) 0 ; 5913 char *arg5 = (char *) 0 ; 5914 char *result = 0 ; 5915 int val1 ; 5916 int ecode1 = 0 ; 5917 int res3 ; 5918 char *buf3 = 0 ; 5919 int alloc3 = 0 ; 5920 int res4 ; 5921 char *buf4 = 0 ; 5922 int alloc4 = 0 ; 5923 int res5 ; 5924 char *buf5 = 0 ; 5925 int alloc5 = 0 ; 5926 PyObject * obj0 = 0 ; 5927 PyObject * obj1 = 0 ; 5928 PyObject * obj2 = 0 ; 5929 PyObject * obj3 = 0 ; 5930 PyObject * obj4 = 0 ; 5931 5932 if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; 5933 ecode1 = SWIG_AsVal_int(obj0, &val1); 5934 if (!SWIG_IsOK(ecode1)) { 5935 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit" "', argument " "1"" of type '" "int""'"); 5936 } 5937 arg1 = (int)(val1); 5938 { 5939 PyObject *py_obj; 5940 struct attropl *ptr, *prev; 5941 char s[255]; 5942 int i=0, size=0; 5943 5944 // printf("Python --> C\n"); 5945 5946 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 5947 5948 size = Get_List_Size(obj1); 5949 5950 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 5951 5952 if ( size == -1 ) { 5953 PyErr_SetString(PyExc_TypeError, "not a list"); 5954 return NULL; 5955 } 5956 //printf("Size = %d\n", size); 5957 5958 if (SARA_DEBUG) printf("\t<Contents>\n"); 5959 5960 arg2 = prev = NULL; 5961 for ( i=0; i < size; i++ ) { 5962 py_obj = PyList_GetItem(obj1, i); 5963 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 5964 sprintf(s,"list item %d has wrong type", i); 5965 PyErr_SetString(PyExc_TypeError, s); 5966 return NULL; 1992 5967 1993 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 1994 1995 // Make a list of batch_status pointers 1996 // 1997 if (SARA_DEBUG) printf("\t<Contents>\n"); 1998 ptr = result; 1999 for (i=0; i < len; i++) { 2000 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 2001 PyList_SetItem(resultobj, i, obj_batch); 2002 if (SARA_DEBUG) { 2003 printf("\t\t- %s\n", ptr->name); 2004 } 2005 ptr = ptr->next; 2006 } 2007 if (SARA_DEBUG) printf("\t</Contents>\n"); 2008 } 2009 return resultobj; 2010 fail: 2011 return NULL; 2012 } 2013 2014 2015 static PyObject *_wrap_get_error(PyObject *self, PyObject *args) { 2016 PyObject *resultobj; 2017 int result; 2018 2019 if(!PyArg_ParseTuple(args,(char *)":get_error")) goto fail; 2020 result = (int)get_error(); 2021 2022 { 2023 resultobj = SWIG_From_int((int)(result)); 2024 } 2025 return resultobj; 2026 fail: 2027 return NULL; 2028 } 2029 2030 2031 static PyObject *_wrap_attrl_name_set(PyObject *self, PyObject *args) { 2032 PyObject *resultobj; 2033 struct attrl *arg1 = (struct attrl *) 0 ; 2034 char *arg2 = (char *) 0 ; 2035 PyObject * obj0 = 0 ; 2036 PyObject * obj1 = 0 ; 2037 2038 if(!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) goto fail; 2039 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2040 if (SWIG_arg_fail(1)) SWIG_fail; 2041 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2042 SWIG_arg_fail(2);SWIG_fail; 2043 } 2044 { 2045 if (arg1->name) free((char*)arg1->name); 2046 if (arg2) { 2047 arg1->name = (char *) malloc(strlen(arg2)+1); 2048 strcpy((char*)arg1->name,arg2); 2049 } else { 2050 arg1->name = 0; 2051 } 2052 } 2053 Py_INCREF(Py_None); resultobj = Py_None; 2054 return resultobj; 2055 fail: 2056 return NULL; 2057 } 2058 2059 2060 static PyObject *_wrap_attrl_name_get(PyObject *self, PyObject *args) { 2061 PyObject *resultobj; 2062 struct attrl *arg1 = (struct attrl *) 0 ; 2063 char *result; 2064 PyObject * obj0 = 0 ; 2065 2066 if(!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) goto fail; 2067 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2068 if (SWIG_arg_fail(1)) SWIG_fail; 2069 result = (char *) ((arg1)->name); 2070 2071 resultobj = SWIG_FromCharPtr(result); 2072 return resultobj; 2073 fail: 2074 return NULL; 2075 } 2076 2077 2078 static PyObject *_wrap_attrl_resource_set(PyObject *self, PyObject *args) { 2079 PyObject *resultobj; 2080 struct attrl *arg1 = (struct attrl *) 0 ; 2081 char *arg2 = (char *) 0 ; 2082 PyObject * obj0 = 0 ; 2083 PyObject * obj1 = 0 ; 2084 2085 if(!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) goto fail; 2086 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2087 if (SWIG_arg_fail(1)) SWIG_fail; 2088 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2089 SWIG_arg_fail(2);SWIG_fail; 2090 } 2091 { 2092 if (arg1->resource) free((char*)arg1->resource); 2093 if (arg2) { 2094 arg1->resource = (char *) malloc(strlen(arg2)+1); 2095 strcpy((char*)arg1->resource,arg2); 2096 } else { 2097 arg1->resource = 0; 2098 } 2099 } 2100 Py_INCREF(Py_None); resultobj = Py_None; 2101 return resultobj; 2102 fail: 2103 return NULL; 2104 } 2105 2106 2107 static PyObject *_wrap_attrl_resource_get(PyObject *self, PyObject *args) { 2108 PyObject *resultobj; 2109 struct attrl *arg1 = (struct attrl *) 0 ; 2110 char *result; 2111 PyObject * obj0 = 0 ; 2112 2113 if(!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) goto fail; 2114 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2115 if (SWIG_arg_fail(1)) SWIG_fail; 2116 result = (char *) ((arg1)->resource); 2117 2118 resultobj = SWIG_FromCharPtr(result); 2119 return resultobj; 2120 fail: 2121 return NULL; 2122 } 2123 2124 2125 static PyObject *_wrap_attrl_value_set(PyObject *self, PyObject *args) { 2126 PyObject *resultobj; 2127 struct attrl *arg1 = (struct attrl *) 0 ; 2128 char *arg2 = (char *) 0 ; 2129 PyObject * obj0 = 0 ; 2130 PyObject * obj1 = 0 ; 2131 2132 if(!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) goto fail; 2133 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2134 if (SWIG_arg_fail(1)) SWIG_fail; 2135 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2136 SWIG_arg_fail(2);SWIG_fail; 2137 } 2138 { 2139 if (arg1->value) free((char*)arg1->value); 2140 if (arg2) { 2141 arg1->value = (char *) malloc(strlen(arg2)+1); 2142 strcpy((char*)arg1->value,arg2); 2143 } else { 2144 arg1->value = 0; 2145 } 2146 } 2147 Py_INCREF(Py_None); resultobj = Py_None; 2148 return resultobj; 2149 fail: 2150 return NULL; 2151 } 2152 2153 2154 static PyObject *_wrap_attrl_value_get(PyObject *self, PyObject *args) { 2155 PyObject *resultobj; 2156 struct attrl *arg1 = (struct attrl *) 0 ; 2157 char *result; 2158 PyObject * obj0 = 0 ; 2159 2160 if(!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) goto fail; 2161 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2162 if (SWIG_arg_fail(1)) SWIG_fail; 2163 result = (char *) ((arg1)->value); 2164 2165 resultobj = SWIG_FromCharPtr(result); 2166 return resultobj; 2167 fail: 2168 return NULL; 2169 } 2170 2171 2172 static PyObject *_wrap_attrl_op_set(PyObject *self, PyObject *args) { 2173 PyObject *resultobj; 2174 struct attrl *arg1 = (struct attrl *) 0 ; 2175 enum batch_op arg2 ; 2176 PyObject * obj0 = 0 ; 2177 PyObject * obj1 = 0 ; 2178 2179 if(!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) goto fail; 2180 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2181 if (SWIG_arg_fail(1)) SWIG_fail; 2182 { 2183 arg2 = (enum batch_op)(SWIG_As_int(obj1)); 2184 if (SWIG_arg_fail(2)) SWIG_fail; 2185 } 2186 if (arg1) (arg1)->op = (enum batch_op )arg2; 2187 2188 Py_INCREF(Py_None); resultobj = Py_None; 2189 return resultobj; 2190 fail: 2191 return NULL; 2192 } 2193 2194 2195 static PyObject *_wrap_attrl_op_get(PyObject *self, PyObject *args) { 2196 PyObject *resultobj; 2197 struct attrl *arg1 = (struct attrl *) 0 ; 2198 enum batch_op result; 2199 PyObject * obj0 = 0 ; 2200 2201 if(!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) goto fail; 2202 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2203 if (SWIG_arg_fail(1)) SWIG_fail; 2204 result = (enum batch_op) ((arg1)->op); 2205 2206 resultobj = SWIG_From_int((result)); 2207 return resultobj; 2208 fail: 2209 return NULL; 2210 } 2211 2212 2213 static PyObject *_wrap_attrl___str__(PyObject *self, PyObject *args) { 2214 PyObject *resultobj; 2215 struct attrl *arg1 = (struct attrl *) 0 ; 2216 char *result; 2217 PyObject * obj0 = 0 ; 2218 2219 if(!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) goto fail; 2220 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | 0); 2221 if (SWIG_arg_fail(1)) SWIG_fail; 2222 result = (char *)attrl___str__(arg1); 2223 2224 resultobj = SWIG_FromCharPtr(result); 2225 return resultobj; 2226 fail: 2227 return NULL; 2228 } 2229 2230 2231 static PyObject * attrl_swigregister(PyObject *self, PyObject *args) { 2232 PyObject *obj; 2233 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; 2234 SWIG_TypeClientData(SWIGTYPE_p_attrl, obj); 2235 Py_INCREF(obj); 2236 return Py_BuildValue((char *)""); 2237 } 2238 static PyObject *_wrap_attropl_name_set(PyObject *self, PyObject *args) { 2239 PyObject *resultobj; 2240 struct attropl *arg1 = (struct attropl *) 0 ; 2241 char *arg2 = (char *) 0 ; 2242 PyObject * obj0 = 0 ; 2243 PyObject * obj1 = 0 ; 2244 2245 if(!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) goto fail; 2246 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2247 if (SWIG_arg_fail(1)) SWIG_fail; 2248 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2249 SWIG_arg_fail(2);SWIG_fail; 2250 } 2251 { 2252 if (arg1->name) free((char*)arg1->name); 2253 if (arg2) { 2254 arg1->name = (char *) malloc(strlen(arg2)+1); 2255 strcpy((char*)arg1->name,arg2); 2256 } else { 2257 arg1->name = 0; 2258 } 2259 } 2260 Py_INCREF(Py_None); resultobj = Py_None; 2261 return resultobj; 2262 fail: 2263 return NULL; 2264 } 2265 2266 2267 static PyObject *_wrap_attropl_name_get(PyObject *self, PyObject *args) { 2268 PyObject *resultobj; 2269 struct attropl *arg1 = (struct attropl *) 0 ; 2270 char *result; 2271 PyObject * obj0 = 0 ; 2272 2273 if(!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) goto fail; 2274 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2275 if (SWIG_arg_fail(1)) SWIG_fail; 2276 result = (char *) ((arg1)->name); 2277 2278 resultobj = SWIG_FromCharPtr(result); 2279 return resultobj; 2280 fail: 2281 return NULL; 2282 } 2283 2284 2285 static PyObject *_wrap_attropl_resource_set(PyObject *self, PyObject *args) { 2286 PyObject *resultobj; 2287 struct attropl *arg1 = (struct attropl *) 0 ; 2288 char *arg2 = (char *) 0 ; 2289 PyObject * obj0 = 0 ; 2290 PyObject * obj1 = 0 ; 2291 2292 if(!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) goto fail; 2293 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2294 if (SWIG_arg_fail(1)) SWIG_fail; 2295 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2296 SWIG_arg_fail(2);SWIG_fail; 2297 } 2298 { 2299 if (arg1->resource) free((char*)arg1->resource); 2300 if (arg2) { 2301 arg1->resource = (char *) malloc(strlen(arg2)+1); 2302 strcpy((char*)arg1->resource,arg2); 2303 } else { 2304 arg1->resource = 0; 2305 } 2306 } 2307 Py_INCREF(Py_None); resultobj = Py_None; 2308 return resultobj; 2309 fail: 2310 return NULL; 2311 } 2312 2313 2314 static PyObject *_wrap_attropl_resource_get(PyObject *self, PyObject *args) { 2315 PyObject *resultobj; 2316 struct attropl *arg1 = (struct attropl *) 0 ; 2317 char *result; 2318 PyObject * obj0 = 0 ; 2319 2320 if(!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) goto fail; 2321 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2322 if (SWIG_arg_fail(1)) SWIG_fail; 2323 result = (char *) ((arg1)->resource); 2324 2325 resultobj = SWIG_FromCharPtr(result); 2326 return resultobj; 2327 fail: 2328 return NULL; 2329 } 2330 2331 2332 static PyObject *_wrap_attropl_value_set(PyObject *self, PyObject *args) { 2333 PyObject *resultobj; 2334 struct attropl *arg1 = (struct attropl *) 0 ; 2335 char *arg2 = (char *) 0 ; 2336 PyObject * obj0 = 0 ; 2337 PyObject * obj1 = 0 ; 2338 2339 if(!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) goto fail; 2340 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2341 if (SWIG_arg_fail(1)) SWIG_fail; 2342 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2343 SWIG_arg_fail(2);SWIG_fail; 2344 } 2345 { 2346 if (arg1->value) free((char*)arg1->value); 2347 if (arg2) { 2348 arg1->value = (char *) malloc(strlen(arg2)+1); 2349 strcpy((char*)arg1->value,arg2); 2350 } else { 2351 arg1->value = 0; 2352 } 2353 } 2354 Py_INCREF(Py_None); resultobj = Py_None; 2355 return resultobj; 2356 fail: 2357 return NULL; 2358 } 2359 2360 2361 static PyObject *_wrap_attropl_value_get(PyObject *self, PyObject *args) { 2362 PyObject *resultobj; 2363 struct attropl *arg1 = (struct attropl *) 0 ; 2364 char *result; 2365 PyObject * obj0 = 0 ; 2366 2367 if(!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) goto fail; 2368 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2369 if (SWIG_arg_fail(1)) SWIG_fail; 2370 result = (char *) ((arg1)->value); 2371 2372 resultobj = SWIG_FromCharPtr(result); 2373 return resultobj; 2374 fail: 2375 return NULL; 2376 } 2377 2378 2379 static PyObject *_wrap_attropl_op_set(PyObject *self, PyObject *args) { 2380 PyObject *resultobj; 2381 struct attropl *arg1 = (struct attropl *) 0 ; 2382 enum batch_op arg2 ; 2383 PyObject * obj0 = 0 ; 2384 PyObject * obj1 = 0 ; 2385 2386 if(!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) goto fail; 2387 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2388 if (SWIG_arg_fail(1)) SWIG_fail; 2389 { 2390 arg2 = (enum batch_op)(SWIG_As_int(obj1)); 2391 if (SWIG_arg_fail(2)) SWIG_fail; 2392 } 2393 if (arg1) (arg1)->op = (enum batch_op )arg2; 2394 2395 Py_INCREF(Py_None); resultobj = Py_None; 2396 return resultobj; 2397 fail: 2398 return NULL; 2399 } 2400 2401 2402 static PyObject *_wrap_attropl_op_get(PyObject *self, PyObject *args) { 2403 PyObject *resultobj; 2404 struct attropl *arg1 = (struct attropl *) 0 ; 2405 enum batch_op result; 2406 PyObject * obj0 = 0 ; 2407 2408 if(!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) goto fail; 2409 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2410 if (SWIG_arg_fail(1)) SWIG_fail; 2411 result = (enum batch_op) ((arg1)->op); 2412 2413 resultobj = SWIG_From_int((result)); 2414 return resultobj; 2415 fail: 2416 return NULL; 2417 } 2418 2419 2420 static PyObject *_wrap_attropl___str__(PyObject *self, PyObject *args) { 2421 PyObject *resultobj; 2422 struct attropl *arg1 = (struct attropl *) 0 ; 2423 char *result; 2424 PyObject * obj0 = 0 ; 2425 2426 if(!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) goto fail; 2427 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_attropl, SWIG_POINTER_EXCEPTION | 0); 2428 if (SWIG_arg_fail(1)) SWIG_fail; 2429 result = (char *)attropl___str__(arg1); 2430 2431 resultobj = SWIG_FromCharPtr(result); 2432 return resultobj; 2433 fail: 2434 return NULL; 2435 } 2436 2437 2438 static PyObject * attropl_swigregister(PyObject *self, PyObject *args) { 2439 PyObject *obj; 2440 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; 2441 SWIG_TypeClientData(SWIGTYPE_p_attropl, obj); 2442 Py_INCREF(obj); 2443 return Py_BuildValue((char *)""); 2444 } 2445 static PyObject *_wrap_batch_status_name_set(PyObject *self, PyObject *args) { 2446 PyObject *resultobj; 2447 struct batch_status *arg1 = (struct batch_status *) 0 ; 2448 char *arg2 = (char *) 0 ; 2449 PyObject * obj0 = 0 ; 2450 PyObject * obj1 = 0 ; 2451 2452 if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) goto fail; 2453 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2454 if (SWIG_arg_fail(1)) SWIG_fail; 2455 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2456 SWIG_arg_fail(2);SWIG_fail; 2457 } 2458 { 2459 if (arg1->name) free((char*)arg1->name); 2460 if (arg2) { 2461 arg1->name = (char *) malloc(strlen(arg2)+1); 2462 strcpy((char*)arg1->name,arg2); 2463 } else { 2464 arg1->name = 0; 2465 } 2466 } 2467 Py_INCREF(Py_None); resultobj = Py_None; 2468 return resultobj; 2469 fail: 2470 return NULL; 2471 } 2472 2473 2474 static PyObject *_wrap_batch_status_name_get(PyObject *self, PyObject *args) { 2475 PyObject *resultobj; 2476 struct batch_status *arg1 = (struct batch_status *) 0 ; 2477 char *result; 2478 PyObject * obj0 = 0 ; 2479 2480 if(!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) goto fail; 2481 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2482 if (SWIG_arg_fail(1)) SWIG_fail; 2483 result = (char *) ((arg1)->name); 2484 2485 resultobj = SWIG_FromCharPtr(result); 2486 return resultobj; 2487 fail: 2488 return NULL; 2489 } 2490 2491 2492 static PyObject *_wrap_batch_status_attribs_set(PyObject *self, PyObject *args) { 2493 PyObject *resultobj; 2494 struct batch_status *arg1 = (struct batch_status *) 0 ; 2495 struct attrl *arg2 = (struct attrl *) 0 ; 2496 PyObject * obj0 = 0 ; 2497 PyObject * obj1 = 0 ; 2498 2499 if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) goto fail; 2500 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2501 if (SWIG_arg_fail(1)) SWIG_fail; 2502 SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_attrl, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN); 2503 if (SWIG_arg_fail(2)) SWIG_fail; 2504 if (arg1) (arg1)->attribs = arg2; 2505 2506 Py_INCREF(Py_None); resultobj = Py_None; 2507 return resultobj; 2508 fail: 2509 return NULL; 2510 } 2511 2512 2513 static PyObject *_wrap_batch_status_attribs_get(PyObject *self, PyObject *args) { 2514 PyObject *resultobj; 2515 struct batch_status *arg1 = (struct batch_status *) 0 ; 2516 struct attrl *result; 2517 PyObject * obj0 = 0 ; 2518 2519 if(!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) goto fail; 2520 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2521 if (SWIG_arg_fail(1)) SWIG_fail; 2522 result = (struct attrl *) ((arg1)->attribs); 2523 2524 { 2525 PyObject *obj_batch; 2526 struct attrl *ptr; 2527 int i=0, len=0; 2528 2529 if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); 2530 2531 ptr = result; 2532 while (ptr != NULL) { 2533 len++; 2534 ptr = ptr->next; 2535 } 2536 resultobj = PyList_New(len); 2537 2538 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 2539 2540 if (SARA_DEBUG) printf("\t<Contents>\n"); 2541 ptr = result; 2542 for (i=0; i < len; i++) { 2543 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 2544 PyList_SetItem(resultobj, i, obj_batch); 2545 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 2546 ptr = ptr->next; 2547 } 2548 if (SARA_DEBUG) printf("\t</Contents>\n"); 2549 } 2550 return resultobj; 2551 fail: 2552 return NULL; 2553 } 2554 2555 2556 static PyObject *_wrap_batch_status_text_set(PyObject *self, PyObject *args) { 2557 PyObject *resultobj; 2558 struct batch_status *arg1 = (struct batch_status *) 0 ; 2559 char *arg2 = (char *) 0 ; 2560 PyObject * obj0 = 0 ; 2561 PyObject * obj1 = 0 ; 2562 2563 if(!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) goto fail; 2564 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2565 if (SWIG_arg_fail(1)) SWIG_fail; 2566 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2567 SWIG_arg_fail(2);SWIG_fail; 2568 } 2569 { 2570 if (arg1->text) free((char*)arg1->text); 2571 if (arg2) { 2572 arg1->text = (char *) malloc(strlen(arg2)+1); 2573 strcpy((char*)arg1->text,arg2); 2574 } else { 2575 arg1->text = 0; 2576 } 2577 } 2578 Py_INCREF(Py_None); resultobj = Py_None; 2579 return resultobj; 2580 fail: 2581 return NULL; 2582 } 2583 2584 2585 static PyObject *_wrap_batch_status_text_get(PyObject *self, PyObject *args) { 2586 PyObject *resultobj; 2587 struct batch_status *arg1 = (struct batch_status *) 0 ; 2588 char *result; 2589 PyObject * obj0 = 0 ; 2590 2591 if(!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) goto fail; 2592 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_batch_status, SWIG_POINTER_EXCEPTION | 0); 2593 if (SWIG_arg_fail(1)) SWIG_fail; 2594 result = (char *) ((arg1)->text); 2595 2596 resultobj = SWIG_FromCharPtr(result); 2597 return resultobj; 2598 fail: 2599 return NULL; 2600 } 2601 2602 2603 static PyObject * batch_status_swigregister(PyObject *self, PyObject *args) { 2604 PyObject *obj; 2605 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; 2606 SWIG_TypeClientData(SWIGTYPE_p_batch_status, obj); 2607 Py_INCREF(obj); 2608 return Py_BuildValue((char *)""); 2609 } 2610 static int _wrap_pbs_errno_set(PyObject *_val) { 2611 { 2612 int temp = (int)(SWIG_As_int(_val)); 2613 if (PyErr_Occurred()) { 2614 SWIG_append_errmsg("C/C++ variable 'pbs_errno (int)'"); 2615 return 1; 2616 } 2617 pbs_errno = temp; 2618 } 2619 return 0; 2620 } 2621 2622 2623 static PyObject *_wrap_pbs_errno_get(void) { 2624 PyObject *pyobj; 2625 2626 { 2627 pyobj = SWIG_From_int((int)(pbs_errno)); 2628 } 2629 return pyobj; 2630 } 2631 2632 2633 static int _wrap_pbs_server_set(PyObject *_val) { 2634 { 2635 char *cptr = 0; 2636 if (!SWIG_AsNewCharPtr(_val, &cptr)) { 2637 SWIG_append_errmsg("C/C++ variable 'pbs_server'"); 2638 return 1; 2639 } 2640 if (pbs_server) free((char*)pbs_server); 2641 pbs_server = cptr; 2642 } 2643 return 0; 2644 } 2645 2646 2647 static PyObject *_wrap_pbs_server_get(void) { 2648 PyObject *pyobj; 2649 2650 pyobj = SWIG_FromCharPtr(pbs_server); 2651 return pyobj; 2652 } 2653 2654 2655 static PyObject *_wrap_avail(PyObject *self, PyObject *args) { 2656 PyObject *resultobj; 2657 int arg1 ; 2658 char *arg2 = (char *) 0 ; 2659 char *result; 2660 PyObject * obj0 = 0 ; 2661 PyObject * obj1 = 0 ; 2662 2663 if(!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) goto fail; 2664 { 2665 arg1 = (int)(SWIG_As_int(obj0)); 2666 if (SWIG_arg_fail(1)) SWIG_fail; 2667 } 2668 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2669 SWIG_arg_fail(2);SWIG_fail; 2670 } 2671 result = (char *)avail(arg1,arg2); 2672 2673 resultobj = SWIG_FromCharPtr(result); 2674 return resultobj; 2675 fail: 2676 return NULL; 2677 } 2678 2679 2680 static PyObject *_wrap_pbs_asyrunjob(PyObject *self, PyObject *args) { 2681 PyObject *resultobj; 2682 int arg1 ; 2683 char *arg2 = (char *) 0 ; 2684 char *arg3 = (char *) 0 ; 2685 char *arg4 = (char *) 0 ; 2686 int result; 2687 PyObject * obj0 = 0 ; 2688 PyObject * obj1 = 0 ; 2689 PyObject * obj2 = 0 ; 2690 PyObject * obj3 = 0 ; 2691 2692 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 2693 { 2694 arg1 = (int)(SWIG_As_int(obj0)); 2695 if (SWIG_arg_fail(1)) SWIG_fail; 2696 } 2697 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2698 SWIG_arg_fail(2);SWIG_fail; 2699 } 2700 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 2701 SWIG_arg_fail(3);SWIG_fail; 2702 } 2703 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 2704 SWIG_arg_fail(4);SWIG_fail; 2705 } 2706 result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4); 2707 2708 { 2709 resultobj = SWIG_From_int((int)(result)); 2710 } 2711 return resultobj; 2712 fail: 2713 return NULL; 2714 } 2715 2716 2717 static PyObject *_wrap_pbs_alterjob(PyObject *self, PyObject *args) { 2718 PyObject *resultobj; 2719 int arg1 ; 2720 char *arg2 = (char *) 0 ; 2721 struct attrl *arg3 = (struct attrl *) 0 ; 2722 char *arg4 = (char *) 0 ; 2723 int result; 2724 PyObject * obj0 = 0 ; 2725 PyObject * obj1 = 0 ; 2726 PyObject * obj2 = 0 ; 2727 PyObject * obj3 = 0 ; 2728 2729 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 2730 { 2731 arg1 = (int)(SWIG_As_int(obj0)); 2732 if (SWIG_arg_fail(1)) SWIG_fail; 2733 } 2734 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2735 SWIG_arg_fail(2);SWIG_fail; 2736 } 2737 { 2738 PyObject *py_obj; 2739 struct attrl *ptr, *prev; 2740 char s[255]; 2741 int i=0, size=0; 2742 2743 // printf("Python --> C\n"); 2744 2745 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 2746 2747 size = Get_List_Size(obj2); 2748 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 2749 2750 if ( size == -1 ) { 2751 PyErr_SetString(PyExc_TypeError, "not a list"); 2752 return NULL; 2753 } 2754 2755 if (SARA_DEBUG) printf("\t<Contents>\n"); 2756 2757 arg3 = prev = NULL; 2758 for ( i=0; i < size; i++ ) { 2759 py_obj = PyList_GetItem(obj2, i); 2760 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 2761 sprintf(s,"list item %d has wrong type", i); 2762 PyErr_SetString(PyExc_TypeError, s); 2763 return NULL; 2764 2765 // This will skipp the wrong entry 2766 // continue; 2767 } 2768 2769 /* 2770 * Make first entry head of C linked list 2771 */ 2772 if ( i == 0) { 2773 arg3 = ptr; 2774 ptr->next = prev; 2775 } 2776 else { 2777 prev->next = ptr; 2778 ptr->next = NULL; 2779 } 2780 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 2781 2782 prev = ptr; 2783 2784 } // end for 2785 if (SARA_DEBUG) printf("\t</Contents>\n"); 2786 } 2787 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 2788 SWIG_arg_fail(4);SWIG_fail; 2789 } 2790 result = (int)pbs_alterjob(arg1,arg2,arg3,arg4); 2791 2792 { 2793 resultobj = SWIG_From_int((int)(result)); 2794 } 2795 return resultobj; 2796 fail: 2797 return NULL; 2798 } 2799 2800 2801 static PyObject *_wrap_pbs_connect(PyObject *self, PyObject *args) { 2802 PyObject *resultobj; 2803 char *arg1 = (char *) 0 ; 2804 int result; 2805 PyObject * obj0 = 0 ; 2806 2807 if(!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) goto fail; 2808 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 2809 SWIG_arg_fail(1);SWIG_fail; 2810 } 2811 result = (int)pbs_connect(arg1); 2812 2813 { 2814 resultobj = SWIG_From_int((int)(result)); 2815 } 2816 return resultobj; 2817 fail: 2818 return NULL; 2819 } 2820 2821 2822 static PyObject *_wrap_pbs_query_max_connections(PyObject *self, PyObject *args) { 2823 PyObject *resultobj; 2824 int result; 2825 2826 if(!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) goto fail; 2827 result = (int)pbs_query_max_connections(); 2828 2829 { 2830 resultobj = SWIG_From_int((int)(result)); 2831 } 2832 return resultobj; 2833 fail: 2834 return NULL; 2835 } 2836 2837 2838 static PyObject *_wrap_pbs_default(PyObject *self, PyObject *args) { 2839 PyObject *resultobj; 2840 char *result; 2841 2842 if(!PyArg_ParseTuple(args,(char *)":pbs_default")) goto fail; 2843 result = (char *)pbs_default(); 2844 2845 resultobj = SWIG_FromCharPtr(result); 2846 return resultobj; 2847 fail: 2848 return NULL; 2849 } 2850 2851 2852 static PyObject *_wrap_pbs_deljob(PyObject *self, PyObject *args) { 2853 PyObject *resultobj; 2854 int arg1 ; 2855 char *arg2 = (char *) 0 ; 2856 char *arg3 = (char *) 0 ; 2857 int result; 2858 PyObject * obj0 = 0 ; 2859 PyObject * obj1 = 0 ; 2860 PyObject * obj2 = 0 ; 2861 2862 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) goto fail; 2863 { 2864 arg1 = (int)(SWIG_As_int(obj0)); 2865 if (SWIG_arg_fail(1)) SWIG_fail; 2866 } 2867 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2868 SWIG_arg_fail(2);SWIG_fail; 2869 } 2870 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 2871 SWIG_arg_fail(3);SWIG_fail; 2872 } 2873 result = (int)pbs_deljob(arg1,arg2,arg3); 2874 2875 { 2876 resultobj = SWIG_From_int((int)(result)); 2877 } 2878 return resultobj; 2879 fail: 2880 return NULL; 2881 } 2882 2883 2884 static PyObject *_wrap_pbs_disconnect(PyObject *self, PyObject *args) { 2885 PyObject *resultobj; 2886 int arg1 ; 2887 int result; 2888 PyObject * obj0 = 0 ; 2889 2890 if(!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) goto fail; 2891 { 2892 arg1 = (int)(SWIG_As_int(obj0)); 2893 if (SWIG_arg_fail(1)) SWIG_fail; 2894 } 2895 result = (int)pbs_disconnect(arg1); 2896 2897 { 2898 resultobj = SWIG_From_int((int)(result)); 2899 } 2900 return resultobj; 2901 fail: 2902 return NULL; 2903 } 2904 2905 2906 static PyObject *_wrap_pbs_holdjob(PyObject *self, PyObject *args) { 2907 PyObject *resultobj; 2908 int arg1 ; 2909 char *arg2 = (char *) 0 ; 2910 char *arg3 = (char *) 0 ; 2911 char *arg4 = (char *) 0 ; 2912 int result; 2913 PyObject * obj0 = 0 ; 2914 PyObject * obj1 = 0 ; 2915 PyObject * obj2 = 0 ; 2916 PyObject * obj3 = 0 ; 2917 2918 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 2919 { 2920 arg1 = (int)(SWIG_As_int(obj0)); 2921 if (SWIG_arg_fail(1)) SWIG_fail; 2922 } 2923 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2924 SWIG_arg_fail(2);SWIG_fail; 2925 } 2926 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 2927 SWIG_arg_fail(3);SWIG_fail; 2928 } 2929 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 2930 SWIG_arg_fail(4);SWIG_fail; 2931 } 2932 result = (int)pbs_holdjob(arg1,arg2,arg3,arg4); 2933 2934 { 2935 resultobj = SWIG_From_int((int)(result)); 2936 } 2937 return resultobj; 2938 fail: 2939 return NULL; 2940 } 2941 2942 2943 static PyObject *_wrap_pbs_locjob(PyObject *self, PyObject *args) { 2944 PyObject *resultobj; 2945 int arg1 ; 2946 char *arg2 = (char *) 0 ; 2947 char *arg3 = (char *) 0 ; 2948 char *result; 2949 PyObject * obj0 = 0 ; 2950 PyObject * obj1 = 0 ; 2951 PyObject * obj2 = 0 ; 2952 2953 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) goto fail; 2954 { 2955 arg1 = (int)(SWIG_As_int(obj0)); 2956 if (SWIG_arg_fail(1)) SWIG_fail; 2957 } 2958 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 2959 SWIG_arg_fail(2);SWIG_fail; 2960 } 2961 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 2962 SWIG_arg_fail(3);SWIG_fail; 2963 } 2964 result = (char *)pbs_locjob(arg1,arg2,arg3); 2965 2966 resultobj = SWIG_FromCharPtr(result); 2967 return resultobj; 2968 fail: 2969 return NULL; 2970 } 2971 2972 2973 static PyObject *_wrap_pbs_manager(PyObject *self, PyObject *args) { 2974 PyObject *resultobj; 2975 int arg1 ; 2976 int arg2 ; 2977 int arg3 ; 2978 char *arg4 = (char *) 0 ; 2979 struct attropl *arg5 = (struct attropl *) 0 ; 2980 char *arg6 = (char *) 0 ; 2981 int result; 2982 PyObject * obj0 = 0 ; 2983 PyObject * obj1 = 0 ; 2984 PyObject * obj2 = 0 ; 2985 PyObject * obj3 = 0 ; 2986 PyObject * obj4 = 0 ; 2987 PyObject * obj5 = 0 ; 2988 2989 if(!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; 2990 { 2991 arg1 = (int)(SWIG_As_int(obj0)); 2992 if (SWIG_arg_fail(1)) SWIG_fail; 2993 } 2994 { 2995 arg2 = (int)(SWIG_As_int(obj1)); 2996 if (SWIG_arg_fail(2)) SWIG_fail; 2997 } 2998 { 2999 arg3 = (int)(SWIG_As_int(obj2)); 3000 if (SWIG_arg_fail(3)) SWIG_fail; 3001 } 3002 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3003 SWIG_arg_fail(4);SWIG_fail; 3004 } 3005 { 3006 PyObject *py_obj; 3007 struct attropl *ptr, *prev; 3008 char s[255]; 3009 int i=0, size=0; 3010 3011 // printf("Python --> C\n"); 3012 3013 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 3014 3015 size = Get_List_Size(obj4); 3016 3017 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3018 3019 if ( size == -1 ) { 3020 PyErr_SetString(PyExc_TypeError, "not a list"); 3021 return NULL; 3022 } 3023 //printf("Size = %d\n", size); 3024 3025 if (SARA_DEBUG) printf("\t<Contents>\n"); 3026 3027 arg5 = prev = NULL; 3028 for ( i=0; i < size; i++ ) { 3029 py_obj = PyList_GetItem(obj4, i); 3030 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 3031 sprintf(s,"list item %d has wrong type", i); 3032 PyErr_SetString(PyExc_TypeError, s); 3033 return NULL; 3034 3035 // This will skipp the wrong entry 3036 // continue; 3037 } 3038 3039 /* 3040 * Make first entry head of C linked list 3041 */ 3042 if ( i == 0) { 3043 arg5 = ptr; 3044 ptr->next = prev; 3045 } 3046 else { 3047 prev->next = ptr; 3048 ptr->next = NULL; 3049 } 3050 prev = ptr; 3051 3052 } // end for 3053 if (SARA_DEBUG) printf("\t</Contents>\n"); 3054 } 3055 if (!SWIG_AsCharPtr(obj5, (char**)&arg6)) { 3056 SWIG_arg_fail(6);SWIG_fail; 3057 } 3058 result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6); 3059 3060 { 3061 resultobj = SWIG_From_int((int)(result)); 3062 } 3063 return resultobj; 3064 fail: 3065 return NULL; 3066 } 3067 3068 3069 static PyObject *_wrap_pbs_movejob(PyObject *self, PyObject *args) { 3070 PyObject *resultobj; 3071 int arg1 ; 3072 char *arg2 = (char *) 0 ; 3073 char *arg3 = (char *) 0 ; 3074 char *arg4 = (char *) 0 ; 3075 int result; 3076 PyObject * obj0 = 0 ; 3077 PyObject * obj1 = 0 ; 3078 PyObject * obj2 = 0 ; 3079 PyObject * obj3 = 0 ; 3080 3081 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3082 { 3083 arg1 = (int)(SWIG_As_int(obj0)); 3084 if (SWIG_arg_fail(1)) SWIG_fail; 3085 } 3086 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3087 SWIG_arg_fail(2);SWIG_fail; 3088 } 3089 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3090 SWIG_arg_fail(3);SWIG_fail; 3091 } 3092 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3093 SWIG_arg_fail(4);SWIG_fail; 3094 } 3095 result = (int)pbs_movejob(arg1,arg2,arg3,arg4); 3096 3097 { 3098 resultobj = SWIG_From_int((int)(result)); 3099 } 3100 return resultobj; 3101 fail: 3102 return NULL; 3103 } 3104 3105 3106 static PyObject *_wrap_pbs_msgjob(PyObject *self, PyObject *args) { 3107 PyObject *resultobj; 3108 int arg1 ; 3109 char *arg2 = (char *) 0 ; 3110 int arg3 ; 3111 char *arg4 = (char *) 0 ; 3112 char *arg5 = (char *) 0 ; 3113 int result; 3114 PyObject * obj0 = 0 ; 3115 PyObject * obj1 = 0 ; 3116 PyObject * obj2 = 0 ; 3117 PyObject * obj3 = 0 ; 3118 PyObject * obj4 = 0 ; 3119 3120 if(!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; 3121 { 3122 arg1 = (int)(SWIG_As_int(obj0)); 3123 if (SWIG_arg_fail(1)) SWIG_fail; 3124 } 3125 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3126 SWIG_arg_fail(2);SWIG_fail; 3127 } 3128 { 3129 arg3 = (int)(SWIG_As_int(obj2)); 3130 if (SWIG_arg_fail(3)) SWIG_fail; 3131 } 3132 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3133 SWIG_arg_fail(4);SWIG_fail; 3134 } 3135 if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) { 3136 SWIG_arg_fail(5);SWIG_fail; 3137 } 3138 result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5); 3139 3140 { 3141 resultobj = SWIG_From_int((int)(result)); 3142 } 3143 return resultobj; 3144 fail: 3145 return NULL; 3146 } 3147 3148 3149 static PyObject *_wrap_pbs_orderjob(PyObject *self, PyObject *args) { 3150 PyObject *resultobj; 3151 int arg1 ; 3152 char *arg2 = (char *) 0 ; 3153 char *arg3 = (char *) 0 ; 3154 char *arg4 = (char *) 0 ; 3155 int result; 3156 PyObject * obj0 = 0 ; 3157 PyObject * obj1 = 0 ; 3158 PyObject * obj2 = 0 ; 3159 PyObject * obj3 = 0 ; 3160 3161 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3162 { 3163 arg1 = (int)(SWIG_As_int(obj0)); 3164 if (SWIG_arg_fail(1)) SWIG_fail; 3165 } 3166 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3167 SWIG_arg_fail(2);SWIG_fail; 3168 } 3169 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3170 SWIG_arg_fail(3);SWIG_fail; 3171 } 3172 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3173 SWIG_arg_fail(4);SWIG_fail; 3174 } 3175 result = (int)pbs_orderjob(arg1,arg2,arg3,arg4); 3176 3177 { 3178 resultobj = SWIG_From_int((int)(result)); 3179 } 3180 return resultobj; 3181 fail: 3182 return NULL; 3183 } 3184 3185 3186 static PyObject *_wrap_pbs_rescquery(PyObject *self, PyObject *args) { 3187 PyObject *resultobj; 3188 int arg1 ; 3189 char **arg2 = (char **) 0 ; 3190 int arg3 ; 3191 int *arg4 = (int *) 0 ; 3192 int *arg5 = (int *) 0 ; 3193 int *arg6 = (int *) 0 ; 3194 int *arg7 = (int *) 0 ; 3195 int result; 3196 int temp4 ; 3197 int res4 = 0 ; 3198 int temp5 ; 3199 int res5 = 0 ; 3200 int temp6 ; 3201 int res6 = 0 ; 3202 int temp7 ; 3203 int res7 = 0 ; 3204 PyObject * obj0 = 0 ; 3205 PyObject * obj1 = 0 ; 3206 PyObject * obj2 = 0 ; 3207 3208 arg4 = &temp4; res4 = SWIG_NEWOBJ; 3209 arg5 = &temp5; res5 = SWIG_NEWOBJ; 3210 arg6 = &temp6; res6 = SWIG_NEWOBJ; 3211 arg7 = &temp7; res7 = SWIG_NEWOBJ; 3212 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_rescquery",&obj0,&obj1,&obj2)) goto fail; 3213 { 3214 arg1 = (int)(SWIG_As_int(obj0)); 3215 if (SWIG_arg_fail(1)) SWIG_fail; 3216 } 3217 { 3218 int i=0, size=0; 3219 PyObject *py_obj; 3220 3221 if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); 3222 3223 size = Get_List_Size(obj1); 3224 3225 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3226 3227 if ( size == -1 ) { 3228 PyErr_SetString(PyExc_TypeError, "not a list"); 3229 return NULL; 3230 } 3231 // printf("Size = %d\n", size); 3232 3233 if (SARA_DEBUG) printf("\t<Contents>\n"); 3234 3235 arg2 = (char **) malloc( (size+1) * sizeof(char *)); 3236 for (i=0; i < size; i++) { 3237 py_obj = PyList_GetItem(obj1, i); 3238 if (PyString_Check(py_obj)) { 3239 arg2[i] = PyString_AsString(py_obj); 3240 if (SARA_DEBUG) printf("%s", arg2[i]); 3241 } 3242 else { 3243 PyErr_SetString(PyExc_TypeError, "not a list of strings"); 3244 free(arg2); 3245 return NULL; 3246 } 3247 } // end for 3248 arg2[i] = 0; 3249 if (SARA_DEBUG) printf("\t</Contents>\n"); 3250 } 3251 { 3252 arg3 = (int)(SWIG_As_int(obj2)); 3253 if (SWIG_arg_fail(3)) SWIG_fail; 3254 } 3255 result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7); 3256 3257 { 3258 resultobj = SWIG_From_int((int)(result)); 3259 } 3260 resultobj = t_output_helper(resultobj, ((res4 == SWIG_NEWOBJ) ? 3261 SWIG_From_int((*arg4)) : SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, 0))); 3262 resultobj = t_output_helper(resultobj, ((res5 == SWIG_NEWOBJ) ? 3263 SWIG_From_int((*arg5)) : SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, 0))); 3264 resultobj = t_output_helper(resultobj, ((res6 == SWIG_NEWOBJ) ? 3265 SWIG_From_int((*arg6)) : SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, 0))); 3266 resultobj = t_output_helper(resultobj, ((res7 == SWIG_NEWOBJ) ? 3267 SWIG_From_int((*arg7)) : SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, 0))); 3268 { 3269 free( (char *) arg2); 3270 } 3271 return resultobj; 3272 fail: 3273 { 3274 free( (char *) arg2); 3275 } 3276 return NULL; 3277 } 3278 3279 3280 static PyObject *_wrap_pbs_rescreserve(PyObject *self, PyObject *args) { 3281 PyObject *resultobj; 3282 int arg1 ; 3283 char **arg2 = (char **) 0 ; 3284 int arg3 ; 3285 int *arg4 = (int *) 0 ; 3286 int result; 3287 int temp4 ; 3288 int res4 = 0 ; 3289 PyObject * obj0 = 0 ; 3290 PyObject * obj1 = 0 ; 3291 PyObject * obj2 = 0 ; 3292 3293 arg4 = &temp4; res4 = SWIG_NEWOBJ; 3294 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_rescreserve",&obj0,&obj1,&obj2)) goto fail; 3295 { 3296 arg1 = (int)(SWIG_As_int(obj0)); 3297 if (SWIG_arg_fail(1)) SWIG_fail; 3298 } 3299 { 3300 int i=0, size=0; 3301 PyObject *py_obj; 3302 3303 if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); 3304 3305 size = Get_List_Size(obj1); 3306 3307 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3308 3309 if ( size == -1 ) { 3310 PyErr_SetString(PyExc_TypeError, "not a list"); 3311 return NULL; 3312 } 3313 // printf("Size = %d\n", size); 3314 3315 if (SARA_DEBUG) printf("\t<Contents>\n"); 3316 3317 arg2 = (char **) malloc( (size+1) * sizeof(char *)); 3318 for (i=0; i < size; i++) { 3319 py_obj = PyList_GetItem(obj1, i); 3320 if (PyString_Check(py_obj)) { 3321 arg2[i] = PyString_AsString(py_obj); 3322 if (SARA_DEBUG) printf("%s", arg2[i]); 3323 } 3324 else { 3325 PyErr_SetString(PyExc_TypeError, "not a list of strings"); 3326 free(arg2); 3327 return NULL; 3328 } 3329 } // end for 3330 arg2[i] = 0; 3331 if (SARA_DEBUG) printf("\t</Contents>\n"); 3332 } 3333 { 3334 arg3 = (int)(SWIG_As_int(obj2)); 3335 if (SWIG_arg_fail(3)) SWIG_fail; 3336 } 3337 result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4); 3338 3339 { 3340 resultobj = SWIG_From_int((int)(result)); 3341 } 3342 resultobj = t_output_helper(resultobj, ((res4 == SWIG_NEWOBJ) ? 3343 SWIG_From_int((*arg4)) : SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, 0))); 3344 { 3345 free( (char *) arg2); 3346 } 3347 return resultobj; 3348 fail: 3349 { 3350 free( (char *) arg2); 3351 } 3352 return NULL; 3353 } 3354 3355 3356 static PyObject *_wrap_pbs_rescrelease(PyObject *self, PyObject *args) { 3357 PyObject *resultobj; 3358 int arg1 ; 3359 int arg2 ; 3360 int result; 3361 PyObject * obj0 = 0 ; 3362 PyObject * obj1 = 0 ; 3363 3364 if(!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) goto fail; 3365 { 3366 arg1 = (int)(SWIG_As_int(obj0)); 3367 if (SWIG_arg_fail(1)) SWIG_fail; 3368 } 3369 { 3370 arg2 = (int)(SWIG_As_int(obj1)); 3371 if (SWIG_arg_fail(2)) SWIG_fail; 3372 } 3373 result = (int)pbs_rescrelease(arg1,arg2); 3374 3375 { 3376 resultobj = SWIG_From_int((int)(result)); 3377 } 3378 return resultobj; 3379 fail: 3380 return NULL; 3381 } 3382 3383 3384 static PyObject *_wrap_pbs_rerunjob(PyObject *self, PyObject *args) { 3385 PyObject *resultobj; 3386 int arg1 ; 3387 char *arg2 = (char *) 0 ; 3388 char *arg3 = (char *) 0 ; 3389 int result; 3390 PyObject * obj0 = 0 ; 3391 PyObject * obj1 = 0 ; 3392 PyObject * obj2 = 0 ; 3393 3394 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) goto fail; 3395 { 3396 arg1 = (int)(SWIG_As_int(obj0)); 3397 if (SWIG_arg_fail(1)) SWIG_fail; 3398 } 3399 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3400 SWIG_arg_fail(2);SWIG_fail; 3401 } 3402 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3403 SWIG_arg_fail(3);SWIG_fail; 3404 } 3405 result = (int)pbs_rerunjob(arg1,arg2,arg3); 3406 3407 { 3408 resultobj = SWIG_From_int((int)(result)); 3409 } 3410 return resultobj; 3411 fail: 3412 return NULL; 3413 } 3414 3415 3416 static PyObject *_wrap_pbs_rlsjob(PyObject *self, PyObject *args) { 3417 PyObject *resultobj; 3418 int arg1 ; 3419 char *arg2 = (char *) 0 ; 3420 char *arg3 = (char *) 0 ; 3421 char *arg4 = (char *) 0 ; 3422 int result; 3423 PyObject * obj0 = 0 ; 3424 PyObject * obj1 = 0 ; 3425 PyObject * obj2 = 0 ; 3426 PyObject * obj3 = 0 ; 3427 3428 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3429 { 3430 arg1 = (int)(SWIG_As_int(obj0)); 3431 if (SWIG_arg_fail(1)) SWIG_fail; 3432 } 3433 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3434 SWIG_arg_fail(2);SWIG_fail; 3435 } 3436 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3437 SWIG_arg_fail(3);SWIG_fail; 3438 } 3439 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3440 SWIG_arg_fail(4);SWIG_fail; 3441 } 3442 result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4); 3443 3444 { 3445 resultobj = SWIG_From_int((int)(result)); 3446 } 3447 return resultobj; 3448 fail: 3449 return NULL; 3450 } 3451 3452 3453 static PyObject *_wrap_pbs_runjob(PyObject *self, PyObject *args) { 3454 PyObject *resultobj; 3455 int arg1 ; 3456 char *arg2 = (char *) 0 ; 3457 char *arg3 = (char *) 0 ; 3458 char *arg4 = (char *) 0 ; 3459 int result; 3460 PyObject * obj0 = 0 ; 3461 PyObject * obj1 = 0 ; 3462 PyObject * obj2 = 0 ; 3463 PyObject * obj3 = 0 ; 3464 3465 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3466 { 3467 arg1 = (int)(SWIG_As_int(obj0)); 3468 if (SWIG_arg_fail(1)) SWIG_fail; 3469 } 3470 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3471 SWIG_arg_fail(2);SWIG_fail; 3472 } 3473 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3474 SWIG_arg_fail(3);SWIG_fail; 3475 } 3476 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3477 SWIG_arg_fail(4);SWIG_fail; 3478 } 3479 result = (int)pbs_runjob(arg1,arg2,arg3,arg4); 3480 3481 { 3482 resultobj = SWIG_From_int((int)(result)); 3483 } 3484 return resultobj; 3485 fail: 3486 return NULL; 3487 } 3488 3489 3490 static PyObject *_wrap_pbs_selectjob(PyObject *self, PyObject *args) { 3491 PyObject *resultobj; 3492 int arg1 ; 3493 struct attropl *arg2 = (struct attropl *) 0 ; 3494 char *arg3 = (char *) 0 ; 3495 char **result; 3496 PyObject * obj0 = 0 ; 3497 PyObject * obj1 = 0 ; 3498 PyObject * obj2 = 0 ; 3499 3500 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) goto fail; 3501 { 3502 arg1 = (int)(SWIG_As_int(obj0)); 3503 if (SWIG_arg_fail(1)) SWIG_fail; 3504 } 3505 { 3506 PyObject *py_obj; 3507 struct attropl *ptr, *prev; 3508 char s[255]; 3509 int i=0, size=0; 3510 3511 // printf("Python --> C\n"); 3512 3513 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 3514 3515 size = Get_List_Size(obj1); 3516 3517 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3518 3519 if ( size == -1 ) { 3520 PyErr_SetString(PyExc_TypeError, "not a list"); 3521 return NULL; 3522 } 3523 //printf("Size = %d\n", size); 3524 3525 if (SARA_DEBUG) printf("\t<Contents>\n"); 3526 3527 arg2 = prev = NULL; 3528 for ( i=0; i < size; i++ ) { 3529 py_obj = PyList_GetItem(obj1, i); 3530 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 3531 sprintf(s,"list item %d has wrong type", i); 3532 PyErr_SetString(PyExc_TypeError, s); 3533 return NULL; 3534 3535 // This will skipp the wrong entry 3536 // continue; 3537 } 3538 3539 /* 3540 * Make first entry head of C linked list 3541 */ 3542 if ( i == 0) { 3543 arg2 = ptr; 3544 ptr->next = prev; 3545 } 3546 else { 3547 prev->next = ptr; 3548 ptr->next = NULL; 3549 } 3550 prev = ptr; 3551 3552 } // end for 3553 if (SARA_DEBUG) printf("\t</Contents>\n"); 3554 } 3555 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3556 SWIG_arg_fail(3);SWIG_fail; 3557 } 3558 result = (char **)pbs_selectjob(arg1,arg2,arg3); 3559 3560 { 3561 int len=0, i; 3562 3563 if (SARA_DEBUG) 3564 printf("Converteren char ** -> python list\n"); 3565 3566 3567 if (result == NULL) 3568 resultobj = PyList_New(0); 3569 else { 3570 while (result[len]) 3571 len++; 3572 } 3573 3574 if (SARA_DEBUG) 3575 printf("\tSize of List: %d\n", len); 3576 3577 resultobj = PyList_New(len); 3578 if (SARA_DEBUG) 3579 printf("\t<Contents>\n"); 3580 for (i=0; i < len; i++ ) { 3581 PyList_SetItem(resultobj, i , PyString_FromString(result[i])); 3582 if (SARA_DEBUG) 3583 printf("\t\t- %s\n", result[i]); 3584 } 3585 if (SARA_DEBUG) 3586 printf("\t</Contents>\n"); 3587 } 3588 return resultobj; 3589 fail: 3590 return NULL; 3591 } 3592 3593 3594 static PyObject *_wrap_pbs_sigjob(PyObject *self, PyObject *args) { 3595 PyObject *resultobj; 3596 int arg1 ; 3597 char *arg2 = (char *) 0 ; 3598 char *arg3 = (char *) 0 ; 3599 char *arg4 = (char *) 0 ; 3600 int result; 3601 PyObject * obj0 = 0 ; 3602 PyObject * obj1 = 0 ; 3603 PyObject * obj2 = 0 ; 3604 PyObject * obj3 = 0 ; 3605 3606 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3607 { 3608 arg1 = (int)(SWIG_As_int(obj0)); 3609 if (SWIG_arg_fail(1)) SWIG_fail; 3610 } 3611 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3612 SWIG_arg_fail(2);SWIG_fail; 3613 } 3614 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3615 SWIG_arg_fail(3);SWIG_fail; 3616 } 3617 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3618 SWIG_arg_fail(4);SWIG_fail; 3619 } 3620 result = (int)pbs_sigjob(arg1,arg2,arg3,arg4); 3621 3622 { 3623 resultobj = SWIG_From_int((int)(result)); 3624 } 3625 return resultobj; 3626 fail: 3627 return NULL; 3628 } 3629 3630 3631 static PyObject *_wrap_pbs_statfree(PyObject *self, PyObject *args) { 3632 PyObject *resultobj; 3633 struct batch_status *arg1 = (struct batch_status *) 0 ; 3634 PyObject * obj0 = 0 ; 3635 3636 if(!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) goto fail; 3637 { 3638 PyObject *py_obj; 3639 struct batch_status *ptr, *prev; 3640 char s[255]; 3641 int i=0, size=0; 3642 3643 // printf("Python --> C\n"); 3644 3645 if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n"); 3646 3647 size = Get_List_Size(obj0); 3648 if (SARA_DEBUG) printf("\tSize of list: %d\n", size); 3649 3650 if ( size == -1 ) { 3651 PyErr_SetString(PyExc_TypeError, "not a list"); 3652 return NULL; 3653 } 3654 // printf("Size = %d\n", size); 3655 3656 if (SARA_DEBUG) printf("\t<Contents>\n"); 3657 3658 arg1 = prev = NULL; 3659 for ( i=0; i < size; i++ ) { 3660 py_obj = PyList_GetItem(obj0, i); 3661 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) { 3662 sprintf(s,"list item %d has wrong type", i); 3663 PyErr_SetString(PyExc_TypeError, s); 3664 return NULL; 3665 3666 // This will skipp the wrong entry 3667 // continue; 3668 } 3669 3670 /* 3671 * Make first entry head of C linked list 3672 */ 3673 if ( i == 0) { 3674 arg1 = ptr; 3675 ptr->next = prev; 3676 } 3677 else { 3678 prev->next = ptr; 3679 ptr->next = NULL; 3680 } 3681 3682 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 3683 prev = ptr; 3684 3685 } // end for 3686 3687 if (SARA_DEBUG) printf("\t</Contents>\n"); 3688 } 3689 pbs_statfree(arg1); 3690 3691 Py_INCREF(Py_None); resultobj = Py_None; 3692 return resultobj; 3693 fail: 3694 return NULL; 3695 } 3696 3697 3698 static PyObject *_wrap_pbs_statjob(PyObject *self, PyObject *args) { 3699 PyObject *resultobj; 3700 int arg1 ; 3701 char *arg2 = (char *) 0 ; 3702 struct attrl *arg3 = (struct attrl *) 0 ; 3703 char *arg4 = (char *) 0 ; 3704 struct batch_status *result; 3705 PyObject * obj0 = 0 ; 3706 PyObject * obj1 = 0 ; 3707 PyObject * obj2 = 0 ; 3708 PyObject * obj3 = 0 ; 3709 3710 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) goto fail; 3711 { 3712 arg1 = (int)(SWIG_As_int(obj0)); 3713 if (SWIG_arg_fail(1)) SWIG_fail; 3714 } 3715 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3716 SWIG_arg_fail(2);SWIG_fail; 3717 } 3718 { 3719 PyObject *py_obj; 3720 struct attrl *ptr, *prev; 3721 char s[255]; 3722 int i=0, size=0; 3723 3724 // printf("Python --> C\n"); 3725 3726 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 3727 3728 size = Get_List_Size(obj2); 3729 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3730 3731 if ( size == -1 ) { 3732 PyErr_SetString(PyExc_TypeError, "not a list"); 3733 return NULL; 3734 } 3735 3736 if (SARA_DEBUG) printf("\t<Contents>\n"); 3737 3738 arg3 = prev = NULL; 3739 for ( i=0; i < size; i++ ) { 3740 py_obj = PyList_GetItem(obj2, i); 3741 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 3742 sprintf(s,"list item %d has wrong type", i); 3743 PyErr_SetString(PyExc_TypeError, s); 3744 return NULL; 3745 3746 // This will skipp the wrong entry 3747 // continue; 3748 } 3749 3750 /* 3751 * Make first entry head of C linked list 3752 */ 3753 if ( i == 0) { 3754 arg3 = ptr; 3755 ptr->next = prev; 3756 } 3757 else { 3758 prev->next = ptr; 3759 ptr->next = NULL; 3760 } 3761 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 3762 3763 prev = ptr; 3764 3765 } // end for 3766 if (SARA_DEBUG) printf("\t</Contents>\n"); 3767 } 3768 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3769 SWIG_arg_fail(4);SWIG_fail; 3770 } 3771 result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4); 3772 3773 { 3774 PyObject *obj_batch; 3775 struct batch_status *ptr; 3776 int i=0, len=0; 3777 3778 // printf("Ja we are in bussniss\n"); 3779 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 3780 3781 // Deterime length of list 3782 // 3783 ptr = result; 3784 while (ptr != NULL) { 3785 len++; 3786 ptr = ptr->next; 3787 } 3788 resultobj = PyList_New(len); 3789 3790 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 3791 3792 // Make a list of batch_status pointers 3793 // 3794 if (SARA_DEBUG) printf("\t<Contents>\n"); 3795 ptr = result; 3796 for (i=0; i < len; i++) { 3797 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 3798 PyList_SetItem(resultobj, i, obj_batch); 3799 if (SARA_DEBUG) { 3800 printf("\t\t- %s\n", ptr->name); 3801 } 3802 ptr = ptr->next; 3803 } 3804 if (SARA_DEBUG) printf("\t</Contents>\n"); 3805 } 3806 return resultobj; 3807 fail: 3808 return NULL; 3809 } 3810 3811 3812 static PyObject *_wrap_pbs_selstat(PyObject *self, PyObject *args) { 3813 PyObject *resultobj; 3814 int arg1 ; 3815 struct attropl *arg2 = (struct attropl *) 0 ; 3816 char *arg3 = (char *) 0 ; 3817 struct batch_status *result; 3818 PyObject * obj0 = 0 ; 3819 PyObject * obj1 = 0 ; 3820 PyObject * obj2 = 0 ; 3821 3822 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) goto fail; 3823 { 3824 arg1 = (int)(SWIG_As_int(obj0)); 3825 if (SWIG_arg_fail(1)) SWIG_fail; 3826 } 3827 { 3828 PyObject *py_obj; 3829 struct attropl *ptr, *prev; 3830 char s[255]; 3831 int i=0, size=0; 3832 3833 // printf("Python --> C\n"); 3834 3835 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 3836 3837 size = Get_List_Size(obj1); 3838 3839 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3840 3841 if ( size == -1 ) { 3842 PyErr_SetString(PyExc_TypeError, "not a list"); 3843 return NULL; 3844 } 3845 //printf("Size = %d\n", size); 3846 3847 if (SARA_DEBUG) printf("\t<Contents>\n"); 3848 3849 arg2 = prev = NULL; 3850 for ( i=0; i < size; i++ ) { 3851 py_obj = PyList_GetItem(obj1, i); 3852 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 3853 sprintf(s,"list item %d has wrong type", i); 3854 PyErr_SetString(PyExc_TypeError, s); 3855 return NULL; 3856 3857 // This will skipp the wrong entry 3858 // continue; 3859 } 3860 3861 /* 3862 * Make first entry head of C linked list 3863 */ 3864 if ( i == 0) { 3865 arg2 = ptr; 3866 ptr->next = prev; 3867 } 3868 else { 3869 prev->next = ptr; 3870 ptr->next = NULL; 3871 } 3872 prev = ptr; 3873 3874 } // end for 3875 if (SARA_DEBUG) printf("\t</Contents>\n"); 3876 } 3877 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 3878 SWIG_arg_fail(3);SWIG_fail; 3879 } 3880 result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3); 3881 3882 { 3883 PyObject *obj_batch; 3884 struct batch_status *ptr; 3885 int i=0, len=0; 3886 3887 // printf("Ja we are in bussniss\n"); 3888 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 3889 3890 // Deterime length of list 3891 // 3892 ptr = result; 3893 while (ptr != NULL) { 3894 len++; 3895 ptr = ptr->next; 3896 } 3897 resultobj = PyList_New(len); 3898 3899 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 3900 3901 // Make a list of batch_status pointers 3902 // 3903 if (SARA_DEBUG) printf("\t<Contents>\n"); 3904 ptr = result; 3905 for (i=0; i < len; i++) { 3906 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 3907 PyList_SetItem(resultobj, i, obj_batch); 3908 if (SARA_DEBUG) { 3909 printf("\t\t- %s\n", ptr->name); 3910 } 3911 ptr = ptr->next; 3912 } 3913 if (SARA_DEBUG) printf("\t</Contents>\n"); 3914 } 3915 return resultobj; 3916 fail: 3917 return NULL; 3918 } 3919 3920 3921 static PyObject *_wrap_pbs_statque(PyObject *self, PyObject *args) { 3922 PyObject *resultobj; 3923 int arg1 ; 3924 char *arg2 = (char *) 0 ; 3925 struct attrl *arg3 = (struct attrl *) 0 ; 3926 char *arg4 = (char *) 0 ; 3927 struct batch_status *result; 3928 PyObject * obj0 = 0 ; 3929 PyObject * obj1 = 0 ; 3930 PyObject * obj2 = 0 ; 3931 PyObject * obj3 = 0 ; 3932 3933 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) goto fail; 3934 { 3935 arg1 = (int)(SWIG_As_int(obj0)); 3936 if (SWIG_arg_fail(1)) SWIG_fail; 3937 } 3938 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 3939 SWIG_arg_fail(2);SWIG_fail; 3940 } 3941 { 3942 PyObject *py_obj; 3943 struct attrl *ptr, *prev; 3944 char s[255]; 3945 int i=0, size=0; 3946 3947 // printf("Python --> C\n"); 3948 3949 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 3950 3951 size = Get_List_Size(obj2); 3952 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 3953 3954 if ( size == -1 ) { 3955 PyErr_SetString(PyExc_TypeError, "not a list"); 3956 return NULL; 3957 } 3958 3959 if (SARA_DEBUG) printf("\t<Contents>\n"); 3960 3961 arg3 = prev = NULL; 3962 for ( i=0; i < size; i++ ) { 3963 py_obj = PyList_GetItem(obj2, i); 3964 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 3965 sprintf(s,"list item %d has wrong type", i); 3966 PyErr_SetString(PyExc_TypeError, s); 3967 return NULL; 3968 3969 // This will skipp the wrong entry 3970 // continue; 3971 } 3972 3973 /* 3974 * Make first entry head of C linked list 3975 */ 3976 if ( i == 0) { 3977 arg3 = ptr; 3978 ptr->next = prev; 3979 } 3980 else { 3981 prev->next = ptr; 3982 ptr->next = NULL; 3983 } 3984 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 3985 3986 prev = ptr; 3987 3988 } // end for 3989 if (SARA_DEBUG) printf("\t</Contents>\n"); 3990 } 3991 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 3992 SWIG_arg_fail(4);SWIG_fail; 3993 } 3994 result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4); 3995 3996 { 3997 PyObject *obj_batch; 3998 struct batch_status *ptr; 3999 int i=0, len=0; 4000 4001 // printf("Ja we are in bussniss\n"); 4002 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 4003 4004 // Deterime length of list 4005 // 4006 ptr = result; 4007 while (ptr != NULL) { 4008 len++; 4009 ptr = ptr->next; 4010 } 4011 resultobj = PyList_New(len); 4012 4013 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 4014 4015 // Make a list of batch_status pointers 4016 // 4017 if (SARA_DEBUG) printf("\t<Contents>\n"); 4018 ptr = result; 4019 for (i=0; i < len; i++) { 4020 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 4021 PyList_SetItem(resultobj, i, obj_batch); 4022 if (SARA_DEBUG) { 4023 printf("\t\t- %s\n", ptr->name); 4024 } 4025 ptr = ptr->next; 4026 } 4027 if (SARA_DEBUG) printf("\t</Contents>\n"); 4028 } 4029 return resultobj; 4030 fail: 4031 return NULL; 4032 } 4033 4034 4035 static PyObject *_wrap_pbs_statserver(PyObject *self, PyObject *args) { 4036 PyObject *resultobj; 4037 int arg1 ; 4038 struct attrl *arg2 = (struct attrl *) 0 ; 4039 char *arg3 = (char *) 0 ; 4040 struct batch_status *result; 4041 PyObject * obj0 = 0 ; 4042 PyObject * obj1 = 0 ; 4043 PyObject * obj2 = 0 ; 4044 4045 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) goto fail; 4046 { 4047 arg1 = (int)(SWIG_As_int(obj0)); 4048 if (SWIG_arg_fail(1)) SWIG_fail; 4049 } 4050 { 4051 PyObject *py_obj; 4052 struct attrl *ptr, *prev; 4053 char s[255]; 4054 int i=0, size=0; 4055 4056 // printf("Python --> C\n"); 4057 4058 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 4059 4060 size = Get_List_Size(obj1); 4061 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4062 4063 if ( size == -1 ) { 4064 PyErr_SetString(PyExc_TypeError, "not a list"); 4065 return NULL; 4066 } 4067 4068 if (SARA_DEBUG) printf("\t<Contents>\n"); 4069 4070 arg2 = prev = NULL; 4071 for ( i=0; i < size; i++ ) { 4072 py_obj = PyList_GetItem(obj1, i); 4073 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 4074 sprintf(s,"list item %d has wrong type", i); 4075 PyErr_SetString(PyExc_TypeError, s); 4076 return NULL; 4077 4078 // This will skipp the wrong entry 4079 // continue; 4080 } 4081 4082 /* 4083 * Make first entry head of C linked list 4084 */ 4085 if ( i == 0) { 4086 arg2 = ptr; 4087 ptr->next = prev; 4088 } 4089 else { 4090 prev->next = ptr; 4091 ptr->next = NULL; 4092 } 4093 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 4094 4095 prev = ptr; 4096 4097 } // end for 4098 if (SARA_DEBUG) printf("\t</Contents>\n"); 4099 } 4100 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4101 SWIG_arg_fail(3);SWIG_fail; 4102 } 4103 result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3); 4104 4105 { 4106 PyObject *obj_batch; 4107 struct batch_status *ptr; 4108 int i=0, len=0; 4109 4110 // printf("Ja we are in bussniss\n"); 4111 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 4112 4113 // Deterime length of list 4114 // 4115 ptr = result; 4116 while (ptr != NULL) { 4117 len++; 4118 ptr = ptr->next; 4119 } 4120 resultobj = PyList_New(len); 4121 4122 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 4123 4124 // Make a list of batch_status pointers 4125 // 4126 if (SARA_DEBUG) printf("\t<Contents>\n"); 4127 ptr = result; 4128 for (i=0; i < len; i++) { 4129 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 4130 PyList_SetItem(resultobj, i, obj_batch); 4131 if (SARA_DEBUG) { 4132 printf("\t\t- %s\n", ptr->name); 4133 } 4134 ptr = ptr->next; 4135 } 4136 if (SARA_DEBUG) printf("\t</Contents>\n"); 4137 } 4138 return resultobj; 4139 fail: 4140 return NULL; 4141 } 4142 4143 4144 static PyObject *_wrap_pbs_statnode(PyObject *self, PyObject *args) { 4145 PyObject *resultobj; 4146 int arg1 ; 4147 char *arg2 = (char *) 0 ; 4148 struct attrl *arg3 = (struct attrl *) 0 ; 4149 char *arg4 = (char *) 0 ; 4150 struct batch_status *result; 4151 PyObject * obj0 = 0 ; 4152 PyObject * obj1 = 0 ; 4153 PyObject * obj2 = 0 ; 4154 PyObject * obj3 = 0 ; 4155 4156 if(!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) goto fail; 4157 { 4158 arg1 = (int)(SWIG_As_int(obj0)); 4159 if (SWIG_arg_fail(1)) SWIG_fail; 4160 } 4161 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 4162 SWIG_arg_fail(2);SWIG_fail; 4163 } 4164 { 4165 PyObject *py_obj; 4166 struct attrl *ptr, *prev; 4167 char s[255]; 4168 int i=0, size=0; 4169 4170 // printf("Python --> C\n"); 4171 4172 if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); 4173 4174 size = Get_List_Size(obj2); 4175 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4176 4177 if ( size == -1 ) { 4178 PyErr_SetString(PyExc_TypeError, "not a list"); 4179 return NULL; 4180 } 4181 4182 if (SARA_DEBUG) printf("\t<Contents>\n"); 4183 4184 arg3 = prev = NULL; 4185 for ( i=0; i < size; i++ ) { 4186 py_obj = PyList_GetItem(obj2, i); 4187 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { 4188 sprintf(s,"list item %d has wrong type", i); 4189 PyErr_SetString(PyExc_TypeError, s); 4190 return NULL; 4191 4192 // This will skipp the wrong entry 4193 // continue; 4194 } 4195 4196 /* 4197 * Make first entry head of C linked list 4198 */ 4199 if ( i == 0) { 4200 arg3 = ptr; 4201 ptr->next = prev; 4202 } 4203 else { 4204 prev->next = ptr; 4205 ptr->next = NULL; 4206 } 4207 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 4208 4209 prev = ptr; 4210 4211 } // end for 4212 if (SARA_DEBUG) printf("\t</Contents>\n"); 4213 } 4214 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 4215 SWIG_arg_fail(4);SWIG_fail; 4216 } 4217 result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4); 4218 4219 { 4220 PyObject *obj_batch; 4221 struct batch_status *ptr; 4222 int i=0, len=0; 4223 4224 // printf("Ja we are in bussniss\n"); 4225 if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); 4226 4227 // Deterime length of list 4228 // 4229 ptr = result; 4230 while (ptr != NULL) { 4231 len++; 4232 ptr = ptr->next; 4233 } 4234 resultobj = PyList_New(len); 4235 4236 if (SARA_DEBUG) printf("\tSize of List: %d\n", len); 4237 4238 // Make a list of batch_status pointers 4239 // 4240 if (SARA_DEBUG) printf("\t<Contents>\n"); 4241 ptr = result; 4242 for (i=0; i < len; i++) { 4243 obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 4244 PyList_SetItem(resultobj, i, obj_batch); 4245 if (SARA_DEBUG) { 4246 printf("\t\t- %s\n", ptr->name); 4247 } 4248 ptr = ptr->next; 4249 } 4250 if (SARA_DEBUG) printf("\t</Contents>\n"); 4251 } 4252 return resultobj; 4253 fail: 4254 return NULL; 4255 } 4256 4257 4258 static PyObject *_wrap_pbs_submit(PyObject *self, PyObject *args) { 4259 PyObject *resultobj; 4260 int arg1 ; 4261 struct attropl *arg2 = (struct attropl *) 0 ; 4262 char *arg3 = (char *) 0 ; 4263 char *arg4 = (char *) 0 ; 4264 char *arg5 = (char *) 0 ; 4265 char *result; 4266 PyObject * obj0 = 0 ; 4267 PyObject * obj1 = 0 ; 4268 PyObject * obj2 = 0 ; 4269 PyObject * obj3 = 0 ; 4270 PyObject * obj4 = 0 ; 4271 4272 if(!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; 4273 { 4274 arg1 = (int)(SWIG_As_int(obj0)); 4275 if (SWIG_arg_fail(1)) SWIG_fail; 4276 } 4277 { 4278 PyObject *py_obj; 4279 struct attropl *ptr, *prev; 4280 char s[255]; 4281 int i=0, size=0; 4282 4283 // printf("Python --> C\n"); 4284 4285 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 4286 4287 size = Get_List_Size(obj1); 4288 4289 if (SARA_DEBUG) printf("\tSize of List: %d\n", size); 4290 4291 if ( size == -1 ) { 4292 PyErr_SetString(PyExc_TypeError, "not a list"); 4293 return NULL; 4294 } 4295 //printf("Size = %d\n", size); 4296 4297 if (SARA_DEBUG) printf("\t<Contents>\n"); 4298 4299 arg2 = prev = NULL; 4300 for ( i=0; i < size; i++ ) { 4301 py_obj = PyList_GetItem(obj1, i); 4302 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 4303 sprintf(s,"list item %d has wrong type", i); 4304 PyErr_SetString(PyExc_TypeError, s); 4305 return NULL; 4306 4307 // This will skipp the wrong entry 4308 // continue; 4309 } 4310 4311 /* 4312 * Make first entry head of C linked list 4313 */ 4314 if ( i == 0) { 4315 arg2 = ptr; 4316 ptr->next = prev; 4317 } 4318 else { 4319 prev->next = ptr; 4320 ptr->next = NULL; 4321 } 4322 prev = ptr; 4323 4324 } // end for 4325 if (SARA_DEBUG) printf("\t</Contents>\n"); 4326 } 4327 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4328 SWIG_arg_fail(3);SWIG_fail; 4329 } 4330 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 4331 SWIG_arg_fail(4);SWIG_fail; 4332 } 4333 if (!SWIG_AsCharPtr(obj4, (char**)&arg5)) { 4334 SWIG_arg_fail(5);SWIG_fail; 4335 } 4336 result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5); 4337 4338 resultobj = SWIG_FromCharPtr(result); 4339 return resultobj; 4340 fail: 4341 return NULL; 4342 } 4343 4344 4345 static PyObject *_wrap_pbs_terminate(PyObject *self, PyObject *args) { 4346 PyObject *resultobj; 4347 int arg1 ; 4348 int arg2 ; 4349 char *arg3 = (char *) 0 ; 4350 int result; 4351 PyObject * obj0 = 0 ; 4352 PyObject * obj1 = 0 ; 4353 PyObject * obj2 = 0 ; 4354 4355 if(!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) goto fail; 4356 { 4357 arg1 = (int)(SWIG_As_int(obj0)); 4358 if (SWIG_arg_fail(1)) SWIG_fail; 4359 } 4360 { 4361 arg2 = (int)(SWIG_As_int(obj1)); 4362 if (SWIG_arg_fail(2)) SWIG_fail; 4363 } 4364 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4365 SWIG_arg_fail(3);SWIG_fail; 4366 } 4367 result = (int)pbs_terminate(arg1,arg2,arg3); 4368 4369 { 4370 resultobj = SWIG_From_int((int)(result)); 4371 } 4372 return resultobj; 4373 fail: 4374 return NULL; 4375 } 4376 4377 4378 static PyObject *_wrap_totpool(PyObject *self, PyObject *args) { 4379 PyObject *resultobj; 4380 int arg1 ; 4381 int arg2 ; 4382 int result; 4383 PyObject * obj0 = 0 ; 4384 PyObject * obj1 = 0 ; 4385 4386 if(!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) goto fail; 4387 { 4388 arg1 = (int)(SWIG_As_int(obj0)); 4389 if (SWIG_arg_fail(1)) SWIG_fail; 4390 } 4391 { 4392 arg2 = (int)(SWIG_As_int(obj1)); 4393 if (SWIG_arg_fail(2)) SWIG_fail; 4394 } 4395 result = (int)totpool(arg1,arg2); 4396 4397 { 4398 resultobj = SWIG_From_int((int)(result)); 4399 } 4400 return resultobj; 4401 fail: 4402 return NULL; 4403 } 4404 4405 4406 static PyObject *_wrap_usepool(PyObject *self, PyObject *args) { 4407 PyObject *resultobj; 4408 int arg1 ; 4409 int arg2 ; 4410 int result; 4411 PyObject * obj0 = 0 ; 4412 PyObject * obj1 = 0 ; 4413 4414 if(!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) goto fail; 4415 { 4416 arg1 = (int)(SWIG_As_int(obj0)); 4417 if (SWIG_arg_fail(1)) SWIG_fail; 4418 } 4419 { 4420 arg2 = (int)(SWIG_As_int(obj1)); 4421 if (SWIG_arg_fail(2)) SWIG_fail; 4422 } 4423 result = (int)usepool(arg1,arg2); 4424 4425 { 4426 resultobj = SWIG_From_int((int)(result)); 4427 } 4428 return resultobj; 4429 fail: 4430 return NULL; 4431 } 4432 4433 4434 static PyObject *_wrap_openrm(PyObject *self, PyObject *args) { 4435 PyObject *resultobj; 4436 char *arg1 = (char *) 0 ; 4437 unsigned int arg2 ; 4438 int result; 4439 PyObject * obj0 = 0 ; 4440 PyObject * obj1 = 0 ; 4441 4442 if(!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) goto fail; 4443 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 4444 SWIG_arg_fail(1);SWIG_fail; 4445 } 4446 { 4447 arg2 = (unsigned int)(SWIG_As_unsigned_SS_int(obj1)); 4448 if (SWIG_arg_fail(2)) SWIG_fail; 4449 } 4450 result = (int)openrm(arg1,arg2); 4451 4452 { 4453 resultobj = SWIG_From_int((int)(result)); 4454 } 4455 return resultobj; 4456 fail: 4457 return NULL; 4458 } 4459 4460 4461 static PyObject *_wrap_closerm(PyObject *self, PyObject *args) { 4462 PyObject *resultobj; 4463 int arg1 ; 4464 int result; 4465 PyObject * obj0 = 0 ; 4466 4467 if(!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) goto fail; 4468 { 4469 arg1 = (int)(SWIG_As_int(obj0)); 4470 if (SWIG_arg_fail(1)) SWIG_fail; 4471 } 4472 result = (int)closerm(arg1); 4473 4474 { 4475 resultobj = SWIG_From_int((int)(result)); 4476 } 4477 return resultobj; 4478 fail: 4479 return NULL; 4480 } 4481 4482 4483 static PyObject *_wrap_downrm(PyObject *self, PyObject *args) { 4484 PyObject *resultobj; 4485 int arg1 ; 4486 int result; 4487 PyObject * obj0 = 0 ; 4488 4489 if(!PyArg_ParseTuple(args,(char *)"O:downrm",&obj0)) goto fail; 4490 { 4491 arg1 = (int)(SWIG_As_int(obj0)); 4492 if (SWIG_arg_fail(1)) SWIG_fail; 4493 } 4494 result = (int)downrm(arg1); 4495 4496 { 4497 resultobj = SWIG_From_int((int)(result)); 4498 } 4499 return resultobj; 4500 fail: 4501 return NULL; 4502 } 4503 4504 4505 static PyObject *_wrap_configrm(PyObject *self, PyObject *args) { 4506 PyObject *resultobj; 4507 int arg1 ; 4508 char *arg2 = (char *) 0 ; 4509 int result; 4510 PyObject * obj0 = 0 ; 4511 PyObject * obj1 = 0 ; 4512 4513 if(!PyArg_ParseTuple(args,(char *)"OO:configrm",&obj0,&obj1)) goto fail; 4514 { 4515 arg1 = (int)(SWIG_As_int(obj0)); 4516 if (SWIG_arg_fail(1)) SWIG_fail; 4517 } 4518 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 4519 SWIG_arg_fail(2);SWIG_fail; 4520 } 4521 result = (int)configrm(arg1,arg2); 4522 4523 { 4524 resultobj = SWIG_From_int((int)(result)); 4525 } 4526 return resultobj; 4527 fail: 4528 return NULL; 4529 } 4530 4531 4532 static PyObject *_wrap_addreq(PyObject *self, PyObject *args) { 4533 PyObject *resultobj; 4534 int arg1 ; 4535 char *arg2 = (char *) 0 ; 4536 int result; 4537 PyObject * obj0 = 0 ; 4538 PyObject * obj1 = 0 ; 4539 4540 if(!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) goto fail; 4541 { 4542 arg1 = (int)(SWIG_As_int(obj0)); 4543 if (SWIG_arg_fail(1)) SWIG_fail; 4544 } 4545 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 4546 SWIG_arg_fail(2);SWIG_fail; 4547 } 4548 result = (int)addreq(arg1,arg2); 4549 4550 { 4551 resultobj = SWIG_From_int((int)(result)); 4552 } 4553 return resultobj; 4554 fail: 4555 return NULL; 4556 } 4557 4558 4559 static PyObject *_wrap_allreq(PyObject *self, PyObject *args) { 4560 PyObject *resultobj; 4561 char *arg1 = (char *) 0 ; 4562 int result; 4563 PyObject * obj0 = 0 ; 4564 4565 if(!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) goto fail; 4566 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 4567 SWIG_arg_fail(1);SWIG_fail; 4568 } 4569 result = (int)allreq(arg1); 4570 4571 { 4572 resultobj = SWIG_From_int((int)(result)); 4573 } 4574 return resultobj; 4575 fail: 4576 return NULL; 4577 } 4578 4579 4580 static PyObject *_wrap_flushreq(PyObject *self, PyObject *args) { 4581 PyObject *resultobj; 4582 int result; 4583 4584 if(!PyArg_ParseTuple(args,(char *)":flushreq")) goto fail; 4585 result = (int)flushreq(); 4586 4587 { 4588 resultobj = SWIG_From_int((int)(result)); 4589 } 4590 return resultobj; 4591 fail: 4592 return NULL; 4593 } 4594 4595 4596 static PyObject *_wrap_activereq(PyObject *self, PyObject *args) { 4597 PyObject *resultobj; 4598 int result; 4599 4600 if(!PyArg_ParseTuple(args,(char *)":activereq")) goto fail; 4601 result = (int)activereq(); 4602 4603 { 4604 resultobj = SWIG_From_int((int)(result)); 4605 } 4606 return resultobj; 4607 fail: 4608 return NULL; 4609 } 4610 4611 4612 static PyObject *_wrap_fullresp(PyObject *self, PyObject *args) { 4613 PyObject *resultobj; 4614 int arg1 ; 4615 PyObject * obj0 = 0 ; 4616 4617 if(!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) goto fail; 4618 { 4619 arg1 = (int)(SWIG_As_int(obj0)); 4620 if (SWIG_arg_fail(1)) SWIG_fail; 4621 } 4622 fullresp(arg1); 4623 4624 Py_INCREF(Py_None); resultobj = Py_None; 4625 return resultobj; 4626 fail: 4627 return NULL; 4628 } 4629 4630 4631 static PyObject *_wrap_getreq(PyObject *self, PyObject *args) { 4632 PyObject *resultobj; 4633 int arg1 ; 4634 char *result; 4635 PyObject * obj0 = 0 ; 4636 4637 if(!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) goto fail; 4638 { 4639 arg1 = (int)(SWIG_As_int(obj0)); 4640 if (SWIG_arg_fail(1)) SWIG_fail; 4641 } 4642 result = (char *)getreq(arg1); 4643 4644 resultobj = SWIG_FromCharPtr(result); 4645 return resultobj; 4646 fail: 4647 return NULL; 4648 } 4649 4650 4651 static int _wrap_log_event_mask_set(PyObject *_val) { 4652 { 4653 void *temp; 4654 if ((SWIG_ConvertPtr(_val, &temp, SWIGTYPE_p_long, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) { 4655 SWIG_append_errmsg("C/C++ variable 'log_event_mask'"); 4656 return 1; 4657 } 4658 log_event_mask = (long *) temp; 4659 } 4660 return 0; 4661 } 4662 4663 4664 static PyObject *_wrap_log_event_mask_get(void) { 4665 PyObject *pyobj; 4666 4667 pyobj = SWIG_NewPointerObj((void *)(log_event_mask), SWIGTYPE_p_long, 0); 4668 return pyobj; 4669 } 4670 4671 4672 static PyObject *_wrap_log_close(PyObject *self, PyObject *args) { 4673 PyObject *resultobj; 4674 int arg1 ; 4675 PyObject * obj0 = 0 ; 4676 4677 if(!PyArg_ParseTuple(args,(char *)"O:log_close",&obj0)) goto fail; 4678 { 4679 arg1 = (int)(SWIG_As_int(obj0)); 4680 if (SWIG_arg_fail(1)) SWIG_fail; 4681 } 4682 log_close(arg1); 4683 4684 Py_INCREF(Py_None); resultobj = Py_None; 4685 return resultobj; 4686 fail: 4687 return NULL; 4688 } 4689 4690 4691 static PyObject *_wrap_log_err(PyObject *self, PyObject *args) { 4692 PyObject *resultobj; 4693 int arg1 ; 4694 char *arg2 = (char *) 0 ; 4695 char *arg3 = (char *) 0 ; 4696 PyObject * obj0 = 0 ; 4697 PyObject * obj1 = 0 ; 4698 PyObject * obj2 = 0 ; 4699 4700 if(!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) goto fail; 4701 { 4702 arg1 = (int)(SWIG_As_int(obj0)); 4703 if (SWIG_arg_fail(1)) SWIG_fail; 4704 } 4705 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 4706 SWIG_arg_fail(2);SWIG_fail; 4707 } 4708 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4709 SWIG_arg_fail(3);SWIG_fail; 4710 } 4711 log_err(arg1,arg2,arg3); 4712 4713 Py_INCREF(Py_None); resultobj = Py_None; 4714 return resultobj; 4715 fail: 4716 return NULL; 4717 } 4718 4719 4720 static PyObject *_wrap_log_event(PyObject *self, PyObject *args) { 4721 PyObject *resultobj; 4722 int arg1 ; 4723 int arg2 ; 4724 char *arg3 = (char *) 0 ; 4725 char *arg4 = (char *) 0 ; 4726 PyObject * obj0 = 0 ; 4727 PyObject * obj1 = 0 ; 4728 PyObject * obj2 = 0 ; 4729 PyObject * obj3 = 0 ; 4730 4731 if(!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) goto fail; 4732 { 4733 arg1 = (int)(SWIG_As_int(obj0)); 4734 if (SWIG_arg_fail(1)) SWIG_fail; 4735 } 4736 { 4737 arg2 = (int)(SWIG_As_int(obj1)); 4738 if (SWIG_arg_fail(2)) SWIG_fail; 4739 } 4740 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4741 SWIG_arg_fail(3);SWIG_fail; 4742 } 4743 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 4744 SWIG_arg_fail(4);SWIG_fail; 4745 } 4746 log_event(arg1,arg2,arg3,arg4); 4747 4748 Py_INCREF(Py_None); resultobj = Py_None; 4749 return resultobj; 4750 fail: 4751 return NULL; 4752 } 4753 4754 4755 static PyObject *_wrap_log_open(PyObject *self, PyObject *args) { 4756 PyObject *resultobj; 4757 char *arg1 = (char *) 0 ; 4758 char *arg2 = (char *) 0 ; 4759 int result; 4760 PyObject * obj0 = 0 ; 4761 PyObject * obj1 = 0 ; 4762 4763 if(!PyArg_ParseTuple(args,(char *)"OO:log_open",&obj0,&obj1)) goto fail; 4764 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 4765 SWIG_arg_fail(1);SWIG_fail; 4766 } 4767 if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) { 4768 SWIG_arg_fail(2);SWIG_fail; 4769 } 4770 result = (int)log_open(arg1,arg2); 4771 4772 { 4773 resultobj = SWIG_From_int((int)(result)); 4774 } 4775 return resultobj; 4776 fail: 4777 return NULL; 4778 } 4779 4780 4781 static PyObject *_wrap_log_record(PyObject *self, PyObject *args) { 4782 PyObject *resultobj; 4783 int arg1 ; 4784 int arg2 ; 4785 char *arg3 = (char *) 0 ; 4786 char *arg4 = (char *) 0 ; 4787 PyObject * obj0 = 0 ; 4788 PyObject * obj1 = 0 ; 4789 PyObject * obj2 = 0 ; 4790 PyObject * obj3 = 0 ; 4791 4792 if(!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) goto fail; 4793 { 4794 arg1 = (int)(SWIG_As_int(obj0)); 4795 if (SWIG_arg_fail(1)) SWIG_fail; 4796 } 4797 { 4798 arg2 = (int)(SWIG_As_int(obj1)); 4799 if (SWIG_arg_fail(2)) SWIG_fail; 4800 } 4801 if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) { 4802 SWIG_arg_fail(3);SWIG_fail; 4803 } 4804 if (!SWIG_AsCharPtr(obj3, (char**)&arg4)) { 4805 SWIG_arg_fail(4);SWIG_fail; 4806 } 4807 log_record(arg1,arg2,arg3,arg4); 4808 4809 Py_INCREF(Py_None); resultobj = Py_None; 4810 return resultobj; 4811 fail: 4812 return NULL; 4813 } 4814 4815 4816 static int _wrap_log_buffer_set(PyObject *_val) { 4817 { 4818 if (!SWIG_AsCharArray(_val, log_buffer, 4096)) { 4819 SWIG_append_errmsg("C/C++ variable 'log_buffer'"); 4820 return 1; 4821 } 4822 } 4823 return 0; 4824 } 4825 4826 4827 static PyObject *_wrap_log_buffer_get(void) { 4828 PyObject *pyobj; 4829 4830 { 4831 size_t size = 4096; 4832 #ifndef SWIG_PRESERVE_CARRAY_SIZE 4833 while (size && (log_buffer[size - 1] == '\0')) --size; 4834 #endif 4835 pyobj = SWIG_FromCharArray(log_buffer, size); 4836 } 4837 return pyobj; 4838 } 4839 4840 4841 static PyObject *_wrap_setup_env(PyObject *self, PyObject *args) { 4842 PyObject *resultobj; 4843 char *arg1 = (char *) 0 ; 4844 int result; 4845 PyObject * obj0 = 0 ; 4846 4847 if(!PyArg_ParseTuple(args,(char *)"O:setup_env",&obj0)) goto fail; 4848 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 4849 SWIG_arg_fail(1);SWIG_fail; 4850 } 4851 result = (int)setup_env(arg1); 4852 4853 { 4854 resultobj = SWIG_From_int((int)(result)); 4855 } 4856 return resultobj; 4857 fail: 4858 return NULL; 4859 } 4860 4861 4862 static PyObject *_wrap_chk_file_sec(PyObject *self, PyObject *args) { 4863 PyObject *resultobj; 4864 char *arg1 = (char *) 0 ; 4865 int arg2 ; 4866 int arg3 ; 4867 int arg4 ; 4868 int arg5 ; 4869 int result; 4870 PyObject * obj0 = 0 ; 4871 PyObject * obj1 = 0 ; 4872 PyObject * obj2 = 0 ; 4873 PyObject * obj3 = 0 ; 4874 PyObject * obj4 = 0 ; 4875 4876 if(!PyArg_ParseTuple(args,(char *)"OOOOO:chk_file_sec",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; 4877 if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { 4878 SWIG_arg_fail(1);SWIG_fail; 4879 } 4880 { 4881 arg2 = (int)(SWIG_As_int(obj1)); 4882 if (SWIG_arg_fail(2)) SWIG_fail; 4883 } 4884 { 4885 arg3 = (int)(SWIG_As_int(obj2)); 4886 if (SWIG_arg_fail(3)) SWIG_fail; 4887 } 4888 { 4889 arg4 = (int)(SWIG_As_int(obj3)); 4890 if (SWIG_arg_fail(4)) SWIG_fail; 4891 } 4892 { 4893 arg5 = (int)(SWIG_As_int(obj4)); 4894 if (SWIG_arg_fail(5)) SWIG_fail; 4895 } 4896 result = (int)chk_file_sec(arg1,arg2,arg3,arg4,arg5); 4897 4898 { 4899 resultobj = SWIG_From_int((int)(result)); 4900 } 4901 return resultobj; 4902 fail: 4903 return NULL; 4904 } 4905 4906 4907 static int _wrap_msg_daemonname_set(PyObject *_val) { 4908 { 4909 char *cptr = 0; 4910 if (!SWIG_AsNewCharPtr(_val, &cptr)) { 4911 SWIG_append_errmsg("C/C++ variable 'msg_daemonname'"); 4912 return 1; 4913 } 4914 if (msg_daemonname) free((char*)msg_daemonname); 4915 msg_daemonname = cptr; 4916 } 4917 return 0; 4918 } 4919 4920 4921 static PyObject *_wrap_msg_daemonname_get(void) { 4922 PyObject *pyobj; 4923 4924 pyobj = SWIG_FromCharPtr(msg_daemonname); 4925 return pyobj; 5968 // This will skipp the wrong entry 5969 // continue; 5970 } 5971 5972 /* 5973 * Make first entry head of C linked list 5974 */ 5975 if ( i == 0) { 5976 arg2 = ptr; 5977 ptr->next = prev; 5978 } 5979 else { 5980 prev->next = ptr; 5981 ptr->next = NULL; 5982 } 5983 prev = ptr; 5984 5985 } // end for 5986 if (SARA_DEBUG) printf("\t</Contents>\n"); 5987 } 5988 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 5989 if (!SWIG_IsOK(res3)) { 5990 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit" "', argument " "3"" of type '" "char *""'"); 5991 } 5992 arg3 = buf3; 5993 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 5994 if (!SWIG_IsOK(res4)) { 5995 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit" "', argument " "4"" of type '" "char *""'"); 5996 } 5997 arg4 = buf4; 5998 res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); 5999 if (!SWIG_IsOK(res5)) { 6000 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit" "', argument " "5"" of type '" "char *""'"); 6001 } 6002 arg5 = buf5; 6003 result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5); 6004 resultobj = SWIG_FromCharPtr(result); 6005 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6006 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6007 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); 6008 return resultobj; 6009 fail: 6010 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6011 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6012 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); 6013 return NULL; 6014 } 6015 6016 6017 SWIGINTERN PyObject *_wrap_pbs_terminate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6018 PyObject *resultobj = 0; 6019 int arg1 ; 6020 int arg2 ; 6021 char *arg3 = (char *) 0 ; 6022 int result; 6023 int val1 ; 6024 int ecode1 = 0 ; 6025 int val2 ; 6026 int ecode2 = 0 ; 6027 int res3 ; 6028 char *buf3 = 0 ; 6029 int alloc3 = 0 ; 6030 PyObject * obj0 = 0 ; 6031 PyObject * obj1 = 0 ; 6032 PyObject * obj2 = 0 ; 6033 6034 if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) SWIG_fail; 6035 ecode1 = SWIG_AsVal_int(obj0, &val1); 6036 if (!SWIG_IsOK(ecode1)) { 6037 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_terminate" "', argument " "1"" of type '" "int""'"); 6038 } 6039 arg1 = (int)(val1); 6040 ecode2 = SWIG_AsVal_int(obj1, &val2); 6041 if (!SWIG_IsOK(ecode2)) { 6042 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_terminate" "', argument " "2"" of type '" "int""'"); 6043 } 6044 arg2 = (int)(val2); 6045 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 6046 if (!SWIG_IsOK(res3)) { 6047 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_terminate" "', argument " "3"" of type '" "char *""'"); 6048 } 6049 arg3 = buf3; 6050 result = (int)pbs_terminate(arg1,arg2,arg3); 6051 resultobj = SWIG_From_int((int)(result)); 6052 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6053 return resultobj; 6054 fail: 6055 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6056 return NULL; 6057 } 6058 6059 6060 SWIGINTERN PyObject *_wrap_totpool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6061 PyObject *resultobj = 0; 6062 int arg1 ; 6063 int arg2 ; 6064 int result; 6065 int val1 ; 6066 int ecode1 = 0 ; 6067 int val2 ; 6068 int ecode2 = 0 ; 6069 PyObject * obj0 = 0 ; 6070 PyObject * obj1 = 0 ; 6071 6072 if (!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) SWIG_fail; 6073 ecode1 = SWIG_AsVal_int(obj0, &val1); 6074 if (!SWIG_IsOK(ecode1)) { 6075 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "totpool" "', argument " "1"" of type '" "int""'"); 6076 } 6077 arg1 = (int)(val1); 6078 ecode2 = SWIG_AsVal_int(obj1, &val2); 6079 if (!SWIG_IsOK(ecode2)) { 6080 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "totpool" "', argument " "2"" of type '" "int""'"); 6081 } 6082 arg2 = (int)(val2); 6083 result = (int)totpool(arg1,arg2); 6084 resultobj = SWIG_From_int((int)(result)); 6085 return resultobj; 6086 fail: 6087 return NULL; 6088 } 6089 6090 6091 SWIGINTERN PyObject *_wrap_usepool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6092 PyObject *resultobj = 0; 6093 int arg1 ; 6094 int arg2 ; 6095 int result; 6096 int val1 ; 6097 int ecode1 = 0 ; 6098 int val2 ; 6099 int ecode2 = 0 ; 6100 PyObject * obj0 = 0 ; 6101 PyObject * obj1 = 0 ; 6102 6103 if (!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) SWIG_fail; 6104 ecode1 = SWIG_AsVal_int(obj0, &val1); 6105 if (!SWIG_IsOK(ecode1)) { 6106 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "usepool" "', argument " "1"" of type '" "int""'"); 6107 } 6108 arg1 = (int)(val1); 6109 ecode2 = SWIG_AsVal_int(obj1, &val2); 6110 if (!SWIG_IsOK(ecode2)) { 6111 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "usepool" "', argument " "2"" of type '" "int""'"); 6112 } 6113 arg2 = (int)(val2); 6114 result = (int)usepool(arg1,arg2); 6115 resultobj = SWIG_From_int((int)(result)); 6116 return resultobj; 6117 fail: 6118 return NULL; 6119 } 6120 6121 6122 SWIGINTERN PyObject *_wrap_openrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6123 PyObject *resultobj = 0; 6124 char *arg1 = (char *) 0 ; 6125 unsigned int arg2 ; 6126 int result; 6127 int res1 ; 6128 char *buf1 = 0 ; 6129 int alloc1 = 0 ; 6130 unsigned int val2 ; 6131 int ecode2 = 0 ; 6132 PyObject * obj0 = 0 ; 6133 PyObject * obj1 = 0 ; 6134 6135 if (!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) SWIG_fail; 6136 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 6137 if (!SWIG_IsOK(res1)) { 6138 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "openrm" "', argument " "1"" of type '" "char *""'"); 6139 } 6140 arg1 = buf1; 6141 ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); 6142 if (!SWIG_IsOK(ecode2)) { 6143 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "openrm" "', argument " "2"" of type '" "unsigned int""'"); 6144 } 6145 arg2 = (unsigned int)(val2); 6146 result = (int)openrm(arg1,arg2); 6147 resultobj = SWIG_From_int((int)(result)); 6148 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6149 return resultobj; 6150 fail: 6151 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6152 return NULL; 6153 } 6154 6155 6156 SWIGINTERN PyObject *_wrap_closerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6157 PyObject *resultobj = 0; 6158 int arg1 ; 6159 int result; 6160 int val1 ; 6161 int ecode1 = 0 ; 6162 PyObject * obj0 = 0 ; 6163 6164 if (!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) SWIG_fail; 6165 ecode1 = SWIG_AsVal_int(obj0, &val1); 6166 if (!SWIG_IsOK(ecode1)) { 6167 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "closerm" "', argument " "1"" of type '" "int""'"); 6168 } 6169 arg1 = (int)(val1); 6170 result = (int)closerm(arg1); 6171 resultobj = SWIG_From_int((int)(result)); 6172 return resultobj; 6173 fail: 6174 return NULL; 6175 } 6176 6177 6178 SWIGINTERN PyObject *_wrap_downrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6179 PyObject *resultobj = 0; 6180 int arg1 ; 6181 int result; 6182 int val1 ; 6183 int ecode1 = 0 ; 6184 PyObject * obj0 = 0 ; 6185 6186 if (!PyArg_ParseTuple(args,(char *)"O:downrm",&obj0)) SWIG_fail; 6187 ecode1 = SWIG_AsVal_int(obj0, &val1); 6188 if (!SWIG_IsOK(ecode1)) { 6189 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "downrm" "', argument " "1"" of type '" "int""'"); 6190 } 6191 arg1 = (int)(val1); 6192 result = (int)downrm(arg1); 6193 resultobj = SWIG_From_int((int)(result)); 6194 return resultobj; 6195 fail: 6196 return NULL; 6197 } 6198 6199 6200 SWIGINTERN PyObject *_wrap_configrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6201 PyObject *resultobj = 0; 6202 int arg1 ; 6203 char *arg2 = (char *) 0 ; 6204 int result; 6205 int val1 ; 6206 int ecode1 = 0 ; 6207 int res2 ; 6208 char *buf2 = 0 ; 6209 int alloc2 = 0 ; 6210 PyObject * obj0 = 0 ; 6211 PyObject * obj1 = 0 ; 6212 6213 if (!PyArg_ParseTuple(args,(char *)"OO:configrm",&obj0,&obj1)) SWIG_fail; 6214 ecode1 = SWIG_AsVal_int(obj0, &val1); 6215 if (!SWIG_IsOK(ecode1)) { 6216 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "configrm" "', argument " "1"" of type '" "int""'"); 6217 } 6218 arg1 = (int)(val1); 6219 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 6220 if (!SWIG_IsOK(res2)) { 6221 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "configrm" "', argument " "2"" of type '" "char *""'"); 6222 } 6223 arg2 = buf2; 6224 result = (int)configrm(arg1,arg2); 6225 resultobj = SWIG_From_int((int)(result)); 6226 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6227 return resultobj; 6228 fail: 6229 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6230 return NULL; 6231 } 6232 6233 6234 SWIGINTERN PyObject *_wrap_addreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6235 PyObject *resultobj = 0; 6236 int arg1 ; 6237 char *arg2 = (char *) 0 ; 6238 int result; 6239 int val1 ; 6240 int ecode1 = 0 ; 6241 int res2 ; 6242 char *buf2 = 0 ; 6243 int alloc2 = 0 ; 6244 PyObject * obj0 = 0 ; 6245 PyObject * obj1 = 0 ; 6246 6247 if (!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) SWIG_fail; 6248 ecode1 = SWIG_AsVal_int(obj0, &val1); 6249 if (!SWIG_IsOK(ecode1)) { 6250 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq" "', argument " "1"" of type '" "int""'"); 6251 } 6252 arg1 = (int)(val1); 6253 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 6254 if (!SWIG_IsOK(res2)) { 6255 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq" "', argument " "2"" of type '" "char *""'"); 6256 } 6257 arg2 = buf2; 6258 result = (int)addreq(arg1,arg2); 6259 resultobj = SWIG_From_int((int)(result)); 6260 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6261 return resultobj; 6262 fail: 6263 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6264 return NULL; 6265 } 6266 6267 6268 SWIGINTERN PyObject *_wrap_allreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6269 PyObject *resultobj = 0; 6270 char *arg1 = (char *) 0 ; 6271 int result; 6272 int res1 ; 6273 char *buf1 = 0 ; 6274 int alloc1 = 0 ; 6275 PyObject * obj0 = 0 ; 6276 6277 if (!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) SWIG_fail; 6278 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 6279 if (!SWIG_IsOK(res1)) { 6280 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "allreq" "', argument " "1"" of type '" "char *""'"); 6281 } 6282 arg1 = buf1; 6283 result = (int)allreq(arg1); 6284 resultobj = SWIG_From_int((int)(result)); 6285 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6286 return resultobj; 6287 fail: 6288 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6289 return NULL; 6290 } 6291 6292 6293 SWIGINTERN PyObject *_wrap_flushreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6294 PyObject *resultobj = 0; 6295 int result; 6296 6297 if (!PyArg_ParseTuple(args,(char *)":flushreq")) SWIG_fail; 6298 result = (int)flushreq(); 6299 resultobj = SWIG_From_int((int)(result)); 6300 return resultobj; 6301 fail: 6302 return NULL; 6303 } 6304 6305 6306 SWIGINTERN PyObject *_wrap_activereq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6307 PyObject *resultobj = 0; 6308 int result; 6309 6310 if (!PyArg_ParseTuple(args,(char *)":activereq")) SWIG_fail; 6311 result = (int)activereq(); 6312 resultobj = SWIG_From_int((int)(result)); 6313 return resultobj; 6314 fail: 6315 return NULL; 6316 } 6317 6318 6319 SWIGINTERN PyObject *_wrap_fullresp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6320 PyObject *resultobj = 0; 6321 int arg1 ; 6322 int val1 ; 6323 int ecode1 = 0 ; 6324 PyObject * obj0 = 0 ; 6325 6326 if (!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) SWIG_fail; 6327 ecode1 = SWIG_AsVal_int(obj0, &val1); 6328 if (!SWIG_IsOK(ecode1)) { 6329 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fullresp" "', argument " "1"" of type '" "int""'"); 6330 } 6331 arg1 = (int)(val1); 6332 fullresp(arg1); 6333 resultobj = SWIG_Py_Void(); 6334 return resultobj; 6335 fail: 6336 return NULL; 6337 } 6338 6339 6340 SWIGINTERN PyObject *_wrap_getreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6341 PyObject *resultobj = 0; 6342 int arg1 ; 6343 char *result = 0 ; 6344 int val1 ; 6345 int ecode1 = 0 ; 6346 PyObject * obj0 = 0 ; 6347 6348 if (!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) SWIG_fail; 6349 ecode1 = SWIG_AsVal_int(obj0, &val1); 6350 if (!SWIG_IsOK(ecode1)) { 6351 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getreq" "', argument " "1"" of type '" "int""'"); 6352 } 6353 arg1 = (int)(val1); 6354 result = (char *)getreq(arg1); 6355 resultobj = SWIG_FromCharPtr(result); 6356 return resultobj; 6357 fail: 6358 return NULL; 6359 } 6360 6361 6362 SWIGINTERN int log_event_mask_set(PyObject *_val) { 6363 { 6364 void *argp = 0; 6365 int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_long, 0 ); 6366 if (!SWIG_IsOK(res)) { 6367 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_event_mask""' of type '""long *""'"); 6368 } 6369 log_event_mask = (long *)(argp); 6370 } 6371 return 0; 6372 fail: 6373 return 1; 6374 } 6375 6376 6377 SWIGINTERN PyObject *log_event_mask_get(void) { 6378 PyObject *pyobj = 0; 6379 6380 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(log_event_mask), SWIGTYPE_p_long, 0 ); 6381 return pyobj; 6382 } 6383 6384 6385 SWIGINTERN PyObject *_wrap_log_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6386 PyObject *resultobj = 0; 6387 int arg1 ; 6388 int val1 ; 6389 int ecode1 = 0 ; 6390 PyObject * obj0 = 0 ; 6391 6392 if (!PyArg_ParseTuple(args,(char *)"O:log_close",&obj0)) SWIG_fail; 6393 ecode1 = SWIG_AsVal_int(obj0, &val1); 6394 if (!SWIG_IsOK(ecode1)) { 6395 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_close" "', argument " "1"" of type '" "int""'"); 6396 } 6397 arg1 = (int)(val1); 6398 log_close(arg1); 6399 resultobj = SWIG_Py_Void(); 6400 return resultobj; 6401 fail: 6402 return NULL; 6403 } 6404 6405 6406 SWIGINTERN PyObject *_wrap_log_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6407 PyObject *resultobj = 0; 6408 int arg1 ; 6409 char *arg2 = (char *) 0 ; 6410 char *arg3 = (char *) 0 ; 6411 int val1 ; 6412 int ecode1 = 0 ; 6413 int res2 ; 6414 char *buf2 = 0 ; 6415 int alloc2 = 0 ; 6416 int res3 ; 6417 char *buf3 = 0 ; 6418 int alloc3 = 0 ; 6419 PyObject * obj0 = 0 ; 6420 PyObject * obj1 = 0 ; 6421 PyObject * obj2 = 0 ; 6422 6423 if (!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) SWIG_fail; 6424 ecode1 = SWIG_AsVal_int(obj0, &val1); 6425 if (!SWIG_IsOK(ecode1)) { 6426 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_err" "', argument " "1"" of type '" "int""'"); 6427 } 6428 arg1 = (int)(val1); 6429 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 6430 if (!SWIG_IsOK(res2)) { 6431 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_err" "', argument " "2"" of type '" "char *""'"); 6432 } 6433 arg2 = buf2; 6434 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 6435 if (!SWIG_IsOK(res3)) { 6436 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_err" "', argument " "3"" of type '" "char *""'"); 6437 } 6438 arg3 = buf3; 6439 log_err(arg1,arg2,arg3); 6440 resultobj = SWIG_Py_Void(); 6441 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6442 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6443 return resultobj; 6444 fail: 6445 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6446 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6447 return NULL; 6448 } 6449 6450 6451 SWIGINTERN PyObject *_wrap_log_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6452 PyObject *resultobj = 0; 6453 int arg1 ; 6454 int arg2 ; 6455 char *arg3 = (char *) 0 ; 6456 char *arg4 = (char *) 0 ; 6457 int val1 ; 6458 int ecode1 = 0 ; 6459 int val2 ; 6460 int ecode2 = 0 ; 6461 int res3 ; 6462 char *buf3 = 0 ; 6463 int alloc3 = 0 ; 6464 int res4 ; 6465 char *buf4 = 0 ; 6466 int alloc4 = 0 ; 6467 PyObject * obj0 = 0 ; 6468 PyObject * obj1 = 0 ; 6469 PyObject * obj2 = 0 ; 6470 PyObject * obj3 = 0 ; 6471 6472 if (!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 6473 ecode1 = SWIG_AsVal_int(obj0, &val1); 6474 if (!SWIG_IsOK(ecode1)) { 6475 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_event" "', argument " "1"" of type '" "int""'"); 6476 } 6477 arg1 = (int)(val1); 6478 ecode2 = SWIG_AsVal_int(obj1, &val2); 6479 if (!SWIG_IsOK(ecode2)) { 6480 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_event" "', argument " "2"" of type '" "int""'"); 6481 } 6482 arg2 = (int)(val2); 6483 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 6484 if (!SWIG_IsOK(res3)) { 6485 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_event" "', argument " "3"" of type '" "char *""'"); 6486 } 6487 arg3 = buf3; 6488 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 6489 if (!SWIG_IsOK(res4)) { 6490 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_event" "', argument " "4"" of type '" "char *""'"); 6491 } 6492 arg4 = buf4; 6493 log_event(arg1,arg2,arg3,arg4); 6494 resultobj = SWIG_Py_Void(); 6495 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6496 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6497 return resultobj; 6498 fail: 6499 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6500 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6501 return NULL; 6502 } 6503 6504 6505 SWIGINTERN PyObject *_wrap_log_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6506 PyObject *resultobj = 0; 6507 char *arg1 = (char *) 0 ; 6508 char *arg2 = (char *) 0 ; 6509 int result; 6510 int res1 ; 6511 char *buf1 = 0 ; 6512 int alloc1 = 0 ; 6513 int res2 ; 6514 char *buf2 = 0 ; 6515 int alloc2 = 0 ; 6516 PyObject * obj0 = 0 ; 6517 PyObject * obj1 = 0 ; 6518 6519 if (!PyArg_ParseTuple(args,(char *)"OO:log_open",&obj0,&obj1)) SWIG_fail; 6520 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 6521 if (!SWIG_IsOK(res1)) { 6522 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "log_open" "', argument " "1"" of type '" "char *""'"); 6523 } 6524 arg1 = buf1; 6525 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 6526 if (!SWIG_IsOK(res2)) { 6527 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_open" "', argument " "2"" of type '" "char *""'"); 6528 } 6529 arg2 = buf2; 6530 result = (int)log_open(arg1,arg2); 6531 resultobj = SWIG_From_int((int)(result)); 6532 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6533 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6534 return resultobj; 6535 fail: 6536 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6537 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 6538 return NULL; 6539 } 6540 6541 6542 SWIGINTERN PyObject *_wrap_log_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6543 PyObject *resultobj = 0; 6544 int arg1 ; 6545 int arg2 ; 6546 char *arg3 = (char *) 0 ; 6547 char *arg4 = (char *) 0 ; 6548 int val1 ; 6549 int ecode1 = 0 ; 6550 int val2 ; 6551 int ecode2 = 0 ; 6552 int res3 ; 6553 char *buf3 = 0 ; 6554 int alloc3 = 0 ; 6555 int res4 ; 6556 char *buf4 = 0 ; 6557 int alloc4 = 0 ; 6558 PyObject * obj0 = 0 ; 6559 PyObject * obj1 = 0 ; 6560 PyObject * obj2 = 0 ; 6561 PyObject * obj3 = 0 ; 6562 6563 if (!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; 6564 ecode1 = SWIG_AsVal_int(obj0, &val1); 6565 if (!SWIG_IsOK(ecode1)) { 6566 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_record" "', argument " "1"" of type '" "int""'"); 6567 } 6568 arg1 = (int)(val1); 6569 ecode2 = SWIG_AsVal_int(obj1, &val2); 6570 if (!SWIG_IsOK(ecode2)) { 6571 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_record" "', argument " "2"" of type '" "int""'"); 6572 } 6573 arg2 = (int)(val2); 6574 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 6575 if (!SWIG_IsOK(res3)) { 6576 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_record" "', argument " "3"" of type '" "char *""'"); 6577 } 6578 arg3 = buf3; 6579 res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); 6580 if (!SWIG_IsOK(res4)) { 6581 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_record" "', argument " "4"" of type '" "char *""'"); 6582 } 6583 arg4 = buf4; 6584 log_record(arg1,arg2,arg3,arg4); 6585 resultobj = SWIG_Py_Void(); 6586 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6587 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6588 return resultobj; 6589 fail: 6590 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 6591 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); 6592 return NULL; 6593 } 6594 6595 6596 SWIGINTERN PyObject *_wrap_log_roll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6597 PyObject *resultobj = 0; 6598 int arg1 ; 6599 int val1 ; 6600 int ecode1 = 0 ; 6601 PyObject * obj0 = 0 ; 6602 6603 if (!PyArg_ParseTuple(args,(char *)"O:log_roll",&obj0)) SWIG_fail; 6604 ecode1 = SWIG_AsVal_int(obj0, &val1); 6605 if (!SWIG_IsOK(ecode1)) { 6606 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_roll" "', argument " "1"" of type '" "int""'"); 6607 } 6608 arg1 = (int)(val1); 6609 log_roll(arg1); 6610 resultobj = SWIG_Py_Void(); 6611 return resultobj; 6612 fail: 6613 return NULL; 6614 } 6615 6616 6617 SWIGINTERN PyObject *_wrap_log_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6618 PyObject *resultobj = 0; 6619 long result; 6620 6621 if (!PyArg_ParseTuple(args,(char *)":log_size")) SWIG_fail; 6622 result = (long)log_size(); 6623 resultobj = SWIG_From_long((long)(result)); 6624 return resultobj; 6625 fail: 6626 return NULL; 6627 } 6628 6629 6630 SWIGINTERN int log_buffer_set(PyObject *_val) { 6631 { 6632 int res = SWIG_AsCharArray(_val, log_buffer, 4096); 6633 if (!SWIG_IsOK(res)) { 6634 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_buffer""' of type '""char [4096]""'"); 6635 } 6636 } 6637 return 0; 6638 fail: 6639 return 1; 6640 } 6641 6642 6643 SWIGINTERN PyObject *log_buffer_get(void) { 6644 PyObject *pyobj = 0; 6645 6646 size_t size = 4096; 6647 6648 while (size && (log_buffer[size - 1] == '\0')) --size; 6649 6650 pyobj = SWIG_FromCharPtrAndSize(log_buffer, size); 6651 return pyobj; 6652 } 6653 6654 6655 SWIGINTERN PyObject *_wrap_setup_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6656 PyObject *resultobj = 0; 6657 char *arg1 = (char *) 0 ; 6658 int result; 6659 int res1 ; 6660 char *buf1 = 0 ; 6661 int alloc1 = 0 ; 6662 PyObject * obj0 = 0 ; 6663 6664 if (!PyArg_ParseTuple(args,(char *)"O:setup_env",&obj0)) SWIG_fail; 6665 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 6666 if (!SWIG_IsOK(res1)) { 6667 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setup_env" "', argument " "1"" of type '" "char *""'"); 6668 } 6669 arg1 = buf1; 6670 result = (int)setup_env(arg1); 6671 resultobj = SWIG_From_int((int)(result)); 6672 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6673 return resultobj; 6674 fail: 6675 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6676 return NULL; 6677 } 6678 6679 6680 SWIGINTERN PyObject *_wrap_chk_file_sec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 6681 PyObject *resultobj = 0; 6682 char *arg1 = (char *) 0 ; 6683 int arg2 ; 6684 int arg3 ; 6685 int arg4 ; 6686 int arg5 ; 6687 int result; 6688 int res1 ; 6689 char *buf1 = 0 ; 6690 int alloc1 = 0 ; 6691 int val2 ; 6692 int ecode2 = 0 ; 6693 int val3 ; 6694 int ecode3 = 0 ; 6695 int val4 ; 6696 int ecode4 = 0 ; 6697 int val5 ; 6698 int ecode5 = 0 ; 6699 PyObject * obj0 = 0 ; 6700 PyObject * obj1 = 0 ; 6701 PyObject * obj2 = 0 ; 6702 PyObject * obj3 = 0 ; 6703 PyObject * obj4 = 0 ; 6704 6705 if (!PyArg_ParseTuple(args,(char *)"OOOOO:chk_file_sec",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; 6706 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); 6707 if (!SWIG_IsOK(res1)) { 6708 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chk_file_sec" "', argument " "1"" of type '" "char *""'"); 6709 } 6710 arg1 = buf1; 6711 ecode2 = SWIG_AsVal_int(obj1, &val2); 6712 if (!SWIG_IsOK(ecode2)) { 6713 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chk_file_sec" "', argument " "2"" of type '" "int""'"); 6714 } 6715 arg2 = (int)(val2); 6716 ecode3 = SWIG_AsVal_int(obj2, &val3); 6717 if (!SWIG_IsOK(ecode3)) { 6718 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "chk_file_sec" "', argument " "3"" of type '" "int""'"); 6719 } 6720 arg3 = (int)(val3); 6721 ecode4 = SWIG_AsVal_int(obj3, &val4); 6722 if (!SWIG_IsOK(ecode4)) { 6723 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "chk_file_sec" "', argument " "4"" of type '" "int""'"); 6724 } 6725 arg4 = (int)(val4); 6726 ecode5 = SWIG_AsVal_int(obj4, &val5); 6727 if (!SWIG_IsOK(ecode5)) { 6728 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "chk_file_sec" "', argument " "5"" of type '" "int""'"); 6729 } 6730 arg5 = (int)(val5); 6731 result = (int)chk_file_sec(arg1,arg2,arg3,arg4,arg5); 6732 resultobj = SWIG_From_int((int)(result)); 6733 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6734 return resultobj; 6735 fail: 6736 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 6737 return NULL; 6738 } 6739 6740 6741 SWIGINTERN int msg_daemonname_set(PyObject *_val) { 6742 { 6743 char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ; 6744 int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc); 6745 if (!SWIG_IsOK(res)) { 6746 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""msg_daemonname""' of type '""char *""'"); 6747 } 6748 if (msg_daemonname) free((char*)msg_daemonname); 6749 if (alloc == SWIG_NEWOBJ) { 6750 msg_daemonname = cptr; 6751 } else { 6752 msg_daemonname = csize ? (char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0; 6753 } 6754 } 6755 return 0; 6756 fail: 6757 return 1; 6758 } 6759 6760 6761 SWIGINTERN PyObject *msg_daemonname_get(void) { 6762 PyObject *pyobj = 0; 6763 6764 pyobj = SWIG_FromCharPtr(msg_daemonname); 6765 return pyobj; 4926 6766 } 4927 6767 … … 4941 6781 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL}, 4942 6782 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL}, 6783 { (char *)"delete_attrl", _wrap_delete_attrl, METH_VARARGS, NULL}, 4943 6784 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL}, 4944 6785 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL}, … … 4951 6792 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL}, 4952 6793 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL}, 6794 { (char *)"delete_attropl", _wrap_delete_attropl, METH_VARARGS, NULL}, 4953 6795 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL}, 4954 6796 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL}, … … 5006 6848 { (char *)"log_open", _wrap_log_open, METH_VARARGS, NULL}, 5007 6849 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL}, 6850 { (char *)"log_roll", _wrap_log_roll, METH_VARARGS, NULL}, 6851 { (char *)"log_size", _wrap_log_size, METH_VARARGS, NULL}, 5008 6852 { (char *)"setup_env", _wrap_setup_env, METH_VARARGS, NULL}, 5009 6853 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL}, … … 5014 6858 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ 5015 6859 5016 static swig_type_info _swigt__p_batch_status[] = {{"_p_batch_status", 0, "struct batch_status *", 0, 0, 0, 0},{"_p_batch_status", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5017 static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5018 static swig_type_info _swigt__p_attropl[] = {{"_p_attropl", 0, "struct attropl *", 0, 0, 0, 0},{"_p_attropl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5019 static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0, 0, 0, 0},{"_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5020 static swig_type_info _swigt__size_t[] = {{"_size_t", 0, "size_t", 0, 0, 0, 0},{"_size_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5021 static swig_type_info _swigt__p_attrl[] = {{"_p_attrl", 0, "struct attrl *", 0, 0, 0, 0},{"_p_attrl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5022 static swig_type_info _swigt__p_long[] = {{"_p_long", 0, "long *", 0, 0, 0, 0},{"_p_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5023 static swig_type_info _swigt__ptrdiff_t[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5024 static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; 5025 5026 static swig_type_info *swig_types_initial[] = { 5027 _swigt__p_batch_status, 5028 _swigt__p_char, 5029 _swigt__p_attropl, 5030 _swigt__p_p_char, 5031 _swigt__size_t, 5032 _swigt__p_attrl, 5033 _swigt__p_long, 5034 _swigt__ptrdiff_t, 5035 _swigt__p_int, 5036 0 6860 static swig_type_info _swigt__p_attrl = {"_p_attrl", "struct attrl *", 0, 0, (void*)0, 0}; 6861 static swig_type_info _swigt__p_attropl = {"_p_attropl", "struct attropl *", 0, 0, (void*)0, 0}; 6862 static swig_type_info _swigt__p_batch_status = {"_p_batch_status", "struct batch_status *", 0, 0, (void*)0, 0}; 6863 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; 6864 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; 6865 static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0}; 6866 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; 6867 6868 static swig_type_info *swig_type_initial[] = { 6869 &_swigt__p_attrl, 6870 &_swigt__p_attropl, 6871 &_swigt__p_batch_status, 6872 &_swigt__p_char, 6873 &_swigt__p_int, 6874 &_swigt__p_long, 6875 &_swigt__p_p_char, 5037 6876 }; 5038 6877 6878 static swig_cast_info _swigc__p_attrl[] = { {&_swigt__p_attrl, 0, 0, 0},{0, 0, 0, 0}}; 6879 static swig_cast_info _swigc__p_attropl[] = { {&_swigt__p_attropl, 0, 0, 0},{0, 0, 0, 0}}; 6880 static swig_cast_info _swigc__p_batch_status[] = { {&_swigt__p_batch_status, 0, 0, 0},{0, 0, 0, 0}}; 6881 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; 6882 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; 6883 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}}; 6884 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; 6885 6886 static swig_cast_info *swig_cast_initial[] = { 6887 _swigc__p_attrl, 6888 _swigc__p_attropl, 6889 _swigc__p_batch_status, 6890 _swigc__p_char, 6891 _swigc__p_int, 6892 _swigc__p_long, 6893 _swigc__p_p_char, 6894 }; 6895 5039 6896 5040 6897 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ 5041 6898 5042 6899 static swig_const_info swig_const_table[] = { 5043 { SWIG_PY_POINTER, (char*)"ATTR_a", 0, 0, (void *)"Execution_Time", &SWIGTYPE_p_char},5044 { SWIG_PY_POINTER, (char*)"ATTR_c", 0, 0, (void *)"Checkpoint", &SWIGTYPE_p_char},5045 { SWIG_PY_POINTER, (char*)"ATTR_e", 0, 0, (void *)"Error_Path", &SWIGTYPE_p_char},5046 { SWIG_PY_POINTER, (char*)"ATTR_g", 0, 0, (void *)"group_list", &SWIGTYPE_p_char},5047 { SWIG_PY_POINTER, (char*)"ATTR_h", 0, 0, (void *)"Hold_Types", &SWIGTYPE_p_char},5048 { SWIG_PY_POINTER, (char*)"ATTR_j", 0, 0, (void *)"Join_Path", &SWIGTYPE_p_char},5049 { SWIG_PY_POINTER, (char*)"ATTR_k", 0, 0, (void *)"Keep_Files", &SWIGTYPE_p_char},5050 { SWIG_PY_POINTER, (char*)"ATTR_l", 0, 0, (void *)"Resource_List", &SWIGTYPE_p_char},5051 { SWIG_PY_POINTER, (char*)"ATTR_m", 0, 0, (void *)"Mail_Points", &SWIGTYPE_p_char},5052 { SWIG_PY_POINTER, (char*)"ATTR_o", 0, 0, (void *)"Output_Path", &SWIGTYPE_p_char},5053 { SWIG_PY_POINTER, (char*)"ATTR_p", 0, 0, (void *)"Priority", &SWIGTYPE_p_char},5054 { SWIG_PY_POINTER, (char*)"ATTR_q", 0, 0, (void *)"destination", &SWIGTYPE_p_char},5055 { SWIG_PY_POINTER, (char*)"ATTR_r", 0, 0, (void *)"Rerunable", &SWIGTYPE_p_char},5056 { SWIG_PY_POINTER, (char*)"ATTR_u", 0, 0, (void *)"User_List", &SWIGTYPE_p_char},5057 { SWIG_PY_POINTER, (char*)"ATTR_v", 0, 0, (void *)"Variable_List", &SWIGTYPE_p_char},5058 { SWIG_PY_POINTER, (char*)"ATTR_A", 0, 0, (void *)"Account_Name", &SWIGTYPE_p_char},5059 { SWIG_PY_POINTER, (char*)"ATTR_M", 0, 0, (void *)"Mail_Users", &SWIGTYPE_p_char},5060 { SWIG_PY_POINTER, (char*)"ATTR_N", 0, 0, (void *)"Job_Name", &SWIGTYPE_p_char},5061 { SWIG_PY_POINTER, (char*)"ATTR_S", 0, 0, (void *)"Shell_Path_List", &SWIGTYPE_p_char},5062 { SWIG_PY_POINTER, (char*)"ATTR_depend", 0, 0, (void *)"depend", &SWIGTYPE_p_char},5063 { SWIG_PY_POINTER, (char*)"ATTR_inter", 0, 0, (void *)"interactive", &SWIGTYPE_p_char},5064 { SWIG_PY_POINTER, (char*)"ATTR_stagein", 0, 0, (void *)"stagein", &SWIGTYPE_p_char},5065 { SWIG_PY_POINTER, (char*)"ATTR_stageout", 0, 0, (void *)"stageout", &SWIGTYPE_p_char},5066 { SWIG_PY_POINTER, (char*)"ATTR_ctime", 0, 0, (void *)"ctime", &SWIGTYPE_p_char},5067 { SWIG_PY_POINTER, (char*)"ATTR_exechost", 0, 0, (void *)"exec_host", &SWIGTYPE_p_char},5068 { SWIG_PY_POINTER, (char*)"ATTR_mtime", 0, 0, (void *)"mtime", &SWIGTYPE_p_char},5069 { SWIG_PY_POINTER, (char*)"ATTR_qtime", 0, 0, (void *)"qtime", &SWIGTYPE_p_char},5070 { SWIG_PY_POINTER, (char*)"ATTR_session", 0, 0, (void *)"session_id", &SWIGTYPE_p_char},5071 { SWIG_PY_POINTER, (char*)"ATTR_euser", 0, 0, (void *)"euser", &SWIGTYPE_p_char},5072 { SWIG_PY_POINTER, (char*)"ATTR_egroup", 0, 0, (void *)"egroup", &SWIGTYPE_p_char},5073 { SWIG_PY_POINTER, (char*)"ATTR_hashname", 0, 0, (void *)"hashname", &SWIGTYPE_p_char},5074 { SWIG_PY_POINTER, (char*)"ATTR_hopcount", 0, 0, (void *)"hop_count", &SWIGTYPE_p_char},5075 { SWIG_PY_POINTER, (char*)"ATTR_security", 0, 0, (void *)"security", &SWIGTYPE_p_char},5076 { SWIG_PY_POINTER, (char*)"ATTR_sched_hint", 0, 0, (void *)"sched_hint", &SWIGTYPE_p_char},5077 { SWIG_PY_POINTER, (char*)"ATTR_substate", 0, 0, (void *)"substate", &SWIGTYPE_p_char},5078 { SWIG_PY_POINTER, (char*)"ATTR_name", 0, 0, (void *)"Job_Name", &SWIGTYPE_p_char},5079 { SWIG_PY_POINTER, (char*)"ATTR_owner", 0, 0, (void *)"Job_Owner", &SWIGTYPE_p_char},5080 { SWIG_PY_POINTER, (char*)"ATTR_used", 0, 0, (void *)"resources_used", &SWIGTYPE_p_char},5081 { SWIG_PY_POINTER, (char*)"ATTR_state", 0, 0, (void *)"job_state", &SWIGTYPE_p_char},5082 { SWIG_PY_POINTER, (char*)"ATTR_queue", 0, 0, (void *)"queue", &SWIGTYPE_p_char},5083 { SWIG_PY_POINTER, (char*)"ATTR_server", 0, 0, (void *)"server", &SWIGTYPE_p_char},5084 { SWIG_PY_POINTER, (char*)"ATTR_maxrun", 0, 0, (void *)"max_running", &SWIGTYPE_p_char},5085 { SWIG_PY_POINTER, (char*)"ATTR_total", 0, 0, (void *)"total_jobs", &SWIGTYPE_p_char},5086 { SWIG_PY_POINTER, (char*)"ATTR_comment", 0, 0, (void *)"comment", &SWIGTYPE_p_char},5087 { SWIG_PY_POINTER, (char*)"ATTR_cookie", 0, 0, (void *)"cookie", &SWIGTYPE_p_char},5088 { SWIG_PY_POINTER, (char*)"ATTR_qrank", 0, 0, (void *)"queue_rank", &SWIGTYPE_p_char},5089 { SWIG_PY_POINTER, (char*)"ATTR_altid", 0, 0, (void *)"alt_id", &SWIGTYPE_p_char},5090 { SWIG_PY_POINTER, (char*)"ATTR_etime", 0, 0, (void *)"etime", &SWIGTYPE_p_char},5091 { SWIG_PY_POINTER, (char*)"ATTR_aclgren", 0, 0, (void *)"acl_group_enable", &SWIGTYPE_p_char},5092 { SWIG_PY_POINTER, (char*)"ATTR_aclgroup", 0, 0, (void *)"acl_groups", &SWIGTYPE_p_char},5093 { SWIG_PY_POINTER, (char*)"ATTR_aclhten", 0, 0, (void *)"acl_host_enable", &SWIGTYPE_p_char},5094 { SWIG_PY_POINTER, (char*)"ATTR_aclhost", 0, 0, (void *)"acl_hosts", &SWIGTYPE_p_char},5095 { SWIG_PY_POINTER, (char*)"ATTR_acluren", 0, 0, (void *)"acl_user_enable", &SWIGTYPE_p_char},5096 { SWIG_PY_POINTER, (char*)"ATTR_acluser", 0, 0, (void *)"acl_users", &SWIGTYPE_p_char},5097 { SWIG_PY_POINTER, (char*)"ATTR_altrouter", 0, 0, (void *)"alt_router", &SWIGTYPE_p_char},5098 { SWIG_PY_POINTER, (char*)"ATTR_chkptmin", 0, 0, (void *)"checkpoint_min", &SWIGTYPE_p_char},5099 { SWIG_PY_POINTER, (char*)"ATTR_enable", 0, 0, (void *)"enabled", &SWIGTYPE_p_char},5100 { SWIG_PY_POINTER, (char*)"ATTR_fromroute", 0, 0, (void *)"from_route_only", &SWIGTYPE_p_char},5101 { SWIG_PY_POINTER, (char*)"ATTR_killdelay", 0, 0, (void *)"kill_delay", &SWIGTYPE_p_char},5102 { SWIG_PY_POINTER, (char*)"ATTR_maxgrprun", 0, 0, (void *)"max_group_run", &SWIGTYPE_p_char},5103 { SWIG_PY_POINTER, (char*)"ATTR_maxque", 0, 0, (void *)"max_queuable", &SWIGTYPE_p_char},5104 { SWIG_PY_POINTER, (char*)"ATTR_maxuserrun", 0, 0, (void *)"max_user_run", &SWIGTYPE_p_char},5105 { SWIG_PY_POINTER, (char*)"ATTR_qtype", 0, 0, (void *)"queue_type", &SWIGTYPE_p_char},5106 { SWIG_PY_POINTER, (char*)"ATTR_rescassn", 0, 0, (void *)"resources_assigned", &SWIGTYPE_p_char},5107 { SWIG_PY_POINTER, (char*)"ATTR_rescdflt", 0, 0, (void *)"resources_default", &SWIGTYPE_p_char},5108 { SWIG_PY_POINTER, (char*)"ATTR_rescmax", 0, 0, (void *)"resources_max", &SWIGTYPE_p_char},5109 { SWIG_PY_POINTER, (char*)"ATTR_rescmin", 0, 0, (void *)"resources_min", &SWIGTYPE_p_char},5110 { SWIG_PY_POINTER, (char*)"ATTR_rndzretry", 0, 0, (void *)"rendezvous_retry", &SWIGTYPE_p_char},5111 { SWIG_PY_POINTER, (char*)"ATTR_routedest", 0, 0, (void *)"route_destinations", &SWIGTYPE_p_char},5112 { SWIG_PY_POINTER, (char*)"ATTR_routeheld", 0, 0, (void *)"route_held_jobs", &SWIGTYPE_p_char},5113 { SWIG_PY_POINTER, (char*)"ATTR_routewait", 0, 0, (void *)"route_waiting_jobs", &SWIGTYPE_p_char},5114 { SWIG_PY_POINTER, (char*)"ATTR_routeretry", 0, 0, (void *)"route_retry_time", &SWIGTYPE_p_char},5115 { SWIG_PY_POINTER, (char*)"ATTR_routelife", 0, 0, (void *)"route_lifetime", &SWIGTYPE_p_char},5116 { SWIG_PY_POINTER, (char*)"ATTR_rsvexpdt", 0, 0, (void *)"reserved_expedite", &SWIGTYPE_p_char},5117 { SWIG_PY_POINTER, (char*)"ATTR_rsvsync", 0, 0, (void *)"reserved_sync", &SWIGTYPE_p_char},5118 { SWIG_PY_POINTER, (char*)"ATTR_start", 0, 0, (void *)"started", &SWIGTYPE_p_char},5119 { SWIG_PY_POINTER, (char*)"ATTR_count", 0, 0, (void *)"state_count", &SWIGTYPE_p_char},5120 { SWIG_PY_POINTER, (char*)"ATTR_number", 0, 0, (void *)"number_jobs", &SWIGTYPE_p_char},5121 { SWIG_PY_POINTER, (char*)"ATTR_reqprop", 0, 0, (void *)"required_property", &SWIGTYPE_p_char},5122 { SWIG_PY_POINTER, (char*)"ATTR_aclroot", 0, 0, (void *)"acl_roots", &SWIGTYPE_p_char},5123 { SWIG_PY_POINTER, (char*)"ATTR_managers", 0, 0, (void *)"managers", &SWIGTYPE_p_char},5124 { SWIG_PY_POINTER, (char*)"ATTR_dfltque", 0, 0, (void *)"default_queue", &SWIGTYPE_p_char},5125 { SWIG_PY_POINTER, (char*)"ATTR_defnode", 0, 0, (void *)"default_node", &SWIGTYPE_p_char},5126 { SWIG_PY_POINTER, (char*)"ATTR_locsvrs", 0, 0, (void *)"location_servers", &SWIGTYPE_p_char},5127 { SWIG_PY_POINTER, (char*)"ATTR_logevents", 0, 0, (void *)"log_events", &SWIGTYPE_p_char},5128 { SWIG_PY_POINTER, (char*)"ATTR_logfile", 0, 0, (void *)"log_file", &SWIGTYPE_p_char},5129 { SWIG_PY_POINTER, (char*)"ATTR_mailfrom", 0, 0, (void *)"mail_from", &SWIGTYPE_p_char},5130 { SWIG_PY_POINTER, (char*)"ATTR_nodepack", 0, 0, (void *)"node_pack", &SWIGTYPE_p_char},5131 { SWIG_PY_POINTER, (char*)"ATTR_operators", 0, 0, (void *)"operators", &SWIGTYPE_p_char},5132 { SWIG_PY_POINTER, (char*)"ATTR_queryother", 0, 0, (void *)"query_other_jobs", &SWIGTYPE_p_char},5133 { SWIG_PY_POINTER, (char*)"ATTR_resccost", 0, 0, (void *)"resources_cost", &SWIGTYPE_p_char},5134 { SWIG_PY_POINTER, (char*)"ATTR_rescavail", 0, 0, (void *)"resources_available", &SWIGTYPE_p_char},5135 { SWIG_PY_POINTER, (char*)"ATTR_schedit", 0, 0, (void *)"scheduler_iteration", &SWIGTYPE_p_char},5136 { SWIG_PY_POINTER, (char*)"ATTR_scheduling", 0, 0, (void *)"scheduling", &SWIGTYPE_p_char},5137 { SWIG_PY_POINTER, (char*)"ATTR_status", 0, 0, (void *)"server_state", &SWIGTYPE_p_char},5138 { SWIG_PY_POINTER, (char*)"ATTR_syscost", 0, 0, (void *)"system_cost", &SWIGTYPE_p_char},5139 { SWIG_PY_POINTER, (char*)"ATTR_pingrate", 0, 0, (void *)"node_ping_rate", &SWIGTYPE_p_char},5140 { SWIG_PY_POINTER, (char*)"ATTR_ndchkrate", 0, 0, (void *)"node_check_rate", &SWIGTYPE_p_char},5141 { SWIG_PY_POINTER, (char*)"ATTR_procpack", 0, 0, (void *)"proc_pack", &SWIGTYPE_p_char},5142 { SWIG_PY_POINTER, (char*)"ATTR_NODE_state", 0, 0, (void *)"state", &SWIGTYPE_p_char},5143 { SWIG_PY_POINTER, (char*)"ATTR_NODE_np", 0, 0, (void *)"np", &SWIGTYPE_p_char},5144 { SWIG_PY_POINTER, (char*)"ATTR_NODE_properties", 0, 0, (void *)"properties", &SWIGTYPE_p_char},5145 { SWIG_PY_POINTER, (char*)"ATTR_NODE_ntype", 0, 0, (void *)"ntype", &SWIGTYPE_p_char},5146 { SWIG_PY_POINTER, (char*)"ATTR_NODE_jobs", 0, 0, (void *)"jobs", &SWIGTYPE_p_char},5147 { SWIG_PY_POINTER, (char*)"CHECKPOINT_UNSPECIFIED", 0, 0, (void *)"u", &SWIGTYPE_p_char},5148 { SWIG_PY_POINTER, (char*)"NO_HOLD", 0, 0, (void *)"n", &SWIGTYPE_p_char},5149 { SWIG_PY_POINTER, (char*)"NO_JOIN", 0, 0, (void *)"n", &SWIGTYPE_p_char},5150 { SWIG_PY_POINTER, (char*)"NO_KEEP", 0, 0, (void *)"n", &SWIGTYPE_p_char},5151 { SWIG_PY_POINTER, (char*)"MAIL_AT_ABORT", 0, 0, (void *)"a", &SWIGTYPE_p_char},5152 { SWIG_PY_POINTER, (char*)"DELDELAY", 0, 0, (void *)"deldelay=", &SWIGTYPE_p_char},5153 { SWIG_PY_POINTER, (char*)"USER_HOLD", 0, 0, (void *)"u", &SWIGTYPE_p_char},5154 { SWIG_PY_POINTER, (char*)"OTHER_HOLD", 0, 0, (void *)"o", &SWIGTYPE_p_char},5155 { SWIG_PY_POINTER, (char*)"SYSTEM_HOLD", 0, 0, (void *)"s", &SWIGTYPE_p_char},5156 { SWIG_PY_POINTER, (char*)"ND_free", 0, 0, (void *)"free", &SWIGTYPE_p_char},5157 { SWIG_PY_POINTER, (char*)"ND_offline", 0, 0, (void *)"offline", &SWIGTYPE_p_char},5158 { SWIG_PY_POINTER, (char*)"ND_down", 0, 0, (void *)"down", &SWIGTYPE_p_char},5159 { SWIG_PY_POINTER, (char*)"ND_reserve", 0, 0, (void *)"reserve", &SWIGTYPE_p_char},5160 { SWIG_PY_POINTER, (char*)"ND_job_exclusive", 0, 0, (void *)"job-exclusive", &SWIGTYPE_p_char},5161 { SWIG_PY_POINTER, (char*)"ND_job_sharing", 0, 0, (void *)"job-sharing", &SWIGTYPE_p_char},5162 { SWIG_PY_POINTER, (char*)"ND_busy", 0, 0, (void *)"busy", &SWIGTYPE_p_char},5163 { SWIG_PY_POINTER, (char*)"ND_state_unknown", 0, 0, (void *)"state-unknown", &SWIGTYPE_p_char},5164 { SWIG_PY_POINTER, (char*)"ND_timeshared", 0, 0, (void *)"time-shared", &SWIGTYPE_p_char},5165 { SWIG_PY_POINTER, (char*)"ND_cluster", 0, 0, (void *)"cluster", &SWIGTYPE_p_char},5166 { SWIG_PY_POINTER, (char*)"SIG_RESUME", 0, 0, (void *)"resume", &SWIGTYPE_p_char},5167 { SWIG_PY_POINTER, (char*)"SIG_SUSPEND", 0, 0, (void *)"suspend", &SWIGTYPE_p_char},5168 { SWIG_PY_POINTER, (char*)"PBS_BATCH_SERVICE_NAME", 0, 0, (void *)"pbs", &SWIGTYPE_p_char},5169 { SWIG_PY_POINTER, (char*)"PBS_BATCH_SERVICE_NAME_DIS", 0, 0, (void *)"pbs_dis", &SWIGTYPE_p_char},5170 { SWIG_PY_POINTER, (char*)"PBS_MOM_SERVICE_NAME", 0, 0, (void *)"pbs_mom", &SWIGTYPE_p_char},5171 { SWIG_PY_POINTER, (char*)"PBS_MANAGER_SERVICE_NAME", 0, 0, (void *)"pbs_resmon", &SWIGTYPE_p_char},5172 { SWIG_PY_POINTER, (char*)"PBS_SCHEDULER_SERVICE_NAME", 0, 0, (void *)"pbs_sched", &SWIGTYPE_p_char},5173 6900 {0, 0, 0, 0.0, 0, 0}}; 5174 6901 … … 5176 6903 } 5177 6904 #endif 5178 6905 /* ----------------------------------------------------------------------------- 6906 * Type initialization: 6907 * This problem is tough by the requirement that no dynamic 6908 * memory is used. Also, since swig_type_info structures store pointers to 6909 * swig_cast_info structures and swig_cast_info structures store pointers back 6910 * to swig_type_info structures, we need some lookup code at initialization. 6911 * The idea is that swig generates all the structures that are needed. 6912 * The runtime then collects these partially filled structures. 6913 * The SWIG_InitializeModule function takes these initial arrays out of 6914 * swig_module, and does all the lookup, filling in the swig_module.types 6915 * array with the correct data and linking the correct swig_cast_info 6916 * structures together. 6917 * 6918 * The generated swig_type_info structures are assigned staticly to an initial 6919 * array. We just loop though that array, and handle each type individually. 6920 * First we lookup if this type has been already loaded, and if so, use the 6921 * loaded structure instead of the generated one. Then we have to fill in the 6922 * cast linked list. The cast data is initially stored in something like a 6923 * two-dimensional array. Each row corresponds to a type (there are the same 6924 * number of rows as there are in the swig_type_initial array). Each entry in 6925 * a column is one of the swig_cast_info structures for that type. 6926 * The cast_initial array is actually an array of arrays, because each row has 6927 * a variable number of columns. So to actually build the cast linked list, 6928 * we find the array of casts associated with the type, and loop through it 6929 * adding the casts to the list. The one last trick we need to do is making 6930 * sure the type pointer in the swig_cast_info struct is correct. 6931 * 6932 * First off, we lookup the cast->type name to see if it is already loaded. 6933 * There are three cases to handle: 6934 * 1) If the cast->type has already been loaded AND the type we are adding 6935 * casting info to has not been loaded (it is in this module), THEN we 6936 * replace the cast->type pointer with the type pointer that has already 6937 * been loaded. 6938 * 2) If BOTH types (the one we are adding casting info to, and the 6939 * cast->type) are loaded, THEN the cast info has already been loaded by 6940 * the previous module so we just ignore it. 6941 * 3) Finally, if cast->type has not already been loaded, then we add that 6942 * swig_cast_info to the linked list (because the cast->type) pointer will 6943 * be correct. 6944 * ----------------------------------------------------------------------------- */ 5179 6945 5180 6946 #ifdef __cplusplus 5181 6947 extern "C" { 5182 #endif 5183 5184 /* Python-specific SWIG API */ 6948 #if 0 6949 } /* c-mode */ 6950 #endif 6951 #endif 6952 6953 #if 0 6954 #define SWIGRUNTIME_DEBUG 6955 #endif 6956 6957 SWIGRUNTIME void 6958 SWIG_InitializeModule(void *clientdata) { 6959 size_t i; 6960 swig_module_info *module_head; 6961 static int init_run = 0; 6962 6963 clientdata = clientdata; 6964 6965 if (init_run) return; 6966 init_run = 1; 6967 6968 /* Initialize the swig_module */ 6969 swig_module.type_initial = swig_type_initial; 6970 swig_module.cast_initial = swig_cast_initial; 6971 6972 /* Try and load any already created modules */ 6973 module_head = SWIG_GetModule(clientdata); 6974 if (module_head) { 6975 swig_module.next = module_head->next; 6976 module_head->next = &swig_module; 6977 } else { 6978 /* This is the first module loaded */ 6979 swig_module.next = &swig_module; 6980 SWIG_SetModule(clientdata, &swig_module); 6981 } 6982 6983 /* Now work on filling in swig_module.types */ 6984 #ifdef SWIGRUNTIME_DEBUG 6985 printf("SWIG_InitializeModule: size %d\n", swig_module.size); 6986 #endif 6987 for (i = 0; i < swig_module.size; ++i) { 6988 swig_type_info *type = 0; 6989 swig_type_info *ret; 6990 swig_cast_info *cast; 6991 6992 #ifdef SWIGRUNTIME_DEBUG 6993 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); 6994 #endif 6995 6996 /* if there is another module already loaded */ 6997 if (swig_module.next != &swig_module) { 6998 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); 6999 } 7000 if (type) { 7001 /* Overwrite clientdata field */ 7002 #ifdef SWIGRUNTIME_DEBUG 7003 printf("SWIG_InitializeModule: found type %s\n", type->name); 7004 #endif 7005 if (swig_module.type_initial[i]->clientdata) { 7006 type->clientdata = swig_module.type_initial[i]->clientdata; 7007 #ifdef SWIGRUNTIME_DEBUG 7008 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); 7009 #endif 7010 } 7011 } else { 7012 type = swig_module.type_initial[i]; 7013 } 7014 7015 /* Insert casting types */ 7016 cast = swig_module.cast_initial[i]; 7017 while (cast->type) { 7018 /* Don't need to add information already in the list */ 7019 ret = 0; 7020 #ifdef SWIGRUNTIME_DEBUG 7021 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); 7022 #endif 7023 if (swig_module.next != &swig_module) { 7024 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); 7025 #ifdef SWIGRUNTIME_DEBUG 7026 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); 7027 #endif 7028 } 7029 if (ret) { 7030 if (type == swig_module.type_initial[i]) { 7031 #ifdef SWIGRUNTIME_DEBUG 7032 printf("SWIG_InitializeModule: skip old type %s\n", ret->name); 7033 #endif 7034 cast->type = ret; 7035 ret = 0; 7036 } else { 7037 /* Check for casting already in the list */ 7038 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); 7039 #ifdef SWIGRUNTIME_DEBUG 7040 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); 7041 #endif 7042 if (!ocast) ret = 0; 7043 } 7044 } 7045 7046 if (!ret) { 7047 #ifdef SWIGRUNTIME_DEBUG 7048 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); 7049 #endif 7050 if (type->cast) { 7051 type->cast->prev = cast; 7052 cast->next = type->cast; 7053 } 7054 type->cast = cast; 7055 } 7056 cast++; 7057 } 7058 /* Set entry in modules->types array equal to the type */ 7059 swig_module.types[i] = type; 7060 } 7061 swig_module.types[i] = 0; 7062 7063 #ifdef SWIGRUNTIME_DEBUG 7064 printf("**** SWIG_InitializeModule: Cast List ******\n"); 7065 for (i = 0; i < swig_module.size; ++i) { 7066 int j = 0; 7067 swig_cast_info *cast = swig_module.cast_initial[i]; 7068 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); 7069 while (cast->type) { 7070 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); 7071 cast++; 7072 ++j; 7073 } 7074 printf("---- Total casts: %d\n",j); 7075 } 7076 printf("**** SWIG_InitializeModule: Cast List ******\n"); 7077 #endif 7078 } 7079 7080 /* This function will propagate the clientdata field of type to 7081 * any new swig_type_info structures that have been added into the list 7082 * of equivalent types. It is like calling 7083 * SWIG_TypeClientData(type, clientdata) a second time. 7084 */ 7085 SWIGRUNTIME void 7086 SWIG_PropagateClientData(void) { 7087 size_t i; 7088 swig_cast_info *equiv; 7089 static int init_run = 0; 7090 7091 if (init_run) return; 7092 init_run = 1; 7093 7094 for (i = 0; i < swig_module.size; i++) { 7095 if (swig_module.types[i]->clientdata) { 7096 equiv = swig_module.types[i]->cast; 7097 while (equiv) { 7098 if (!equiv->converter) { 7099 if (equiv->type && !equiv->type->clientdata) 7100 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); 7101 } 7102 equiv = equiv->next; 7103 } 7104 } 7105 } 7106 } 7107 7108 #ifdef __cplusplus 7109 #if 0 7110 { 7111 /* c-mode */ 7112 #endif 7113 } 7114 #endif 7115 7116 7117 7118 #ifdef __cplusplus 7119 extern "C" { 7120 #endif 7121 7122 /* Python-specific SWIG API */ 5185 7123 #define SWIG_newvarlink() SWIG_Python_newvarlink() 5186 7124 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) 5187 7125 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) 5188 5189 /* ----------------------------------------------------------------------------- 5190 * global variable support code. 5191 * ----------------------------------------------------------------------------- */ 5192 5193 typedef struct swig_globalvar { 5194 char *name; /* Name of global variable */ 5195 PyObject *(*get_attr)(); /* Return the current value */ 5196 int (*set_attr)(PyObject *); /* Set the value */ 5197 struct swig_globalvar *next; 5198 } swig_globalvar; 5199 5200 typedef struct swig_varlinkobject { 5201 PyObject_HEAD 5202 swig_globalvar *vars; 5203 } swig_varlinkobject; 5204 5205 static PyObject * 5206 swig_varlink_repr(swig_varlinkobject *v) { 5207 v = v; 5208 return PyString_FromString("<Swig global variables>"); 5209 } 5210 5211 static int 5212 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { 5213 swig_globalvar *var; 5214 flags = flags; 5215 fprintf(fp,"Swig global variables { "); 5216 for (var = v->vars; var; var=var->next) { 5217 fprintf(fp,"%s", var->name); 5218 if (var->next) fprintf(fp,", "); 5219 } 5220 fprintf(fp," }\n"); 5221 return 0; 5222 } 5223 5224 static PyObject * 5225 swig_varlink_getattr(swig_varlinkobject *v, char *n) { 5226 swig_globalvar *var = v->vars; 5227 while (var) { 5228 if (strcmp(var->name,n) == 0) { 5229 return (*var->get_attr)(); 5230 } 5231 var = var->next; 5232 } 5233 PyErr_SetString(PyExc_NameError,"Unknown C global variable"); 5234 return NULL; 5235 } 5236 5237 static int 5238 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { 5239 swig_globalvar *var = v->vars; 5240 while (var) { 5241 if (strcmp(var->name,n) == 0) { 5242 return (*var->set_attr)(p); 5243 } 5244 var = var->next; 5245 } 5246 PyErr_SetString(PyExc_NameError,"Unknown C global variable"); 5247 return 1; 5248 } 5249 5250 static PyTypeObject varlinktype = { 5251 PyObject_HEAD_INIT(0) 7126 7127 /* ----------------------------------------------------------------------------- 7128 * global variable support code. 7129 * ----------------------------------------------------------------------------- */ 7130 7131 typedef struct swig_globalvar { 7132 char *name; /* Name of global variable */ 7133 PyObject *(*get_attr)(void); /* Return the current value */ 7134 int (*set_attr)(PyObject *); /* Set the value */ 7135 struct swig_globalvar *next; 7136 } swig_globalvar; 7137 7138 typedef struct swig_varlinkobject { 7139 PyObject_HEAD 7140 swig_globalvar *vars; 7141 } swig_varlinkobject; 7142 7143 SWIGINTERN PyObject * 7144 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { 7145 return PyString_FromString("<Swig global variables>"); 7146 } 7147 7148 SWIGINTERN PyObject * 7149 swig_varlink_str(swig_varlinkobject *v) { 7150 PyObject *str = PyString_FromString("("); 7151 swig_globalvar *var; 7152 for (var = v->vars; var; var=var->next) { 7153 PyString_ConcatAndDel(&str,PyString_FromString(var->name)); 7154 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); 7155 } 7156 PyString_ConcatAndDel(&str,PyString_FromString(")")); 7157 return str; 7158 } 7159 7160 SWIGINTERN int 7161 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { 7162 PyObject *str = swig_varlink_str(v); 7163 fprintf(fp,"Swig global variables "); 7164 fprintf(fp,"%s\n", PyString_AsString(str)); 7165 Py_DECREF(str); 7166 return 0; 7167 } 7168 7169 SWIGINTERN void 7170 swig_varlink_dealloc(swig_varlinkobject *v) { 7171 swig_globalvar *var = v->vars; 7172 while (var) { 7173 swig_globalvar *n = var->next; 7174 free(var->name); 7175 free(var); 7176 var = n; 7177 } 7178 } 7179 7180 SWIGINTERN PyObject * 7181 swig_varlink_getattr(swig_varlinkobject *v, char *n) { 7182 PyObject *res = NULL; 7183 swig_globalvar *var = v->vars; 7184 while (var) { 7185 if (strcmp(var->name,n) == 0) { 7186 res = (*var->get_attr)(); 7187 break; 7188 } 7189 var = var->next; 7190 } 7191 if (res == NULL && !PyErr_Occurred()) { 7192 PyErr_SetString(PyExc_NameError,"Unknown C global variable"); 7193 } 7194 return res; 7195 } 7196 7197 SWIGINTERN int 7198 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { 7199 int res = 1; 7200 swig_globalvar *var = v->vars; 7201 while (var) { 7202 if (strcmp(var->name,n) == 0) { 7203 res = (*var->set_attr)(p); 7204 break; 7205 } 7206 var = var->next; 7207 } 7208 if (res == 1 && !PyErr_Occurred()) { 7209 PyErr_SetString(PyExc_NameError,"Unknown C global variable"); 7210 } 7211 return res; 7212 } 7213 7214 SWIGINTERN PyTypeObject* 7215 swig_varlink_type(void) { 7216 static char varlink__doc__[] = "Swig var link object"; 7217 static PyTypeObject varlink_type; 7218 static int type_init = 0; 7219 if (!type_init) { 7220 const PyTypeObject tmp 7221 = { 7222 PyObject_HEAD_INIT(NULL) 5252 7223 0, /* Number of items in variable part (ob_size) */ 5253 7224 (char *)"swigvarlink", /* Type name (tp_name) */ 5254 7225 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 5255 7226 0, /* Itemsize (tp_itemsize) */ 5256 0,/* Deallocator (tp_dealloc) */7227 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ 5257 7228 (printfunc) swig_varlink_print, /* Print (tp_print) */ 5258 7229 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ … … 5265 7236 0, /* tp_hash */ 5266 7237 0, /* tp_call */ 5267 0,/* tp_str */7238 (reprfunc)swig_varlink_str, /* tp_str */ 5268 7239 0, /* tp_getattro */ 5269 7240 0, /* tp_setattro */ 5270 7241 0, /* tp_as_buffer */ 5271 7242 0, /* tp_flags */ 5272 0, /* tp_doc */ 5273 #if PY_VERSION_HEX >= 0x02000000 7243 varlink__doc__, /* tp_doc */ 5274 7244 0, /* tp_traverse */ 5275 7245 0, /* tp_clear */ 5276 #endif5277 #if PY_VERSION_HEX >= 0x020100005278 7246 0, /* tp_richcompare */ 5279 7247 0, /* tp_weaklistoffset */ 5280 #endif5281 7248 #if PY_VERSION_HEX >= 0x02020000 5282 7249 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ … … 5288 7255 0,0,0,0 /* tp_alloc -> tp_next */ 5289 7256 #endif 5290 }; 5291 5292 /* Create a variable linking object for use later */ 5293 static PyObject * 5294 SWIG_Python_newvarlink(void) { 5295 swig_varlinkobject *result = 0; 5296 result = PyMem_NEW(swig_varlinkobject,1); 5297 varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ 5298 result->ob_type = &varlinktype; 5299 result->vars = 0; 5300 result->ob_refcnt = 0; 5301 Py_XINCREF((PyObject *) result); 5302 return ((PyObject*) result); 5303 } 5304 5305 static void 5306 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { 5307 swig_varlinkobject *v; 5308 swig_globalvar *gv; 5309 v= (swig_varlinkobject *) p; 5310 gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); 5311 gv->name = (char *) malloc(strlen(name)+1); 5312 strcpy(gv->name,name); 7257 }; 7258 varlink_type = tmp; 7259 varlink_type.ob_type = &PyType_Type; 7260 type_init = 1; 7261 } 7262 return &varlink_type; 7263 } 7264 7265 /* Create a variable linking object for use later */ 7266 SWIGINTERN PyObject * 7267 SWIG_Python_newvarlink(void) { 7268 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); 7269 if (result) { 7270 result->vars = 0; 7271 } 7272 return ((PyObject*) result); 7273 } 7274 7275 SWIGINTERN void 7276 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { 7277 swig_varlinkobject *v = (swig_varlinkobject *) p; 7278 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); 7279 if (gv) { 7280 size_t size = strlen(name)+1; 7281 gv->name = (char *)malloc(size); 7282 if (gv->name) { 7283 strncpy(gv->name,name,size); 5313 7284 gv->get_attr = get_attr; 5314 7285 gv->set_attr = set_attr; 5315 7286 gv->next = v->vars; 5316 v->vars = gv; 5317 } 5318 5319 /* ----------------------------------------------------------------------------- 5320 * constants/methods manipulation 5321 * ----------------------------------------------------------------------------- */ 5322 5323 /* Install Constants */ 5324 static void 5325 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { 5326 PyObject *obj = 0; 5327 size_t i; 5328 for (i = 0; constants[i].type; i++) { 5329 switch(constants[i].type) { 5330 case SWIG_PY_INT: 5331 obj = PyInt_FromLong(constants[i].lvalue); 5332 break; 5333 case SWIG_PY_FLOAT: 5334 obj = PyFloat_FromDouble(constants[i].dvalue); 5335 break; 5336 case SWIG_PY_STRING: 5337 if (constants[i].pvalue) { 5338 obj = PyString_FromString((char *) constants[i].pvalue); 5339 } else { 5340 Py_INCREF(Py_None); 5341 obj = Py_None; 5342 } 5343 break; 5344 case SWIG_PY_POINTER: 5345 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); 5346 break; 5347 case SWIG_PY_BINARY: 5348 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); 5349 break; 5350 default: 5351 obj = 0; 5352 break; 5353 } 5354 if (obj) { 5355 PyDict_SetItemString(d,constants[i].name,obj); 5356 Py_DECREF(obj); 5357 } 5358 } 5359 } 5360 5361 /* -----------------------------------------------------------------------------*/ 5362 /* Fix SwigMethods to carry the callback ptrs when needed */ 5363 /* -----------------------------------------------------------------------------*/ 5364 5365 static void 5366 SWIG_Python_FixMethods(PyMethodDef *methods, 7287 } 7288 } 7289 v->vars = gv; 7290 } 7291 7292 SWIGINTERN PyObject * 7293 SWIG_globals() { 7294 static PyObject *_SWIG_globals = 0; 7295 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); 7296 return _SWIG_globals; 7297 } 7298 7299 /* ----------------------------------------------------------------------------- 7300 * constants/methods manipulation 7301 * ----------------------------------------------------------------------------- */ 7302 7303 /* Install Constants */ 7304 SWIGINTERN void 7305 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { 7306 PyObject *obj = 0; 7307 size_t i; 7308 for (i = 0; constants[i].type; ++i) { 7309 switch(constants[i].type) { 7310 case SWIG_PY_POINTER: 7311 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); 7312 break; 7313 case SWIG_PY_BINARY: 7314 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); 7315 break; 7316 default: 7317 obj = 0; 7318 break; 7319 } 7320 if (obj) { 7321 PyDict_SetItemString(d, constants[i].name, obj); 7322 Py_DECREF(obj); 7323 } 7324 } 7325 } 7326 7327 /* -----------------------------------------------------------------------------*/ 7328 /* Fix SwigMethods to carry the callback ptrs when needed */ 7329 /* -----------------------------------------------------------------------------*/ 7330 7331 SWIGINTERN void 7332 SWIG_Python_FixMethods(PyMethodDef *methods, 5367 7333 swig_const_info *const_table, 5368 7334 swig_type_info **types, 5369 7335 swig_type_info **types_initial) { 5370 size_t i; 5371 for (i = 0; methods[i].ml_name; ++i) { 5372 char *c = methods[i].ml_doc; 5373 if (c && (c = strstr(c, "swig_ptr: "))) { 5374 int j; 5375 swig_const_info *ci = 0; 5376 char *name = c + 10; 5377 for (j = 0; const_table[j].type; j++) { 5378 if (strncmp(const_table[j].name, name, 5379 strlen(const_table[j].name)) == 0) { 5380 ci = &(const_table[j]); 5381 break; 5382 } 5383 } 5384 if (ci) { 5385 size_t shift = (ci->ptype) - types; 5386 swig_type_info *ty = types_initial[shift]; 5387 size_t ldoc = (c - methods[i].ml_doc); 5388 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; 5389 char *ndoc = (char*)malloc(ldoc + lptr + 10); 5390 char *buff = ndoc; 5391 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue: (void *)(ci->lvalue); 5392 strncpy(buff, methods[i].ml_doc, ldoc); 5393 buff += ldoc; 5394 strncpy(buff, "swig_ptr: ", 10); 5395 buff += 10; 5396 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); 5397 methods[i].ml_doc = ndoc; 5398 } 7336 size_t i; 7337 for (i = 0; methods[i].ml_name; ++i) { 7338 char *c = methods[i].ml_doc; 7339 if (c && (c = strstr(c, "swig_ptr: "))) { 7340 int j; 7341 swig_const_info *ci = 0; 7342 char *name = c + 10; 7343 for (j = 0; const_table[j].type; ++j) { 7344 if (strncmp(const_table[j].name, name, 7345 strlen(const_table[j].name)) == 0) { 7346 ci = &(const_table[j]); 7347 break; 7348 } 7349 } 7350 if (ci) { 7351 size_t shift = (ci->ptype) - types; 7352 swig_type_info *ty = types_initial[shift]; 7353 size_t ldoc = (c - methods[i].ml_doc); 7354 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; 7355 char *ndoc = (char*)malloc(ldoc + lptr + 10); 7356 if (ndoc) { 7357 char *buff = ndoc; 7358 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; 7359 if (ptr) { 7360 strncpy(buff, methods[i].ml_doc, ldoc); 7361 buff += ldoc; 7362 strncpy(buff, "swig_ptr: ", 10); 7363 buff += 10; 7364 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); 7365 methods[i].ml_doc = ndoc; 5399 7366 } 7367 } 5400 7368 } 5401 } 5402 5403 /* -----------------------------------------------------------------------------* 5404 * Initialize type list 5405 * -----------------------------------------------------------------------------*/ 5406 5407 #if PY_MAJOR_VERSION < 2 5408 /* PyModule_AddObject function was introduced in Python 2.0. The following function 5409 is copied out of Python/modsupport.c in python version 2.3.4 */ 5410 static int 5411 PyModule_AddObject(PyObject *m, char *name, PyObject *o) 5412 { 5413 PyObject *dict; 5414 if (!PyModule_Check(m)) { 5415 PyErr_SetString(PyExc_TypeError, 5416 "PyModule_AddObject() needs module as first arg"); 5417 return -1; 5418 } 5419 if (!o) { 5420 PyErr_SetString(PyExc_TypeError, 5421 "PyModule_AddObject() needs non-NULL value"); 5422 return -1; 5423 } 5424 5425 dict = PyModule_GetDict(m); 5426 if (dict == NULL) { 5427 /* Internal error -- modules must have a dict! */ 5428 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", 5429 PyModule_GetName(m)); 5430 return -1; 5431 } 5432 if (PyDict_SetItemString(dict, name, o)) 5433 return -1; 5434 Py_DECREF(o); 5435 return 0; 5436 } 5437 #endif 5438 5439 static swig_type_info ** 5440 SWIG_Python_SetTypeListHandle(swig_type_info **type_list_handle) { 5441 static PyMethodDef swig_empty_runtime_method_table[] = { 5442 { 5443 NULL, NULL, 0, NULL 5444 } 5445 };/* Sentinel */ 5446 5447 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, 5448 swig_empty_runtime_method_table); 5449 PyObject *pointer = PyCObject_FromVoidPtr((void *) type_list_handle, NULL); 5450 if (pointer && module) { 5451 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); 5452 } 5453 return type_list_handle; 5454 } 5455 5456 static swig_type_info ** 5457 SWIG_Python_LookupTypePointer(swig_type_info **type_list_handle) { 5458 swig_type_info **type_pointer; 5459 5460 /* first check if module already created */ 5461 type_pointer = SWIG_Python_GetTypeListHandle(); 5462 if (type_pointer) { 5463 return type_pointer; 5464 } else { 5465 /* create a new module and variable */ 5466 return SWIG_Python_SetTypeListHandle(type_list_handle); 5467 } 5468 } 5469 7369 } 7370 } 7371 } 7372 5470 7373 #ifdef __cplusplus 5471 7374 } … … 5476 7379 * -----------------------------------------------------------------------------*/ 5477 7380 5478 #ifdef SWIG_LINK_RUNTIME5479 7381 #ifdef __cplusplus 5480 7382 extern "C" 5481 7383 #endif 5482 SWIGEXPORT(void *) SWIG_ReturnGlobalTypeList(void *); 5483 #endif 5484 5485 #ifdef __cplusplus 5486 extern "C" 5487 #endif 5488 SWIGEXPORT(void) SWIG_init(void) { 5489 static PyObject *SWIG_globals = 0; 5490 static int typeinit = 0; 5491 PyObject *m, *d; 5492 int i; 5493 if (!SWIG_globals) SWIG_globals = SWIG_newvarlink(); 5494 5495 /* Fix SwigMethods to carry the callback ptrs when needed */ 5496 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_types_initial); 5497 5498 m = Py_InitModule((char *) SWIG_name, SwigMethods); 5499 d = PyModule_GetDict(m); 5500 5501 if (!typeinit) { 5502 #ifdef SWIG_LINK_RUNTIME 5503 swig_type_list_handle = (swig_type_info **) SWIG_ReturnGlobalTypeList(swig_type_list_handle); 5504 #else 5505 # ifndef SWIG_STATIC_RUNTIME 5506 swig_type_list_handle = SWIG_Python_LookupTypePointer(swig_type_list_handle); 5507 # endif 5508 #endif 5509 for (i = 0; swig_types_initial[i]; i++) { 5510 swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); 5511 } 5512 typeinit = 1; 5513 } 5514 SWIG_InstallConstants(d,swig_const_table); 5515 5516 PyDict_SetItemString(d,"ATTR_a", SWIG_FromCharPtr("Execution_Time")); 5517 PyDict_SetItemString(d,"ATTR_c", SWIG_FromCharPtr("Checkpoint")); 5518 PyDict_SetItemString(d,"ATTR_e", SWIG_FromCharPtr("Error_Path")); 5519 PyDict_SetItemString(d,"ATTR_g", SWIG_FromCharPtr("group_list")); 5520 PyDict_SetItemString(d,"ATTR_h", SWIG_FromCharPtr("Hold_Types")); 5521 PyDict_SetItemString(d,"ATTR_j", SWIG_FromCharPtr("Join_Path")); 5522 PyDict_SetItemString(d,"ATTR_k", SWIG_FromCharPtr("Keep_Files")); 5523 PyDict_SetItemString(d,"ATTR_l", SWIG_FromCharPtr("Resource_List")); 5524 PyDict_SetItemString(d,"ATTR_m", SWIG_FromCharPtr("Mail_Points")); 5525 PyDict_SetItemString(d,"ATTR_o", SWIG_FromCharPtr("Output_Path")); 5526 PyDict_SetItemString(d,"ATTR_p", SWIG_FromCharPtr("Priority")); 5527 PyDict_SetItemString(d,"ATTR_q", SWIG_FromCharPtr("destination")); 5528 PyDict_SetItemString(d,"ATTR_r", SWIG_FromCharPtr("Rerunable")); 5529 PyDict_SetItemString(d,"ATTR_u", SWIG_FromCharPtr("User_List")); 5530 PyDict_SetItemString(d,"ATTR_v", SWIG_FromCharPtr("Variable_List")); 5531 PyDict_SetItemString(d,"ATTR_A", SWIG_FromCharPtr("Account_Name")); 5532 PyDict_SetItemString(d,"ATTR_M", SWIG_FromCharPtr("Mail_Users")); 5533 PyDict_SetItemString(d,"ATTR_N", SWIG_FromCharPtr("Job_Name")); 5534 PyDict_SetItemString(d,"ATTR_S", SWIG_FromCharPtr("Shell_Path_List")); 5535 PyDict_SetItemString(d,"ATTR_depend", SWIG_FromCharPtr("depend")); 5536 PyDict_SetItemString(d,"ATTR_inter", SWIG_FromCharPtr("interactive")); 5537 PyDict_SetItemString(d,"ATTR_stagein", SWIG_FromCharPtr("stagein")); 5538 PyDict_SetItemString(d,"ATTR_stageout", SWIG_FromCharPtr("stageout")); 5539 PyDict_SetItemString(d,"ATTR_ctime", SWIG_FromCharPtr("ctime")); 5540 PyDict_SetItemString(d,"ATTR_exechost", SWIG_FromCharPtr("exec_host")); 5541 PyDict_SetItemString(d,"ATTR_mtime", SWIG_FromCharPtr("mtime")); 5542 PyDict_SetItemString(d,"ATTR_qtime", SWIG_FromCharPtr("qtime")); 5543 PyDict_SetItemString(d,"ATTR_session", SWIG_FromCharPtr("session_id")); 5544 PyDict_SetItemString(d,"ATTR_euser", SWIG_FromCharPtr("euser")); 5545 PyDict_SetItemString(d,"ATTR_egroup", SWIG_FromCharPtr("egroup")); 5546 PyDict_SetItemString(d,"ATTR_hashname", SWIG_FromCharPtr("hashname")); 5547 PyDict_SetItemString(d,"ATTR_hopcount", SWIG_FromCharPtr("hop_count")); 5548 PyDict_SetItemString(d,"ATTR_security", SWIG_FromCharPtr("security")); 5549 PyDict_SetItemString(d,"ATTR_sched_hint", SWIG_FromCharPtr("sched_hint")); 5550 PyDict_SetItemString(d,"ATTR_substate", SWIG_FromCharPtr("substate")); 5551 PyDict_SetItemString(d,"ATTR_name", SWIG_FromCharPtr("Job_Name")); 5552 PyDict_SetItemString(d,"ATTR_owner", SWIG_FromCharPtr("Job_Owner")); 5553 PyDict_SetItemString(d,"ATTR_used", SWIG_FromCharPtr("resources_used")); 5554 PyDict_SetItemString(d,"ATTR_state", SWIG_FromCharPtr("job_state")); 5555 PyDict_SetItemString(d,"ATTR_queue", SWIG_FromCharPtr("queue")); 5556 PyDict_SetItemString(d,"ATTR_server", SWIG_FromCharPtr("server")); 5557 PyDict_SetItemString(d,"ATTR_maxrun", SWIG_FromCharPtr("max_running")); 5558 PyDict_SetItemString(d,"ATTR_total", SWIG_FromCharPtr("total_jobs")); 5559 PyDict_SetItemString(d,"ATTR_comment", SWIG_FromCharPtr("comment")); 5560 PyDict_SetItemString(d,"ATTR_cookie", SWIG_FromCharPtr("cookie")); 5561 PyDict_SetItemString(d,"ATTR_qrank", SWIG_FromCharPtr("queue_rank")); 5562 PyDict_SetItemString(d,"ATTR_altid", SWIG_FromCharPtr("alt_id")); 5563 PyDict_SetItemString(d,"ATTR_etime", SWIG_FromCharPtr("etime")); 5564 PyDict_SetItemString(d,"ATTR_aclgren", SWIG_FromCharPtr("acl_group_enable")); 5565 PyDict_SetItemString(d,"ATTR_aclgroup", SWIG_FromCharPtr("acl_groups")); 5566 PyDict_SetItemString(d,"ATTR_aclhten", SWIG_FromCharPtr("acl_host_enable")); 5567 PyDict_SetItemString(d,"ATTR_aclhost", SWIG_FromCharPtr("acl_hosts")); 5568 PyDict_SetItemString(d,"ATTR_acluren", SWIG_FromCharPtr("acl_user_enable")); 5569 PyDict_SetItemString(d,"ATTR_acluser", SWIG_FromCharPtr("acl_users")); 5570 PyDict_SetItemString(d,"ATTR_altrouter", SWIG_FromCharPtr("alt_router")); 5571 PyDict_SetItemString(d,"ATTR_chkptmin", SWIG_FromCharPtr("checkpoint_min")); 5572 PyDict_SetItemString(d,"ATTR_enable", SWIG_FromCharPtr("enabled")); 5573 PyDict_SetItemString(d,"ATTR_fromroute", SWIG_FromCharPtr("from_route_only")); 5574 PyDict_SetItemString(d,"ATTR_killdelay", SWIG_FromCharPtr("kill_delay")); 5575 PyDict_SetItemString(d,"ATTR_maxgrprun", SWIG_FromCharPtr("max_group_run")); 5576 PyDict_SetItemString(d,"ATTR_maxque", SWIG_FromCharPtr("max_queuable")); 5577 PyDict_SetItemString(d,"ATTR_maxuserrun", SWIG_FromCharPtr("max_user_run")); 5578 PyDict_SetItemString(d,"ATTR_qtype", SWIG_FromCharPtr("queue_type")); 5579 PyDict_SetItemString(d,"ATTR_rescassn", SWIG_FromCharPtr("resources_assigned")); 5580 PyDict_SetItemString(d,"ATTR_rescdflt", SWIG_FromCharPtr("resources_default")); 5581 PyDict_SetItemString(d,"ATTR_rescmax", SWIG_FromCharPtr("resources_max")); 5582 PyDict_SetItemString(d,"ATTR_rescmin", SWIG_FromCharPtr("resources_min")); 5583 PyDict_SetItemString(d,"ATTR_rndzretry", SWIG_FromCharPtr("rendezvous_retry")); 5584 PyDict_SetItemString(d,"ATTR_routedest", SWIG_FromCharPtr("route_destinations")); 5585 PyDict_SetItemString(d,"ATTR_routeheld", SWIG_FromCharPtr("route_held_jobs")); 5586 PyDict_SetItemString(d,"ATTR_routewait", SWIG_FromCharPtr("route_waiting_jobs")); 5587 PyDict_SetItemString(d,"ATTR_routeretry", SWIG_FromCharPtr("route_retry_time")); 5588 PyDict_SetItemString(d,"ATTR_routelife", SWIG_FromCharPtr("route_lifetime")); 5589 PyDict_SetItemString(d,"ATTR_rsvexpdt", SWIG_FromCharPtr("reserved_expedite")); 5590 PyDict_SetItemString(d,"ATTR_rsvsync", SWIG_FromCharPtr("reserved_sync")); 5591 PyDict_SetItemString(d,"ATTR_start", SWIG_FromCharPtr("started")); 5592 PyDict_SetItemString(d,"ATTR_count", SWIG_FromCharPtr("state_count")); 5593 PyDict_SetItemString(d,"ATTR_number", SWIG_FromCharPtr("number_jobs")); 5594 PyDict_SetItemString(d,"ATTR_reqprop", SWIG_FromCharPtr("required_property")); 5595 PyDict_SetItemString(d,"ATTR_aclroot", SWIG_FromCharPtr("acl_roots")); 5596 PyDict_SetItemString(d,"ATTR_managers", SWIG_FromCharPtr("managers")); 5597 PyDict_SetItemString(d,"ATTR_dfltque", SWIG_FromCharPtr("default_queue")); 5598 PyDict_SetItemString(d,"ATTR_defnode", SWIG_FromCharPtr("default_node")); 5599 PyDict_SetItemString(d,"ATTR_locsvrs", SWIG_FromCharPtr("location_servers")); 5600 PyDict_SetItemString(d,"ATTR_logevents", SWIG_FromCharPtr("log_events")); 5601 PyDict_SetItemString(d,"ATTR_logfile", SWIG_FromCharPtr("log_file")); 5602 PyDict_SetItemString(d,"ATTR_mailfrom", SWIG_FromCharPtr("mail_from")); 5603 PyDict_SetItemString(d,"ATTR_nodepack", SWIG_FromCharPtr("node_pack")); 5604 PyDict_SetItemString(d,"ATTR_operators", SWIG_FromCharPtr("operators")); 5605 PyDict_SetItemString(d,"ATTR_queryother", SWIG_FromCharPtr("query_other_jobs")); 5606 PyDict_SetItemString(d,"ATTR_resccost", SWIG_FromCharPtr("resources_cost")); 5607 PyDict_SetItemString(d,"ATTR_rescavail", SWIG_FromCharPtr("resources_available")); 5608 PyDict_SetItemString(d,"ATTR_schedit", SWIG_FromCharPtr("scheduler_iteration")); 5609 PyDict_SetItemString(d,"ATTR_scheduling", SWIG_FromCharPtr("scheduling")); 5610 PyDict_SetItemString(d,"ATTR_status", SWIG_FromCharPtr("server_state")); 5611 PyDict_SetItemString(d,"ATTR_syscost", SWIG_FromCharPtr("system_cost")); 5612 PyDict_SetItemString(d,"ATTR_pingrate", SWIG_FromCharPtr("node_ping_rate")); 5613 PyDict_SetItemString(d,"ATTR_ndchkrate", SWIG_FromCharPtr("node_check_rate")); 5614 PyDict_SetItemString(d,"ATTR_procpack", SWIG_FromCharPtr("proc_pack")); 5615 PyDict_SetItemString(d,"ATTR_NODE_state", SWIG_FromCharPtr("state")); 5616 PyDict_SetItemString(d,"ATTR_NODE_np", SWIG_FromCharPtr("np")); 5617 PyDict_SetItemString(d,"ATTR_NODE_properties", SWIG_FromCharPtr("properties")); 5618 PyDict_SetItemString(d,"ATTR_NODE_ntype", SWIG_FromCharPtr("ntype")); 5619 PyDict_SetItemString(d,"ATTR_NODE_jobs", SWIG_FromCharPtr("jobs")); 5620 PyDict_SetItemString(d,"CHECKPOINT_UNSPECIFIED", SWIG_FromCharPtr("u")); 5621 PyDict_SetItemString(d,"NO_HOLD", SWIG_FromCharPtr("n")); 5622 PyDict_SetItemString(d,"NO_JOIN", SWIG_FromCharPtr("n")); 5623 PyDict_SetItemString(d,"NO_KEEP", SWIG_FromCharPtr("n")); 5624 PyDict_SetItemString(d,"MAIL_AT_ABORT", SWIG_FromCharPtr("a")); 5625 PyDict_SetItemString(d,"DELDELAY", SWIG_FromCharPtr("deldelay=")); 5626 PyDict_SetItemString(d,"USER_HOLD", SWIG_FromCharPtr("u")); 5627 PyDict_SetItemString(d,"OTHER_HOLD", SWIG_FromCharPtr("o")); 5628 PyDict_SetItemString(d,"SYSTEM_HOLD", SWIG_FromCharPtr("s")); 5629 PyDict_SetItemString(d,"ND_free", SWIG_FromCharPtr("free")); 5630 PyDict_SetItemString(d,"ND_offline", SWIG_FromCharPtr("offline")); 5631 PyDict_SetItemString(d,"ND_down", SWIG_FromCharPtr("down")); 5632 PyDict_SetItemString(d,"ND_reserve", SWIG_FromCharPtr("reserve")); 5633 PyDict_SetItemString(d,"ND_job_exclusive", SWIG_FromCharPtr("job-exclusive")); 5634 PyDict_SetItemString(d,"ND_job_sharing", SWIG_FromCharPtr("job-sharing")); 5635 PyDict_SetItemString(d,"ND_busy", SWIG_FromCharPtr("busy")); 5636 PyDict_SetItemString(d,"ND_state_unknown", SWIG_FromCharPtr("state-unknown")); 5637 PyDict_SetItemString(d,"ND_timeshared", SWIG_FromCharPtr("time-shared")); 5638 PyDict_SetItemString(d,"ND_cluster", SWIG_FromCharPtr("cluster")); 5639 { 5640 PyDict_SetItemString(d,"MAX_ENCODE_BFR", SWIG_From_int((int)(100))); 5641 } 5642 { 5643 PyDict_SetItemString(d,"MGR_CMD_CREATE", SWIG_From_int((int)(0))); 5644 } 5645 { 5646 PyDict_SetItemString(d,"MGR_CMD_DELETE", SWIG_From_int((int)(1))); 5647 } 5648 { 5649 PyDict_SetItemString(d,"MGR_CMD_SET", SWIG_From_int((int)(2))); 5650 } 5651 { 5652 PyDict_SetItemString(d,"MGR_CMD_UNSET", SWIG_From_int((int)(3))); 5653 } 5654 { 5655 PyDict_SetItemString(d,"MGR_CMD_LIST", SWIG_From_int((int)(4))); 5656 } 5657 { 5658 PyDict_SetItemString(d,"MGR_CMD_PRINT", SWIG_From_int((int)(5))); 5659 } 5660 { 5661 PyDict_SetItemString(d,"MGR_CMD_ACTIVE", SWIG_From_int((int)(6))); 5662 } 5663 { 5664 PyDict_SetItemString(d,"MGR_OBJ_NONE", SWIG_From_int((int)(-1))); 5665 } 5666 { 5667 PyDict_SetItemString(d,"MGR_OBJ_SERVER", SWIG_From_int((int)(0))); 5668 } 5669 { 5670 PyDict_SetItemString(d,"MGR_OBJ_QUEUE", SWIG_From_int((int)(1))); 5671 } 5672 { 5673 PyDict_SetItemString(d,"MGR_OBJ_JOB", SWIG_From_int((int)(2))); 5674 } 5675 { 5676 PyDict_SetItemString(d,"MGR_OBJ_NODE", SWIG_From_int((int)(3))); 5677 } 5678 { 5679 PyDict_SetItemString(d,"MSG_OUT", SWIG_From_int((int)(1))); 5680 } 5681 { 5682 PyDict_SetItemString(d,"MSG_ERR", SWIG_From_int((int)(2))); 5683 } 5684 { 5685 PyDict_SetItemString(d,"SHUT_SIG", SWIG_From_int((int)(-1))); 5686 } 5687 { 5688 PyDict_SetItemString(d,"SHUT_IMMEDIATE", SWIG_From_int((int)(0))); 5689 } 5690 { 5691 PyDict_SetItemString(d,"SHUT_DELAY", SWIG_From_int((int)(1))); 5692 } 5693 { 5694 PyDict_SetItemString(d,"SHUT_QUICK", SWIG_From_int((int)(2))); 5695 } 5696 PyDict_SetItemString(d,"SIG_RESUME", SWIG_FromCharPtr("resume")); 5697 PyDict_SetItemString(d,"SIG_SUSPEND", SWIG_FromCharPtr("suspend")); 5698 { 5699 PyDict_SetItemString(d,"PBS_MAXHOSTNAME", SWIG_From_int((int)(64))); 5700 } 5701 { 5702 PyDict_SetItemString(d,"MAXPATHLEN", SWIG_From_int((int)(1024))); 5703 } 5704 { 5705 PyDict_SetItemString(d,"MAXNAMLEN", SWIG_From_int((int)(255))); 5706 } 5707 { 5708 PyDict_SetItemString(d,"PBS_MAXUSER", SWIG_From_int((int)(16))); 5709 } 5710 { 5711 PyDict_SetItemString(d,"PBS_MAXGRPN", SWIG_From_int((int)(16))); 5712 } 5713 { 5714 PyDict_SetItemString(d,"PBS_MAXQUEUENAME", SWIG_From_int((int)(15))); 5715 } 5716 { 5717 PyDict_SetItemString(d,"PBS_MAXSERVERNAME", SWIG_From_int((int)(64))); 5718 } 5719 { 5720 PyDict_SetItemString(d,"PBS_MAXSEQNUM", SWIG_From_int((int)(6))); 5721 } 5722 { 5723 PyDict_SetItemString(d,"PBS_MAXPORTNUM", SWIG_From_int((int)(5))); 5724 } 5725 { 5726 PyDict_SetItemString(d,"PBS_MAXSVRJOBID", SWIG_From_int((int)((6+64+5+2)))); 5727 } 5728 { 5729 PyDict_SetItemString(d,"PBS_MAXCLTJOBID", SWIG_From_int((int)(((6+64+5+2) +64+5+2)))); 5730 } 5731 { 5732 PyDict_SetItemString(d,"PBS_MAXDEST", SWIG_From_int((int)(1024))); 5733 } 5734 { 5735 PyDict_SetItemString(d,"PBS_MAXROUTEDEST", SWIG_From_int((int)((15+64+5+2)))); 5736 } 5737 { 5738 PyDict_SetItemString(d,"PBS_USE_IFF", SWIG_From_int((int)(1))); 5739 } 5740 { 5741 PyDict_SetItemString(d,"PBS_INTERACTIVE", SWIG_From_int((int)(1))); 5742 } 5743 { 5744 PyDict_SetItemString(d,"PBS_TERM_BUF_SZ", SWIG_From_int((int)(80))); 5745 } 5746 { 5747 PyDict_SetItemString(d,"PBS_TERM_CCA", SWIG_From_int((int)(6))); 5748 } 5749 PyDict_SetItemString(d,"PBS_BATCH_SERVICE_NAME", SWIG_FromCharPtr("pbs")); 5750 { 5751 PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT", SWIG_From_int((int)(15001))); 5752 } 5753 PyDict_SetItemString(d,"PBS_BATCH_SERVICE_NAME_DIS", SWIG_FromCharPtr("pbs_dis")); 5754 { 5755 PyDict_SetItemString(d,"PBS_BATCH_SERVICE_PORT_DIS", SWIG_From_int((int)(15001))); 5756 } 5757 PyDict_SetItemString(d,"PBS_MOM_SERVICE_NAME", SWIG_FromCharPtr("pbs_mom")); 5758 { 5759 PyDict_SetItemString(d,"PBS_MOM_SERVICE_PORT", SWIG_From_int((int)(15002))); 5760 } 5761 PyDict_SetItemString(d,"PBS_MANAGER_SERVICE_NAME", SWIG_FromCharPtr("pbs_resmon")); 5762 { 5763 PyDict_SetItemString(d,"PBS_MANAGER_SERVICE_PORT", SWIG_From_int((int)(15003))); 5764 } 5765 PyDict_SetItemString(d,"PBS_SCHEDULER_SERVICE_NAME", SWIG_FromCharPtr("pbs_sched")); 5766 { 5767 PyDict_SetItemString(d,"PBS_SCHEDULER_SERVICE_PORT", SWIG_From_int((int)(15004))); 5768 } 5769 { 5770 PyDict_SetItemString(d,"SET", SWIG_From_int((int)(SET))); 5771 } 5772 { 5773 PyDict_SetItemString(d,"UNSET", SWIG_From_int((int)(UNSET))); 5774 } 5775 { 5776 PyDict_SetItemString(d,"INCR", SWIG_From_int((int)(INCR))); 5777 } 5778 { 5779 PyDict_SetItemString(d,"DECR", SWIG_From_int((int)(DECR))); 5780 } 5781 { 5782 PyDict_SetItemString(d,"EQ", SWIG_From_int((int)(EQ))); 5783 } 5784 { 5785 PyDict_SetItemString(d,"NE", SWIG_From_int((int)(NE))); 5786 } 5787 { 5788 PyDict_SetItemString(d,"GE", SWIG_From_int((int)(GE))); 5789 } 5790 { 5791 PyDict_SetItemString(d,"GT", SWIG_From_int((int)(GT))); 5792 } 5793 { 5794 PyDict_SetItemString(d,"LE", SWIG_From_int((int)(LE))); 5795 } 5796 { 5797 PyDict_SetItemString(d,"LT", SWIG_From_int((int)(LT))); 5798 } 5799 { 5800 PyDict_SetItemString(d,"DFLT", SWIG_From_int((int)(DFLT))); 5801 } 5802 { 5803 PyDict_SetItemString(d,"RESOURCE_T_NULL", SWIG_From_int((int)(0))); 5804 } 5805 { 5806 PyDict_SetItemString(d,"RESOURCE_T_ALL", SWIG_From_int((int)(-1))); 5807 } 5808 PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); 5809 SWIG_addvarlink(SWIG_globals,(char*)"pbs_errno",_wrap_pbs_errno_get, _wrap_pbs_errno_set); 5810 SWIG_addvarlink(SWIG_globals,(char*)"pbs_server",_wrap_pbs_server_get, _wrap_pbs_server_set); 5811 { 5812 PyDict_SetItemString(d,"LOG_BUF_SIZE", SWIG_From_int((int)(4096))); 5813 } 5814 SWIG_addvarlink(SWIG_globals,(char*)"log_event_mask",_wrap_log_event_mask_get, _wrap_log_event_mask_set); 5815 SWIG_addvarlink(SWIG_globals,(char*)"log_buffer",_wrap_log_buffer_get, _wrap_log_buffer_set); 5816 { 5817 PyDict_SetItemString(d,"PBSEVENT_ERROR", SWIG_From_int((int)(0x0001))); 5818 } 5819 { 5820 PyDict_SetItemString(d,"PBSEVENT_SYSTEM", SWIG_From_int((int)(0x0002))); 5821 } 5822 { 5823 PyDict_SetItemString(d,"PBSEVENT_ADMIN", SWIG_From_int((int)(0x0004))); 5824 } 5825 { 5826 PyDict_SetItemString(d,"PBSEVENT_JOB", SWIG_From_int((int)(0x0008))); 5827 } 5828 { 5829 PyDict_SetItemString(d,"PBSEVENT_JOB_USAGE", SWIG_From_int((int)(0x0010))); 5830 } 5831 { 5832 PyDict_SetItemString(d,"PBSEVENT_SECURITY", SWIG_From_int((int)(0x0020))); 5833 } 5834 { 5835 PyDict_SetItemString(d,"PBSEVENT_SCHED", SWIG_From_int((int)(0x0040))); 5836 } 5837 { 5838 PyDict_SetItemString(d,"PBSEVENT_DEBUG", SWIG_From_int((int)(0x0080))); 5839 } 5840 { 5841 PyDict_SetItemString(d,"PBSEVENT_DEBUG2", SWIG_From_int((int)(0x0100))); 5842 } 5843 { 5844 PyDict_SetItemString(d,"PBSEVENT_FORCE", SWIG_From_int((int)(0x8000))); 5845 } 5846 { 5847 PyDict_SetItemString(d,"PBS_EVENTCLASS_SERVER", SWIG_From_int((int)(1))); 5848 } 5849 { 5850 PyDict_SetItemString(d,"PBS_EVENTCLASS_QUEUE", SWIG_From_int((int)(2))); 5851 } 5852 { 5853 PyDict_SetItemString(d,"PBS_EVENTCLASS_JOB", SWIG_From_int((int)(3))); 5854 } 5855 { 5856 PyDict_SetItemString(d,"PBS_EVENTCLASS_REQUEST", SWIG_From_int((int)(4))); 5857 } 5858 { 5859 PyDict_SetItemString(d,"PBS_EVENTCLASS_FILE", SWIG_From_int((int)(5))); 5860 } 5861 { 5862 PyDict_SetItemString(d,"PBS_EVENTCLASS_ACCT", SWIG_From_int((int)(6))); 5863 } 5864 { 5865 PyDict_SetItemString(d,"PBS_EVENTCLASS_NODE", SWIG_From_int((int)(7))); 5866 } 5867 { 5868 PyDict_SetItemString(d,"PBSEVENT_MASK", SWIG_From_int((int)(0x01ff))); 5869 } 5870 SWIG_addvarlink(SWIG_globals,(char*)"msg_daemonname",_wrap_msg_daemonname_get, _wrap_msg_daemonname_set); 5871 } 5872 7384 SWIGEXPORT void SWIG_init(void) { 7385 PyObject *m, *d; 7386 7387 /* Fix SwigMethods to carry the callback ptrs when needed */ 7388 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); 7389 7390 m = Py_InitModule((char *) SWIG_name, SwigMethods); 7391 d = PyModule_GetDict(m); 7392 7393 SWIG_InitializeModule(0); 7394 SWIG_InstallConstants(d,swig_const_table); 7395 7396 7397 SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time")); 7398 SWIG_Python_SetConstant(d, "ATTR_c",SWIG_FromCharPtr("Checkpoint")); 7399 SWIG_Python_SetConstant(d, "ATTR_e",SWIG_FromCharPtr("Error_Path")); 7400 SWIG_Python_SetConstant(d, "ATTR_g",SWIG_FromCharPtr("group_list")); 7401 SWIG_Python_SetConstant(d, "ATTR_h",SWIG_FromCharPtr("Hold_Types")); 7402 SWIG_Python_SetConstant(d, "ATTR_j",SWIG_FromCharPtr("Join_Path")); 7403 SWIG_Python_SetConstant(d, "ATTR_k",SWIG_FromCharPtr("Keep_Files")); 7404 SWIG_Python_SetConstant(d, "ATTR_l",SWIG_FromCharPtr("Resource_List")); 7405 SWIG_Python_SetConstant(d, "ATTR_m",SWIG_FromCharPtr("Mail_Points")); 7406 SWIG_Python_SetConstant(d, "ATTR_o",SWIG_FromCharPtr("Output_Path")); 7407 SWIG_Python_SetConstant(d, "ATTR_p",SWIG_FromCharPtr("Priority")); 7408 SWIG_Python_SetConstant(d, "ATTR_q",SWIG_FromCharPtr("destination")); 7409 SWIG_Python_SetConstant(d, "ATTR_r",SWIG_FromCharPtr("Rerunable")); 7410 SWIG_Python_SetConstant(d, "ATTR_u",SWIG_FromCharPtr("User_List")); 7411 SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List")); 7412 SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name")); 7413 SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users")); 7414 SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name")); 7415 SWIG_Python_SetConstant(d, "ATTR_S",SWIG_FromCharPtr("Shell_Path_List")); 7416 SWIG_Python_SetConstant(d, "ATTR_depend",SWIG_FromCharPtr("depend")); 7417 SWIG_Python_SetConstant(d, "ATTR_inter",SWIG_FromCharPtr("interactive")); 7418 SWIG_Python_SetConstant(d, "ATTR_stagein",SWIG_FromCharPtr("stagein")); 7419 SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout")); 7420 SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime")); 7421 SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host")); 7422 SWIG_Python_SetConstant(d, "ATTR_mtime",SWIG_FromCharPtr("mtime")); 7423 SWIG_Python_SetConstant(d, "ATTR_qtime",SWIG_FromCharPtr("qtime")); 7424 SWIG_Python_SetConstant(d, "ATTR_session",SWIG_FromCharPtr("session_id")); 7425 SWIG_Python_SetConstant(d, "ATTR_euser",SWIG_FromCharPtr("euser")); 7426 SWIG_Python_SetConstant(d, "ATTR_egroup",SWIG_FromCharPtr("egroup")); 7427 SWIG_Python_SetConstant(d, "ATTR_hashname",SWIG_FromCharPtr("hashname")); 7428 SWIG_Python_SetConstant(d, "ATTR_hopcount",SWIG_FromCharPtr("hop_count")); 7429 SWIG_Python_SetConstant(d, "ATTR_security",SWIG_FromCharPtr("security")); 7430 SWIG_Python_SetConstant(d, "ATTR_sched_hint",SWIG_FromCharPtr("sched_hint")); 7431 SWIG_Python_SetConstant(d, "ATTR_substate",SWIG_FromCharPtr("substate")); 7432 SWIG_Python_SetConstant(d, "ATTR_name",SWIG_FromCharPtr("Job_Name")); 7433 SWIG_Python_SetConstant(d, "ATTR_owner",SWIG_FromCharPtr("Job_Owner")); 7434 SWIG_Python_SetConstant(d, "ATTR_used",SWIG_FromCharPtr("resources_used")); 7435 SWIG_Python_SetConstant(d, "ATTR_state",SWIG_FromCharPtr("job_state")); 7436 SWIG_Python_SetConstant(d, "ATTR_queue",SWIG_FromCharPtr("queue")); 7437 SWIG_Python_SetConstant(d, "ATTR_server",SWIG_FromCharPtr("server")); 7438 SWIG_Python_SetConstant(d, "ATTR_maxrun",SWIG_FromCharPtr("max_running")); 7439 SWIG_Python_SetConstant(d, "ATTR_total",SWIG_FromCharPtr("total_jobs")); 7440 SWIG_Python_SetConstant(d, "ATTR_comment",SWIG_FromCharPtr("comment")); 7441 SWIG_Python_SetConstant(d, "ATTR_cookie",SWIG_FromCharPtr("cookie")); 7442 SWIG_Python_SetConstant(d, "ATTR_qrank",SWIG_FromCharPtr("queue_rank")); 7443 SWIG_Python_SetConstant(d, "ATTR_altid",SWIG_FromCharPtr("alt_id")); 7444 SWIG_Python_SetConstant(d, "ATTR_etime",SWIG_FromCharPtr("etime")); 7445 SWIG_Python_SetConstant(d, "ATTR_exitstat",SWIG_FromCharPtr("exit_status")); 7446 SWIG_Python_SetConstant(d, "ATTR_forwardx11",SWIG_FromCharPtr("forward_x11")); 7447 SWIG_Python_SetConstant(d, "ATTR_submit_args",SWIG_FromCharPtr("submit_args")); 7448 SWIG_Python_SetConstant(d, "ATTR_umask",SWIG_FromCharPtr("umask")); 7449 SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable")); 7450 SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups")); 7451 SWIG_Python_SetConstant(d, "ATTR_aclhten",SWIG_FromCharPtr("acl_host_enable")); 7452 SWIG_Python_SetConstant(d, "ATTR_aclhost",SWIG_FromCharPtr("acl_hosts")); 7453 SWIG_Python_SetConstant(d, "ATTR_acluren",SWIG_FromCharPtr("acl_user_enable")); 7454 SWIG_Python_SetConstant(d, "ATTR_acluser",SWIG_FromCharPtr("acl_users")); 7455 SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router")); 7456 SWIG_Python_SetConstant(d, "ATTR_chkptmin",SWIG_FromCharPtr("checkpoint_min")); 7457 SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled")); 7458 SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only")); 7459 SWIG_Python_SetConstant(d, "ATTR_killdelay",SWIG_FromCharPtr("kill_delay")); 7460 SWIG_Python_SetConstant(d, "ATTR_maxgrprun",SWIG_FromCharPtr("max_group_run")); 7461 SWIG_Python_SetConstant(d, "ATTR_maxque",SWIG_FromCharPtr("max_queuable")); 7462 SWIG_Python_SetConstant(d, "ATTR_maxuserrun",SWIG_FromCharPtr("max_user_run")); 7463 SWIG_Python_SetConstant(d, "ATTR_qtype",SWIG_FromCharPtr("queue_type")); 7464 SWIG_Python_SetConstant(d, "ATTR_rescassn",SWIG_FromCharPtr("resources_assigned")); 7465 SWIG_Python_SetConstant(d, "ATTR_rescdflt",SWIG_FromCharPtr("resources_default")); 7466 SWIG_Python_SetConstant(d, "ATTR_rescmax",SWIG_FromCharPtr("resources_max")); 7467 SWIG_Python_SetConstant(d, "ATTR_rescmin",SWIG_FromCharPtr("resources_min")); 7468 SWIG_Python_SetConstant(d, "ATTR_rndzretry",SWIG_FromCharPtr("rendezvous_retry")); 7469 SWIG_Python_SetConstant(d, "ATTR_routedest",SWIG_FromCharPtr("route_destinations")); 7470 SWIG_Python_SetConstant(d, "ATTR_routeheld",SWIG_FromCharPtr("route_held_jobs")); 7471 SWIG_Python_SetConstant(d, "ATTR_routewait",SWIG_FromCharPtr("route_waiting_jobs")); 7472 SWIG_Python_SetConstant(d, "ATTR_routeretry",SWIG_FromCharPtr("route_retry_time")); 7473 SWIG_Python_SetConstant(d, "ATTR_routelife",SWIG_FromCharPtr("route_lifetime")); 7474 SWIG_Python_SetConstant(d, "ATTR_rsvexpdt",SWIG_FromCharPtr("reserved_expedite")); 7475 SWIG_Python_SetConstant(d, "ATTR_rsvsync",SWIG_FromCharPtr("reserved_sync")); 7476 SWIG_Python_SetConstant(d, "ATTR_start",SWIG_FromCharPtr("started")); 7477 SWIG_Python_SetConstant(d, "ATTR_count",SWIG_FromCharPtr("state_count")); 7478 SWIG_Python_SetConstant(d, "ATTR_number",SWIG_FromCharPtr("number_jobs")); 7479 SWIG_Python_SetConstant(d, "ATTR_acllogic",SWIG_FromCharPtr("acl_logic_or")); 7480 SWIG_Python_SetConstant(d, "ATTR_aclgrpslpy",SWIG_FromCharPtr("acl_group_sloppy")); 7481 SWIG_Python_SetConstant(d, "ATTR_keepcompleted",SWIG_FromCharPtr("keep_completed")); 7482 SWIG_Python_SetConstant(d, "ATTR_disallowedtypes",SWIG_FromCharPtr("disallowed_types")); 7483 SWIG_Python_SetConstant(d, "ATTR_aclroot",SWIG_FromCharPtr("acl_roots")); 7484 SWIG_Python_SetConstant(d, "ATTR_managers",SWIG_FromCharPtr("managers")); 7485 SWIG_Python_SetConstant(d, "ATTR_dfltque",SWIG_FromCharPtr("default_queue")); 7486 SWIG_Python_SetConstant(d, "ATTR_defnode",SWIG_FromCharPtr("default_node")); 7487 SWIG_Python_SetConstant(d, "ATTR_locsvrs",SWIG_FromCharPtr("location_servers")); 7488 SWIG_Python_SetConstant(d, "ATTR_logevents",SWIG_FromCharPtr("log_events")); 7489 SWIG_Python_SetConstant(d, "ATTR_logfile",SWIG_FromCharPtr("log_file")); 7490 SWIG_Python_SetConstant(d, "ATTR_loglevel",SWIG_FromCharPtr("log_level")); 7491 SWIG_Python_SetConstant(d, "ATTR_mailfrom",SWIG_FromCharPtr("mail_from")); 7492 SWIG_Python_SetConstant(d, "ATTR_nodepack",SWIG_FromCharPtr("node_pack")); 7493 SWIG_Python_SetConstant(d, "ATTR_operators",SWIG_FromCharPtr("operators")); 7494 SWIG_Python_SetConstant(d, "ATTR_queryother",SWIG_FromCharPtr("query_other_jobs")); 7495 SWIG_Python_SetConstant(d, "ATTR_resccost",SWIG_FromCharPtr("resources_cost")); 7496 SWIG_Python_SetConstant(d, "ATTR_rescavail",SWIG_FromCharPtr("resources_available")); 7497 SWIG_Python_SetConstant(d, "ATTR_schedit",SWIG_FromCharPtr("scheduler_iteration")); 7498 SWIG_Python_SetConstant(d, "ATTR_scheduling",SWIG_FromCharPtr("scheduling")); 7499 SWIG_Python_SetConstant(d, "ATTR_status",SWIG_FromCharPtr("server_state")); 7500 SWIG_Python_SetConstant(d, "ATTR_syscost",SWIG_FromCharPtr("system_cost")); 7501 SWIG_Python_SetConstant(d, "ATTR_pingrate",SWIG_FromCharPtr("node_ping_rate")); 7502 SWIG_Python_SetConstant(d, "ATTR_ndchkrate",SWIG_FromCharPtr("node_check_rate")); 7503 SWIG_Python_SetConstant(d, "ATTR_tcptimeout",SWIG_FromCharPtr("tcp_timeout")); 7504 SWIG_Python_SetConstant(d, "ATTR_jobstatrate",SWIG_FromCharPtr("job_stat_rate")); 7505 SWIG_Python_SetConstant(d, "ATTR_polljobs",SWIG_FromCharPtr("poll_jobs")); 7506 SWIG_Python_SetConstant(d, "ATTR_downonerror",SWIG_FromCharPtr("down_on_error")); 7507 SWIG_Python_SetConstant(d, "ATTR_jobnanny",SWIG_FromCharPtr("job_nanny")); 7508 SWIG_Python_SetConstant(d, "ATTR_ownerpurge",SWIG_FromCharPtr("owner_purge")); 7509 SWIG_Python_SetConstant(d, "ATTR_qcqlimits",SWIG_FromCharPtr("queue_centric_limits")); 7510 SWIG_Python_SetConstant(d, "ATTR_momjobsync",SWIG_FromCharPtr("mom_job_sync")); 7511 SWIG_Python_SetConstant(d, "ATTR_maildomain",SWIG_FromCharPtr("mail_domain")); 7512 SWIG_Python_SetConstant(d, "ATTR_pbsversion",SWIG_FromCharPtr("pbs_version")); 7513 SWIG_Python_SetConstant(d, "ATTR_submithosts",SWIG_FromCharPtr("submit_hosts")); 7514 SWIG_Python_SetConstant(d, "ATTR_allownodesubmit",SWIG_FromCharPtr("allow_node_submit")); 7515 SWIG_Python_SetConstant(d, "ATTR_autonodenp",SWIG_FromCharPtr("auto_node_np")); 7516 SWIG_Python_SetConstant(d, "ATTR_servername",SWIG_FromCharPtr("server_name")); 7517 SWIG_Python_SetConstant(d, "ATTR_logfilemaxsize",SWIG_FromCharPtr("log_file_max_size")); 7518 SWIG_Python_SetConstant(d, "ATTR_logfilerolldepth",SWIG_FromCharPtr("log_file_roll_depth")); 7519 SWIG_Python_SetConstant(d, "ATTR_nextjobnum",SWIG_FromCharPtr("next_job_number")); 7520 SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state")); 7521 SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np")); 7522 SWIG_Python_SetConstant(d, "ATTR_NODE_properties",SWIG_FromCharPtr("properties")); 7523 SWIG_Python_SetConstant(d, "ATTR_NODE_ntype",SWIG_FromCharPtr("ntype")); 7524 SWIG_Python_SetConstant(d, "ATTR_NODE_jobs",SWIG_FromCharPtr("jobs")); 7525 SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status")); 7526 SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note")); 7527 SWIG_Python_SetConstant(d, "CHECKPOINT_UNSPECIFIED",SWIG_FromCharPtr("u")); 7528 SWIG_Python_SetConstant(d, "NO_HOLD",SWIG_FromCharPtr("n")); 7529 SWIG_Python_SetConstant(d, "NO_JOIN",SWIG_FromCharPtr("n")); 7530 SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n")); 7531 SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a")); 7532 SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay=")); 7533 SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge=")); 7534 SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only")); 7535 SWIG_Python_SetConstant(d, "USER_HOLD",SWIG_FromCharPtr("u")); 7536 SWIG_Python_SetConstant(d, "OTHER_HOLD",SWIG_FromCharPtr("o")); 7537 SWIG_Python_SetConstant(d, "SYSTEM_HOLD",SWIG_FromCharPtr("s")); 7538 SWIG_Python_SetConstant(d, "ND_free",SWIG_FromCharPtr("free")); 7539 SWIG_Python_SetConstant(d, "ND_offline",SWIG_FromCharPtr("offline")); 7540 SWIG_Python_SetConstant(d, "ND_down",SWIG_FromCharPtr("down")); 7541 SWIG_Python_SetConstant(d, "ND_reserve",SWIG_FromCharPtr("reserve")); 7542 SWIG_Python_SetConstant(d, "ND_job_exclusive",SWIG_FromCharPtr("job-exclusive")); 7543 SWIG_Python_SetConstant(d, "ND_job_sharing",SWIG_FromCharPtr("job-sharing")); 7544 SWIG_Python_SetConstant(d, "ND_busy",SWIG_FromCharPtr("busy")); 7545 SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown")); 7546 SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared")); 7547 SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster")); 7548 SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch")); 7549 SWIG_Python_SetConstant(d, "Q_DT_interactive",SWIG_FromCharPtr("interactive")); 7550 SWIG_Python_SetConstant(d, "Q_DT_rerunable",SWIG_FromCharPtr("rerunable")); 7551 SWIG_Python_SetConstant(d, "Q_DT_nonrerunable",SWIG_FromCharPtr("nonrerunable")); 7552 SWIG_Python_SetConstant(d, "MAX_ENCODE_BFR",SWIG_From_int((int)(100))); 7553 SWIG_Python_SetConstant(d, "MGR_CMD_CREATE",SWIG_From_int((int)(0))); 7554 SWIG_Python_SetConstant(d, "MGR_CMD_DELETE",SWIG_From_int((int)(1))); 7555 SWIG_Python_SetConstant(d, "MGR_CMD_SET",SWIG_From_int((int)(2))); 7556 SWIG_Python_SetConstant(d, "MGR_CMD_UNSET",SWIG_From_int((int)(3))); 7557 SWIG_Python_SetConstant(d, "MGR_CMD_LIST",SWIG_From_int((int)(4))); 7558 SWIG_Python_SetConstant(d, "MGR_CMD_PRINT",SWIG_From_int((int)(5))); 7559 SWIG_Python_SetConstant(d, "MGR_CMD_ACTIVE",SWIG_From_int((int)(6))); 7560 SWIG_Python_SetConstant(d, "MGR_OBJ_NONE",SWIG_From_int((int)(-1))); 7561 SWIG_Python_SetConstant(d, "MGR_OBJ_SERVER",SWIG_From_int((int)(0))); 7562 SWIG_Python_SetConstant(d, "MGR_OBJ_QUEUE",SWIG_From_int((int)(1))); 7563 SWIG_Python_SetConstant(d, "MGR_OBJ_JOB",SWIG_From_int((int)(2))); 7564 SWIG_Python_SetConstant(d, "MGR_OBJ_NODE",SWIG_From_int((int)(3))); 7565 SWIG_Python_SetConstant(d, "MSG_OUT",SWIG_From_int((int)(1))); 7566 SWIG_Python_SetConstant(d, "MSG_ERR",SWIG_From_int((int)(2))); 7567 SWIG_Python_SetConstant(d, "SHUT_SIG",SWIG_From_int((int)(-1))); 7568 SWIG_Python_SetConstant(d, "SHUT_IMMEDIATE",SWIG_From_int((int)(0))); 7569 SWIG_Python_SetConstant(d, "SHUT_DELAY",SWIG_From_int((int)(1))); 7570 SWIG_Python_SetConstant(d, "SHUT_QUICK",SWIG_From_int((int)(2))); 7571 SWIG_Python_SetConstant(d, "SIG_RESUME",SWIG_FromCharPtr("resume")); 7572 SWIG_Python_SetConstant(d, "SIG_SUSPEND",SWIG_FromCharPtr("suspend")); 7573 SWIG_Python_SetConstant(d, "PBS_MAXHOSTNAME",SWIG_From_int((int)(64))); 7574 SWIG_Python_SetConstant(d, "MAXPATHLEN",SWIG_From_int((int)(1024))); 7575 SWIG_Python_SetConstant(d, "MAXNAMLEN",SWIG_From_int((int)(255))); 7576 SWIG_Python_SetConstant(d, "MAX_NOTE",SWIG_From_int((int)(256))); 7577 SWIG_Python_SetConstant(d, "MAX_NOTE_STR",SWIG_FromCharPtr("256")); 7578 SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(16))); 7579 SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16))); 7580 SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15))); 7581 SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(64))); 7582 SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(6))); 7583 SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5))); 7584 SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((6+64+5+2)))); 7585 SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((6+64+5+2) +64+5+2)))); 7586 SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024))); 7587 SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+64+5+2)))); 7588 SWIG_Python_SetConstant(d, "PBS_USE_IFF",SWIG_From_int((int)(1))); 7589 SWIG_Python_SetConstant(d, "PBS_INTERACTIVE",SWIG_From_int((int)(1))); 7590 SWIG_Python_SetConstant(d, "PBS_TERM_BUF_SZ",SWIG_From_int((int)(80))); 7591 SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6))); 7592 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs")); 7593 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001))); 7594 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME_DIS",SWIG_FromCharPtr("pbs_dis")); 7595 SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT_DIS",SWIG_From_int((int)(15001))); 7596 SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_NAME",SWIG_FromCharPtr("pbs_mom")); 7597 SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_PORT",SWIG_From_int((int)(15002))); 7598 SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_NAME",SWIG_FromCharPtr("pbs_resmon")); 7599 SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_PORT",SWIG_From_int((int)(15003))); 7600 SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_NAME",SWIG_FromCharPtr("pbs_sched")); 7601 SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_PORT",SWIG_From_int((int)(15004))); 7602 SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET))); 7603 SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET))); 7604 SWIG_Python_SetConstant(d, "INCR",SWIG_From_int((int)(INCR))); 7605 SWIG_Python_SetConstant(d, "DECR",SWIG_From_int((int)(DECR))); 7606 SWIG_Python_SetConstant(d, "EQ",SWIG_From_int((int)(EQ))); 7607 SWIG_Python_SetConstant(d, "NE",SWIG_From_int((int)(NE))); 7608 SWIG_Python_SetConstant(d, "GE",SWIG_From_int((int)(GE))); 7609 SWIG_Python_SetConstant(d, "GT",SWIG_From_int((int)(GT))); 7610 SWIG_Python_SetConstant(d, "LE",SWIG_From_int((int)(LE))); 7611 SWIG_Python_SetConstant(d, "LT",SWIG_From_int((int)(LT))); 7612 SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT))); 7613 SWIG_Python_SetConstant(d, "RESOURCE_T_NULL",SWIG_From_int((int)(0))); 7614 SWIG_Python_SetConstant(d, "RESOURCE_T_ALL",SWIG_From_int((int)(-1))); 7615 PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); 7616 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",pbs_errno_get, pbs_errno_set); 7617 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",pbs_server_get, pbs_server_set); 7618 SWIG_Python_SetConstant(d, "LOG_BUF_SIZE",SWIG_From_int((int)(4096))); 7619 SWIG_addvarlink(SWIG_globals(),(char*)"log_event_mask",log_event_mask_get, log_event_mask_set); 7620 SWIG_addvarlink(SWIG_globals(),(char*)"log_buffer",log_buffer_get, log_buffer_set); 7621 SWIG_Python_SetConstant(d, "PBSEVENT_ERROR",SWIG_From_int((int)(0x0001))); 7622 SWIG_Python_SetConstant(d, "PBSEVENT_SYSTEM",SWIG_From_int((int)(0x0002))); 7623 SWIG_Python_SetConstant(d, "PBSEVENT_ADMIN",SWIG_From_int((int)(0x0004))); 7624 SWIG_Python_SetConstant(d, "PBSEVENT_JOB",SWIG_From_int((int)(0x0008))); 7625 SWIG_Python_SetConstant(d, "PBSEVENT_JOB_USAGE",SWIG_From_int((int)(0x0010))); 7626 SWIG_Python_SetConstant(d, "PBSEVENT_SECURITY",SWIG_From_int((int)(0x0020))); 7627 SWIG_Python_SetConstant(d, "PBSEVENT_SCHED",SWIG_From_int((int)(0x0040))); 7628 SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG",SWIG_From_int((int)(0x0080))); 7629 SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG2",SWIG_From_int((int)(0x0100))); 7630 SWIG_Python_SetConstant(d, "PBSEVENT_FORCE",SWIG_From_int((int)(0x8000))); 7631 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_SERVER",SWIG_From_int((int)(1))); 7632 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_QUEUE",SWIG_From_int((int)(2))); 7633 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_JOB",SWIG_From_int((int)(3))); 7634 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_REQUEST",SWIG_From_int((int)(4))); 7635 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_FILE",SWIG_From_int((int)(5))); 7636 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_ACCT",SWIG_From_int((int)(6))); 7637 SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_NODE",SWIG_From_int((int)(7))); 7638 SWIG_Python_SetConstant(d, "PBSEVENT_MASK",SWIG_From_int((int)(0x01ff))); 7639 SWIG_addvarlink(SWIG_globals(),(char*)"msg_daemonname",msg_daemonname_get, msg_daemonname_set); 7640 } 7641
Note: See TracChangeset
for help on using the changeset viewer.