1 | /* ---------------------------------------------------------------------------- |
---|
2 | * This file was automatically generated by SWIG (http://www.swig.org). |
---|
3 | * Version 1.3.40 |
---|
4 | * |
---|
5 | * This file is not intended to be easily readable and contains a number of |
---|
6 | * coding conventions designed to improve portability and efficiency. Do not make |
---|
7 | * changes to this file unless you know what you are doing--modify the SWIG |
---|
8 | * interface file instead. |
---|
9 | * ----------------------------------------------------------------------------- */ |
---|
10 | |
---|
11 | #define SWIGPYTHON |
---|
12 | #define SWIG_PYTHON_DIRECTOR_NO_VTABLE |
---|
13 | |
---|
14 | /* ----------------------------------------------------------------------------- |
---|
15 | * This section contains generic SWIG labels for method/variable |
---|
16 | * declarations/attributes, and other compiler dependent labels. |
---|
17 | * ----------------------------------------------------------------------------- */ |
---|
18 | |
---|
19 | /* template workaround for compilers that cannot correctly implement the C++ standard */ |
---|
20 | #ifndef SWIGTEMPLATEDISAMBIGUATOR |
---|
21 | # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) |
---|
22 | # define SWIGTEMPLATEDISAMBIGUATOR template |
---|
23 | # elif defined(__HP_aCC) |
---|
24 | /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ |
---|
25 | /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ |
---|
26 | # define SWIGTEMPLATEDISAMBIGUATOR template |
---|
27 | # else |
---|
28 | # define SWIGTEMPLATEDISAMBIGUATOR |
---|
29 | # endif |
---|
30 | #endif |
---|
31 | |
---|
32 | /* inline attribute */ |
---|
33 | #ifndef SWIGINLINE |
---|
34 | # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) |
---|
35 | # define SWIGINLINE inline |
---|
36 | # else |
---|
37 | # define SWIGINLINE |
---|
38 | # endif |
---|
39 | #endif |
---|
40 | |
---|
41 | /* attribute recognised by some compilers to avoid 'unused' warnings */ |
---|
42 | #ifndef SWIGUNUSED |
---|
43 | # if defined(__GNUC__) |
---|
44 | # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) |
---|
45 | # define SWIGUNUSED __attribute__ ((__unused__)) |
---|
46 | # else |
---|
47 | # define SWIGUNUSED |
---|
48 | # endif |
---|
49 | # elif defined(__ICC) |
---|
50 | # define SWIGUNUSED __attribute__ ((__unused__)) |
---|
51 | # else |
---|
52 | # define SWIGUNUSED |
---|
53 | # endif |
---|
54 | #endif |
---|
55 | |
---|
56 | #ifndef SWIG_MSC_UNSUPPRESS_4505 |
---|
57 | # if defined(_MSC_VER) |
---|
58 | # pragma warning(disable : 4505) /* unreferenced local function has been removed */ |
---|
59 | # endif |
---|
60 | #endif |
---|
61 | |
---|
62 | #ifndef SWIGUNUSEDPARM |
---|
63 | # ifdef __cplusplus |
---|
64 | # define SWIGUNUSEDPARM(p) |
---|
65 | # else |
---|
66 | # define SWIGUNUSEDPARM(p) p SWIGUNUSED |
---|
67 | # endif |
---|
68 | #endif |
---|
69 | |
---|
70 | /* internal SWIG method */ |
---|
71 | #ifndef SWIGINTERN |
---|
72 | # define SWIGINTERN static SWIGUNUSED |
---|
73 | #endif |
---|
74 | |
---|
75 | /* internal inline SWIG method */ |
---|
76 | #ifndef SWIGINTERNINLINE |
---|
77 | # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE |
---|
78 | #endif |
---|
79 | |
---|
80 | /* exporting methods */ |
---|
81 | #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) |
---|
82 | # ifndef GCC_HASCLASSVISIBILITY |
---|
83 | # define GCC_HASCLASSVISIBILITY |
---|
84 | # endif |
---|
85 | #endif |
---|
86 | |
---|
87 | #ifndef SWIGEXPORT |
---|
88 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
89 | # if defined(STATIC_LINKED) |
---|
90 | # define SWIGEXPORT |
---|
91 | # else |
---|
92 | # define SWIGEXPORT __declspec(dllexport) |
---|
93 | # endif |
---|
94 | # else |
---|
95 | # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) |
---|
96 | # define SWIGEXPORT __attribute__ ((visibility("default"))) |
---|
97 | # else |
---|
98 | # define SWIGEXPORT |
---|
99 | # endif |
---|
100 | # endif |
---|
101 | #endif |
---|
102 | |
---|
103 | /* calling conventions for Windows */ |
---|
104 | #ifndef SWIGSTDCALL |
---|
105 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
106 | # define SWIGSTDCALL __stdcall |
---|
107 | # else |
---|
108 | # define SWIGSTDCALL |
---|
109 | # endif |
---|
110 | #endif |
---|
111 | |
---|
112 | /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ |
---|
113 | #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) |
---|
114 | # define _CRT_SECURE_NO_DEPRECATE |
---|
115 | #endif |
---|
116 | |
---|
117 | /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ |
---|
118 | #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) |
---|
119 | # define _SCL_SECURE_NO_DEPRECATE |
---|
120 | #endif |
---|
121 | |
---|
122 | |
---|
123 | |
---|
124 | /* Python.h has to appear first */ |
---|
125 | #include <Python.h> |
---|
126 | |
---|
127 | /* ----------------------------------------------------------------------------- |
---|
128 | * swigrun.swg |
---|
129 | * |
---|
130 | * This file contains generic C API SWIG runtime support for pointer |
---|
131 | * type checking. |
---|
132 | * ----------------------------------------------------------------------------- */ |
---|
133 | |
---|
134 | /* This should only be incremented when either the layout of swig_type_info changes, |
---|
135 | or for whatever reason, the runtime changes incompatibly */ |
---|
136 | #define SWIG_RUNTIME_VERSION "4" |
---|
137 | |
---|
138 | /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ |
---|
139 | #ifdef SWIG_TYPE_TABLE |
---|
140 | # define SWIG_QUOTE_STRING(x) #x |
---|
141 | # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) |
---|
142 | # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) |
---|
143 | #else |
---|
144 | # define SWIG_TYPE_TABLE_NAME |
---|
145 | #endif |
---|
146 | |
---|
147 | /* |
---|
148 | You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for |
---|
149 | creating a static or dynamic library from the SWIG runtime code. |
---|
150 | In 99.9% of the cases, SWIG just needs to declare them as 'static'. |
---|
151 | |
---|
152 | But only do this if strictly necessary, ie, if you have problems |
---|
153 | with your compiler or suchlike. |
---|
154 | */ |
---|
155 | |
---|
156 | #ifndef SWIGRUNTIME |
---|
157 | # define SWIGRUNTIME SWIGINTERN |
---|
158 | #endif |
---|
159 | |
---|
160 | #ifndef SWIGRUNTIMEINLINE |
---|
161 | # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE |
---|
162 | #endif |
---|
163 | |
---|
164 | /* Generic buffer size */ |
---|
165 | #ifndef SWIG_BUFFER_SIZE |
---|
166 | # define SWIG_BUFFER_SIZE 1024 |
---|
167 | #endif |
---|
168 | |
---|
169 | /* Flags for pointer conversions */ |
---|
170 | #define SWIG_POINTER_DISOWN 0x1 |
---|
171 | #define SWIG_CAST_NEW_MEMORY 0x2 |
---|
172 | |
---|
173 | /* Flags for new pointer objects */ |
---|
174 | #define SWIG_POINTER_OWN 0x1 |
---|
175 | |
---|
176 | |
---|
177 | /* |
---|
178 | Flags/methods for returning states. |
---|
179 | |
---|
180 | The SWIG conversion methods, as ConvertPtr, return and integer |
---|
181 | that tells if the conversion was successful or not. And if not, |
---|
182 | an error code can be returned (see swigerrors.swg for the codes). |
---|
183 | |
---|
184 | Use the following macros/flags to set or process the returning |
---|
185 | states. |
---|
186 | |
---|
187 | In old versions of SWIG, code such as the following was usually written: |
---|
188 | |
---|
189 | if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { |
---|
190 | // success code |
---|
191 | } else { |
---|
192 | //fail code |
---|
193 | } |
---|
194 | |
---|
195 | Now you can be more explicit: |
---|
196 | |
---|
197 | int res = SWIG_ConvertPtr(obj,vptr,ty.flags); |
---|
198 | if (SWIG_IsOK(res)) { |
---|
199 | // success code |
---|
200 | } else { |
---|
201 | // fail code |
---|
202 | } |
---|
203 | |
---|
204 | which is the same really, but now you can also do |
---|
205 | |
---|
206 | Type *ptr; |
---|
207 | int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); |
---|
208 | if (SWIG_IsOK(res)) { |
---|
209 | // success code |
---|
210 | if (SWIG_IsNewObj(res) { |
---|
211 | ... |
---|
212 | delete *ptr; |
---|
213 | } else { |
---|
214 | ... |
---|
215 | } |
---|
216 | } else { |
---|
217 | // fail code |
---|
218 | } |
---|
219 | |
---|
220 | I.e., now SWIG_ConvertPtr can return new objects and you can |
---|
221 | identify the case and take care of the deallocation. Of course that |
---|
222 | also requires SWIG_ConvertPtr to return new result values, such as |
---|
223 | |
---|
224 | int SWIG_ConvertPtr(obj, ptr,...) { |
---|
225 | if (<obj is ok>) { |
---|
226 | if (<need new object>) { |
---|
227 | *ptr = <ptr to new allocated object>; |
---|
228 | return SWIG_NEWOBJ; |
---|
229 | } else { |
---|
230 | *ptr = <ptr to old object>; |
---|
231 | return SWIG_OLDOBJ; |
---|
232 | } |
---|
233 | } else { |
---|
234 | return SWIG_BADOBJ; |
---|
235 | } |
---|
236 | } |
---|
237 | |
---|
238 | Of course, returning the plain '0(success)/-1(fail)' still works, but you can be |
---|
239 | more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the |
---|
240 | SWIG errors code. |
---|
241 | |
---|
242 | Finally, if the SWIG_CASTRANK_MODE is enabled, the result code |
---|
243 | allows to return the 'cast rank', for example, if you have this |
---|
244 | |
---|
245 | int food(double) |
---|
246 | int fooi(int); |
---|
247 | |
---|
248 | and you call |
---|
249 | |
---|
250 | food(1) // cast rank '1' (1 -> 1.0) |
---|
251 | fooi(1) // cast rank '0' |
---|
252 | |
---|
253 | just use the SWIG_AddCast()/SWIG_CheckState() |
---|
254 | */ |
---|
255 | |
---|
256 | #define SWIG_OK (0) |
---|
257 | #define SWIG_ERROR (-1) |
---|
258 | #define SWIG_IsOK(r) (r >= 0) |
---|
259 | #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) |
---|
260 | |
---|
261 | /* The CastRankLimit says how many bits are used for the cast rank */ |
---|
262 | #define SWIG_CASTRANKLIMIT (1 << 8) |
---|
263 | /* The NewMask denotes the object was created (using new/malloc) */ |
---|
264 | #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) |
---|
265 | /* The TmpMask is for in/out typemaps that use temporal objects */ |
---|
266 | #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) |
---|
267 | /* Simple returning values */ |
---|
268 | #define SWIG_BADOBJ (SWIG_ERROR) |
---|
269 | #define SWIG_OLDOBJ (SWIG_OK) |
---|
270 | #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) |
---|
271 | #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) |
---|
272 | /* Check, add and del mask methods */ |
---|
273 | #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) |
---|
274 | #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) |
---|
275 | #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) |
---|
276 | #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) |
---|
277 | #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) |
---|
278 | #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) |
---|
279 | |
---|
280 | /* Cast-Rank Mode */ |
---|
281 | #if defined(SWIG_CASTRANK_MODE) |
---|
282 | # ifndef SWIG_TypeRank |
---|
283 | # define SWIG_TypeRank unsigned long |
---|
284 | # endif |
---|
285 | # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ |
---|
286 | # define SWIG_MAXCASTRANK (2) |
---|
287 | # endif |
---|
288 | # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) |
---|
289 | # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) |
---|
290 | SWIGINTERNINLINE int SWIG_AddCast(int r) { |
---|
291 | return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; |
---|
292 | } |
---|
293 | SWIGINTERNINLINE int SWIG_CheckState(int r) { |
---|
294 | return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; |
---|
295 | } |
---|
296 | #else /* no cast-rank mode */ |
---|
297 | # define SWIG_AddCast |
---|
298 | # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) |
---|
299 | #endif |
---|
300 | |
---|
301 | |
---|
302 | #include <string.h> |
---|
303 | |
---|
304 | #ifdef __cplusplus |
---|
305 | extern "C" { |
---|
306 | #endif |
---|
307 | |
---|
308 | typedef void *(*swig_converter_func)(void *, int *); |
---|
309 | typedef struct swig_type_info *(*swig_dycast_func)(void **); |
---|
310 | |
---|
311 | /* Structure to store information on one type */ |
---|
312 | typedef struct swig_type_info { |
---|
313 | const char *name; /* mangled name of this type */ |
---|
314 | const char *str; /* human readable name of this type */ |
---|
315 | swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ |
---|
316 | struct swig_cast_info *cast; /* linked list of types that can cast into this type */ |
---|
317 | void *clientdata; /* language specific type data */ |
---|
318 | int owndata; /* flag if the structure owns the clientdata */ |
---|
319 | } swig_type_info; |
---|
320 | |
---|
321 | /* Structure to store a type and conversion function used for casting */ |
---|
322 | typedef struct swig_cast_info { |
---|
323 | swig_type_info *type; /* pointer to type that is equivalent to this type */ |
---|
324 | swig_converter_func converter; /* function to cast the void pointers */ |
---|
325 | struct swig_cast_info *next; /* pointer to next cast in linked list */ |
---|
326 | struct swig_cast_info *prev; /* pointer to the previous cast */ |
---|
327 | } swig_cast_info; |
---|
328 | |
---|
329 | /* Structure used to store module information |
---|
330 | * Each module generates one structure like this, and the runtime collects |
---|
331 | * all of these structures and stores them in a circularly linked list.*/ |
---|
332 | typedef struct swig_module_info { |
---|
333 | swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ |
---|
334 | size_t size; /* Number of types in this module */ |
---|
335 | struct swig_module_info *next; /* Pointer to next element in circularly linked list */ |
---|
336 | swig_type_info **type_initial; /* Array of initially generated type structures */ |
---|
337 | swig_cast_info **cast_initial; /* Array of initially generated casting structures */ |
---|
338 | void *clientdata; /* Language specific module data */ |
---|
339 | } swig_module_info; |
---|
340 | |
---|
341 | /* |
---|
342 | Compare two type names skipping the space characters, therefore |
---|
343 | "char*" == "char *" and "Class<int>" == "Class<int >", etc. |
---|
344 | |
---|
345 | Return 0 when the two name types are equivalent, as in |
---|
346 | strncmp, but skipping ' '. |
---|
347 | */ |
---|
348 | SWIGRUNTIME int |
---|
349 | SWIG_TypeNameComp(const char *f1, const char *l1, |
---|
350 | const char *f2, const char *l2) { |
---|
351 | for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { |
---|
352 | while ((*f1 == ' ') && (f1 != l1)) ++f1; |
---|
353 | while ((*f2 == ' ') && (f2 != l2)) ++f2; |
---|
354 | if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; |
---|
355 | } |
---|
356 | return (int)((l1 - f1) - (l2 - f2)); |
---|
357 | } |
---|
358 | |
---|
359 | /* |
---|
360 | Check type equivalence in a name list like <name1>|<name2>|... |
---|
361 | Return 0 if not equal, 1 if equal |
---|
362 | */ |
---|
363 | SWIGRUNTIME int |
---|
364 | SWIG_TypeEquiv(const char *nb, const char *tb) { |
---|
365 | int equiv = 0; |
---|
366 | const char* te = tb + strlen(tb); |
---|
367 | const char* ne = nb; |
---|
368 | while (!equiv && *ne) { |
---|
369 | for (nb = ne; *ne; ++ne) { |
---|
370 | if (*ne == '|') break; |
---|
371 | } |
---|
372 | equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; |
---|
373 | if (*ne) ++ne; |
---|
374 | } |
---|
375 | return equiv; |
---|
376 | } |
---|
377 | |
---|
378 | /* |
---|
379 | Check type equivalence in a name list like <name1>|<name2>|... |
---|
380 | Return 0 if equal, -1 if nb < tb, 1 if nb > tb |
---|
381 | */ |
---|
382 | SWIGRUNTIME int |
---|
383 | SWIG_TypeCompare(const char *nb, const char *tb) { |
---|
384 | int equiv = 0; |
---|
385 | const char* te = tb + strlen(tb); |
---|
386 | const char* ne = nb; |
---|
387 | while (!equiv && *ne) { |
---|
388 | for (nb = ne; *ne; ++ne) { |
---|
389 | if (*ne == '|') break; |
---|
390 | } |
---|
391 | equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; |
---|
392 | if (*ne) ++ne; |
---|
393 | } |
---|
394 | return equiv; |
---|
395 | } |
---|
396 | |
---|
397 | |
---|
398 | /* |
---|
399 | Check the typename |
---|
400 | */ |
---|
401 | SWIGRUNTIME swig_cast_info * |
---|
402 | SWIG_TypeCheck(const char *c, swig_type_info *ty) { |
---|
403 | if (ty) { |
---|
404 | swig_cast_info *iter = ty->cast; |
---|
405 | while (iter) { |
---|
406 | if (strcmp(iter->type->name, c) == 0) { |
---|
407 | if (iter == ty->cast) |
---|
408 | return iter; |
---|
409 | /* Move iter to the top of the linked list */ |
---|
410 | iter->prev->next = iter->next; |
---|
411 | if (iter->next) |
---|
412 | iter->next->prev = iter->prev; |
---|
413 | iter->next = ty->cast; |
---|
414 | iter->prev = 0; |
---|
415 | if (ty->cast) ty->cast->prev = iter; |
---|
416 | ty->cast = iter; |
---|
417 | return iter; |
---|
418 | } |
---|
419 | iter = iter->next; |
---|
420 | } |
---|
421 | } |
---|
422 | return 0; |
---|
423 | } |
---|
424 | |
---|
425 | /* |
---|
426 | Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison |
---|
427 | */ |
---|
428 | SWIGRUNTIME swig_cast_info * |
---|
429 | SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { |
---|
430 | if (ty) { |
---|
431 | swig_cast_info *iter = ty->cast; |
---|
432 | while (iter) { |
---|
433 | if (iter->type == from) { |
---|
434 | if (iter == ty->cast) |
---|
435 | return iter; |
---|
436 | /* Move iter to the top of the linked list */ |
---|
437 | iter->prev->next = iter->next; |
---|
438 | if (iter->next) |
---|
439 | iter->next->prev = iter->prev; |
---|
440 | iter->next = ty->cast; |
---|
441 | iter->prev = 0; |
---|
442 | if (ty->cast) ty->cast->prev = iter; |
---|
443 | ty->cast = iter; |
---|
444 | return iter; |
---|
445 | } |
---|
446 | iter = iter->next; |
---|
447 | } |
---|
448 | } |
---|
449 | return 0; |
---|
450 | } |
---|
451 | |
---|
452 | /* |
---|
453 | Cast a pointer up an inheritance hierarchy |
---|
454 | */ |
---|
455 | SWIGRUNTIMEINLINE void * |
---|
456 | SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { |
---|
457 | return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); |
---|
458 | } |
---|
459 | |
---|
460 | /* |
---|
461 | Dynamic pointer casting. Down an inheritance hierarchy |
---|
462 | */ |
---|
463 | SWIGRUNTIME swig_type_info * |
---|
464 | SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { |
---|
465 | swig_type_info *lastty = ty; |
---|
466 | if (!ty || !ty->dcast) return ty; |
---|
467 | while (ty && (ty->dcast)) { |
---|
468 | ty = (*ty->dcast)(ptr); |
---|
469 | if (ty) lastty = ty; |
---|
470 | } |
---|
471 | return lastty; |
---|
472 | } |
---|
473 | |
---|
474 | /* |
---|
475 | Return the name associated with this type |
---|
476 | */ |
---|
477 | SWIGRUNTIMEINLINE const char * |
---|
478 | SWIG_TypeName(const swig_type_info *ty) { |
---|
479 | return ty->name; |
---|
480 | } |
---|
481 | |
---|
482 | /* |
---|
483 | Return the pretty name associated with this type, |
---|
484 | that is an unmangled type name in a form presentable to the user. |
---|
485 | */ |
---|
486 | SWIGRUNTIME const char * |
---|
487 | SWIG_TypePrettyName(const swig_type_info *type) { |
---|
488 | /* The "str" field contains the equivalent pretty names of the |
---|
489 | type, separated by vertical-bar characters. We choose |
---|
490 | to print the last name, as it is often (?) the most |
---|
491 | specific. */ |
---|
492 | if (!type) return NULL; |
---|
493 | if (type->str != NULL) { |
---|
494 | const char *last_name = type->str; |
---|
495 | const char *s; |
---|
496 | for (s = type->str; *s; s++) |
---|
497 | if (*s == '|') last_name = s+1; |
---|
498 | return last_name; |
---|
499 | } |
---|
500 | else |
---|
501 | return type->name; |
---|
502 | } |
---|
503 | |
---|
504 | /* |
---|
505 | Set the clientdata field for a type |
---|
506 | */ |
---|
507 | SWIGRUNTIME void |
---|
508 | SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { |
---|
509 | swig_cast_info *cast = ti->cast; |
---|
510 | /* if (ti->clientdata == clientdata) return; */ |
---|
511 | ti->clientdata = clientdata; |
---|
512 | |
---|
513 | while (cast) { |
---|
514 | if (!cast->converter) { |
---|
515 | swig_type_info *tc = cast->type; |
---|
516 | if (!tc->clientdata) { |
---|
517 | SWIG_TypeClientData(tc, clientdata); |
---|
518 | } |
---|
519 | } |
---|
520 | cast = cast->next; |
---|
521 | } |
---|
522 | } |
---|
523 | SWIGRUNTIME void |
---|
524 | SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { |
---|
525 | SWIG_TypeClientData(ti, clientdata); |
---|
526 | ti->owndata = 1; |
---|
527 | } |
---|
528 | |
---|
529 | /* |
---|
530 | Search for a swig_type_info structure only by mangled name |
---|
531 | Search is a O(log #types) |
---|
532 | |
---|
533 | We start searching at module start, and finish searching when start == end. |
---|
534 | Note: if start == end at the beginning of the function, we go all the way around |
---|
535 | the circular list. |
---|
536 | */ |
---|
537 | SWIGRUNTIME swig_type_info * |
---|
538 | SWIG_MangledTypeQueryModule(swig_module_info *start, |
---|
539 | swig_module_info *end, |
---|
540 | const char *name) { |
---|
541 | swig_module_info *iter = start; |
---|
542 | do { |
---|
543 | if (iter->size) { |
---|
544 | register size_t l = 0; |
---|
545 | register size_t r = iter->size - 1; |
---|
546 | do { |
---|
547 | /* since l+r >= 0, we can (>> 1) instead (/ 2) */ |
---|
548 | register size_t i = (l + r) >> 1; |
---|
549 | const char *iname = iter->types[i]->name; |
---|
550 | if (iname) { |
---|
551 | register int compare = strcmp(name, iname); |
---|
552 | if (compare == 0) { |
---|
553 | return iter->types[i]; |
---|
554 | } else if (compare < 0) { |
---|
555 | if (i) { |
---|
556 | r = i - 1; |
---|
557 | } else { |
---|
558 | break; |
---|
559 | } |
---|
560 | } else if (compare > 0) { |
---|
561 | l = i + 1; |
---|
562 | } |
---|
563 | } else { |
---|
564 | break; /* should never happen */ |
---|
565 | } |
---|
566 | } while (l <= r); |
---|
567 | } |
---|
568 | iter = iter->next; |
---|
569 | } while (iter != end); |
---|
570 | return 0; |
---|
571 | } |
---|
572 | |
---|
573 | /* |
---|
574 | Search for a swig_type_info structure for either a mangled name or a human readable name. |
---|
575 | It first searches the mangled names of the types, which is a O(log #types) |
---|
576 | If a type is not found it then searches the human readable names, which is O(#types). |
---|
577 | |
---|
578 | We start searching at module start, and finish searching when start == end. |
---|
579 | Note: if start == end at the beginning of the function, we go all the way around |
---|
580 | the circular list. |
---|
581 | */ |
---|
582 | SWIGRUNTIME swig_type_info * |
---|
583 | SWIG_TypeQueryModule(swig_module_info *start, |
---|
584 | swig_module_info *end, |
---|
585 | const char *name) { |
---|
586 | /* STEP 1: Search the name field using binary search */ |
---|
587 | swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); |
---|
588 | if (ret) { |
---|
589 | return ret; |
---|
590 | } else { |
---|
591 | /* STEP 2: If the type hasn't been found, do a complete search |
---|
592 | of the str field (the human readable name) */ |
---|
593 | swig_module_info *iter = start; |
---|
594 | do { |
---|
595 | register size_t i = 0; |
---|
596 | for (; i < iter->size; ++i) { |
---|
597 | if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) |
---|
598 | return iter->types[i]; |
---|
599 | } |
---|
600 | iter = iter->next; |
---|
601 | } while (iter != end); |
---|
602 | } |
---|
603 | |
---|
604 | /* neither found a match */ |
---|
605 | return 0; |
---|
606 | } |
---|
607 | |
---|
608 | /* |
---|
609 | Pack binary data into a string |
---|
610 | */ |
---|
611 | SWIGRUNTIME char * |
---|
612 | SWIG_PackData(char *c, void *ptr, size_t sz) { |
---|
613 | static const char hex[17] = "0123456789abcdef"; |
---|
614 | register const unsigned char *u = (unsigned char *) ptr; |
---|
615 | register const unsigned char *eu = u + sz; |
---|
616 | for (; u != eu; ++u) { |
---|
617 | register unsigned char uu = *u; |
---|
618 | *(c++) = hex[(uu & 0xf0) >> 4]; |
---|
619 | *(c++) = hex[uu & 0xf]; |
---|
620 | } |
---|
621 | return c; |
---|
622 | } |
---|
623 | |
---|
624 | /* |
---|
625 | Unpack binary data from a string |
---|
626 | */ |
---|
627 | SWIGRUNTIME const char * |
---|
628 | SWIG_UnpackData(const char *c, void *ptr, size_t sz) { |
---|
629 | register unsigned char *u = (unsigned char *) ptr; |
---|
630 | register const unsigned char *eu = u + sz; |
---|
631 | for (; u != eu; ++u) { |
---|
632 | register char d = *(c++); |
---|
633 | register unsigned char uu; |
---|
634 | if ((d >= '0') && (d <= '9')) |
---|
635 | uu = ((d - '0') << 4); |
---|
636 | else if ((d >= 'a') && (d <= 'f')) |
---|
637 | uu = ((d - ('a'-10)) << 4); |
---|
638 | else |
---|
639 | return (char *) 0; |
---|
640 | d = *(c++); |
---|
641 | if ((d >= '0') && (d <= '9')) |
---|
642 | uu |= (d - '0'); |
---|
643 | else if ((d >= 'a') && (d <= 'f')) |
---|
644 | uu |= (d - ('a'-10)); |
---|
645 | else |
---|
646 | return (char *) 0; |
---|
647 | *u = uu; |
---|
648 | } |
---|
649 | return c; |
---|
650 | } |
---|
651 | |
---|
652 | /* |
---|
653 | Pack 'void *' into a string buffer. |
---|
654 | */ |
---|
655 | SWIGRUNTIME char * |
---|
656 | SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { |
---|
657 | char *r = buff; |
---|
658 | if ((2*sizeof(void *) + 2) > bsz) return 0; |
---|
659 | *(r++) = '_'; |
---|
660 | r = SWIG_PackData(r,&ptr,sizeof(void *)); |
---|
661 | if (strlen(name) + 1 > (bsz - (r - buff))) return 0; |
---|
662 | strcpy(r,name); |
---|
663 | return buff; |
---|
664 | } |
---|
665 | |
---|
666 | SWIGRUNTIME const char * |
---|
667 | SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { |
---|
668 | if (*c != '_') { |
---|
669 | if (strcmp(c,"NULL") == 0) { |
---|
670 | *ptr = (void *) 0; |
---|
671 | return name; |
---|
672 | } else { |
---|
673 | return 0; |
---|
674 | } |
---|
675 | } |
---|
676 | return SWIG_UnpackData(++c,ptr,sizeof(void *)); |
---|
677 | } |
---|
678 | |
---|
679 | SWIGRUNTIME char * |
---|
680 | SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { |
---|
681 | char *r = buff; |
---|
682 | size_t lname = (name ? strlen(name) : 0); |
---|
683 | if ((2*sz + 2 + lname) > bsz) return 0; |
---|
684 | *(r++) = '_'; |
---|
685 | r = SWIG_PackData(r,ptr,sz); |
---|
686 | if (lname) { |
---|
687 | strncpy(r,name,lname+1); |
---|
688 | } else { |
---|
689 | *r = 0; |
---|
690 | } |
---|
691 | return buff; |
---|
692 | } |
---|
693 | |
---|
694 | SWIGRUNTIME const char * |
---|
695 | SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { |
---|
696 | if (*c != '_') { |
---|
697 | if (strcmp(c,"NULL") == 0) { |
---|
698 | memset(ptr,0,sz); |
---|
699 | return name; |
---|
700 | } else { |
---|
701 | return 0; |
---|
702 | } |
---|
703 | } |
---|
704 | return SWIG_UnpackData(++c,ptr,sz); |
---|
705 | } |
---|
706 | |
---|
707 | #ifdef __cplusplus |
---|
708 | } |
---|
709 | #endif |
---|
710 | |
---|
711 | /* Errors in SWIG */ |
---|
712 | #define SWIG_UnknownError -1 |
---|
713 | #define SWIG_IOError -2 |
---|
714 | #define SWIG_RuntimeError -3 |
---|
715 | #define SWIG_IndexError -4 |
---|
716 | #define SWIG_TypeError -5 |
---|
717 | #define SWIG_DivisionByZero -6 |
---|
718 | #define SWIG_OverflowError -7 |
---|
719 | #define SWIG_SyntaxError -8 |
---|
720 | #define SWIG_ValueError -9 |
---|
721 | #define SWIG_SystemError -10 |
---|
722 | #define SWIG_AttributeError -11 |
---|
723 | #define SWIG_MemoryError -12 |
---|
724 | #define SWIG_NullReferenceError -13 |
---|
725 | |
---|
726 | |
---|
727 | |
---|
728 | /* Compatibility macros for Python 3 */ |
---|
729 | #if PY_VERSION_HEX >= 0x03000000 |
---|
730 | |
---|
731 | #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) |
---|
732 | #define PyInt_Check(x) PyLong_Check(x) |
---|
733 | #define PyInt_AsLong(x) PyLong_AsLong(x) |
---|
734 | #define PyInt_FromLong(x) PyLong_FromLong(x) |
---|
735 | #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) |
---|
736 | |
---|
737 | #endif |
---|
738 | |
---|
739 | #ifndef Py_TYPE |
---|
740 | # define Py_TYPE(op) ((op)->ob_type) |
---|
741 | #endif |
---|
742 | |
---|
743 | /* SWIG APIs for compatibility of both Python 2 & 3 */ |
---|
744 | |
---|
745 | #if PY_VERSION_HEX >= 0x03000000 |
---|
746 | # define SWIG_Python_str_FromFormat PyUnicode_FromFormat |
---|
747 | #else |
---|
748 | # define SWIG_Python_str_FromFormat PyString_FromFormat |
---|
749 | #endif |
---|
750 | |
---|
751 | |
---|
752 | /* Warning: This function will allocate a new string in Python 3, |
---|
753 | * so please call SWIG_Python_str_DelForPy3(x) to free the space. |
---|
754 | */ |
---|
755 | SWIGINTERN char* |
---|
756 | SWIG_Python_str_AsChar(PyObject *str) |
---|
757 | { |
---|
758 | #if PY_VERSION_HEX >= 0x03000000 |
---|
759 | char *cstr; |
---|
760 | char *newstr; |
---|
761 | Py_ssize_t len; |
---|
762 | str = PyUnicode_AsUTF8String(str); |
---|
763 | PyBytes_AsStringAndSize(str, &cstr, &len); |
---|
764 | newstr = (char *) malloc(len+1); |
---|
765 | memcpy(newstr, cstr, len+1); |
---|
766 | Py_XDECREF(str); |
---|
767 | return newstr; |
---|
768 | #else |
---|
769 | return PyString_AsString(str); |
---|
770 | #endif |
---|
771 | } |
---|
772 | |
---|
773 | #if PY_VERSION_HEX >= 0x03000000 |
---|
774 | # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) |
---|
775 | #else |
---|
776 | # define SWIG_Python_str_DelForPy3(x) |
---|
777 | #endif |
---|
778 | |
---|
779 | |
---|
780 | SWIGINTERN PyObject* |
---|
781 | SWIG_Python_str_FromChar(const char *c) |
---|
782 | { |
---|
783 | #if PY_VERSION_HEX >= 0x03000000 |
---|
784 | return PyUnicode_FromString(c); |
---|
785 | #else |
---|
786 | return PyString_FromString(c); |
---|
787 | #endif |
---|
788 | } |
---|
789 | |
---|
790 | /* Add PyOS_snprintf for old Pythons */ |
---|
791 | #if PY_VERSION_HEX < 0x02020000 |
---|
792 | # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) |
---|
793 | # define PyOS_snprintf _snprintf |
---|
794 | # else |
---|
795 | # define PyOS_snprintf snprintf |
---|
796 | # endif |
---|
797 | #endif |
---|
798 | |
---|
799 | /* A crude PyString_FromFormat implementation for old Pythons */ |
---|
800 | #if PY_VERSION_HEX < 0x02020000 |
---|
801 | |
---|
802 | #ifndef SWIG_PYBUFFER_SIZE |
---|
803 | # define SWIG_PYBUFFER_SIZE 1024 |
---|
804 | #endif |
---|
805 | |
---|
806 | static PyObject * |
---|
807 | PyString_FromFormat(const char *fmt, ...) { |
---|
808 | va_list ap; |
---|
809 | char buf[SWIG_PYBUFFER_SIZE * 2]; |
---|
810 | int res; |
---|
811 | va_start(ap, fmt); |
---|
812 | res = vsnprintf(buf, sizeof(buf), fmt, ap); |
---|
813 | va_end(ap); |
---|
814 | return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); |
---|
815 | } |
---|
816 | #endif |
---|
817 | |
---|
818 | /* Add PyObject_Del for old Pythons */ |
---|
819 | #if PY_VERSION_HEX < 0x01060000 |
---|
820 | # define PyObject_Del(op) PyMem_DEL((op)) |
---|
821 | #endif |
---|
822 | #ifndef PyObject_DEL |
---|
823 | # define PyObject_DEL PyObject_Del |
---|
824 | #endif |
---|
825 | |
---|
826 | /* A crude PyExc_StopIteration exception for old Pythons */ |
---|
827 | #if PY_VERSION_HEX < 0x02020000 |
---|
828 | # ifndef PyExc_StopIteration |
---|
829 | # define PyExc_StopIteration PyExc_RuntimeError |
---|
830 | # endif |
---|
831 | # ifndef PyObject_GenericGetAttr |
---|
832 | # define PyObject_GenericGetAttr 0 |
---|
833 | # endif |
---|
834 | #endif |
---|
835 | |
---|
836 | /* Py_NotImplemented is defined in 2.1 and up. */ |
---|
837 | #if PY_VERSION_HEX < 0x02010000 |
---|
838 | # ifndef Py_NotImplemented |
---|
839 | # define Py_NotImplemented PyExc_RuntimeError |
---|
840 | # endif |
---|
841 | #endif |
---|
842 | |
---|
843 | /* A crude PyString_AsStringAndSize implementation for old Pythons */ |
---|
844 | #if PY_VERSION_HEX < 0x02010000 |
---|
845 | # ifndef PyString_AsStringAndSize |
---|
846 | # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} |
---|
847 | # endif |
---|
848 | #endif |
---|
849 | |
---|
850 | /* PySequence_Size for old Pythons */ |
---|
851 | #if PY_VERSION_HEX < 0x02000000 |
---|
852 | # ifndef PySequence_Size |
---|
853 | # define PySequence_Size PySequence_Length |
---|
854 | # endif |
---|
855 | #endif |
---|
856 | |
---|
857 | /* PyBool_FromLong for old Pythons */ |
---|
858 | #if PY_VERSION_HEX < 0x02030000 |
---|
859 | static |
---|
860 | PyObject *PyBool_FromLong(long ok) |
---|
861 | { |
---|
862 | PyObject *result = ok ? Py_True : Py_False; |
---|
863 | Py_INCREF(result); |
---|
864 | return result; |
---|
865 | } |
---|
866 | #endif |
---|
867 | |
---|
868 | /* Py_ssize_t for old Pythons */ |
---|
869 | /* This code is as recommended by: */ |
---|
870 | /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ |
---|
871 | #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) |
---|
872 | typedef int Py_ssize_t; |
---|
873 | # define PY_SSIZE_T_MAX INT_MAX |
---|
874 | # define PY_SSIZE_T_MIN INT_MIN |
---|
875 | #endif |
---|
876 | |
---|
877 | /* ----------------------------------------------------------------------------- |
---|
878 | * error manipulation |
---|
879 | * ----------------------------------------------------------------------------- */ |
---|
880 | |
---|
881 | SWIGRUNTIME PyObject* |
---|
882 | SWIG_Python_ErrorType(int code) { |
---|
883 | PyObject* type = 0; |
---|
884 | switch(code) { |
---|
885 | case SWIG_MemoryError: |
---|
886 | type = PyExc_MemoryError; |
---|
887 | break; |
---|
888 | case SWIG_IOError: |
---|
889 | type = PyExc_IOError; |
---|
890 | break; |
---|
891 | case SWIG_RuntimeError: |
---|
892 | type = PyExc_RuntimeError; |
---|
893 | break; |
---|
894 | case SWIG_IndexError: |
---|
895 | type = PyExc_IndexError; |
---|
896 | break; |
---|
897 | case SWIG_TypeError: |
---|
898 | type = PyExc_TypeError; |
---|
899 | break; |
---|
900 | case SWIG_DivisionByZero: |
---|
901 | type = PyExc_ZeroDivisionError; |
---|
902 | break; |
---|
903 | case SWIG_OverflowError: |
---|
904 | type = PyExc_OverflowError; |
---|
905 | break; |
---|
906 | case SWIG_SyntaxError: |
---|
907 | type = PyExc_SyntaxError; |
---|
908 | break; |
---|
909 | case SWIG_ValueError: |
---|
910 | type = PyExc_ValueError; |
---|
911 | break; |
---|
912 | case SWIG_SystemError: |
---|
913 | type = PyExc_SystemError; |
---|
914 | break; |
---|
915 | case SWIG_AttributeError: |
---|
916 | type = PyExc_AttributeError; |
---|
917 | break; |
---|
918 | default: |
---|
919 | type = PyExc_RuntimeError; |
---|
920 | } |
---|
921 | return type; |
---|
922 | } |
---|
923 | |
---|
924 | |
---|
925 | SWIGRUNTIME void |
---|
926 | SWIG_Python_AddErrorMsg(const char* mesg) |
---|
927 | { |
---|
928 | PyObject *type = 0; |
---|
929 | PyObject *value = 0; |
---|
930 | PyObject *traceback = 0; |
---|
931 | |
---|
932 | if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); |
---|
933 | if (value) { |
---|
934 | char *tmp; |
---|
935 | PyObject *old_str = PyObject_Str(value); |
---|
936 | PyErr_Clear(); |
---|
937 | Py_XINCREF(type); |
---|
938 | |
---|
939 | PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); |
---|
940 | SWIG_Python_str_DelForPy3(tmp); |
---|
941 | Py_DECREF(old_str); |
---|
942 | Py_DECREF(value); |
---|
943 | } else { |
---|
944 | PyErr_SetString(PyExc_RuntimeError, mesg); |
---|
945 | } |
---|
946 | } |
---|
947 | |
---|
948 | #if defined(SWIG_PYTHON_NO_THREADS) |
---|
949 | # if defined(SWIG_PYTHON_THREADS) |
---|
950 | # undef SWIG_PYTHON_THREADS |
---|
951 | # endif |
---|
952 | #endif |
---|
953 | #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ |
---|
954 | # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) |
---|
955 | # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ |
---|
956 | # define SWIG_PYTHON_USE_GIL |
---|
957 | # endif |
---|
958 | # endif |
---|
959 | # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ |
---|
960 | # ifndef SWIG_PYTHON_INITIALIZE_THREADS |
---|
961 | # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() |
---|
962 | # endif |
---|
963 | # ifdef __cplusplus /* C++ code */ |
---|
964 | class SWIG_Python_Thread_Block { |
---|
965 | bool status; |
---|
966 | PyGILState_STATE state; |
---|
967 | public: |
---|
968 | void end() { if (status) { PyGILState_Release(state); status = false;} } |
---|
969 | SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} |
---|
970 | ~SWIG_Python_Thread_Block() { end(); } |
---|
971 | }; |
---|
972 | class SWIG_Python_Thread_Allow { |
---|
973 | bool status; |
---|
974 | PyThreadState *save; |
---|
975 | public: |
---|
976 | void end() { if (status) { PyEval_RestoreThread(save); status = false; }} |
---|
977 | SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} |
---|
978 | ~SWIG_Python_Thread_Allow() { end(); } |
---|
979 | }; |
---|
980 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block |
---|
981 | # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() |
---|
982 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow |
---|
983 | # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() |
---|
984 | # else /* C code */ |
---|
985 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() |
---|
986 | # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) |
---|
987 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() |
---|
988 | # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) |
---|
989 | # endif |
---|
990 | # else /* Old thread way, not implemented, user must provide it */ |
---|
991 | # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) |
---|
992 | # define SWIG_PYTHON_INITIALIZE_THREADS |
---|
993 | # endif |
---|
994 | # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) |
---|
995 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK |
---|
996 | # endif |
---|
997 | # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) |
---|
998 | # define SWIG_PYTHON_THREAD_END_BLOCK |
---|
999 | # endif |
---|
1000 | # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) |
---|
1001 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW |
---|
1002 | # endif |
---|
1003 | # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) |
---|
1004 | # define SWIG_PYTHON_THREAD_END_ALLOW |
---|
1005 | # endif |
---|
1006 | # endif |
---|
1007 | #else /* No thread support */ |
---|
1008 | # define SWIG_PYTHON_INITIALIZE_THREADS |
---|
1009 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK |
---|
1010 | # define SWIG_PYTHON_THREAD_END_BLOCK |
---|
1011 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW |
---|
1012 | # define SWIG_PYTHON_THREAD_END_ALLOW |
---|
1013 | #endif |
---|
1014 | |
---|
1015 | /* ----------------------------------------------------------------------------- |
---|
1016 | * Python API portion that goes into the runtime |
---|
1017 | * ----------------------------------------------------------------------------- */ |
---|
1018 | |
---|
1019 | #ifdef __cplusplus |
---|
1020 | extern "C" { |
---|
1021 | #if 0 |
---|
1022 | } /* cc-mode */ |
---|
1023 | #endif |
---|
1024 | #endif |
---|
1025 | |
---|
1026 | /* ----------------------------------------------------------------------------- |
---|
1027 | * Constant declarations |
---|
1028 | * ----------------------------------------------------------------------------- */ |
---|
1029 | |
---|
1030 | /* Constant Types */ |
---|
1031 | #define SWIG_PY_POINTER 4 |
---|
1032 | #define SWIG_PY_BINARY 5 |
---|
1033 | |
---|
1034 | /* Constant information structure */ |
---|
1035 | typedef struct swig_const_info { |
---|
1036 | int type; |
---|
1037 | char *name; |
---|
1038 | long lvalue; |
---|
1039 | double dvalue; |
---|
1040 | void *pvalue; |
---|
1041 | swig_type_info **ptype; |
---|
1042 | } swig_const_info; |
---|
1043 | |
---|
1044 | |
---|
1045 | /* ----------------------------------------------------------------------------- |
---|
1046 | * Wrapper of PyInstanceMethod_New() used in Python 3 |
---|
1047 | * It is exported to the generated module, used for -fastproxy |
---|
1048 | * ----------------------------------------------------------------------------- */ |
---|
1049 | SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) |
---|
1050 | { |
---|
1051 | #if PY_VERSION_HEX >= 0x03000000 |
---|
1052 | return PyInstanceMethod_New(func); |
---|
1053 | #else |
---|
1054 | return NULL; |
---|
1055 | #endif |
---|
1056 | } |
---|
1057 | |
---|
1058 | #ifdef __cplusplus |
---|
1059 | #if 0 |
---|
1060 | { /* cc-mode */ |
---|
1061 | #endif |
---|
1062 | } |
---|
1063 | #endif |
---|
1064 | |
---|
1065 | |
---|
1066 | /* ----------------------------------------------------------------------------- |
---|
1067 | * See the LICENSE file for information on copyright, usage and redistribution |
---|
1068 | * of SWIG, and the README file for authors - http://www.swig.org/release.html. |
---|
1069 | * |
---|
1070 | * pyrun.swg |
---|
1071 | * |
---|
1072 | * This file contains the runtime support for Python modules |
---|
1073 | * and includes code for managing global variables and pointer |
---|
1074 | * type checking. |
---|
1075 | * |
---|
1076 | * ----------------------------------------------------------------------------- */ |
---|
1077 | |
---|
1078 | /* Common SWIG API */ |
---|
1079 | |
---|
1080 | /* for raw pointers */ |
---|
1081 | #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) |
---|
1082 | #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) |
---|
1083 | #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) |
---|
1084 | #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) |
---|
1085 | #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) |
---|
1086 | #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) |
---|
1087 | #define swig_owntype int |
---|
1088 | |
---|
1089 | /* for raw packed data */ |
---|
1090 | #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) |
---|
1091 | #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) |
---|
1092 | |
---|
1093 | /* for class or struct pointers */ |
---|
1094 | #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) |
---|
1095 | #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) |
---|
1096 | |
---|
1097 | /* for C or C++ function pointers */ |
---|
1098 | #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) |
---|
1099 | #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) |
---|
1100 | |
---|
1101 | /* for C++ member pointers, ie, member methods */ |
---|
1102 | #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) |
---|
1103 | #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) |
---|
1104 | |
---|
1105 | |
---|
1106 | /* Runtime API */ |
---|
1107 | |
---|
1108 | #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() |
---|
1109 | #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) |
---|
1110 | #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) |
---|
1111 | |
---|
1112 | #define SWIG_SetErrorObj SWIG_Python_SetErrorObj |
---|
1113 | #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg |
---|
1114 | #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) |
---|
1115 | #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) |
---|
1116 | #define SWIG_fail goto fail |
---|
1117 | |
---|
1118 | |
---|
1119 | /* Runtime API implementation */ |
---|
1120 | |
---|
1121 | /* Error manipulation */ |
---|
1122 | |
---|
1123 | SWIGINTERN void |
---|
1124 | SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { |
---|
1125 | SWIG_PYTHON_THREAD_BEGIN_BLOCK; |
---|
1126 | PyErr_SetObject(errtype, obj); |
---|
1127 | Py_DECREF(obj); |
---|
1128 | SWIG_PYTHON_THREAD_END_BLOCK; |
---|
1129 | } |
---|
1130 | |
---|
1131 | SWIGINTERN void |
---|
1132 | SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { |
---|
1133 | SWIG_PYTHON_THREAD_BEGIN_BLOCK; |
---|
1134 | PyErr_SetString(errtype, (char *) msg); |
---|
1135 | SWIG_PYTHON_THREAD_END_BLOCK; |
---|
1136 | } |
---|
1137 | |
---|
1138 | #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) |
---|
1139 | |
---|
1140 | /* Set a constant value */ |
---|
1141 | |
---|
1142 | SWIGINTERN void |
---|
1143 | SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { |
---|
1144 | PyDict_SetItemString(d, (char*) name, obj); |
---|
1145 | Py_DECREF(obj); |
---|
1146 | } |
---|
1147 | |
---|
1148 | /* Append a value to the result obj */ |
---|
1149 | |
---|
1150 | SWIGINTERN PyObject* |
---|
1151 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { |
---|
1152 | #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) |
---|
1153 | if (!result) { |
---|
1154 | result = obj; |
---|
1155 | } else if (result == Py_None) { |
---|
1156 | Py_DECREF(result); |
---|
1157 | result = obj; |
---|
1158 | } else { |
---|
1159 | if (!PyList_Check(result)) { |
---|
1160 | PyObject *o2 = result; |
---|
1161 | result = PyList_New(1); |
---|
1162 | PyList_SetItem(result, 0, o2); |
---|
1163 | } |
---|
1164 | PyList_Append(result,obj); |
---|
1165 | Py_DECREF(obj); |
---|
1166 | } |
---|
1167 | return result; |
---|
1168 | #else |
---|
1169 | PyObject* o2; |
---|
1170 | PyObject* o3; |
---|
1171 | if (!result) { |
---|
1172 | result = obj; |
---|
1173 | } else if (result == Py_None) { |
---|
1174 | Py_DECREF(result); |
---|
1175 | result = obj; |
---|
1176 | } else { |
---|
1177 | if (!PyTuple_Check(result)) { |
---|
1178 | o2 = result; |
---|
1179 | result = PyTuple_New(1); |
---|
1180 | PyTuple_SET_ITEM(result, 0, o2); |
---|
1181 | } |
---|
1182 | o3 = PyTuple_New(1); |
---|
1183 | PyTuple_SET_ITEM(o3, 0, obj); |
---|
1184 | o2 = result; |
---|
1185 | result = PySequence_Concat(o2, o3); |
---|
1186 | Py_DECREF(o2); |
---|
1187 | Py_DECREF(o3); |
---|
1188 | } |
---|
1189 | return result; |
---|
1190 | #endif |
---|
1191 | } |
---|
1192 | |
---|
1193 | /* Unpack the argument tuple */ |
---|
1194 | |
---|
1195 | SWIGINTERN int |
---|
1196 | SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) |
---|
1197 | { |
---|
1198 | if (!args) { |
---|
1199 | if (!min && !max) { |
---|
1200 | return 1; |
---|
1201 | } else { |
---|
1202 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", |
---|
1203 | name, (min == max ? "" : "at least "), (int)min); |
---|
1204 | return 0; |
---|
1205 | } |
---|
1206 | } |
---|
1207 | if (!PyTuple_Check(args)) { |
---|
1208 | PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); |
---|
1209 | return 0; |
---|
1210 | } else { |
---|
1211 | register Py_ssize_t l = PyTuple_GET_SIZE(args); |
---|
1212 | if (l < min) { |
---|
1213 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", |
---|
1214 | name, (min == max ? "" : "at least "), (int)min, (int)l); |
---|
1215 | return 0; |
---|
1216 | } else if (l > max) { |
---|
1217 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", |
---|
1218 | name, (min == max ? "" : "at most "), (int)max, (int)l); |
---|
1219 | return 0; |
---|
1220 | } else { |
---|
1221 | register int i; |
---|
1222 | for (i = 0; i < l; ++i) { |
---|
1223 | objs[i] = PyTuple_GET_ITEM(args, i); |
---|
1224 | } |
---|
1225 | for (; l < max; ++l) { |
---|
1226 | objs[l] = 0; |
---|
1227 | } |
---|
1228 | return i + 1; |
---|
1229 | } |
---|
1230 | } |
---|
1231 | } |
---|
1232 | |
---|
1233 | /* A functor is a function object with one single object argument */ |
---|
1234 | #if PY_VERSION_HEX >= 0x02020000 |
---|
1235 | #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); |
---|
1236 | #else |
---|
1237 | #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); |
---|
1238 | #endif |
---|
1239 | |
---|
1240 | /* |
---|
1241 | Helper for static pointer initialization for both C and C++ code, for example |
---|
1242 | static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); |
---|
1243 | */ |
---|
1244 | #ifdef __cplusplus |
---|
1245 | #define SWIG_STATIC_POINTER(var) var |
---|
1246 | #else |
---|
1247 | #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var |
---|
1248 | #endif |
---|
1249 | |
---|
1250 | /* ----------------------------------------------------------------------------- |
---|
1251 | * Pointer declarations |
---|
1252 | * ----------------------------------------------------------------------------- */ |
---|
1253 | |
---|
1254 | /* Flags for new pointer objects */ |
---|
1255 | #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) |
---|
1256 | #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) |
---|
1257 | |
---|
1258 | #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) |
---|
1259 | |
---|
1260 | #ifdef __cplusplus |
---|
1261 | extern "C" { |
---|
1262 | #if 0 |
---|
1263 | } /* cc-mode */ |
---|
1264 | #endif |
---|
1265 | #endif |
---|
1266 | |
---|
1267 | /* How to access Py_None */ |
---|
1268 | #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
1269 | # ifndef SWIG_PYTHON_NO_BUILD_NONE |
---|
1270 | # ifndef SWIG_PYTHON_BUILD_NONE |
---|
1271 | # define SWIG_PYTHON_BUILD_NONE |
---|
1272 | # endif |
---|
1273 | # endif |
---|
1274 | #endif |
---|
1275 | |
---|
1276 | #ifdef SWIG_PYTHON_BUILD_NONE |
---|
1277 | # ifdef Py_None |
---|
1278 | # undef Py_None |
---|
1279 | # define Py_None SWIG_Py_None() |
---|
1280 | # endif |
---|
1281 | SWIGRUNTIMEINLINE PyObject * |
---|
1282 | _SWIG_Py_None(void) |
---|
1283 | { |
---|
1284 | PyObject *none = Py_BuildValue((char*)""); |
---|
1285 | Py_DECREF(none); |
---|
1286 | return none; |
---|
1287 | } |
---|
1288 | SWIGRUNTIME PyObject * |
---|
1289 | SWIG_Py_None(void) |
---|
1290 | { |
---|
1291 | static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); |
---|
1292 | return none; |
---|
1293 | } |
---|
1294 | #endif |
---|
1295 | |
---|
1296 | /* The python void return value */ |
---|
1297 | |
---|
1298 | SWIGRUNTIMEINLINE PyObject * |
---|
1299 | SWIG_Py_Void(void) |
---|
1300 | { |
---|
1301 | PyObject *none = Py_None; |
---|
1302 | Py_INCREF(none); |
---|
1303 | return none; |
---|
1304 | } |
---|
1305 | |
---|
1306 | /* SwigPyClientData */ |
---|
1307 | |
---|
1308 | typedef struct { |
---|
1309 | PyObject *klass; |
---|
1310 | PyObject *newraw; |
---|
1311 | PyObject *newargs; |
---|
1312 | PyObject *destroy; |
---|
1313 | int delargs; |
---|
1314 | int implicitconv; |
---|
1315 | } SwigPyClientData; |
---|
1316 | |
---|
1317 | SWIGRUNTIMEINLINE int |
---|
1318 | SWIG_Python_CheckImplicit(swig_type_info *ty) |
---|
1319 | { |
---|
1320 | SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; |
---|
1321 | return data ? data->implicitconv : 0; |
---|
1322 | } |
---|
1323 | |
---|
1324 | SWIGRUNTIMEINLINE PyObject * |
---|
1325 | SWIG_Python_ExceptionType(swig_type_info *desc) { |
---|
1326 | SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; |
---|
1327 | PyObject *klass = data ? data->klass : 0; |
---|
1328 | return (klass ? klass : PyExc_RuntimeError); |
---|
1329 | } |
---|
1330 | |
---|
1331 | |
---|
1332 | SWIGRUNTIME SwigPyClientData * |
---|
1333 | SwigPyClientData_New(PyObject* obj) |
---|
1334 | { |
---|
1335 | if (!obj) { |
---|
1336 | return 0; |
---|
1337 | } else { |
---|
1338 | SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); |
---|
1339 | /* the klass element */ |
---|
1340 | data->klass = obj; |
---|
1341 | Py_INCREF(data->klass); |
---|
1342 | /* the newraw method and newargs arguments used to create a new raw instance */ |
---|
1343 | if (PyClass_Check(obj)) { |
---|
1344 | data->newraw = 0; |
---|
1345 | data->newargs = obj; |
---|
1346 | Py_INCREF(obj); |
---|
1347 | } else { |
---|
1348 | #if (PY_VERSION_HEX < 0x02020000) |
---|
1349 | data->newraw = 0; |
---|
1350 | #else |
---|
1351 | data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); |
---|
1352 | #endif |
---|
1353 | if (data->newraw) { |
---|
1354 | Py_INCREF(data->newraw); |
---|
1355 | data->newargs = PyTuple_New(1); |
---|
1356 | PyTuple_SetItem(data->newargs, 0, obj); |
---|
1357 | } else { |
---|
1358 | data->newargs = obj; |
---|
1359 | } |
---|
1360 | Py_INCREF(data->newargs); |
---|
1361 | } |
---|
1362 | /* the destroy method, aka as the C++ delete method */ |
---|
1363 | data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); |
---|
1364 | if (PyErr_Occurred()) { |
---|
1365 | PyErr_Clear(); |
---|
1366 | data->destroy = 0; |
---|
1367 | } |
---|
1368 | if (data->destroy) { |
---|
1369 | int flags; |
---|
1370 | Py_INCREF(data->destroy); |
---|
1371 | flags = PyCFunction_GET_FLAGS(data->destroy); |
---|
1372 | #ifdef METH_O |
---|
1373 | data->delargs = !(flags & (METH_O)); |
---|
1374 | #else |
---|
1375 | data->delargs = 0; |
---|
1376 | #endif |
---|
1377 | } else { |
---|
1378 | data->delargs = 0; |
---|
1379 | } |
---|
1380 | data->implicitconv = 0; |
---|
1381 | return data; |
---|
1382 | } |
---|
1383 | } |
---|
1384 | |
---|
1385 | SWIGRUNTIME void |
---|
1386 | SwigPyClientData_Del(SwigPyClientData* data) |
---|
1387 | { |
---|
1388 | Py_XDECREF(data->newraw); |
---|
1389 | Py_XDECREF(data->newargs); |
---|
1390 | Py_XDECREF(data->destroy); |
---|
1391 | } |
---|
1392 | |
---|
1393 | /* =============== SwigPyObject =====================*/ |
---|
1394 | |
---|
1395 | typedef struct { |
---|
1396 | PyObject_HEAD |
---|
1397 | void *ptr; |
---|
1398 | swig_type_info *ty; |
---|
1399 | int own; |
---|
1400 | PyObject *next; |
---|
1401 | } SwigPyObject; |
---|
1402 | |
---|
1403 | SWIGRUNTIME PyObject * |
---|
1404 | SwigPyObject_long(SwigPyObject *v) |
---|
1405 | { |
---|
1406 | return PyLong_FromVoidPtr(v->ptr); |
---|
1407 | } |
---|
1408 | |
---|
1409 | SWIGRUNTIME PyObject * |
---|
1410 | SwigPyObject_format(const char* fmt, SwigPyObject *v) |
---|
1411 | { |
---|
1412 | PyObject *res = NULL; |
---|
1413 | PyObject *args = PyTuple_New(1); |
---|
1414 | if (args) { |
---|
1415 | if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { |
---|
1416 | PyObject *ofmt = SWIG_Python_str_FromChar(fmt); |
---|
1417 | if (ofmt) { |
---|
1418 | #if PY_VERSION_HEX >= 0x03000000 |
---|
1419 | res = PyUnicode_Format(ofmt,args); |
---|
1420 | #else |
---|
1421 | res = PyString_Format(ofmt,args); |
---|
1422 | #endif |
---|
1423 | Py_DECREF(ofmt); |
---|
1424 | } |
---|
1425 | Py_DECREF(args); |
---|
1426 | } |
---|
1427 | } |
---|
1428 | return res; |
---|
1429 | } |
---|
1430 | |
---|
1431 | SWIGRUNTIME PyObject * |
---|
1432 | SwigPyObject_oct(SwigPyObject *v) |
---|
1433 | { |
---|
1434 | return SwigPyObject_format("%o",v); |
---|
1435 | } |
---|
1436 | |
---|
1437 | SWIGRUNTIME PyObject * |
---|
1438 | SwigPyObject_hex(SwigPyObject *v) |
---|
1439 | { |
---|
1440 | return SwigPyObject_format("%x",v); |
---|
1441 | } |
---|
1442 | |
---|
1443 | SWIGRUNTIME PyObject * |
---|
1444 | #ifdef METH_NOARGS |
---|
1445 | SwigPyObject_repr(SwigPyObject *v) |
---|
1446 | #else |
---|
1447 | SwigPyObject_repr(SwigPyObject *v, PyObject *args) |
---|
1448 | #endif |
---|
1449 | { |
---|
1450 | const char *name = SWIG_TypePrettyName(v->ty); |
---|
1451 | PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v); |
---|
1452 | if (v->next) { |
---|
1453 | #ifdef METH_NOARGS |
---|
1454 | PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); |
---|
1455 | #else |
---|
1456 | PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); |
---|
1457 | #endif |
---|
1458 | #if PY_VERSION_HEX >= 0x03000000 |
---|
1459 | PyObject *joined = PyUnicode_Concat(repr, nrep); |
---|
1460 | Py_DecRef(repr); |
---|
1461 | Py_DecRef(nrep); |
---|
1462 | repr = joined; |
---|
1463 | #else |
---|
1464 | PyString_ConcatAndDel(&repr,nrep); |
---|
1465 | #endif |
---|
1466 | } |
---|
1467 | return repr; |
---|
1468 | } |
---|
1469 | |
---|
1470 | SWIGRUNTIME int |
---|
1471 | SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) |
---|
1472 | { |
---|
1473 | char *str; |
---|
1474 | #ifdef METH_NOARGS |
---|
1475 | PyObject *repr = SwigPyObject_repr(v); |
---|
1476 | #else |
---|
1477 | PyObject *repr = SwigPyObject_repr(v, NULL); |
---|
1478 | #endif |
---|
1479 | if (repr) { |
---|
1480 | str = SWIG_Python_str_AsChar(repr); |
---|
1481 | fputs(str, fp); |
---|
1482 | SWIG_Python_str_DelForPy3(str); |
---|
1483 | Py_DECREF(repr); |
---|
1484 | return 0; |
---|
1485 | } else { |
---|
1486 | return 1; |
---|
1487 | } |
---|
1488 | } |
---|
1489 | |
---|
1490 | SWIGRUNTIME PyObject * |
---|
1491 | SwigPyObject_str(SwigPyObject *v) |
---|
1492 | { |
---|
1493 | char result[SWIG_BUFFER_SIZE]; |
---|
1494 | return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? |
---|
1495 | SWIG_Python_str_FromChar(result) : 0; |
---|
1496 | } |
---|
1497 | |
---|
1498 | SWIGRUNTIME int |
---|
1499 | SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) |
---|
1500 | { |
---|
1501 | void *i = v->ptr; |
---|
1502 | void *j = w->ptr; |
---|
1503 | return (i < j) ? -1 : ((i > j) ? 1 : 0); |
---|
1504 | } |
---|
1505 | |
---|
1506 | /* Added for Python 3.x, would it also be useful for Python 2.x? */ |
---|
1507 | SWIGRUNTIME PyObject* |
---|
1508 | SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) |
---|
1509 | { |
---|
1510 | PyObject* res; |
---|
1511 | if( op != Py_EQ && op != Py_NE ) { |
---|
1512 | Py_INCREF(Py_NotImplemented); |
---|
1513 | return Py_NotImplemented; |
---|
1514 | } |
---|
1515 | if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) |
---|
1516 | res = Py_True; |
---|
1517 | else |
---|
1518 | res = Py_False; |
---|
1519 | Py_INCREF(res); |
---|
1520 | return res; |
---|
1521 | } |
---|
1522 | |
---|
1523 | |
---|
1524 | SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); |
---|
1525 | |
---|
1526 | SWIGRUNTIME PyTypeObject* |
---|
1527 | SwigPyObject_type(void) { |
---|
1528 | static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); |
---|
1529 | return type; |
---|
1530 | } |
---|
1531 | |
---|
1532 | SWIGRUNTIMEINLINE int |
---|
1533 | SwigPyObject_Check(PyObject *op) { |
---|
1534 | return (Py_TYPE(op) == SwigPyObject_type()) |
---|
1535 | || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); |
---|
1536 | } |
---|
1537 | |
---|
1538 | SWIGRUNTIME PyObject * |
---|
1539 | SwigPyObject_New(void *ptr, swig_type_info *ty, int own); |
---|
1540 | |
---|
1541 | SWIGRUNTIME void |
---|
1542 | SwigPyObject_dealloc(PyObject *v) |
---|
1543 | { |
---|
1544 | SwigPyObject *sobj = (SwigPyObject *) v; |
---|
1545 | PyObject *next = sobj->next; |
---|
1546 | if (sobj->own == SWIG_POINTER_OWN) { |
---|
1547 | swig_type_info *ty = sobj->ty; |
---|
1548 | SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; |
---|
1549 | PyObject *destroy = data ? data->destroy : 0; |
---|
1550 | if (destroy) { |
---|
1551 | /* destroy is always a VARARGS method */ |
---|
1552 | PyObject *res; |
---|
1553 | if (data->delargs) { |
---|
1554 | /* we need to create a temporary object to carry the destroy operation */ |
---|
1555 | PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); |
---|
1556 | res = SWIG_Python_CallFunctor(destroy, tmp); |
---|
1557 | Py_DECREF(tmp); |
---|
1558 | } else { |
---|
1559 | PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); |
---|
1560 | PyObject *mself = PyCFunction_GET_SELF(destroy); |
---|
1561 | res = ((*meth)(mself, v)); |
---|
1562 | } |
---|
1563 | Py_XDECREF(res); |
---|
1564 | } |
---|
1565 | #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) |
---|
1566 | else { |
---|
1567 | const char *name = SWIG_TypePrettyName(ty); |
---|
1568 | printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); |
---|
1569 | } |
---|
1570 | #endif |
---|
1571 | } |
---|
1572 | Py_XDECREF(next); |
---|
1573 | PyObject_DEL(v); |
---|
1574 | } |
---|
1575 | |
---|
1576 | SWIGRUNTIME PyObject* |
---|
1577 | SwigPyObject_append(PyObject* v, PyObject* next) |
---|
1578 | { |
---|
1579 | SwigPyObject *sobj = (SwigPyObject *) v; |
---|
1580 | #ifndef METH_O |
---|
1581 | PyObject *tmp = 0; |
---|
1582 | if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; |
---|
1583 | next = tmp; |
---|
1584 | #endif |
---|
1585 | if (!SwigPyObject_Check(next)) { |
---|
1586 | return NULL; |
---|
1587 | } |
---|
1588 | sobj->next = next; |
---|
1589 | Py_INCREF(next); |
---|
1590 | return SWIG_Py_Void(); |
---|
1591 | } |
---|
1592 | |
---|
1593 | SWIGRUNTIME PyObject* |
---|
1594 | #ifdef METH_NOARGS |
---|
1595 | SwigPyObject_next(PyObject* v) |
---|
1596 | #else |
---|
1597 | SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) |
---|
1598 | #endif |
---|
1599 | { |
---|
1600 | SwigPyObject *sobj = (SwigPyObject *) v; |
---|
1601 | if (sobj->next) { |
---|
1602 | Py_INCREF(sobj->next); |
---|
1603 | return sobj->next; |
---|
1604 | } else { |
---|
1605 | return SWIG_Py_Void(); |
---|
1606 | } |
---|
1607 | } |
---|
1608 | |
---|
1609 | SWIGINTERN PyObject* |
---|
1610 | #ifdef METH_NOARGS |
---|
1611 | SwigPyObject_disown(PyObject *v) |
---|
1612 | #else |
---|
1613 | SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) |
---|
1614 | #endif |
---|
1615 | { |
---|
1616 | SwigPyObject *sobj = (SwigPyObject *)v; |
---|
1617 | sobj->own = 0; |
---|
1618 | return SWIG_Py_Void(); |
---|
1619 | } |
---|
1620 | |
---|
1621 | SWIGINTERN PyObject* |
---|
1622 | #ifdef METH_NOARGS |
---|
1623 | SwigPyObject_acquire(PyObject *v) |
---|
1624 | #else |
---|
1625 | SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) |
---|
1626 | #endif |
---|
1627 | { |
---|
1628 | SwigPyObject *sobj = (SwigPyObject *)v; |
---|
1629 | sobj->own = SWIG_POINTER_OWN; |
---|
1630 | return SWIG_Py_Void(); |
---|
1631 | } |
---|
1632 | |
---|
1633 | SWIGINTERN PyObject* |
---|
1634 | SwigPyObject_own(PyObject *v, PyObject *args) |
---|
1635 | { |
---|
1636 | PyObject *val = 0; |
---|
1637 | #if (PY_VERSION_HEX < 0x02020000) |
---|
1638 | if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) |
---|
1639 | #else |
---|
1640 | if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) |
---|
1641 | #endif |
---|
1642 | { |
---|
1643 | return NULL; |
---|
1644 | } |
---|
1645 | else |
---|
1646 | { |
---|
1647 | SwigPyObject *sobj = (SwigPyObject *)v; |
---|
1648 | PyObject *obj = PyBool_FromLong(sobj->own); |
---|
1649 | if (val) { |
---|
1650 | #ifdef METH_NOARGS |
---|
1651 | if (PyObject_IsTrue(val)) { |
---|
1652 | SwigPyObject_acquire(v); |
---|
1653 | } else { |
---|
1654 | SwigPyObject_disown(v); |
---|
1655 | } |
---|
1656 | #else |
---|
1657 | if (PyObject_IsTrue(val)) { |
---|
1658 | SwigPyObject_acquire(v,args); |
---|
1659 | } else { |
---|
1660 | SwigPyObject_disown(v,args); |
---|
1661 | } |
---|
1662 | #endif |
---|
1663 | } |
---|
1664 | return obj; |
---|
1665 | } |
---|
1666 | } |
---|
1667 | |
---|
1668 | #ifdef METH_O |
---|
1669 | static PyMethodDef |
---|
1670 | swigobject_methods[] = { |
---|
1671 | {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, |
---|
1672 | {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, |
---|
1673 | {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, |
---|
1674 | {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, |
---|
1675 | {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, |
---|
1676 | {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, |
---|
1677 | {0, 0, 0, 0} |
---|
1678 | }; |
---|
1679 | #else |
---|
1680 | static PyMethodDef |
---|
1681 | swigobject_methods[] = { |
---|
1682 | {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, |
---|
1683 | {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, |
---|
1684 | {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, |
---|
1685 | {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, |
---|
1686 | {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, |
---|
1687 | {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, |
---|
1688 | {0, 0, 0, 0} |
---|
1689 | }; |
---|
1690 | #endif |
---|
1691 | |
---|
1692 | #if PY_VERSION_HEX < 0x02020000 |
---|
1693 | SWIGINTERN PyObject * |
---|
1694 | SwigPyObject_getattr(SwigPyObject *sobj,char *name) |
---|
1695 | { |
---|
1696 | return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); |
---|
1697 | } |
---|
1698 | #endif |
---|
1699 | |
---|
1700 | SWIGRUNTIME PyTypeObject* |
---|
1701 | _PySwigObject_type(void) { |
---|
1702 | static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; |
---|
1703 | |
---|
1704 | static PyNumberMethods SwigPyObject_as_number = { |
---|
1705 | (binaryfunc)0, /*nb_add*/ |
---|
1706 | (binaryfunc)0, /*nb_subtract*/ |
---|
1707 | (binaryfunc)0, /*nb_multiply*/ |
---|
1708 | /* nb_divide removed in Python 3 */ |
---|
1709 | #if PY_VERSION_HEX < 0x03000000 |
---|
1710 | (binaryfunc)0, /*nb_divide*/ |
---|
1711 | #endif |
---|
1712 | (binaryfunc)0, /*nb_remainder*/ |
---|
1713 | (binaryfunc)0, /*nb_divmod*/ |
---|
1714 | (ternaryfunc)0,/*nb_power*/ |
---|
1715 | (unaryfunc)0, /*nb_negative*/ |
---|
1716 | (unaryfunc)0, /*nb_positive*/ |
---|
1717 | (unaryfunc)0, /*nb_absolute*/ |
---|
1718 | (inquiry)0, /*nb_nonzero*/ |
---|
1719 | 0, /*nb_invert*/ |
---|
1720 | 0, /*nb_lshift*/ |
---|
1721 | 0, /*nb_rshift*/ |
---|
1722 | 0, /*nb_and*/ |
---|
1723 | 0, /*nb_xor*/ |
---|
1724 | 0, /*nb_or*/ |
---|
1725 | #if PY_VERSION_HEX < 0x03000000 |
---|
1726 | 0, /*nb_coerce*/ |
---|
1727 | #endif |
---|
1728 | (unaryfunc)SwigPyObject_long, /*nb_int*/ |
---|
1729 | #if PY_VERSION_HEX < 0x03000000 |
---|
1730 | (unaryfunc)SwigPyObject_long, /*nb_long*/ |
---|
1731 | #else |
---|
1732 | 0, /*nb_reserved*/ |
---|
1733 | #endif |
---|
1734 | (unaryfunc)0, /*nb_float*/ |
---|
1735 | #if PY_VERSION_HEX < 0x03000000 |
---|
1736 | (unaryfunc)SwigPyObject_oct, /*nb_oct*/ |
---|
1737 | (unaryfunc)SwigPyObject_hex, /*nb_hex*/ |
---|
1738 | #endif |
---|
1739 | #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ |
---|
1740 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ |
---|
1741 | #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ |
---|
1742 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ |
---|
1743 | #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ |
---|
1744 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ |
---|
1745 | #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ |
---|
1746 | 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ |
---|
1747 | #endif |
---|
1748 | }; |
---|
1749 | |
---|
1750 | static PyTypeObject swigpyobject_type; |
---|
1751 | static int type_init = 0; |
---|
1752 | if (!type_init) { |
---|
1753 | const PyTypeObject tmp |
---|
1754 | = { |
---|
1755 | /* PyObject header changed in Python 3 */ |
---|
1756 | #if PY_VERSION_HEX >= 0x03000000 |
---|
1757 | PyVarObject_HEAD_INIT(&PyType_Type, 0) |
---|
1758 | #else |
---|
1759 | PyObject_HEAD_INIT(NULL) |
---|
1760 | 0, /* ob_size */ |
---|
1761 | #endif |
---|
1762 | (char *)"SwigPyObject", /* tp_name */ |
---|
1763 | sizeof(SwigPyObject), /* tp_basicsize */ |
---|
1764 | 0, /* tp_itemsize */ |
---|
1765 | (destructor)SwigPyObject_dealloc, /* tp_dealloc */ |
---|
1766 | (printfunc)SwigPyObject_print, /* tp_print */ |
---|
1767 | #if PY_VERSION_HEX < 0x02020000 |
---|
1768 | (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ |
---|
1769 | #else |
---|
1770 | (getattrfunc)0, /* tp_getattr */ |
---|
1771 | #endif |
---|
1772 | (setattrfunc)0, /* tp_setattr */ |
---|
1773 | #if PY_VERSION_HEX >= 0x03000000 |
---|
1774 | 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ |
---|
1775 | #else |
---|
1776 | (cmpfunc)SwigPyObject_compare, /* tp_compare */ |
---|
1777 | #endif |
---|
1778 | (reprfunc)SwigPyObject_repr, /* tp_repr */ |
---|
1779 | &SwigPyObject_as_number, /* tp_as_number */ |
---|
1780 | 0, /* tp_as_sequence */ |
---|
1781 | 0, /* tp_as_mapping */ |
---|
1782 | (hashfunc)0, /* tp_hash */ |
---|
1783 | (ternaryfunc)0, /* tp_call */ |
---|
1784 | (reprfunc)SwigPyObject_str, /* tp_str */ |
---|
1785 | PyObject_GenericGetAttr, /* tp_getattro */ |
---|
1786 | 0, /* tp_setattro */ |
---|
1787 | 0, /* tp_as_buffer */ |
---|
1788 | Py_TPFLAGS_DEFAULT, /* tp_flags */ |
---|
1789 | swigobject_doc, /* tp_doc */ |
---|
1790 | 0, /* tp_traverse */ |
---|
1791 | 0, /* tp_clear */ |
---|
1792 | (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ |
---|
1793 | 0, /* tp_weaklistoffset */ |
---|
1794 | #if PY_VERSION_HEX >= 0x02020000 |
---|
1795 | 0, /* tp_iter */ |
---|
1796 | 0, /* tp_iternext */ |
---|
1797 | swigobject_methods, /* tp_methods */ |
---|
1798 | 0, /* tp_members */ |
---|
1799 | 0, /* tp_getset */ |
---|
1800 | 0, /* tp_base */ |
---|
1801 | 0, /* tp_dict */ |
---|
1802 | 0, /* tp_descr_get */ |
---|
1803 | 0, /* tp_descr_set */ |
---|
1804 | 0, /* tp_dictoffset */ |
---|
1805 | 0, /* tp_init */ |
---|
1806 | 0, /* tp_alloc */ |
---|
1807 | 0, /* tp_new */ |
---|
1808 | 0, /* tp_free */ |
---|
1809 | 0, /* tp_is_gc */ |
---|
1810 | 0, /* tp_bases */ |
---|
1811 | 0, /* tp_mro */ |
---|
1812 | 0, /* tp_cache */ |
---|
1813 | 0, /* tp_subclasses */ |
---|
1814 | 0, /* tp_weaklist */ |
---|
1815 | #endif |
---|
1816 | #if PY_VERSION_HEX >= 0x02030000 |
---|
1817 | 0, /* tp_del */ |
---|
1818 | #endif |
---|
1819 | #ifdef COUNT_ALLOCS |
---|
1820 | 0,0,0,0 /* tp_alloc -> tp_next */ |
---|
1821 | #endif |
---|
1822 | }; |
---|
1823 | swigpyobject_type = tmp; |
---|
1824 | /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ |
---|
1825 | #if PY_VERSION_HEX < 0x03000000 |
---|
1826 | swigpyobject_type.ob_type = &PyType_Type; |
---|
1827 | #endif |
---|
1828 | type_init = 1; |
---|
1829 | } |
---|
1830 | return &swigpyobject_type; |
---|
1831 | } |
---|
1832 | |
---|
1833 | SWIGRUNTIME PyObject * |
---|
1834 | SwigPyObject_New(void *ptr, swig_type_info *ty, int own) |
---|
1835 | { |
---|
1836 | SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); |
---|
1837 | if (sobj) { |
---|
1838 | sobj->ptr = ptr; |
---|
1839 | sobj->ty = ty; |
---|
1840 | sobj->own = own; |
---|
1841 | sobj->next = 0; |
---|
1842 | } |
---|
1843 | return (PyObject *)sobj; |
---|
1844 | } |
---|
1845 | |
---|
1846 | /* ----------------------------------------------------------------------------- |
---|
1847 | * Implements a simple Swig Packed type, and use it instead of string |
---|
1848 | * ----------------------------------------------------------------------------- */ |
---|
1849 | |
---|
1850 | typedef struct { |
---|
1851 | PyObject_HEAD |
---|
1852 | void *pack; |
---|
1853 | swig_type_info *ty; |
---|
1854 | size_t size; |
---|
1855 | } SwigPyPacked; |
---|
1856 | |
---|
1857 | SWIGRUNTIME int |
---|
1858 | SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) |
---|
1859 | { |
---|
1860 | char result[SWIG_BUFFER_SIZE]; |
---|
1861 | fputs("<Swig Packed ", fp); |
---|
1862 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { |
---|
1863 | fputs("at ", fp); |
---|
1864 | fputs(result, fp); |
---|
1865 | } |
---|
1866 | fputs(v->ty->name,fp); |
---|
1867 | fputs(">", fp); |
---|
1868 | return 0; |
---|
1869 | } |
---|
1870 | |
---|
1871 | SWIGRUNTIME PyObject * |
---|
1872 | SwigPyPacked_repr(SwigPyPacked *v) |
---|
1873 | { |
---|
1874 | char result[SWIG_BUFFER_SIZE]; |
---|
1875 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { |
---|
1876 | return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); |
---|
1877 | } else { |
---|
1878 | return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name); |
---|
1879 | } |
---|
1880 | } |
---|
1881 | |
---|
1882 | SWIGRUNTIME PyObject * |
---|
1883 | SwigPyPacked_str(SwigPyPacked *v) |
---|
1884 | { |
---|
1885 | char result[SWIG_BUFFER_SIZE]; |
---|
1886 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ |
---|
1887 | return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); |
---|
1888 | } else { |
---|
1889 | return SWIG_Python_str_FromChar(v->ty->name); |
---|
1890 | } |
---|
1891 | } |
---|
1892 | |
---|
1893 | SWIGRUNTIME int |
---|
1894 | SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) |
---|
1895 | { |
---|
1896 | size_t i = v->size; |
---|
1897 | size_t j = w->size; |
---|
1898 | int s = (i < j) ? -1 : ((i > j) ? 1 : 0); |
---|
1899 | return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); |
---|
1900 | } |
---|
1901 | |
---|
1902 | SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); |
---|
1903 | |
---|
1904 | SWIGRUNTIME PyTypeObject* |
---|
1905 | SwigPyPacked_type(void) { |
---|
1906 | static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); |
---|
1907 | return type; |
---|
1908 | } |
---|
1909 | |
---|
1910 | SWIGRUNTIMEINLINE int |
---|
1911 | SwigPyPacked_Check(PyObject *op) { |
---|
1912 | return ((op)->ob_type == _PySwigPacked_type()) |
---|
1913 | || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); |
---|
1914 | } |
---|
1915 | |
---|
1916 | SWIGRUNTIME void |
---|
1917 | SwigPyPacked_dealloc(PyObject *v) |
---|
1918 | { |
---|
1919 | if (SwigPyPacked_Check(v)) { |
---|
1920 | SwigPyPacked *sobj = (SwigPyPacked *) v; |
---|
1921 | free(sobj->pack); |
---|
1922 | } |
---|
1923 | PyObject_DEL(v); |
---|
1924 | } |
---|
1925 | |
---|
1926 | SWIGRUNTIME PyTypeObject* |
---|
1927 | _PySwigPacked_type(void) { |
---|
1928 | static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; |
---|
1929 | static PyTypeObject swigpypacked_type; |
---|
1930 | static int type_init = 0; |
---|
1931 | if (!type_init) { |
---|
1932 | const PyTypeObject tmp |
---|
1933 | = { |
---|
1934 | /* PyObject header changed in Python 3 */ |
---|
1935 | #if PY_VERSION_HEX>=0x03000000 |
---|
1936 | PyVarObject_HEAD_INIT(&PyType_Type, 0) |
---|
1937 | #else |
---|
1938 | PyObject_HEAD_INIT(NULL) |
---|
1939 | 0, /* ob_size */ |
---|
1940 | #endif |
---|
1941 | (char *)"SwigPyPacked", /* tp_name */ |
---|
1942 | sizeof(SwigPyPacked), /* tp_basicsize */ |
---|
1943 | 0, /* tp_itemsize */ |
---|
1944 | (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ |
---|
1945 | (printfunc)SwigPyPacked_print, /* tp_print */ |
---|
1946 | (getattrfunc)0, /* tp_getattr */ |
---|
1947 | (setattrfunc)0, /* tp_setattr */ |
---|
1948 | #if PY_VERSION_HEX>=0x03000000 |
---|
1949 | 0, /* tp_reserved in 3.0.1 */ |
---|
1950 | #else |
---|
1951 | (cmpfunc)SwigPyPacked_compare, /* tp_compare */ |
---|
1952 | #endif |
---|
1953 | (reprfunc)SwigPyPacked_repr, /* tp_repr */ |
---|
1954 | 0, /* tp_as_number */ |
---|
1955 | 0, /* tp_as_sequence */ |
---|
1956 | 0, /* tp_as_mapping */ |
---|
1957 | (hashfunc)0, /* tp_hash */ |
---|
1958 | (ternaryfunc)0, /* tp_call */ |
---|
1959 | (reprfunc)SwigPyPacked_str, /* tp_str */ |
---|
1960 | PyObject_GenericGetAttr, /* tp_getattro */ |
---|
1961 | 0, /* tp_setattro */ |
---|
1962 | 0, /* tp_as_buffer */ |
---|
1963 | Py_TPFLAGS_DEFAULT, /* tp_flags */ |
---|
1964 | swigpacked_doc, /* tp_doc */ |
---|
1965 | 0, /* tp_traverse */ |
---|
1966 | 0, /* tp_clear */ |
---|
1967 | 0, /* tp_richcompare */ |
---|
1968 | 0, /* tp_weaklistoffset */ |
---|
1969 | #if PY_VERSION_HEX >= 0x02020000 |
---|
1970 | 0, /* tp_iter */ |
---|
1971 | 0, /* tp_iternext */ |
---|
1972 | 0, /* tp_methods */ |
---|
1973 | 0, /* tp_members */ |
---|
1974 | 0, /* tp_getset */ |
---|
1975 | 0, /* tp_base */ |
---|
1976 | 0, /* tp_dict */ |
---|
1977 | 0, /* tp_descr_get */ |
---|
1978 | 0, /* tp_descr_set */ |
---|
1979 | 0, /* tp_dictoffset */ |
---|
1980 | 0, /* tp_init */ |
---|
1981 | 0, /* tp_alloc */ |
---|
1982 | 0, /* tp_new */ |
---|
1983 | 0, /* tp_free */ |
---|
1984 | 0, /* tp_is_gc */ |
---|
1985 | 0, /* tp_bases */ |
---|
1986 | 0, /* tp_mro */ |
---|
1987 | 0, /* tp_cache */ |
---|
1988 | 0, /* tp_subclasses */ |
---|
1989 | 0, /* tp_weaklist */ |
---|
1990 | #endif |
---|
1991 | #if PY_VERSION_HEX >= 0x02030000 |
---|
1992 | 0, /* tp_del */ |
---|
1993 | #endif |
---|
1994 | #ifdef COUNT_ALLOCS |
---|
1995 | 0,0,0,0 /* tp_alloc -> tp_next */ |
---|
1996 | #endif |
---|
1997 | }; |
---|
1998 | swigpypacked_type = tmp; |
---|
1999 | /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ |
---|
2000 | #if PY_VERSION_HEX < 0x03000000 |
---|
2001 | swigpypacked_type.ob_type = &PyType_Type; |
---|
2002 | #endif |
---|
2003 | type_init = 1; |
---|
2004 | } |
---|
2005 | return &swigpypacked_type; |
---|
2006 | } |
---|
2007 | |
---|
2008 | SWIGRUNTIME PyObject * |
---|
2009 | SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) |
---|
2010 | { |
---|
2011 | SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); |
---|
2012 | if (sobj) { |
---|
2013 | void *pack = malloc(size); |
---|
2014 | if (pack) { |
---|
2015 | memcpy(pack, ptr, size); |
---|
2016 | sobj->pack = pack; |
---|
2017 | sobj->ty = ty; |
---|
2018 | sobj->size = size; |
---|
2019 | } else { |
---|
2020 | PyObject_DEL((PyObject *) sobj); |
---|
2021 | sobj = 0; |
---|
2022 | } |
---|
2023 | } |
---|
2024 | return (PyObject *) sobj; |
---|
2025 | } |
---|
2026 | |
---|
2027 | SWIGRUNTIME swig_type_info * |
---|
2028 | SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) |
---|
2029 | { |
---|
2030 | if (SwigPyPacked_Check(obj)) { |
---|
2031 | SwigPyPacked *sobj = (SwigPyPacked *)obj; |
---|
2032 | if (sobj->size != size) return 0; |
---|
2033 | memcpy(ptr, sobj->pack, size); |
---|
2034 | return sobj->ty; |
---|
2035 | } else { |
---|
2036 | return 0; |
---|
2037 | } |
---|
2038 | } |
---|
2039 | |
---|
2040 | /* ----------------------------------------------------------------------------- |
---|
2041 | * pointers/data manipulation |
---|
2042 | * ----------------------------------------------------------------------------- */ |
---|
2043 | |
---|
2044 | SWIGRUNTIMEINLINE PyObject * |
---|
2045 | _SWIG_This(void) |
---|
2046 | { |
---|
2047 | return SWIG_Python_str_FromChar("this"); |
---|
2048 | } |
---|
2049 | |
---|
2050 | SWIGRUNTIME PyObject * |
---|
2051 | SWIG_This(void) |
---|
2052 | { |
---|
2053 | static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); |
---|
2054 | return swig_this; |
---|
2055 | } |
---|
2056 | |
---|
2057 | /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ |
---|
2058 | |
---|
2059 | /* TODO: I don't know how to implement the fast getset in Python 3 right now */ |
---|
2060 | #if PY_VERSION_HEX>=0x03000000 |
---|
2061 | #define SWIG_PYTHON_SLOW_GETSET_THIS |
---|
2062 | #endif |
---|
2063 | |
---|
2064 | SWIGRUNTIME SwigPyObject * |
---|
2065 | SWIG_Python_GetSwigThis(PyObject *pyobj) |
---|
2066 | { |
---|
2067 | if (SwigPyObject_Check(pyobj)) { |
---|
2068 | return (SwigPyObject *) pyobj; |
---|
2069 | } else { |
---|
2070 | PyObject *obj = 0; |
---|
2071 | #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) |
---|
2072 | if (PyInstance_Check(pyobj)) { |
---|
2073 | obj = _PyInstance_Lookup(pyobj, SWIG_This()); |
---|
2074 | } else { |
---|
2075 | PyObject **dictptr = _PyObject_GetDictPtr(pyobj); |
---|
2076 | if (dictptr != NULL) { |
---|
2077 | PyObject *dict = *dictptr; |
---|
2078 | obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; |
---|
2079 | } else { |
---|
2080 | #ifdef PyWeakref_CheckProxy |
---|
2081 | if (PyWeakref_CheckProxy(pyobj)) { |
---|
2082 | PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); |
---|
2083 | return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; |
---|
2084 | } |
---|
2085 | #endif |
---|
2086 | obj = PyObject_GetAttr(pyobj,SWIG_This()); |
---|
2087 | if (obj) { |
---|
2088 | Py_DECREF(obj); |
---|
2089 | } else { |
---|
2090 | if (PyErr_Occurred()) PyErr_Clear(); |
---|
2091 | return 0; |
---|
2092 | } |
---|
2093 | } |
---|
2094 | } |
---|
2095 | #else |
---|
2096 | obj = PyObject_GetAttr(pyobj,SWIG_This()); |
---|
2097 | if (obj) { |
---|
2098 | Py_DECREF(obj); |
---|
2099 | } else { |
---|
2100 | if (PyErr_Occurred()) PyErr_Clear(); |
---|
2101 | return 0; |
---|
2102 | } |
---|
2103 | #endif |
---|
2104 | if (obj && !SwigPyObject_Check(obj)) { |
---|
2105 | /* a PyObject is called 'this', try to get the 'real this' |
---|
2106 | SwigPyObject from it */ |
---|
2107 | return SWIG_Python_GetSwigThis(obj); |
---|
2108 | } |
---|
2109 | return (SwigPyObject *)obj; |
---|
2110 | } |
---|
2111 | } |
---|
2112 | |
---|
2113 | /* Acquire a pointer value */ |
---|
2114 | |
---|
2115 | SWIGRUNTIME int |
---|
2116 | SWIG_Python_AcquirePtr(PyObject *obj, int own) { |
---|
2117 | if (own == SWIG_POINTER_OWN) { |
---|
2118 | SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); |
---|
2119 | if (sobj) { |
---|
2120 | int oldown = sobj->own; |
---|
2121 | sobj->own = own; |
---|
2122 | return oldown; |
---|
2123 | } |
---|
2124 | } |
---|
2125 | return 0; |
---|
2126 | } |
---|
2127 | |
---|
2128 | /* Convert a pointer value */ |
---|
2129 | |
---|
2130 | SWIGRUNTIME int |
---|
2131 | SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { |
---|
2132 | if (!obj) return SWIG_ERROR; |
---|
2133 | if (obj == Py_None) { |
---|
2134 | if (ptr) *ptr = 0; |
---|
2135 | return SWIG_OK; |
---|
2136 | } else { |
---|
2137 | SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); |
---|
2138 | if (own) |
---|
2139 | *own = 0; |
---|
2140 | while (sobj) { |
---|
2141 | void *vptr = sobj->ptr; |
---|
2142 | if (ty) { |
---|
2143 | swig_type_info *to = sobj->ty; |
---|
2144 | if (to == ty) { |
---|
2145 | /* no type cast needed */ |
---|
2146 | if (ptr) *ptr = vptr; |
---|
2147 | break; |
---|
2148 | } else { |
---|
2149 | swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); |
---|
2150 | if (!tc) { |
---|
2151 | sobj = (SwigPyObject *)sobj->next; |
---|
2152 | } else { |
---|
2153 | if (ptr) { |
---|
2154 | int newmemory = 0; |
---|
2155 | *ptr = SWIG_TypeCast(tc,vptr,&newmemory); |
---|
2156 | if (newmemory == SWIG_CAST_NEW_MEMORY) { |
---|
2157 | assert(own); |
---|
2158 | if (own) |
---|
2159 | *own = *own | SWIG_CAST_NEW_MEMORY; |
---|
2160 | } |
---|
2161 | } |
---|
2162 | break; |
---|
2163 | } |
---|
2164 | } |
---|
2165 | } else { |
---|
2166 | if (ptr) *ptr = vptr; |
---|
2167 | break; |
---|
2168 | } |
---|
2169 | } |
---|
2170 | if (sobj) { |
---|
2171 | if (own) |
---|
2172 | *own = *own | sobj->own; |
---|
2173 | if (flags & SWIG_POINTER_DISOWN) { |
---|
2174 | sobj->own = 0; |
---|
2175 | } |
---|
2176 | return SWIG_OK; |
---|
2177 | } else { |
---|
2178 | int res = SWIG_ERROR; |
---|
2179 | if (flags & SWIG_POINTER_IMPLICIT_CONV) { |
---|
2180 | SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; |
---|
2181 | if (data && !data->implicitconv) { |
---|
2182 | PyObject *klass = data->klass; |
---|
2183 | if (klass) { |
---|
2184 | PyObject *impconv; |
---|
2185 | data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ |
---|
2186 | impconv = SWIG_Python_CallFunctor(klass, obj); |
---|
2187 | data->implicitconv = 0; |
---|
2188 | if (PyErr_Occurred()) { |
---|
2189 | PyErr_Clear(); |
---|
2190 | impconv = 0; |
---|
2191 | } |
---|
2192 | if (impconv) { |
---|
2193 | SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); |
---|
2194 | if (iobj) { |
---|
2195 | void *vptr; |
---|
2196 | res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); |
---|
2197 | if (SWIG_IsOK(res)) { |
---|
2198 | if (ptr) { |
---|
2199 | *ptr = vptr; |
---|
2200 | /* transfer the ownership to 'ptr' */ |
---|
2201 | iobj->own = 0; |
---|
2202 | res = SWIG_AddCast(res); |
---|
2203 | res = SWIG_AddNewMask(res); |
---|
2204 | } else { |
---|
2205 | res = SWIG_AddCast(res); |
---|
2206 | } |
---|
2207 | } |
---|
2208 | } |
---|
2209 | Py_DECREF(impconv); |
---|
2210 | } |
---|
2211 | } |
---|
2212 | } |
---|
2213 | } |
---|
2214 | return res; |
---|
2215 | } |
---|
2216 | } |
---|
2217 | } |
---|
2218 | |
---|
2219 | /* Convert a function ptr value */ |
---|
2220 | |
---|
2221 | SWIGRUNTIME int |
---|
2222 | SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { |
---|
2223 | if (!PyCFunction_Check(obj)) { |
---|
2224 | return SWIG_ConvertPtr(obj, ptr, ty, 0); |
---|
2225 | } else { |
---|
2226 | void *vptr = 0; |
---|
2227 | |
---|
2228 | /* here we get the method pointer for callbacks */ |
---|
2229 | const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); |
---|
2230 | const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; |
---|
2231 | if (desc) |
---|
2232 | desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; |
---|
2233 | if (!desc) |
---|
2234 | return SWIG_ERROR; |
---|
2235 | if (ty) { |
---|
2236 | swig_cast_info *tc = SWIG_TypeCheck(desc,ty); |
---|
2237 | if (tc) { |
---|
2238 | int newmemory = 0; |
---|
2239 | *ptr = SWIG_TypeCast(tc,vptr,&newmemory); |
---|
2240 | assert(!newmemory); /* newmemory handling not yet implemented */ |
---|
2241 | } else { |
---|
2242 | return SWIG_ERROR; |
---|
2243 | } |
---|
2244 | } else { |
---|
2245 | *ptr = vptr; |
---|
2246 | } |
---|
2247 | return SWIG_OK; |
---|
2248 | } |
---|
2249 | } |
---|
2250 | |
---|
2251 | /* Convert a packed value value */ |
---|
2252 | |
---|
2253 | SWIGRUNTIME int |
---|
2254 | SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { |
---|
2255 | swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); |
---|
2256 | if (!to) return SWIG_ERROR; |
---|
2257 | if (ty) { |
---|
2258 | if (to != ty) { |
---|
2259 | /* check type cast? */ |
---|
2260 | swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); |
---|
2261 | if (!tc) return SWIG_ERROR; |
---|
2262 | } |
---|
2263 | } |
---|
2264 | return SWIG_OK; |
---|
2265 | } |
---|
2266 | |
---|
2267 | /* ----------------------------------------------------------------------------- |
---|
2268 | * Create a new pointer object |
---|
2269 | * ----------------------------------------------------------------------------- */ |
---|
2270 | |
---|
2271 | /* |
---|
2272 | Create a new instance object, without calling __init__, and set the |
---|
2273 | 'this' attribute. |
---|
2274 | */ |
---|
2275 | |
---|
2276 | SWIGRUNTIME PyObject* |
---|
2277 | SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) |
---|
2278 | { |
---|
2279 | #if (PY_VERSION_HEX >= 0x02020000) |
---|
2280 | PyObject *inst = 0; |
---|
2281 | PyObject *newraw = data->newraw; |
---|
2282 | if (newraw) { |
---|
2283 | inst = PyObject_Call(newraw, data->newargs, NULL); |
---|
2284 | if (inst) { |
---|
2285 | #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) |
---|
2286 | PyObject **dictptr = _PyObject_GetDictPtr(inst); |
---|
2287 | if (dictptr != NULL) { |
---|
2288 | PyObject *dict = *dictptr; |
---|
2289 | if (dict == NULL) { |
---|
2290 | dict = PyDict_New(); |
---|
2291 | *dictptr = dict; |
---|
2292 | PyDict_SetItem(dict, SWIG_This(), swig_this); |
---|
2293 | } |
---|
2294 | } |
---|
2295 | #else |
---|
2296 | PyObject *key = SWIG_This(); |
---|
2297 | PyObject_SetAttr(inst, key, swig_this); |
---|
2298 | #endif |
---|
2299 | } |
---|
2300 | } else { |
---|
2301 | #if PY_VERSION_HEX >= 0x03000000 |
---|
2302 | inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); |
---|
2303 | PyObject_SetAttr(inst, SWIG_This(), swig_this); |
---|
2304 | Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; |
---|
2305 | #else |
---|
2306 | PyObject *dict = PyDict_New(); |
---|
2307 | PyDict_SetItem(dict, SWIG_This(), swig_this); |
---|
2308 | inst = PyInstance_NewRaw(data->newargs, dict); |
---|
2309 | Py_DECREF(dict); |
---|
2310 | #endif |
---|
2311 | } |
---|
2312 | return inst; |
---|
2313 | #else |
---|
2314 | #if (PY_VERSION_HEX >= 0x02010000) |
---|
2315 | PyObject *inst; |
---|
2316 | PyObject *dict = PyDict_New(); |
---|
2317 | PyDict_SetItem(dict, SWIG_This(), swig_this); |
---|
2318 | inst = PyInstance_NewRaw(data->newargs, dict); |
---|
2319 | Py_DECREF(dict); |
---|
2320 | return (PyObject *) inst; |
---|
2321 | #else |
---|
2322 | PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); |
---|
2323 | if (inst == NULL) { |
---|
2324 | return NULL; |
---|
2325 | } |
---|
2326 | inst->in_class = (PyClassObject *)data->newargs; |
---|
2327 | Py_INCREF(inst->in_class); |
---|
2328 | inst->in_dict = PyDict_New(); |
---|
2329 | if (inst->in_dict == NULL) { |
---|
2330 | Py_DECREF(inst); |
---|
2331 | return NULL; |
---|
2332 | } |
---|
2333 | #ifdef Py_TPFLAGS_HAVE_WEAKREFS |
---|
2334 | inst->in_weakreflist = NULL; |
---|
2335 | #endif |
---|
2336 | #ifdef Py_TPFLAGS_GC |
---|
2337 | PyObject_GC_Init(inst); |
---|
2338 | #endif |
---|
2339 | PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); |
---|
2340 | return (PyObject *) inst; |
---|
2341 | #endif |
---|
2342 | #endif |
---|
2343 | } |
---|
2344 | |
---|
2345 | SWIGRUNTIME void |
---|
2346 | SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) |
---|
2347 | { |
---|
2348 | PyObject *dict; |
---|
2349 | #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) |
---|
2350 | PyObject **dictptr = _PyObject_GetDictPtr(inst); |
---|
2351 | if (dictptr != NULL) { |
---|
2352 | dict = *dictptr; |
---|
2353 | if (dict == NULL) { |
---|
2354 | dict = PyDict_New(); |
---|
2355 | *dictptr = dict; |
---|
2356 | } |
---|
2357 | PyDict_SetItem(dict, SWIG_This(), swig_this); |
---|
2358 | return; |
---|
2359 | } |
---|
2360 | #endif |
---|
2361 | dict = PyObject_GetAttrString(inst, (char*)"__dict__"); |
---|
2362 | PyDict_SetItem(dict, SWIG_This(), swig_this); |
---|
2363 | Py_DECREF(dict); |
---|
2364 | } |
---|
2365 | |
---|
2366 | |
---|
2367 | SWIGINTERN PyObject * |
---|
2368 | SWIG_Python_InitShadowInstance(PyObject *args) { |
---|
2369 | PyObject *obj[2]; |
---|
2370 | if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { |
---|
2371 | return NULL; |
---|
2372 | } else { |
---|
2373 | SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); |
---|
2374 | if (sthis) { |
---|
2375 | SwigPyObject_append((PyObject*) sthis, obj[1]); |
---|
2376 | } else { |
---|
2377 | SWIG_Python_SetSwigThis(obj[0], obj[1]); |
---|
2378 | } |
---|
2379 | return SWIG_Py_Void(); |
---|
2380 | } |
---|
2381 | } |
---|
2382 | |
---|
2383 | /* Create a new pointer object */ |
---|
2384 | |
---|
2385 | SWIGRUNTIME PyObject * |
---|
2386 | SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { |
---|
2387 | if (!ptr) { |
---|
2388 | return SWIG_Py_Void(); |
---|
2389 | } else { |
---|
2390 | int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; |
---|
2391 | PyObject *robj = SwigPyObject_New(ptr, type, own); |
---|
2392 | SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; |
---|
2393 | if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { |
---|
2394 | PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); |
---|
2395 | if (inst) { |
---|
2396 | Py_DECREF(robj); |
---|
2397 | robj = inst; |
---|
2398 | } |
---|
2399 | } |
---|
2400 | return robj; |
---|
2401 | } |
---|
2402 | } |
---|
2403 | |
---|
2404 | /* Create a new packed object */ |
---|
2405 | |
---|
2406 | SWIGRUNTIMEINLINE PyObject * |
---|
2407 | SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { |
---|
2408 | return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); |
---|
2409 | } |
---|
2410 | |
---|
2411 | /* -----------------------------------------------------------------------------* |
---|
2412 | * Get type list |
---|
2413 | * -----------------------------------------------------------------------------*/ |
---|
2414 | |
---|
2415 | #ifdef SWIG_LINK_RUNTIME |
---|
2416 | void *SWIG_ReturnGlobalTypeList(void *); |
---|
2417 | #endif |
---|
2418 | |
---|
2419 | SWIGRUNTIME swig_module_info * |
---|
2420 | SWIG_Python_GetModule(void) { |
---|
2421 | static void *type_pointer = (void *)0; |
---|
2422 | /* first check if module already created */ |
---|
2423 | if (!type_pointer) { |
---|
2424 | #ifdef SWIG_LINK_RUNTIME |
---|
2425 | type_pointer = SWIG_ReturnGlobalTypeList((void *)0); |
---|
2426 | #else |
---|
2427 | type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, |
---|
2428 | (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); |
---|
2429 | if (PyErr_Occurred()) { |
---|
2430 | PyErr_Clear(); |
---|
2431 | type_pointer = (void *)0; |
---|
2432 | } |
---|
2433 | #endif |
---|
2434 | } |
---|
2435 | return (swig_module_info *) type_pointer; |
---|
2436 | } |
---|
2437 | |
---|
2438 | #if PY_MAJOR_VERSION < 2 |
---|
2439 | /* PyModule_AddObject function was introduced in Python 2.0. The following function |
---|
2440 | is copied out of Python/modsupport.c in python version 2.3.4 */ |
---|
2441 | SWIGINTERN int |
---|
2442 | PyModule_AddObject(PyObject *m, char *name, PyObject *o) |
---|
2443 | { |
---|
2444 | PyObject *dict; |
---|
2445 | if (!PyModule_Check(m)) { |
---|
2446 | PyErr_SetString(PyExc_TypeError, |
---|
2447 | "PyModule_AddObject() needs module as first arg"); |
---|
2448 | return SWIG_ERROR; |
---|
2449 | } |
---|
2450 | if (!o) { |
---|
2451 | PyErr_SetString(PyExc_TypeError, |
---|
2452 | "PyModule_AddObject() needs non-NULL value"); |
---|
2453 | return SWIG_ERROR; |
---|
2454 | } |
---|
2455 | |
---|
2456 | dict = PyModule_GetDict(m); |
---|
2457 | if (dict == NULL) { |
---|
2458 | /* Internal error -- modules must have a dict! */ |
---|
2459 | PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", |
---|
2460 | PyModule_GetName(m)); |
---|
2461 | return SWIG_ERROR; |
---|
2462 | } |
---|
2463 | if (PyDict_SetItemString(dict, name, o)) |
---|
2464 | return SWIG_ERROR; |
---|
2465 | Py_DECREF(o); |
---|
2466 | return SWIG_OK; |
---|
2467 | } |
---|
2468 | #endif |
---|
2469 | |
---|
2470 | SWIGRUNTIME void |
---|
2471 | SWIG_Python_DestroyModule(void *vptr) |
---|
2472 | { |
---|
2473 | swig_module_info *swig_module = (swig_module_info *) vptr; |
---|
2474 | swig_type_info **types = swig_module->types; |
---|
2475 | size_t i; |
---|
2476 | for (i =0; i < swig_module->size; ++i) { |
---|
2477 | swig_type_info *ty = types[i]; |
---|
2478 | if (ty->owndata) { |
---|
2479 | SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; |
---|
2480 | if (data) SwigPyClientData_Del(data); |
---|
2481 | } |
---|
2482 | } |
---|
2483 | Py_DECREF(SWIG_This()); |
---|
2484 | } |
---|
2485 | |
---|
2486 | SWIGRUNTIME void |
---|
2487 | SWIG_Python_SetModule(swig_module_info *swig_module) { |
---|
2488 | static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ |
---|
2489 | |
---|
2490 | #if PY_VERSION_HEX >= 0x03000000 |
---|
2491 | /* Add a dummy module object into sys.modules */ |
---|
2492 | PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); |
---|
2493 | #else |
---|
2494 | PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, |
---|
2495 | swig_empty_runtime_method_table); |
---|
2496 | #endif |
---|
2497 | PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); |
---|
2498 | if (pointer && module) { |
---|
2499 | PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); |
---|
2500 | } else { |
---|
2501 | Py_XDECREF(pointer); |
---|
2502 | } |
---|
2503 | } |
---|
2504 | |
---|
2505 | /* The python cached type query */ |
---|
2506 | SWIGRUNTIME PyObject * |
---|
2507 | SWIG_Python_TypeCache(void) { |
---|
2508 | static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); |
---|
2509 | return cache; |
---|
2510 | } |
---|
2511 | |
---|
2512 | SWIGRUNTIME swig_type_info * |
---|
2513 | SWIG_Python_TypeQuery(const char *type) |
---|
2514 | { |
---|
2515 | PyObject *cache = SWIG_Python_TypeCache(); |
---|
2516 | PyObject *key = SWIG_Python_str_FromChar(type); |
---|
2517 | PyObject *obj = PyDict_GetItem(cache, key); |
---|
2518 | swig_type_info *descriptor; |
---|
2519 | if (obj) { |
---|
2520 | descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); |
---|
2521 | } else { |
---|
2522 | swig_module_info *swig_module = SWIG_Python_GetModule(); |
---|
2523 | descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); |
---|
2524 | if (descriptor) { |
---|
2525 | obj = PyCObject_FromVoidPtr(descriptor, NULL); |
---|
2526 | PyDict_SetItem(cache, key, obj); |
---|
2527 | Py_DECREF(obj); |
---|
2528 | } |
---|
2529 | } |
---|
2530 | Py_DECREF(key); |
---|
2531 | return descriptor; |
---|
2532 | } |
---|
2533 | |
---|
2534 | /* |
---|
2535 | For backward compatibility only |
---|
2536 | */ |
---|
2537 | #define SWIG_POINTER_EXCEPTION 0 |
---|
2538 | #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) |
---|
2539 | #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) |
---|
2540 | |
---|
2541 | SWIGRUNTIME int |
---|
2542 | SWIG_Python_AddErrMesg(const char* mesg, int infront) |
---|
2543 | { |
---|
2544 | if (PyErr_Occurred()) { |
---|
2545 | PyObject *type = 0; |
---|
2546 | PyObject *value = 0; |
---|
2547 | PyObject *traceback = 0; |
---|
2548 | PyErr_Fetch(&type, &value, &traceback); |
---|
2549 | if (value) { |
---|
2550 | char *tmp; |
---|
2551 | PyObject *old_str = PyObject_Str(value); |
---|
2552 | Py_XINCREF(type); |
---|
2553 | PyErr_Clear(); |
---|
2554 | if (infront) { |
---|
2555 | PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); |
---|
2556 | } else { |
---|
2557 | PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); |
---|
2558 | } |
---|
2559 | SWIG_Python_str_DelForPy3(tmp); |
---|
2560 | Py_DECREF(old_str); |
---|
2561 | } |
---|
2562 | return 1; |
---|
2563 | } else { |
---|
2564 | return 0; |
---|
2565 | } |
---|
2566 | } |
---|
2567 | |
---|
2568 | SWIGRUNTIME int |
---|
2569 | SWIG_Python_ArgFail(int argnum) |
---|
2570 | { |
---|
2571 | if (PyErr_Occurred()) { |
---|
2572 | /* add information about failing argument */ |
---|
2573 | char mesg[256]; |
---|
2574 | PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); |
---|
2575 | return SWIG_Python_AddErrMesg(mesg, 1); |
---|
2576 | } else { |
---|
2577 | return 0; |
---|
2578 | } |
---|
2579 | } |
---|
2580 | |
---|
2581 | SWIGRUNTIMEINLINE const char * |
---|
2582 | SwigPyObject_GetDesc(PyObject *self) |
---|
2583 | { |
---|
2584 | SwigPyObject *v = (SwigPyObject *)self; |
---|
2585 | swig_type_info *ty = v ? v->ty : 0; |
---|
2586 | return ty ? ty->str : (char*)""; |
---|
2587 | } |
---|
2588 | |
---|
2589 | SWIGRUNTIME void |
---|
2590 | SWIG_Python_TypeError(const char *type, PyObject *obj) |
---|
2591 | { |
---|
2592 | if (type) { |
---|
2593 | #if defined(SWIG_COBJECT_TYPES) |
---|
2594 | if (obj && SwigPyObject_Check(obj)) { |
---|
2595 | const char *otype = (const char *) SwigPyObject_GetDesc(obj); |
---|
2596 | if (otype) { |
---|
2597 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", |
---|
2598 | type, otype); |
---|
2599 | return; |
---|
2600 | } |
---|
2601 | } else |
---|
2602 | #endif |
---|
2603 | { |
---|
2604 | const char *otype = (obj ? obj->ob_type->tp_name : 0); |
---|
2605 | if (otype) { |
---|
2606 | PyObject *str = PyObject_Str(obj); |
---|
2607 | const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; |
---|
2608 | if (cstr) { |
---|
2609 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", |
---|
2610 | type, otype, cstr); |
---|
2611 | SWIG_Python_str_DelForPy3(cstr); |
---|
2612 | } else { |
---|
2613 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", |
---|
2614 | type, otype); |
---|
2615 | } |
---|
2616 | Py_XDECREF(str); |
---|
2617 | return; |
---|
2618 | } |
---|
2619 | } |
---|
2620 | PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); |
---|
2621 | } else { |
---|
2622 | PyErr_Format(PyExc_TypeError, "unexpected type is received"); |
---|
2623 | } |
---|
2624 | } |
---|
2625 | |
---|
2626 | |
---|
2627 | /* Convert a pointer value, signal an exception on a type mismatch */ |
---|
2628 | SWIGRUNTIME void * |
---|
2629 | SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { |
---|
2630 | void *result; |
---|
2631 | if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { |
---|
2632 | PyErr_Clear(); |
---|
2633 | #if SWIG_POINTER_EXCEPTION |
---|
2634 | if (flags) { |
---|
2635 | SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); |
---|
2636 | SWIG_Python_ArgFail(argnum); |
---|
2637 | } |
---|
2638 | #endif |
---|
2639 | } |
---|
2640 | return result; |
---|
2641 | } |
---|
2642 | |
---|
2643 | |
---|
2644 | #ifdef __cplusplus |
---|
2645 | #if 0 |
---|
2646 | { /* cc-mode */ |
---|
2647 | #endif |
---|
2648 | } |
---|
2649 | #endif |
---|
2650 | |
---|
2651 | |
---|
2652 | |
---|
2653 | #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) |
---|
2654 | |
---|
2655 | #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else |
---|
2656 | |
---|
2657 | |
---|
2658 | |
---|
2659 | /* -------- TYPES TABLE (BEGIN) -------- */ |
---|
2660 | |
---|
2661 | #define SWIGTYPE_p_attrl swig_types[0] |
---|
2662 | #define SWIGTYPE_p_attropl swig_types[1] |
---|
2663 | #define SWIGTYPE_p_batch_status swig_types[2] |
---|
2664 | #define SWIGTYPE_p_char swig_types[3] |
---|
2665 | #define SWIGTYPE_p_int swig_types[4] |
---|
2666 | #define SWIGTYPE_p_long swig_types[5] |
---|
2667 | #define SWIGTYPE_p_p_char swig_types[6] |
---|
2668 | static swig_type_info *swig_types[8]; |
---|
2669 | static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0}; |
---|
2670 | #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) |
---|
2671 | #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) |
---|
2672 | |
---|
2673 | /* -------- TYPES TABLE (END) -------- */ |
---|
2674 | |
---|
2675 | #if (PY_VERSION_HEX <= 0x02000000) |
---|
2676 | # if !defined(SWIG_PYTHON_CLASSIC) |
---|
2677 | # error "This python version requires swig to be run with the '-classic' option" |
---|
2678 | # endif |
---|
2679 | #endif |
---|
2680 | |
---|
2681 | /*----------------------------------------------- |
---|
2682 | @(target):= _pbs.so |
---|
2683 | ------------------------------------------------*/ |
---|
2684 | #if PY_VERSION_HEX >= 0x03000000 |
---|
2685 | # define SWIG_init PyInit__pbs |
---|
2686 | |
---|
2687 | #else |
---|
2688 | # define SWIG_init init_pbs |
---|
2689 | |
---|
2690 | #endif |
---|
2691 | #define SWIG_name "_pbs" |
---|
2692 | |
---|
2693 | #define SWIGVERSION 0x010340 |
---|
2694 | #define SWIG_VERSION SWIGVERSION |
---|
2695 | |
---|
2696 | |
---|
2697 | #define SWIG_as_voidptr(a) (void *)((const void *)(a)) |
---|
2698 | #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) |
---|
2699 | |
---|
2700 | |
---|
2701 | |
---|
2702 | #include "pbs_ifl.h" |
---|
2703 | #include "pbs_error.h" |
---|
2704 | #include "rm.h" |
---|
2705 | #include "log.h" |
---|
2706 | |
---|
2707 | #define SARA_DEBUG 0 |
---|
2708 | |
---|
2709 | //extern int pbs_errno; |
---|
2710 | |
---|
2711 | |
---|
2712 | |
---|
2713 | int Get_List_Size(PyObject *src) |
---|
2714 | { |
---|
2715 | if (PyList_Check(src)) |
---|
2716 | return(PyList_Size(src)); |
---|
2717 | |
---|
2718 | /* check if valid NULL pointer */ |
---|
2719 | if ( PyString_Check(src) ) { |
---|
2720 | if ( ! strcmp(PyString_AsString(src), "NULL") ) |
---|
2721 | return(0); |
---|
2722 | } |
---|
2723 | return(-1); |
---|
2724 | |
---|
2725 | } // end Get_List_Size() |
---|
2726 | |
---|
2727 | |
---|
2728 | |
---|
2729 | |
---|
2730 | // The default constructor for struct attrl |
---|
2731 | // |
---|
2732 | struct attrl *new_attrl(int number) |
---|
2733 | { |
---|
2734 | struct attrl *ptr; |
---|
2735 | struct attrl *prev, *current; |
---|
2736 | int i; |
---|
2737 | |
---|
2738 | /* |
---|
2739 | allocate memory as a one block is handy for Python scripts |
---|
2740 | and fill in the next fields so it also works for the C-library |
---|
2741 | */ |
---|
2742 | ptr = (struct attrl *) malloc(number * sizeof(struct attrl)); |
---|
2743 | |
---|
2744 | prev = NULL; |
---|
2745 | current = ptr + (number - 1); |
---|
2746 | for (i=0; i < number; i++) |
---|
2747 | { |
---|
2748 | // printf("constructor called\n"); |
---|
2749 | current->name = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2750 | current->resource = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2751 | current->value = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2752 | |
---|
2753 | bzero( (void*) current->name, sizeof(current->name)); |
---|
2754 | bzero( (void*) current->resource, sizeof(current->resource)); |
---|
2755 | bzero( (void*) current->value, sizeof(current->value)); |
---|
2756 | |
---|
2757 | current->next = prev; |
---|
2758 | prev = current; |
---|
2759 | current--; |
---|
2760 | } |
---|
2761 | return (struct attrl *)ptr; |
---|
2762 | |
---|
2763 | } // end new_attrl() |
---|
2764 | |
---|
2765 | |
---|
2766 | |
---|
2767 | // The default constructor for struct attropl |
---|
2768 | // |
---|
2769 | struct attropl *new_attropl(int number) |
---|
2770 | { |
---|
2771 | struct attropl *ptr; |
---|
2772 | struct attropl *prev, *current; |
---|
2773 | int i; |
---|
2774 | |
---|
2775 | /* |
---|
2776 | allocate memory as a one block is handy for Python scripts |
---|
2777 | and fill in the next fields so it also works for the C-library |
---|
2778 | */ |
---|
2779 | ptr = (struct attropl *) malloc(number * sizeof(struct attropl)); |
---|
2780 | |
---|
2781 | prev = NULL; |
---|
2782 | current = ptr + (number - 1); |
---|
2783 | for (i=0; i < number; i++) |
---|
2784 | { |
---|
2785 | // printf("constructor called\n"); |
---|
2786 | current->name = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2787 | current->resource = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2788 | current->value = (char *) malloc(MAXNAMLEN * sizeof(char)); |
---|
2789 | |
---|
2790 | bzero( (void*) current->name, sizeof(current->name)); |
---|
2791 | bzero( (void*) current->resource, sizeof(current->resource)); |
---|
2792 | bzero( (void*) current->value, sizeof(current->value)); |
---|
2793 | current->op = 0; |
---|
2794 | |
---|
2795 | current->next = prev; |
---|
2796 | prev = current; |
---|
2797 | current--; |
---|
2798 | } |
---|
2799 | return (struct attropl *)ptr; |
---|
2800 | |
---|
2801 | } // end new_attropl() |
---|
2802 | |
---|
2803 | /* Not used only returned */ |
---|
2804 | struct batch_status *new_batch_status() |
---|
2805 | { |
---|
2806 | struct batch_status *ptr; |
---|
2807 | |
---|
2808 | ptr = (struct batch_status *) malloc(sizeof(struct batch_status)); |
---|
2809 | return (struct batch_status *)ptr; |
---|
2810 | } // end new struct batch_status |
---|
2811 | |
---|
2812 | int get_error() |
---|
2813 | { |
---|
2814 | char *errmsg; |
---|
2815 | |
---|
2816 | errmsg = pbse_to_txt(pbs_errno); |
---|
2817 | if (SARA_DEBUG) |
---|
2818 | { |
---|
2819 | printf("Bas = %d\n", pbs_errno); |
---|
2820 | printf("Bas = %d, text = %s\n", pbs_errno, errmsg); |
---|
2821 | } |
---|
2822 | return (pbs_errno); |
---|
2823 | } |
---|
2824 | |
---|
2825 | |
---|
2826 | |
---|
2827 | |
---|
2828 | #include <limits.h> |
---|
2829 | #if !defined(SWIG_NO_LLONG_MAX) |
---|
2830 | # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) |
---|
2831 | # define LLONG_MAX __LONG_LONG_MAX__ |
---|
2832 | # define LLONG_MIN (-LLONG_MAX - 1LL) |
---|
2833 | # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) |
---|
2834 | # endif |
---|
2835 | #endif |
---|
2836 | |
---|
2837 | |
---|
2838 | SWIGINTERN int |
---|
2839 | SWIG_AsVal_double (PyObject *obj, double *val) |
---|
2840 | { |
---|
2841 | int res = SWIG_TypeError; |
---|
2842 | if (PyFloat_Check(obj)) { |
---|
2843 | if (val) *val = PyFloat_AsDouble(obj); |
---|
2844 | return SWIG_OK; |
---|
2845 | } else if (PyInt_Check(obj)) { |
---|
2846 | if (val) *val = PyInt_AsLong(obj); |
---|
2847 | return SWIG_OK; |
---|
2848 | } else if (PyLong_Check(obj)) { |
---|
2849 | double v = PyLong_AsDouble(obj); |
---|
2850 | if (!PyErr_Occurred()) { |
---|
2851 | if (val) *val = v; |
---|
2852 | return SWIG_OK; |
---|
2853 | } else { |
---|
2854 | PyErr_Clear(); |
---|
2855 | } |
---|
2856 | } |
---|
2857 | #ifdef SWIG_PYTHON_CAST_MODE |
---|
2858 | { |
---|
2859 | int dispatch = 0; |
---|
2860 | double d = PyFloat_AsDouble(obj); |
---|
2861 | if (!PyErr_Occurred()) { |
---|
2862 | if (val) *val = d; |
---|
2863 | return SWIG_AddCast(SWIG_OK); |
---|
2864 | } else { |
---|
2865 | PyErr_Clear(); |
---|
2866 | } |
---|
2867 | if (!dispatch) { |
---|
2868 | long v = PyLong_AsLong(obj); |
---|
2869 | if (!PyErr_Occurred()) { |
---|
2870 | if (val) *val = v; |
---|
2871 | return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); |
---|
2872 | } else { |
---|
2873 | PyErr_Clear(); |
---|
2874 | } |
---|
2875 | } |
---|
2876 | } |
---|
2877 | #endif |
---|
2878 | return res; |
---|
2879 | } |
---|
2880 | |
---|
2881 | |
---|
2882 | #include <float.h> |
---|
2883 | |
---|
2884 | |
---|
2885 | #include <math.h> |
---|
2886 | |
---|
2887 | |
---|
2888 | SWIGINTERNINLINE int |
---|
2889 | SWIG_CanCastAsInteger(double *d, double min, double max) { |
---|
2890 | double x = *d; |
---|
2891 | if ((min <= x && x <= max)) { |
---|
2892 | double fx = floor(x); |
---|
2893 | double cx = ceil(x); |
---|
2894 | double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ |
---|
2895 | if ((errno == EDOM) || (errno == ERANGE)) { |
---|
2896 | errno = 0; |
---|
2897 | } else { |
---|
2898 | double summ, reps, diff; |
---|
2899 | if (rd < x) { |
---|
2900 | diff = x - rd; |
---|
2901 | } else if (rd > x) { |
---|
2902 | diff = rd - x; |
---|
2903 | } else { |
---|
2904 | return 1; |
---|
2905 | } |
---|
2906 | summ = rd + x; |
---|
2907 | reps = diff/summ; |
---|
2908 | if (reps < 8*DBL_EPSILON) { |
---|
2909 | *d = rd; |
---|
2910 | return 1; |
---|
2911 | } |
---|
2912 | } |
---|
2913 | } |
---|
2914 | return 0; |
---|
2915 | } |
---|
2916 | |
---|
2917 | |
---|
2918 | SWIGINTERN int |
---|
2919 | SWIG_AsVal_long (PyObject *obj, long* val) |
---|
2920 | { |
---|
2921 | if (PyInt_Check(obj)) { |
---|
2922 | if (val) *val = PyInt_AsLong(obj); |
---|
2923 | return SWIG_OK; |
---|
2924 | } else if (PyLong_Check(obj)) { |
---|
2925 | long v = PyLong_AsLong(obj); |
---|
2926 | if (!PyErr_Occurred()) { |
---|
2927 | if (val) *val = v; |
---|
2928 | return SWIG_OK; |
---|
2929 | } else { |
---|
2930 | PyErr_Clear(); |
---|
2931 | } |
---|
2932 | } |
---|
2933 | #ifdef SWIG_PYTHON_CAST_MODE |
---|
2934 | { |
---|
2935 | int dispatch = 0; |
---|
2936 | long v = PyInt_AsLong(obj); |
---|
2937 | if (!PyErr_Occurred()) { |
---|
2938 | if (val) *val = v; |
---|
2939 | return SWIG_AddCast(SWIG_OK); |
---|
2940 | } else { |
---|
2941 | PyErr_Clear(); |
---|
2942 | } |
---|
2943 | if (!dispatch) { |
---|
2944 | double d; |
---|
2945 | int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); |
---|
2946 | if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { |
---|
2947 | if (val) *val = (long)(d); |
---|
2948 | return res; |
---|
2949 | } |
---|
2950 | } |
---|
2951 | } |
---|
2952 | #endif |
---|
2953 | return SWIG_TypeError; |
---|
2954 | } |
---|
2955 | |
---|
2956 | |
---|
2957 | SWIGINTERN int |
---|
2958 | SWIG_AsVal_int (PyObject * obj, int *val) |
---|
2959 | { |
---|
2960 | long v; |
---|
2961 | int res = SWIG_AsVal_long (obj, &v); |
---|
2962 | if (SWIG_IsOK(res)) { |
---|
2963 | if ((v < INT_MIN || v > INT_MAX)) { |
---|
2964 | return SWIG_OverflowError; |
---|
2965 | } else { |
---|
2966 | if (val) *val = (int)(v); |
---|
2967 | } |
---|
2968 | } |
---|
2969 | return res; |
---|
2970 | } |
---|
2971 | |
---|
2972 | |
---|
2973 | #define SWIG_From_long PyInt_FromLong |
---|
2974 | |
---|
2975 | |
---|
2976 | SWIGINTERNINLINE PyObject * |
---|
2977 | SWIG_From_int (int value) |
---|
2978 | { |
---|
2979 | return SWIG_From_long (value); |
---|
2980 | } |
---|
2981 | |
---|
2982 | |
---|
2983 | SWIGINTERN swig_type_info* |
---|
2984 | SWIG_pchar_descriptor(void) |
---|
2985 | { |
---|
2986 | static int init = 0; |
---|
2987 | static swig_type_info* info = 0; |
---|
2988 | if (!init) { |
---|
2989 | info = SWIG_TypeQuery("_p_char"); |
---|
2990 | init = 1; |
---|
2991 | } |
---|
2992 | return info; |
---|
2993 | } |
---|
2994 | |
---|
2995 | |
---|
2996 | SWIGINTERNINLINE PyObject * |
---|
2997 | SWIG_FromCharPtrAndSize(const char* carray, size_t size) |
---|
2998 | { |
---|
2999 | if (carray) { |
---|
3000 | if (size > INT_MAX) { |
---|
3001 | swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); |
---|
3002 | return pchar_descriptor ? |
---|
3003 | SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); |
---|
3004 | } else { |
---|
3005 | #if PY_VERSION_HEX >= 0x03000000 |
---|
3006 | return PyUnicode_FromStringAndSize(carray, (int)(size)); |
---|
3007 | #else |
---|
3008 | return PyString_FromStringAndSize(carray, (int)(size)); |
---|
3009 | #endif |
---|
3010 | } |
---|
3011 | } else { |
---|
3012 | return SWIG_Py_Void(); |
---|
3013 | } |
---|
3014 | } |
---|
3015 | |
---|
3016 | |
---|
3017 | SWIGINTERNINLINE PyObject * |
---|
3018 | SWIG_FromCharPtr(const char *cptr) |
---|
3019 | { |
---|
3020 | return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); |
---|
3021 | } |
---|
3022 | |
---|
3023 | |
---|
3024 | SWIGINTERN int |
---|
3025 | SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) |
---|
3026 | { |
---|
3027 | #if PY_VERSION_HEX>=0x03000000 |
---|
3028 | if (PyUnicode_Check(obj)) |
---|
3029 | #else |
---|
3030 | if (PyString_Check(obj)) |
---|
3031 | #endif |
---|
3032 | { |
---|
3033 | char *cstr; Py_ssize_t len; |
---|
3034 | #if PY_VERSION_HEX>=0x03000000 |
---|
3035 | if (!alloc && cptr) { |
---|
3036 | /* We can't allow converting without allocation, since the internal |
---|
3037 | representation of string in Python 3 is UCS-2/UCS-4 but we require |
---|
3038 | a UTF-8 representation. |
---|
3039 | TODO(bhy) More detailed explanation */ |
---|
3040 | return SWIG_RuntimeError; |
---|
3041 | } |
---|
3042 | obj = PyUnicode_AsUTF8String(obj); |
---|
3043 | PyBytes_AsStringAndSize(obj, &cstr, &len); |
---|
3044 | if(alloc) *alloc = SWIG_NEWOBJ; |
---|
3045 | #else |
---|
3046 | PyString_AsStringAndSize(obj, &cstr, &len); |
---|
3047 | #endif |
---|
3048 | if (cptr) { |
---|
3049 | if (alloc) { |
---|
3050 | /* |
---|
3051 | In python the user should not be able to modify the inner |
---|
3052 | string representation. To warranty that, if you define |
---|
3053 | SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string |
---|
3054 | buffer is always returned. |
---|
3055 | |
---|
3056 | The default behavior is just to return the pointer value, |
---|
3057 | so, be careful. |
---|
3058 | */ |
---|
3059 | #if defined(SWIG_PYTHON_SAFE_CSTRINGS) |
---|
3060 | if (*alloc != SWIG_OLDOBJ) |
---|
3061 | #else |
---|
3062 | if (*alloc == SWIG_NEWOBJ) |
---|
3063 | #endif |
---|
3064 | { |
---|
3065 | *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); |
---|
3066 | *alloc = SWIG_NEWOBJ; |
---|
3067 | } |
---|
3068 | else { |
---|
3069 | *cptr = cstr; |
---|
3070 | *alloc = SWIG_OLDOBJ; |
---|
3071 | } |
---|
3072 | } else { |
---|
3073 | #if PY_VERSION_HEX>=0x03000000 |
---|
3074 | assert(0); /* Should never reach here in Python 3 */ |
---|
3075 | #endif |
---|
3076 | *cptr = SWIG_Python_str_AsChar(obj); |
---|
3077 | } |
---|
3078 | } |
---|
3079 | if (psize) *psize = len + 1; |
---|
3080 | #if PY_VERSION_HEX>=0x03000000 |
---|
3081 | Py_XDECREF(obj); |
---|
3082 | #endif |
---|
3083 | return SWIG_OK; |
---|
3084 | } else { |
---|
3085 | swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); |
---|
3086 | if (pchar_descriptor) { |
---|
3087 | void* vptr = 0; |
---|
3088 | if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { |
---|
3089 | if (cptr) *cptr = (char *) vptr; |
---|
3090 | if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; |
---|
3091 | if (alloc) *alloc = SWIG_OLDOBJ; |
---|
3092 | return SWIG_OK; |
---|
3093 | } |
---|
3094 | } |
---|
3095 | } |
---|
3096 | return SWIG_TypeError; |
---|
3097 | } |
---|
3098 | |
---|
3099 | |
---|
3100 | |
---|
3101 | |
---|
3102 | SWIGINTERN char *attrl___str__(struct attrl *self){ |
---|
3103 | static char temp[4 * 255] ; |
---|
3104 | snprintf(temp, sizeof(temp), "(%s,%s,%s)", |
---|
3105 | self->name, self->resource, self->value); |
---|
3106 | |
---|
3107 | return &temp[0]; |
---|
3108 | } |
---|
3109 | SWIGINTERN void delete_attrl(struct attrl *self){ |
---|
3110 | if (SARA_DEBUG) |
---|
3111 | printf("Bas free attrl\n"); |
---|
3112 | |
---|
3113 | /* |
---|
3114 | free(self); |
---|
3115 | */ |
---|
3116 | } |
---|
3117 | SWIGINTERN char *attropl___str__(struct attropl *self){ |
---|
3118 | static char temp[4 * 255] ; |
---|
3119 | snprintf(temp, sizeof(temp), "(%s,%s,%s)", |
---|
3120 | self->name, self->resource, self->value); |
---|
3121 | |
---|
3122 | return &temp[0]; |
---|
3123 | } |
---|
3124 | SWIGINTERN void delete_attropl(struct attropl *self){ |
---|
3125 | if (SARA_DEBUG) |
---|
3126 | printf("Bas free attropl\n"); |
---|
3127 | |
---|
3128 | /* |
---|
3129 | free(self); |
---|
3130 | */ |
---|
3131 | } |
---|
3132 | |
---|
3133 | SWIGINTERN int |
---|
3134 | SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) |
---|
3135 | { |
---|
3136 | if (PyInt_Check(obj)) { |
---|
3137 | long v = PyInt_AsLong(obj); |
---|
3138 | if (v >= 0) { |
---|
3139 | if (val) *val = v; |
---|
3140 | return SWIG_OK; |
---|
3141 | } else { |
---|
3142 | return SWIG_OverflowError; |
---|
3143 | } |
---|
3144 | } else if (PyLong_Check(obj)) { |
---|
3145 | unsigned long v = PyLong_AsUnsignedLong(obj); |
---|
3146 | if (!PyErr_Occurred()) { |
---|
3147 | if (val) *val = v; |
---|
3148 | return SWIG_OK; |
---|
3149 | } else { |
---|
3150 | PyErr_Clear(); |
---|
3151 | } |
---|
3152 | } |
---|
3153 | #ifdef SWIG_PYTHON_CAST_MODE |
---|
3154 | { |
---|
3155 | int dispatch = 0; |
---|
3156 | unsigned long v = PyLong_AsUnsignedLong(obj); |
---|
3157 | if (!PyErr_Occurred()) { |
---|
3158 | if (val) *val = v; |
---|
3159 | return SWIG_AddCast(SWIG_OK); |
---|
3160 | } else { |
---|
3161 | PyErr_Clear(); |
---|
3162 | } |
---|
3163 | if (!dispatch) { |
---|
3164 | double d; |
---|
3165 | int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); |
---|
3166 | if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { |
---|
3167 | if (val) *val = (unsigned long)(d); |
---|
3168 | return res; |
---|
3169 | } |
---|
3170 | } |
---|
3171 | } |
---|
3172 | #endif |
---|
3173 | return SWIG_TypeError; |
---|
3174 | } |
---|
3175 | |
---|
3176 | |
---|
3177 | SWIGINTERN int |
---|
3178 | SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) |
---|
3179 | { |
---|
3180 | unsigned long v; |
---|
3181 | int res = SWIG_AsVal_unsigned_SS_long (obj, &v); |
---|
3182 | if (SWIG_IsOK(res)) { |
---|
3183 | if ((v > UINT_MAX)) { |
---|
3184 | return SWIG_OverflowError; |
---|
3185 | } else { |
---|
3186 | if (val) *val = (unsigned int)(v); |
---|
3187 | } |
---|
3188 | } |
---|
3189 | return res; |
---|
3190 | } |
---|
3191 | |
---|
3192 | |
---|
3193 | SWIGINTERN int |
---|
3194 | SWIG_AsCharArray(PyObject * obj, char *val, size_t size) |
---|
3195 | { |
---|
3196 | char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; |
---|
3197 | int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); |
---|
3198 | if (SWIG_IsOK(res)) { |
---|
3199 | if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; |
---|
3200 | if (csize <= size) { |
---|
3201 | if (val) { |
---|
3202 | if (csize) memcpy(val, cptr, csize*sizeof(char)); |
---|
3203 | if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); |
---|
3204 | } |
---|
3205 | if (alloc == SWIG_NEWOBJ) { |
---|
3206 | free((char*)cptr); |
---|
3207 | res = SWIG_DelNewMask(res); |
---|
3208 | } |
---|
3209 | return res; |
---|
3210 | } |
---|
3211 | if (alloc == SWIG_NEWOBJ) free((char*)cptr); |
---|
3212 | } |
---|
3213 | return SWIG_TypeError; |
---|
3214 | } |
---|
3215 | |
---|
3216 | #ifdef __cplusplus |
---|
3217 | extern "C" { |
---|
3218 | #endif |
---|
3219 | SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3220 | PyObject *resultobj = 0; |
---|
3221 | int arg1 ; |
---|
3222 | int val1 ; |
---|
3223 | int ecode1 = 0 ; |
---|
3224 | PyObject * obj0 = 0 ; |
---|
3225 | struct attrl *result = 0 ; |
---|
3226 | |
---|
3227 | if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail; |
---|
3228 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
3229 | if (!SWIG_IsOK(ecode1)) { |
---|
3230 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'"); |
---|
3231 | } |
---|
3232 | arg1 = (int)(val1); |
---|
3233 | result = (struct attrl *)new_attrl(arg1); |
---|
3234 | { |
---|
3235 | PyObject *obj_batch; |
---|
3236 | struct attrl *ptr; |
---|
3237 | int i=0, len=0; |
---|
3238 | |
---|
3239 | if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); |
---|
3240 | |
---|
3241 | ptr = result; |
---|
3242 | while (ptr != NULL) { |
---|
3243 | len++; |
---|
3244 | ptr = ptr->next; |
---|
3245 | } |
---|
3246 | resultobj = PyList_New(len); |
---|
3247 | |
---|
3248 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
3249 | |
---|
3250 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
3251 | ptr = result; |
---|
3252 | for (i=0; i < len; i++) { |
---|
3253 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); |
---|
3254 | PyList_SetItem(resultobj, i, obj_batch); |
---|
3255 | if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); |
---|
3256 | ptr = ptr->next; |
---|
3257 | } |
---|
3258 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
3259 | } |
---|
3260 | return resultobj; |
---|
3261 | fail: |
---|
3262 | return NULL; |
---|
3263 | } |
---|
3264 | |
---|
3265 | |
---|
3266 | SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3267 | PyObject *resultobj = 0; |
---|
3268 | int arg1 ; |
---|
3269 | int val1 ; |
---|
3270 | int ecode1 = 0 ; |
---|
3271 | PyObject * obj0 = 0 ; |
---|
3272 | struct attropl *result = 0 ; |
---|
3273 | |
---|
3274 | if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail; |
---|
3275 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
3276 | if (!SWIG_IsOK(ecode1)) { |
---|
3277 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'"); |
---|
3278 | } |
---|
3279 | arg1 = (int)(val1); |
---|
3280 | result = (struct attropl *)new_attropl(arg1); |
---|
3281 | { |
---|
3282 | PyObject *obj_batch; |
---|
3283 | struct attropl *ptr; |
---|
3284 | int i=0, len=0; |
---|
3285 | |
---|
3286 | if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n"); |
---|
3287 | |
---|
3288 | ptr = result; |
---|
3289 | while (ptr != NULL) { |
---|
3290 | len++; |
---|
3291 | ptr = ptr->next; |
---|
3292 | } |
---|
3293 | resultobj = PyList_New(len); |
---|
3294 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
3295 | |
---|
3296 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
3297 | ptr = result; |
---|
3298 | for (i=0; i < len; i++) { |
---|
3299 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); |
---|
3300 | PyList_SetItem(resultobj, i, obj_batch); |
---|
3301 | ptr = ptr->next; |
---|
3302 | } |
---|
3303 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
3304 | } |
---|
3305 | return resultobj; |
---|
3306 | fail: |
---|
3307 | return NULL; |
---|
3308 | } |
---|
3309 | |
---|
3310 | |
---|
3311 | SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3312 | PyObject *resultobj = 0; |
---|
3313 | struct batch_status *result = 0 ; |
---|
3314 | |
---|
3315 | if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail; |
---|
3316 | result = (struct batch_status *)new_batch_status(); |
---|
3317 | { |
---|
3318 | PyObject *obj_batch; |
---|
3319 | struct batch_status *ptr; |
---|
3320 | int i=0, len=0; |
---|
3321 | |
---|
3322 | // printf("Ja we are in bussniss\n"); |
---|
3323 | if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); |
---|
3324 | |
---|
3325 | // Deterime length of list |
---|
3326 | // |
---|
3327 | ptr = result; |
---|
3328 | while (ptr != NULL) { |
---|
3329 | len++; |
---|
3330 | ptr = ptr->next; |
---|
3331 | } |
---|
3332 | resultobj = PyList_New(len); |
---|
3333 | |
---|
3334 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
3335 | |
---|
3336 | // Make a list of batch_status pointers |
---|
3337 | // |
---|
3338 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
3339 | ptr = result; |
---|
3340 | for (i=0; i < len; i++) { |
---|
3341 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); |
---|
3342 | PyList_SetItem(resultobj, i, obj_batch); |
---|
3343 | if (SARA_DEBUG) { |
---|
3344 | printf("\t\t- %s\n", ptr->name); |
---|
3345 | } |
---|
3346 | ptr = ptr->next; |
---|
3347 | } |
---|
3348 | |
---|
3349 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
3350 | } |
---|
3351 | return resultobj; |
---|
3352 | fail: |
---|
3353 | return NULL; |
---|
3354 | } |
---|
3355 | |
---|
3356 | |
---|
3357 | SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3358 | PyObject *resultobj = 0; |
---|
3359 | int result; |
---|
3360 | |
---|
3361 | if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail; |
---|
3362 | result = (int)get_error(); |
---|
3363 | resultobj = SWIG_From_int((int)(result)); |
---|
3364 | return resultobj; |
---|
3365 | fail: |
---|
3366 | return NULL; |
---|
3367 | } |
---|
3368 | |
---|
3369 | |
---|
3370 | SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3371 | PyObject *resultobj = 0; |
---|
3372 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3373 | struct attrl *arg2 = (struct attrl *) 0 ; |
---|
3374 | void *argp1 = 0 ; |
---|
3375 | int res1 = 0 ; |
---|
3376 | void *argp2 = 0 ; |
---|
3377 | int res2 = 0 ; |
---|
3378 | PyObject * obj0 = 0 ; |
---|
3379 | PyObject * obj1 = 0 ; |
---|
3380 | |
---|
3381 | if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail; |
---|
3382 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3383 | if (!SWIG_IsOK(res1)) { |
---|
3384 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3385 | } |
---|
3386 | arg1 = (struct attrl *)(argp1); |
---|
3387 | res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN | 0 ); |
---|
3388 | if (!SWIG_IsOK(res2)) { |
---|
3389 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); |
---|
3390 | } |
---|
3391 | arg2 = (struct attrl *)(argp2); |
---|
3392 | if (arg1) (arg1)->next = arg2; |
---|
3393 | resultobj = SWIG_Py_Void(); |
---|
3394 | return resultobj; |
---|
3395 | fail: |
---|
3396 | return NULL; |
---|
3397 | } |
---|
3398 | |
---|
3399 | |
---|
3400 | SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3401 | PyObject *resultobj = 0; |
---|
3402 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3403 | void *argp1 = 0 ; |
---|
3404 | int res1 = 0 ; |
---|
3405 | PyObject * obj0 = 0 ; |
---|
3406 | struct attrl *result = 0 ; |
---|
3407 | |
---|
3408 | if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail; |
---|
3409 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3410 | if (!SWIG_IsOK(res1)) { |
---|
3411 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3412 | } |
---|
3413 | arg1 = (struct attrl *)(argp1); |
---|
3414 | result = (struct attrl *) ((arg1)->next); |
---|
3415 | { |
---|
3416 | PyObject *obj_batch; |
---|
3417 | struct attrl *ptr; |
---|
3418 | int i=0, len=0; |
---|
3419 | |
---|
3420 | if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); |
---|
3421 | |
---|
3422 | ptr = result; |
---|
3423 | while (ptr != NULL) { |
---|
3424 | len++; |
---|
3425 | ptr = ptr->next; |
---|
3426 | } |
---|
3427 | resultobj = PyList_New(len); |
---|
3428 | |
---|
3429 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
3430 | |
---|
3431 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
3432 | ptr = result; |
---|
3433 | for (i=0; i < len; i++) { |
---|
3434 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); |
---|
3435 | PyList_SetItem(resultobj, i, obj_batch); |
---|
3436 | if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); |
---|
3437 | ptr = ptr->next; |
---|
3438 | } |
---|
3439 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
3440 | } |
---|
3441 | return resultobj; |
---|
3442 | fail: |
---|
3443 | return NULL; |
---|
3444 | } |
---|
3445 | |
---|
3446 | |
---|
3447 | SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3448 | PyObject *resultobj = 0; |
---|
3449 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3450 | char *arg2 = (char *) 0 ; |
---|
3451 | void *argp1 = 0 ; |
---|
3452 | int res1 = 0 ; |
---|
3453 | int res2 ; |
---|
3454 | char *buf2 = 0 ; |
---|
3455 | int alloc2 = 0 ; |
---|
3456 | PyObject * obj0 = 0 ; |
---|
3457 | PyObject * obj1 = 0 ; |
---|
3458 | |
---|
3459 | if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail; |
---|
3460 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3461 | if (!SWIG_IsOK(res1)) { |
---|
3462 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3463 | } |
---|
3464 | arg1 = (struct attrl *)(argp1); |
---|
3465 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3466 | if (!SWIG_IsOK(res2)) { |
---|
3467 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'"); |
---|
3468 | } |
---|
3469 | arg2 = (char *)(buf2); |
---|
3470 | if (arg1->name) free((char*)arg1->name); |
---|
3471 | if (arg2) { |
---|
3472 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3473 | arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3474 | } else { |
---|
3475 | arg1->name = 0; |
---|
3476 | } |
---|
3477 | resultobj = SWIG_Py_Void(); |
---|
3478 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3479 | return resultobj; |
---|
3480 | fail: |
---|
3481 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3482 | return NULL; |
---|
3483 | } |
---|
3484 | |
---|
3485 | |
---|
3486 | SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3487 | PyObject *resultobj = 0; |
---|
3488 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3489 | void *argp1 = 0 ; |
---|
3490 | int res1 = 0 ; |
---|
3491 | PyObject * obj0 = 0 ; |
---|
3492 | char *result = 0 ; |
---|
3493 | |
---|
3494 | if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail; |
---|
3495 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3496 | if (!SWIG_IsOK(res1)) { |
---|
3497 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3498 | } |
---|
3499 | arg1 = (struct attrl *)(argp1); |
---|
3500 | result = (char *) ((arg1)->name); |
---|
3501 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3502 | return resultobj; |
---|
3503 | fail: |
---|
3504 | return NULL; |
---|
3505 | } |
---|
3506 | |
---|
3507 | |
---|
3508 | SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3509 | PyObject *resultobj = 0; |
---|
3510 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3511 | char *arg2 = (char *) 0 ; |
---|
3512 | void *argp1 = 0 ; |
---|
3513 | int res1 = 0 ; |
---|
3514 | int res2 ; |
---|
3515 | char *buf2 = 0 ; |
---|
3516 | int alloc2 = 0 ; |
---|
3517 | PyObject * obj0 = 0 ; |
---|
3518 | PyObject * obj1 = 0 ; |
---|
3519 | |
---|
3520 | if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail; |
---|
3521 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3522 | if (!SWIG_IsOK(res1)) { |
---|
3523 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3524 | } |
---|
3525 | arg1 = (struct attrl *)(argp1); |
---|
3526 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3527 | if (!SWIG_IsOK(res2)) { |
---|
3528 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'"); |
---|
3529 | } |
---|
3530 | arg2 = (char *)(buf2); |
---|
3531 | if (arg1->resource) free((char*)arg1->resource); |
---|
3532 | if (arg2) { |
---|
3533 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3534 | arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3535 | } else { |
---|
3536 | arg1->resource = 0; |
---|
3537 | } |
---|
3538 | resultobj = SWIG_Py_Void(); |
---|
3539 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3540 | return resultobj; |
---|
3541 | fail: |
---|
3542 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3543 | return NULL; |
---|
3544 | } |
---|
3545 | |
---|
3546 | |
---|
3547 | SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3548 | PyObject *resultobj = 0; |
---|
3549 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3550 | void *argp1 = 0 ; |
---|
3551 | int res1 = 0 ; |
---|
3552 | PyObject * obj0 = 0 ; |
---|
3553 | char *result = 0 ; |
---|
3554 | |
---|
3555 | if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail; |
---|
3556 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3557 | if (!SWIG_IsOK(res1)) { |
---|
3558 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3559 | } |
---|
3560 | arg1 = (struct attrl *)(argp1); |
---|
3561 | result = (char *) ((arg1)->resource); |
---|
3562 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3563 | return resultobj; |
---|
3564 | fail: |
---|
3565 | return NULL; |
---|
3566 | } |
---|
3567 | |
---|
3568 | |
---|
3569 | SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3570 | PyObject *resultobj = 0; |
---|
3571 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3572 | char *arg2 = (char *) 0 ; |
---|
3573 | void *argp1 = 0 ; |
---|
3574 | int res1 = 0 ; |
---|
3575 | int res2 ; |
---|
3576 | char *buf2 = 0 ; |
---|
3577 | int alloc2 = 0 ; |
---|
3578 | PyObject * obj0 = 0 ; |
---|
3579 | PyObject * obj1 = 0 ; |
---|
3580 | |
---|
3581 | if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail; |
---|
3582 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3583 | if (!SWIG_IsOK(res1)) { |
---|
3584 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3585 | } |
---|
3586 | arg1 = (struct attrl *)(argp1); |
---|
3587 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3588 | if (!SWIG_IsOK(res2)) { |
---|
3589 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'"); |
---|
3590 | } |
---|
3591 | arg2 = (char *)(buf2); |
---|
3592 | if (arg1->value) free((char*)arg1->value); |
---|
3593 | if (arg2) { |
---|
3594 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3595 | arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3596 | } else { |
---|
3597 | arg1->value = 0; |
---|
3598 | } |
---|
3599 | resultobj = SWIG_Py_Void(); |
---|
3600 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3601 | return resultobj; |
---|
3602 | fail: |
---|
3603 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3604 | return NULL; |
---|
3605 | } |
---|
3606 | |
---|
3607 | |
---|
3608 | SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3609 | PyObject *resultobj = 0; |
---|
3610 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3611 | void *argp1 = 0 ; |
---|
3612 | int res1 = 0 ; |
---|
3613 | PyObject * obj0 = 0 ; |
---|
3614 | char *result = 0 ; |
---|
3615 | |
---|
3616 | if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail; |
---|
3617 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3618 | if (!SWIG_IsOK(res1)) { |
---|
3619 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3620 | } |
---|
3621 | arg1 = (struct attrl *)(argp1); |
---|
3622 | result = (char *) ((arg1)->value); |
---|
3623 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3624 | return resultobj; |
---|
3625 | fail: |
---|
3626 | return NULL; |
---|
3627 | } |
---|
3628 | |
---|
3629 | |
---|
3630 | SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3631 | PyObject *resultobj = 0; |
---|
3632 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3633 | enum batch_op arg2 ; |
---|
3634 | void *argp1 = 0 ; |
---|
3635 | int res1 = 0 ; |
---|
3636 | int val2 ; |
---|
3637 | int ecode2 = 0 ; |
---|
3638 | PyObject * obj0 = 0 ; |
---|
3639 | PyObject * obj1 = 0 ; |
---|
3640 | |
---|
3641 | if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail; |
---|
3642 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3643 | if (!SWIG_IsOK(res1)) { |
---|
3644 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3645 | } |
---|
3646 | arg1 = (struct attrl *)(argp1); |
---|
3647 | ecode2 = SWIG_AsVal_int(obj1, &val2); |
---|
3648 | if (!SWIG_IsOK(ecode2)) { |
---|
3649 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'"); |
---|
3650 | } |
---|
3651 | arg2 = (enum batch_op)(val2); |
---|
3652 | if (arg1) (arg1)->op = arg2; |
---|
3653 | resultobj = SWIG_Py_Void(); |
---|
3654 | return resultobj; |
---|
3655 | fail: |
---|
3656 | return NULL; |
---|
3657 | } |
---|
3658 | |
---|
3659 | |
---|
3660 | SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3661 | PyObject *resultobj = 0; |
---|
3662 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3663 | void *argp1 = 0 ; |
---|
3664 | int res1 = 0 ; |
---|
3665 | PyObject * obj0 = 0 ; |
---|
3666 | enum batch_op result; |
---|
3667 | |
---|
3668 | if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail; |
---|
3669 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3670 | if (!SWIG_IsOK(res1)) { |
---|
3671 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3672 | } |
---|
3673 | arg1 = (struct attrl *)(argp1); |
---|
3674 | result = (enum batch_op) ((arg1)->op); |
---|
3675 | resultobj = SWIG_From_int((int)(result)); |
---|
3676 | return resultobj; |
---|
3677 | fail: |
---|
3678 | return NULL; |
---|
3679 | } |
---|
3680 | |
---|
3681 | |
---|
3682 | SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3683 | PyObject *resultobj = 0; |
---|
3684 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3685 | void *argp1 = 0 ; |
---|
3686 | int res1 = 0 ; |
---|
3687 | PyObject * obj0 = 0 ; |
---|
3688 | char *result = 0 ; |
---|
3689 | |
---|
3690 | if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail; |
---|
3691 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 | 0 ); |
---|
3692 | if (!SWIG_IsOK(res1)) { |
---|
3693 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3694 | } |
---|
3695 | arg1 = (struct attrl *)(argp1); |
---|
3696 | result = (char *)attrl___str__(arg1); |
---|
3697 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3698 | return resultobj; |
---|
3699 | fail: |
---|
3700 | return NULL; |
---|
3701 | } |
---|
3702 | |
---|
3703 | |
---|
3704 | SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3705 | PyObject *resultobj = 0; |
---|
3706 | struct attrl *arg1 = (struct attrl *) 0 ; |
---|
3707 | void *argp1 = 0 ; |
---|
3708 | int res1 = 0 ; |
---|
3709 | PyObject * obj0 = 0 ; |
---|
3710 | |
---|
3711 | if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail; |
---|
3712 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN | 0 ); |
---|
3713 | if (!SWIG_IsOK(res1)) { |
---|
3714 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); |
---|
3715 | } |
---|
3716 | arg1 = (struct attrl *)(argp1); |
---|
3717 | delete_attrl(arg1); |
---|
3718 | resultobj = SWIG_Py_Void(); |
---|
3719 | return resultobj; |
---|
3720 | fail: |
---|
3721 | return NULL; |
---|
3722 | } |
---|
3723 | |
---|
3724 | |
---|
3725 | SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3726 | PyObject *obj; |
---|
3727 | if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; |
---|
3728 | SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj)); |
---|
3729 | return SWIG_Py_Void(); |
---|
3730 | } |
---|
3731 | |
---|
3732 | SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3733 | PyObject *resultobj = 0; |
---|
3734 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3735 | struct attropl *arg2 = (struct attropl *) 0 ; |
---|
3736 | void *argp1 = 0 ; |
---|
3737 | int res1 = 0 ; |
---|
3738 | void *argp2 = 0 ; |
---|
3739 | int res2 = 0 ; |
---|
3740 | PyObject * obj0 = 0 ; |
---|
3741 | PyObject * obj1 = 0 ; |
---|
3742 | |
---|
3743 | if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail; |
---|
3744 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3745 | if (!SWIG_IsOK(res1)) { |
---|
3746 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3747 | } |
---|
3748 | arg1 = (struct attropl *)(argp1); |
---|
3749 | res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN | 0 ); |
---|
3750 | if (!SWIG_IsOK(res2)) { |
---|
3751 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); |
---|
3752 | } |
---|
3753 | arg2 = (struct attropl *)(argp2); |
---|
3754 | if (arg1) (arg1)->next = arg2; |
---|
3755 | resultobj = SWIG_Py_Void(); |
---|
3756 | return resultobj; |
---|
3757 | fail: |
---|
3758 | return NULL; |
---|
3759 | } |
---|
3760 | |
---|
3761 | |
---|
3762 | SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3763 | PyObject *resultobj = 0; |
---|
3764 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3765 | void *argp1 = 0 ; |
---|
3766 | int res1 = 0 ; |
---|
3767 | PyObject * obj0 = 0 ; |
---|
3768 | struct attropl *result = 0 ; |
---|
3769 | |
---|
3770 | if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail; |
---|
3771 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3772 | if (!SWIG_IsOK(res1)) { |
---|
3773 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3774 | } |
---|
3775 | arg1 = (struct attropl *)(argp1); |
---|
3776 | result = (struct attropl *) ((arg1)->next); |
---|
3777 | { |
---|
3778 | PyObject *obj_batch; |
---|
3779 | struct attropl *ptr; |
---|
3780 | int i=0, len=0; |
---|
3781 | |
---|
3782 | if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n"); |
---|
3783 | |
---|
3784 | ptr = result; |
---|
3785 | while (ptr != NULL) { |
---|
3786 | len++; |
---|
3787 | ptr = ptr->next; |
---|
3788 | } |
---|
3789 | resultobj = PyList_New(len); |
---|
3790 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
3791 | |
---|
3792 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
3793 | ptr = result; |
---|
3794 | for (i=0; i < len; i++) { |
---|
3795 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); |
---|
3796 | PyList_SetItem(resultobj, i, obj_batch); |
---|
3797 | ptr = ptr->next; |
---|
3798 | } |
---|
3799 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
3800 | } |
---|
3801 | return resultobj; |
---|
3802 | fail: |
---|
3803 | return NULL; |
---|
3804 | } |
---|
3805 | |
---|
3806 | |
---|
3807 | SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3808 | PyObject *resultobj = 0; |
---|
3809 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3810 | char *arg2 = (char *) 0 ; |
---|
3811 | void *argp1 = 0 ; |
---|
3812 | int res1 = 0 ; |
---|
3813 | int res2 ; |
---|
3814 | char *buf2 = 0 ; |
---|
3815 | int alloc2 = 0 ; |
---|
3816 | PyObject * obj0 = 0 ; |
---|
3817 | PyObject * obj1 = 0 ; |
---|
3818 | |
---|
3819 | if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail; |
---|
3820 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3821 | if (!SWIG_IsOK(res1)) { |
---|
3822 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3823 | } |
---|
3824 | arg1 = (struct attropl *)(argp1); |
---|
3825 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3826 | if (!SWIG_IsOK(res2)) { |
---|
3827 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'"); |
---|
3828 | } |
---|
3829 | arg2 = (char *)(buf2); |
---|
3830 | if (arg1->name) free((char*)arg1->name); |
---|
3831 | if (arg2) { |
---|
3832 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3833 | arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3834 | } else { |
---|
3835 | arg1->name = 0; |
---|
3836 | } |
---|
3837 | resultobj = SWIG_Py_Void(); |
---|
3838 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3839 | return resultobj; |
---|
3840 | fail: |
---|
3841 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3842 | return NULL; |
---|
3843 | } |
---|
3844 | |
---|
3845 | |
---|
3846 | SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3847 | PyObject *resultobj = 0; |
---|
3848 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3849 | void *argp1 = 0 ; |
---|
3850 | int res1 = 0 ; |
---|
3851 | PyObject * obj0 = 0 ; |
---|
3852 | char *result = 0 ; |
---|
3853 | |
---|
3854 | if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail; |
---|
3855 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3856 | if (!SWIG_IsOK(res1)) { |
---|
3857 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3858 | } |
---|
3859 | arg1 = (struct attropl *)(argp1); |
---|
3860 | result = (char *) ((arg1)->name); |
---|
3861 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3862 | return resultobj; |
---|
3863 | fail: |
---|
3864 | return NULL; |
---|
3865 | } |
---|
3866 | |
---|
3867 | |
---|
3868 | SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3869 | PyObject *resultobj = 0; |
---|
3870 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3871 | char *arg2 = (char *) 0 ; |
---|
3872 | void *argp1 = 0 ; |
---|
3873 | int res1 = 0 ; |
---|
3874 | int res2 ; |
---|
3875 | char *buf2 = 0 ; |
---|
3876 | int alloc2 = 0 ; |
---|
3877 | PyObject * obj0 = 0 ; |
---|
3878 | PyObject * obj1 = 0 ; |
---|
3879 | |
---|
3880 | if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail; |
---|
3881 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3882 | if (!SWIG_IsOK(res1)) { |
---|
3883 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3884 | } |
---|
3885 | arg1 = (struct attropl *)(argp1); |
---|
3886 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3887 | if (!SWIG_IsOK(res2)) { |
---|
3888 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'"); |
---|
3889 | } |
---|
3890 | arg2 = (char *)(buf2); |
---|
3891 | if (arg1->resource) free((char*)arg1->resource); |
---|
3892 | if (arg2) { |
---|
3893 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3894 | arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3895 | } else { |
---|
3896 | arg1->resource = 0; |
---|
3897 | } |
---|
3898 | resultobj = SWIG_Py_Void(); |
---|
3899 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3900 | return resultobj; |
---|
3901 | fail: |
---|
3902 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3903 | return NULL; |
---|
3904 | } |
---|
3905 | |
---|
3906 | |
---|
3907 | SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3908 | PyObject *resultobj = 0; |
---|
3909 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3910 | void *argp1 = 0 ; |
---|
3911 | int res1 = 0 ; |
---|
3912 | PyObject * obj0 = 0 ; |
---|
3913 | char *result = 0 ; |
---|
3914 | |
---|
3915 | if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail; |
---|
3916 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3917 | if (!SWIG_IsOK(res1)) { |
---|
3918 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3919 | } |
---|
3920 | arg1 = (struct attropl *)(argp1); |
---|
3921 | result = (char *) ((arg1)->resource); |
---|
3922 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3923 | return resultobj; |
---|
3924 | fail: |
---|
3925 | return NULL; |
---|
3926 | } |
---|
3927 | |
---|
3928 | |
---|
3929 | SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3930 | PyObject *resultobj = 0; |
---|
3931 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3932 | char *arg2 = (char *) 0 ; |
---|
3933 | void *argp1 = 0 ; |
---|
3934 | int res1 = 0 ; |
---|
3935 | int res2 ; |
---|
3936 | char *buf2 = 0 ; |
---|
3937 | int alloc2 = 0 ; |
---|
3938 | PyObject * obj0 = 0 ; |
---|
3939 | PyObject * obj1 = 0 ; |
---|
3940 | |
---|
3941 | if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail; |
---|
3942 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3943 | if (!SWIG_IsOK(res1)) { |
---|
3944 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3945 | } |
---|
3946 | arg1 = (struct attropl *)(argp1); |
---|
3947 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
3948 | if (!SWIG_IsOK(res2)) { |
---|
3949 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'"); |
---|
3950 | } |
---|
3951 | arg2 = (char *)(buf2); |
---|
3952 | if (arg1->value) free((char*)arg1->value); |
---|
3953 | if (arg2) { |
---|
3954 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
3955 | arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
3956 | } else { |
---|
3957 | arg1->value = 0; |
---|
3958 | } |
---|
3959 | resultobj = SWIG_Py_Void(); |
---|
3960 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3961 | return resultobj; |
---|
3962 | fail: |
---|
3963 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
3964 | return NULL; |
---|
3965 | } |
---|
3966 | |
---|
3967 | |
---|
3968 | SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3969 | PyObject *resultobj = 0; |
---|
3970 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3971 | void *argp1 = 0 ; |
---|
3972 | int res1 = 0 ; |
---|
3973 | PyObject * obj0 = 0 ; |
---|
3974 | char *result = 0 ; |
---|
3975 | |
---|
3976 | if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail; |
---|
3977 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
3978 | if (!SWIG_IsOK(res1)) { |
---|
3979 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
3980 | } |
---|
3981 | arg1 = (struct attropl *)(argp1); |
---|
3982 | result = (char *) ((arg1)->value); |
---|
3983 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
3984 | return resultobj; |
---|
3985 | fail: |
---|
3986 | return NULL; |
---|
3987 | } |
---|
3988 | |
---|
3989 | |
---|
3990 | SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
3991 | PyObject *resultobj = 0; |
---|
3992 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
3993 | enum batch_op arg2 ; |
---|
3994 | void *argp1 = 0 ; |
---|
3995 | int res1 = 0 ; |
---|
3996 | int val2 ; |
---|
3997 | int ecode2 = 0 ; |
---|
3998 | PyObject * obj0 = 0 ; |
---|
3999 | PyObject * obj1 = 0 ; |
---|
4000 | |
---|
4001 | if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail; |
---|
4002 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
4003 | if (!SWIG_IsOK(res1)) { |
---|
4004 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
4005 | } |
---|
4006 | arg1 = (struct attropl *)(argp1); |
---|
4007 | ecode2 = SWIG_AsVal_int(obj1, &val2); |
---|
4008 | if (!SWIG_IsOK(ecode2)) { |
---|
4009 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'"); |
---|
4010 | } |
---|
4011 | arg2 = (enum batch_op)(val2); |
---|
4012 | if (arg1) (arg1)->op = arg2; |
---|
4013 | resultobj = SWIG_Py_Void(); |
---|
4014 | return resultobj; |
---|
4015 | fail: |
---|
4016 | return NULL; |
---|
4017 | } |
---|
4018 | |
---|
4019 | |
---|
4020 | SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4021 | PyObject *resultobj = 0; |
---|
4022 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
4023 | void *argp1 = 0 ; |
---|
4024 | int res1 = 0 ; |
---|
4025 | PyObject * obj0 = 0 ; |
---|
4026 | enum batch_op result; |
---|
4027 | |
---|
4028 | if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail; |
---|
4029 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
4030 | if (!SWIG_IsOK(res1)) { |
---|
4031 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
4032 | } |
---|
4033 | arg1 = (struct attropl *)(argp1); |
---|
4034 | result = (enum batch_op) ((arg1)->op); |
---|
4035 | resultobj = SWIG_From_int((int)(result)); |
---|
4036 | return resultobj; |
---|
4037 | fail: |
---|
4038 | return NULL; |
---|
4039 | } |
---|
4040 | |
---|
4041 | |
---|
4042 | SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4043 | PyObject *resultobj = 0; |
---|
4044 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
4045 | void *argp1 = 0 ; |
---|
4046 | int res1 = 0 ; |
---|
4047 | PyObject * obj0 = 0 ; |
---|
4048 | char *result = 0 ; |
---|
4049 | |
---|
4050 | if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail; |
---|
4051 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 | 0 ); |
---|
4052 | if (!SWIG_IsOK(res1)) { |
---|
4053 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
4054 | } |
---|
4055 | arg1 = (struct attropl *)(argp1); |
---|
4056 | result = (char *)attropl___str__(arg1); |
---|
4057 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4058 | return resultobj; |
---|
4059 | fail: |
---|
4060 | return NULL; |
---|
4061 | } |
---|
4062 | |
---|
4063 | |
---|
4064 | SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4065 | PyObject *resultobj = 0; |
---|
4066 | struct attropl *arg1 = (struct attropl *) 0 ; |
---|
4067 | void *argp1 = 0 ; |
---|
4068 | int res1 = 0 ; |
---|
4069 | PyObject * obj0 = 0 ; |
---|
4070 | |
---|
4071 | if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail; |
---|
4072 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN | 0 ); |
---|
4073 | if (!SWIG_IsOK(res1)) { |
---|
4074 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); |
---|
4075 | } |
---|
4076 | arg1 = (struct attropl *)(argp1); |
---|
4077 | delete_attropl(arg1); |
---|
4078 | resultobj = SWIG_Py_Void(); |
---|
4079 | return resultobj; |
---|
4080 | fail: |
---|
4081 | return NULL; |
---|
4082 | } |
---|
4083 | |
---|
4084 | |
---|
4085 | SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4086 | PyObject *obj; |
---|
4087 | if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; |
---|
4088 | SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj)); |
---|
4089 | return SWIG_Py_Void(); |
---|
4090 | } |
---|
4091 | |
---|
4092 | SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4093 | PyObject *resultobj = 0; |
---|
4094 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4095 | struct batch_status *arg2 = (struct batch_status *) 0 ; |
---|
4096 | void *argp1 = 0 ; |
---|
4097 | int res1 = 0 ; |
---|
4098 | void *argp2 = 0 ; |
---|
4099 | int res2 = 0 ; |
---|
4100 | PyObject * obj0 = 0 ; |
---|
4101 | PyObject * obj1 = 0 ; |
---|
4102 | |
---|
4103 | if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail; |
---|
4104 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4105 | if (!SWIG_IsOK(res1)) { |
---|
4106 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4107 | } |
---|
4108 | arg1 = (struct batch_status *)(argp1); |
---|
4109 | res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN | 0 ); |
---|
4110 | if (!SWIG_IsOK(res2)) { |
---|
4111 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); |
---|
4112 | } |
---|
4113 | arg2 = (struct batch_status *)(argp2); |
---|
4114 | if (arg1) (arg1)->next = arg2; |
---|
4115 | resultobj = SWIG_Py_Void(); |
---|
4116 | return resultobj; |
---|
4117 | fail: |
---|
4118 | return NULL; |
---|
4119 | } |
---|
4120 | |
---|
4121 | |
---|
4122 | SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4123 | PyObject *resultobj = 0; |
---|
4124 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4125 | void *argp1 = 0 ; |
---|
4126 | int res1 = 0 ; |
---|
4127 | PyObject * obj0 = 0 ; |
---|
4128 | struct batch_status *result = 0 ; |
---|
4129 | |
---|
4130 | if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail; |
---|
4131 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4132 | if (!SWIG_IsOK(res1)) { |
---|
4133 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4134 | } |
---|
4135 | arg1 = (struct batch_status *)(argp1); |
---|
4136 | result = (struct batch_status *) ((arg1)->next); |
---|
4137 | { |
---|
4138 | PyObject *obj_batch; |
---|
4139 | struct batch_status *ptr; |
---|
4140 | int i=0, len=0; |
---|
4141 | |
---|
4142 | // printf("Ja we are in bussniss\n"); |
---|
4143 | if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n"); |
---|
4144 | |
---|
4145 | // Deterime length of list |
---|
4146 | // |
---|
4147 | ptr = result; |
---|
4148 | while (ptr != NULL) { |
---|
4149 | len++; |
---|
4150 | ptr = ptr->next; |
---|
4151 | } |
---|
4152 | resultobj = PyList_New(len); |
---|
4153 | |
---|
4154 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
4155 | |
---|
4156 | // Make a list of batch_status pointers |
---|
4157 | // |
---|
4158 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
4159 | ptr = result; |
---|
4160 | for (i=0; i < len; i++) { |
---|
4161 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); |
---|
4162 | PyList_SetItem(resultobj, i, obj_batch); |
---|
4163 | if (SARA_DEBUG) { |
---|
4164 | printf("\t\t- %s\n", ptr->name); |
---|
4165 | } |
---|
4166 | ptr = ptr->next; |
---|
4167 | } |
---|
4168 | |
---|
4169 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
4170 | } |
---|
4171 | return resultobj; |
---|
4172 | fail: |
---|
4173 | return NULL; |
---|
4174 | } |
---|
4175 | |
---|
4176 | |
---|
4177 | SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4178 | PyObject *resultobj = 0; |
---|
4179 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4180 | char *arg2 = (char *) 0 ; |
---|
4181 | void *argp1 = 0 ; |
---|
4182 | int res1 = 0 ; |
---|
4183 | int res2 ; |
---|
4184 | char *buf2 = 0 ; |
---|
4185 | int alloc2 = 0 ; |
---|
4186 | PyObject * obj0 = 0 ; |
---|
4187 | PyObject * obj1 = 0 ; |
---|
4188 | |
---|
4189 | if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail; |
---|
4190 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4191 | if (!SWIG_IsOK(res1)) { |
---|
4192 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4193 | } |
---|
4194 | arg1 = (struct batch_status *)(argp1); |
---|
4195 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4196 | if (!SWIG_IsOK(res2)) { |
---|
4197 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'"); |
---|
4198 | } |
---|
4199 | arg2 = (char *)(buf2); |
---|
4200 | if (arg1->name) free((char*)arg1->name); |
---|
4201 | if (arg2) { |
---|
4202 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
4203 | arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
4204 | } else { |
---|
4205 | arg1->name = 0; |
---|
4206 | } |
---|
4207 | resultobj = SWIG_Py_Void(); |
---|
4208 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4209 | return resultobj; |
---|
4210 | fail: |
---|
4211 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4212 | return NULL; |
---|
4213 | } |
---|
4214 | |
---|
4215 | |
---|
4216 | SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4217 | PyObject *resultobj = 0; |
---|
4218 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4219 | void *argp1 = 0 ; |
---|
4220 | int res1 = 0 ; |
---|
4221 | PyObject * obj0 = 0 ; |
---|
4222 | char *result = 0 ; |
---|
4223 | |
---|
4224 | if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail; |
---|
4225 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4226 | if (!SWIG_IsOK(res1)) { |
---|
4227 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4228 | } |
---|
4229 | arg1 = (struct batch_status *)(argp1); |
---|
4230 | result = (char *) ((arg1)->name); |
---|
4231 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4232 | return resultobj; |
---|
4233 | fail: |
---|
4234 | return NULL; |
---|
4235 | } |
---|
4236 | |
---|
4237 | |
---|
4238 | SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4239 | PyObject *resultobj = 0; |
---|
4240 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4241 | struct attrl *arg2 = (struct attrl *) 0 ; |
---|
4242 | void *argp1 = 0 ; |
---|
4243 | int res1 = 0 ; |
---|
4244 | void *argp2 = 0 ; |
---|
4245 | int res2 = 0 ; |
---|
4246 | PyObject * obj0 = 0 ; |
---|
4247 | PyObject * obj1 = 0 ; |
---|
4248 | |
---|
4249 | if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail; |
---|
4250 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4251 | if (!SWIG_IsOK(res1)) { |
---|
4252 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4253 | } |
---|
4254 | arg1 = (struct batch_status *)(argp1); |
---|
4255 | res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN | 0 ); |
---|
4256 | if (!SWIG_IsOK(res2)) { |
---|
4257 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); |
---|
4258 | } |
---|
4259 | arg2 = (struct attrl *)(argp2); |
---|
4260 | if (arg1) (arg1)->attribs = arg2; |
---|
4261 | resultobj = SWIG_Py_Void(); |
---|
4262 | return resultobj; |
---|
4263 | fail: |
---|
4264 | return NULL; |
---|
4265 | } |
---|
4266 | |
---|
4267 | |
---|
4268 | SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4269 | PyObject *resultobj = 0; |
---|
4270 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4271 | void *argp1 = 0 ; |
---|
4272 | int res1 = 0 ; |
---|
4273 | PyObject * obj0 = 0 ; |
---|
4274 | struct attrl *result = 0 ; |
---|
4275 | |
---|
4276 | if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail; |
---|
4277 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4278 | if (!SWIG_IsOK(res1)) { |
---|
4279 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4280 | } |
---|
4281 | arg1 = (struct batch_status *)(argp1); |
---|
4282 | result = (struct attrl *) ((arg1)->attribs); |
---|
4283 | { |
---|
4284 | PyObject *obj_batch; |
---|
4285 | struct attrl *ptr; |
---|
4286 | int i=0, len=0; |
---|
4287 | |
---|
4288 | if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n"); |
---|
4289 | |
---|
4290 | ptr = result; |
---|
4291 | while (ptr != NULL) { |
---|
4292 | len++; |
---|
4293 | ptr = ptr->next; |
---|
4294 | } |
---|
4295 | resultobj = PyList_New(len); |
---|
4296 | |
---|
4297 | if (SARA_DEBUG) printf("\tSize of List: %d\n", len); |
---|
4298 | |
---|
4299 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
4300 | ptr = result; |
---|
4301 | for (i=0; i < len; i++) { |
---|
4302 | obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); |
---|
4303 | PyList_SetItem(resultobj, i, obj_batch); |
---|
4304 | if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); |
---|
4305 | ptr = ptr->next; |
---|
4306 | } |
---|
4307 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
4308 | } |
---|
4309 | return resultobj; |
---|
4310 | fail: |
---|
4311 | return NULL; |
---|
4312 | } |
---|
4313 | |
---|
4314 | |
---|
4315 | SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4316 | PyObject *resultobj = 0; |
---|
4317 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4318 | char *arg2 = (char *) 0 ; |
---|
4319 | void *argp1 = 0 ; |
---|
4320 | int res1 = 0 ; |
---|
4321 | int res2 ; |
---|
4322 | char *buf2 = 0 ; |
---|
4323 | int alloc2 = 0 ; |
---|
4324 | PyObject * obj0 = 0 ; |
---|
4325 | PyObject * obj1 = 0 ; |
---|
4326 | |
---|
4327 | if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail; |
---|
4328 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4329 | if (!SWIG_IsOK(res1)) { |
---|
4330 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4331 | } |
---|
4332 | arg1 = (struct batch_status *)(argp1); |
---|
4333 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4334 | if (!SWIG_IsOK(res2)) { |
---|
4335 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'"); |
---|
4336 | } |
---|
4337 | arg2 = (char *)(buf2); |
---|
4338 | if (arg1->text) free((char*)arg1->text); |
---|
4339 | if (arg2) { |
---|
4340 | size_t size = strlen((const char *)(arg2)) + 1; |
---|
4341 | arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); |
---|
4342 | } else { |
---|
4343 | arg1->text = 0; |
---|
4344 | } |
---|
4345 | resultobj = SWIG_Py_Void(); |
---|
4346 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4347 | return resultobj; |
---|
4348 | fail: |
---|
4349 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4350 | return NULL; |
---|
4351 | } |
---|
4352 | |
---|
4353 | |
---|
4354 | SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4355 | PyObject *resultobj = 0; |
---|
4356 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
4357 | void *argp1 = 0 ; |
---|
4358 | int res1 = 0 ; |
---|
4359 | PyObject * obj0 = 0 ; |
---|
4360 | char *result = 0 ; |
---|
4361 | |
---|
4362 | if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail; |
---|
4363 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); |
---|
4364 | if (!SWIG_IsOK(res1)) { |
---|
4365 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); |
---|
4366 | } |
---|
4367 | arg1 = (struct batch_status *)(argp1); |
---|
4368 | result = (char *) ((arg1)->text); |
---|
4369 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4370 | return resultobj; |
---|
4371 | fail: |
---|
4372 | return NULL; |
---|
4373 | } |
---|
4374 | |
---|
4375 | |
---|
4376 | SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4377 | PyObject *obj; |
---|
4378 | if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; |
---|
4379 | SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj)); |
---|
4380 | return SWIG_Py_Void(); |
---|
4381 | } |
---|
4382 | |
---|
4383 | SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) { |
---|
4384 | { |
---|
4385 | int val; |
---|
4386 | int res = SWIG_AsVal_int(_val, &val); |
---|
4387 | if (!SWIG_IsOK(res)) { |
---|
4388 | SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'"); |
---|
4389 | } |
---|
4390 | pbs_errno = (int)(val); |
---|
4391 | } |
---|
4392 | return 0; |
---|
4393 | fail: |
---|
4394 | return 1; |
---|
4395 | } |
---|
4396 | |
---|
4397 | |
---|
4398 | SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) { |
---|
4399 | PyObject *pyobj = 0; |
---|
4400 | |
---|
4401 | pyobj = SWIG_From_int((int)(pbs_errno)); |
---|
4402 | return pyobj; |
---|
4403 | } |
---|
4404 | |
---|
4405 | |
---|
4406 | SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) { |
---|
4407 | { |
---|
4408 | char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ; |
---|
4409 | int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc); |
---|
4410 | if (!SWIG_IsOK(res)) { |
---|
4411 | SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'"); |
---|
4412 | } |
---|
4413 | if (pbs_server) free((char*)pbs_server); |
---|
4414 | if (alloc == SWIG_NEWOBJ) { |
---|
4415 | pbs_server = cptr; |
---|
4416 | } else { |
---|
4417 | pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0; |
---|
4418 | } |
---|
4419 | } |
---|
4420 | return 0; |
---|
4421 | fail: |
---|
4422 | return 1; |
---|
4423 | } |
---|
4424 | |
---|
4425 | |
---|
4426 | SWIGINTERN PyObject *Swig_var_pbs_server_get(void) { |
---|
4427 | PyObject *pyobj = 0; |
---|
4428 | |
---|
4429 | pyobj = SWIG_FromCharPtr(pbs_server); |
---|
4430 | return pyobj; |
---|
4431 | } |
---|
4432 | |
---|
4433 | |
---|
4434 | SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4435 | PyObject *resultobj = 0; |
---|
4436 | int arg1 ; |
---|
4437 | char *arg2 = (char *) 0 ; |
---|
4438 | int val1 ; |
---|
4439 | int ecode1 = 0 ; |
---|
4440 | int res2 ; |
---|
4441 | char *buf2 = 0 ; |
---|
4442 | int alloc2 = 0 ; |
---|
4443 | PyObject * obj0 = 0 ; |
---|
4444 | PyObject * obj1 = 0 ; |
---|
4445 | char *result = 0 ; |
---|
4446 | |
---|
4447 | if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail; |
---|
4448 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4449 | if (!SWIG_IsOK(ecode1)) { |
---|
4450 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'"); |
---|
4451 | } |
---|
4452 | arg1 = (int)(val1); |
---|
4453 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4454 | if (!SWIG_IsOK(res2)) { |
---|
4455 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'"); |
---|
4456 | } |
---|
4457 | arg2 = (char *)(buf2); |
---|
4458 | result = (char *)avail(arg1,arg2); |
---|
4459 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4460 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4461 | return resultobj; |
---|
4462 | fail: |
---|
4463 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4464 | return NULL; |
---|
4465 | } |
---|
4466 | |
---|
4467 | |
---|
4468 | SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4469 | PyObject *resultobj = 0; |
---|
4470 | int arg1 ; |
---|
4471 | char *arg2 = (char *) 0 ; |
---|
4472 | char *arg3 = (char *) 0 ; |
---|
4473 | char *arg4 = (char *) 0 ; |
---|
4474 | int val1 ; |
---|
4475 | int ecode1 = 0 ; |
---|
4476 | int res2 ; |
---|
4477 | char *buf2 = 0 ; |
---|
4478 | int alloc2 = 0 ; |
---|
4479 | int res3 ; |
---|
4480 | char *buf3 = 0 ; |
---|
4481 | int alloc3 = 0 ; |
---|
4482 | int res4 ; |
---|
4483 | char *buf4 = 0 ; |
---|
4484 | int alloc4 = 0 ; |
---|
4485 | PyObject * obj0 = 0 ; |
---|
4486 | PyObject * obj1 = 0 ; |
---|
4487 | PyObject * obj2 = 0 ; |
---|
4488 | PyObject * obj3 = 0 ; |
---|
4489 | int result; |
---|
4490 | |
---|
4491 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
4492 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4493 | if (!SWIG_IsOK(ecode1)) { |
---|
4494 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'"); |
---|
4495 | } |
---|
4496 | arg1 = (int)(val1); |
---|
4497 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4498 | if (!SWIG_IsOK(res2)) { |
---|
4499 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'"); |
---|
4500 | } |
---|
4501 | arg2 = (char *)(buf2); |
---|
4502 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
4503 | if (!SWIG_IsOK(res3)) { |
---|
4504 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'"); |
---|
4505 | } |
---|
4506 | arg3 = (char *)(buf3); |
---|
4507 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
4508 | if (!SWIG_IsOK(res4)) { |
---|
4509 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'"); |
---|
4510 | } |
---|
4511 | arg4 = (char *)(buf4); |
---|
4512 | result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4); |
---|
4513 | resultobj = SWIG_From_int((int)(result)); |
---|
4514 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4515 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4516 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4517 | return resultobj; |
---|
4518 | fail: |
---|
4519 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4520 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4521 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4522 | return NULL; |
---|
4523 | } |
---|
4524 | |
---|
4525 | |
---|
4526 | SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4527 | PyObject *resultobj = 0; |
---|
4528 | int arg1 ; |
---|
4529 | char *arg2 = (char *) 0 ; |
---|
4530 | struct attrl *arg3 = (struct attrl *) 0 ; |
---|
4531 | char *arg4 = (char *) 0 ; |
---|
4532 | int val1 ; |
---|
4533 | int ecode1 = 0 ; |
---|
4534 | int res2 ; |
---|
4535 | char *buf2 = 0 ; |
---|
4536 | int alloc2 = 0 ; |
---|
4537 | int res4 ; |
---|
4538 | char *buf4 = 0 ; |
---|
4539 | int alloc4 = 0 ; |
---|
4540 | PyObject * obj0 = 0 ; |
---|
4541 | PyObject * obj1 = 0 ; |
---|
4542 | PyObject * obj2 = 0 ; |
---|
4543 | PyObject * obj3 = 0 ; |
---|
4544 | int result; |
---|
4545 | |
---|
4546 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
4547 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4548 | if (!SWIG_IsOK(ecode1)) { |
---|
4549 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'"); |
---|
4550 | } |
---|
4551 | arg1 = (int)(val1); |
---|
4552 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4553 | if (!SWIG_IsOK(res2)) { |
---|
4554 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'"); |
---|
4555 | } |
---|
4556 | arg2 = (char *)(buf2); |
---|
4557 | { |
---|
4558 | PyObject *py_obj; |
---|
4559 | struct attrl *ptr, *prev; |
---|
4560 | char s[255]; |
---|
4561 | int i=0, size=0; |
---|
4562 | |
---|
4563 | // printf("Python --> C\n"); |
---|
4564 | |
---|
4565 | if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n"); |
---|
4566 | |
---|
4567 | size = Get_List_Size(obj2); |
---|
4568 | if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size); |
---|
4569 | |
---|
4570 | if ( size == -1 ) { |
---|
4571 | PyErr_SetString(PyExc_TypeError, "not a list"); |
---|
4572 | return NULL; |
---|
4573 | } |
---|
4574 | |
---|
4575 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
4576 | |
---|
4577 | arg3 = prev = NULL; |
---|
4578 | for ( i=0; i < size; i++ ) { |
---|
4579 | py_obj = PyList_GetItem(obj2, i); |
---|
4580 | if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) { |
---|
4581 | sprintf(s,"list item %d has wrong type", i); |
---|
4582 | PyErr_SetString(PyExc_TypeError, s); |
---|
4583 | return NULL; |
---|
4584 | |
---|
4585 | // This will skipp the wrong entry |
---|
4586 | // continue; |
---|
4587 | } |
---|
4588 | |
---|
4589 | /* |
---|
4590 | * Make first entry head of C linked list |
---|
4591 | */ |
---|
4592 | if ( i == 0) { |
---|
4593 | arg3 = ptr; |
---|
4594 | ptr->next = prev; |
---|
4595 | } |
---|
4596 | else { |
---|
4597 | prev->next = ptr; |
---|
4598 | ptr->next = NULL; |
---|
4599 | } |
---|
4600 | if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); |
---|
4601 | |
---|
4602 | prev = ptr; |
---|
4603 | |
---|
4604 | } // end for |
---|
4605 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
4606 | } |
---|
4607 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
4608 | if (!SWIG_IsOK(res4)) { |
---|
4609 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'"); |
---|
4610 | } |
---|
4611 | arg4 = (char *)(buf4); |
---|
4612 | result = (int)pbs_alterjob(arg1,arg2,arg3,arg4); |
---|
4613 | resultobj = SWIG_From_int((int)(result)); |
---|
4614 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4615 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4616 | return resultobj; |
---|
4617 | fail: |
---|
4618 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4619 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4620 | return NULL; |
---|
4621 | } |
---|
4622 | |
---|
4623 | |
---|
4624 | SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4625 | PyObject *resultobj = 0; |
---|
4626 | char *arg1 = (char *) 0 ; |
---|
4627 | int res1 ; |
---|
4628 | char *buf1 = 0 ; |
---|
4629 | int alloc1 = 0 ; |
---|
4630 | PyObject * obj0 = 0 ; |
---|
4631 | int result; |
---|
4632 | |
---|
4633 | if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail; |
---|
4634 | res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); |
---|
4635 | if (!SWIG_IsOK(res1)) { |
---|
4636 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'"); |
---|
4637 | } |
---|
4638 | arg1 = (char *)(buf1); |
---|
4639 | result = (int)pbs_connect(arg1); |
---|
4640 | resultobj = SWIG_From_int((int)(result)); |
---|
4641 | if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); |
---|
4642 | return resultobj; |
---|
4643 | fail: |
---|
4644 | if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); |
---|
4645 | return NULL; |
---|
4646 | } |
---|
4647 | |
---|
4648 | |
---|
4649 | SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4650 | PyObject *resultobj = 0; |
---|
4651 | int result; |
---|
4652 | |
---|
4653 | if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail; |
---|
4654 | result = (int)pbs_query_max_connections(); |
---|
4655 | resultobj = SWIG_From_int((int)(result)); |
---|
4656 | return resultobj; |
---|
4657 | fail: |
---|
4658 | return NULL; |
---|
4659 | } |
---|
4660 | |
---|
4661 | |
---|
4662 | SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4663 | PyObject *resultobj = 0; |
---|
4664 | char *result = 0 ; |
---|
4665 | |
---|
4666 | if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail; |
---|
4667 | result = (char *)pbs_default(); |
---|
4668 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4669 | return resultobj; |
---|
4670 | fail: |
---|
4671 | return NULL; |
---|
4672 | } |
---|
4673 | |
---|
4674 | |
---|
4675 | SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4676 | PyObject *resultobj = 0; |
---|
4677 | int arg1 ; |
---|
4678 | char *arg2 = (char *) 0 ; |
---|
4679 | char *arg3 = (char *) 0 ; |
---|
4680 | int val1 ; |
---|
4681 | int ecode1 = 0 ; |
---|
4682 | int res2 ; |
---|
4683 | char *buf2 = 0 ; |
---|
4684 | int alloc2 = 0 ; |
---|
4685 | int res3 ; |
---|
4686 | char *buf3 = 0 ; |
---|
4687 | int alloc3 = 0 ; |
---|
4688 | PyObject * obj0 = 0 ; |
---|
4689 | PyObject * obj1 = 0 ; |
---|
4690 | PyObject * obj2 = 0 ; |
---|
4691 | int result; |
---|
4692 | |
---|
4693 | if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail; |
---|
4694 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4695 | if (!SWIG_IsOK(ecode1)) { |
---|
4696 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'"); |
---|
4697 | } |
---|
4698 | arg1 = (int)(val1); |
---|
4699 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4700 | if (!SWIG_IsOK(res2)) { |
---|
4701 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'"); |
---|
4702 | } |
---|
4703 | arg2 = (char *)(buf2); |
---|
4704 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
4705 | if (!SWIG_IsOK(res3)) { |
---|
4706 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'"); |
---|
4707 | } |
---|
4708 | arg3 = (char *)(buf3); |
---|
4709 | result = (int)pbs_deljob(arg1,arg2,arg3); |
---|
4710 | resultobj = SWIG_From_int((int)(result)); |
---|
4711 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4712 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4713 | return resultobj; |
---|
4714 | fail: |
---|
4715 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4716 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4717 | return NULL; |
---|
4718 | } |
---|
4719 | |
---|
4720 | |
---|
4721 | SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4722 | PyObject *resultobj = 0; |
---|
4723 | int arg1 ; |
---|
4724 | int val1 ; |
---|
4725 | int ecode1 = 0 ; |
---|
4726 | PyObject * obj0 = 0 ; |
---|
4727 | int result; |
---|
4728 | |
---|
4729 | if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail; |
---|
4730 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4731 | if (!SWIG_IsOK(ecode1)) { |
---|
4732 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'"); |
---|
4733 | } |
---|
4734 | arg1 = (int)(val1); |
---|
4735 | result = (int)pbs_disconnect(arg1); |
---|
4736 | resultobj = SWIG_From_int((int)(result)); |
---|
4737 | return resultobj; |
---|
4738 | fail: |
---|
4739 | return NULL; |
---|
4740 | } |
---|
4741 | |
---|
4742 | |
---|
4743 | SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4744 | PyObject *resultobj = 0; |
---|
4745 | int arg1 ; |
---|
4746 | int val1 ; |
---|
4747 | int ecode1 = 0 ; |
---|
4748 | PyObject * obj0 = 0 ; |
---|
4749 | char *result = 0 ; |
---|
4750 | |
---|
4751 | if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail; |
---|
4752 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4753 | if (!SWIG_IsOK(ecode1)) { |
---|
4754 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'"); |
---|
4755 | } |
---|
4756 | arg1 = (int)(val1); |
---|
4757 | result = (char *)pbs_geterrmsg(arg1); |
---|
4758 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4759 | return resultobj; |
---|
4760 | fail: |
---|
4761 | return NULL; |
---|
4762 | } |
---|
4763 | |
---|
4764 | |
---|
4765 | SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4766 | PyObject *resultobj = 0; |
---|
4767 | int arg1 ; |
---|
4768 | char *arg2 = (char *) 0 ; |
---|
4769 | char *arg3 = (char *) 0 ; |
---|
4770 | char *arg4 = (char *) 0 ; |
---|
4771 | int val1 ; |
---|
4772 | int ecode1 = 0 ; |
---|
4773 | int res2 ; |
---|
4774 | char *buf2 = 0 ; |
---|
4775 | int alloc2 = 0 ; |
---|
4776 | int res3 ; |
---|
4777 | char *buf3 = 0 ; |
---|
4778 | int alloc3 = 0 ; |
---|
4779 | int res4 ; |
---|
4780 | char *buf4 = 0 ; |
---|
4781 | int alloc4 = 0 ; |
---|
4782 | PyObject * obj0 = 0 ; |
---|
4783 | PyObject * obj1 = 0 ; |
---|
4784 | PyObject * obj2 = 0 ; |
---|
4785 | PyObject * obj3 = 0 ; |
---|
4786 | int result; |
---|
4787 | |
---|
4788 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
4789 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4790 | if (!SWIG_IsOK(ecode1)) { |
---|
4791 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'"); |
---|
4792 | } |
---|
4793 | arg1 = (int)(val1); |
---|
4794 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4795 | if (!SWIG_IsOK(res2)) { |
---|
4796 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'"); |
---|
4797 | } |
---|
4798 | arg2 = (char *)(buf2); |
---|
4799 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
4800 | if (!SWIG_IsOK(res3)) { |
---|
4801 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'"); |
---|
4802 | } |
---|
4803 | arg3 = (char *)(buf3); |
---|
4804 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
4805 | if (!SWIG_IsOK(res4)) { |
---|
4806 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'"); |
---|
4807 | } |
---|
4808 | arg4 = (char *)(buf4); |
---|
4809 | result = (int)pbs_holdjob(arg1,arg2,arg3,arg4); |
---|
4810 | resultobj = SWIG_From_int((int)(result)); |
---|
4811 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4812 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4813 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4814 | return resultobj; |
---|
4815 | fail: |
---|
4816 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4817 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4818 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4819 | return NULL; |
---|
4820 | } |
---|
4821 | |
---|
4822 | |
---|
4823 | SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4824 | PyObject *resultobj = 0; |
---|
4825 | int arg1 ; |
---|
4826 | char *arg2 = (char *) 0 ; |
---|
4827 | char *arg3 = (char *) 0 ; |
---|
4828 | int val1 ; |
---|
4829 | int ecode1 = 0 ; |
---|
4830 | int res2 ; |
---|
4831 | char *buf2 = 0 ; |
---|
4832 | int alloc2 = 0 ; |
---|
4833 | int res3 ; |
---|
4834 | char *buf3 = 0 ; |
---|
4835 | int alloc3 = 0 ; |
---|
4836 | PyObject * obj0 = 0 ; |
---|
4837 | PyObject * obj1 = 0 ; |
---|
4838 | PyObject * obj2 = 0 ; |
---|
4839 | char *result = 0 ; |
---|
4840 | |
---|
4841 | if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail; |
---|
4842 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4843 | if (!SWIG_IsOK(ecode1)) { |
---|
4844 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'"); |
---|
4845 | } |
---|
4846 | arg1 = (int)(val1); |
---|
4847 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
4848 | if (!SWIG_IsOK(res2)) { |
---|
4849 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'"); |
---|
4850 | } |
---|
4851 | arg2 = (char *)(buf2); |
---|
4852 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
4853 | if (!SWIG_IsOK(res3)) { |
---|
4854 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'"); |
---|
4855 | } |
---|
4856 | arg3 = (char *)(buf3); |
---|
4857 | result = (char *)pbs_locjob(arg1,arg2,arg3); |
---|
4858 | resultobj = SWIG_FromCharPtr((const char *)result); |
---|
4859 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4860 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4861 | return resultobj; |
---|
4862 | fail: |
---|
4863 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
4864 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
4865 | return NULL; |
---|
4866 | } |
---|
4867 | |
---|
4868 | |
---|
4869 | SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4870 | PyObject *resultobj = 0; |
---|
4871 | int arg1 ; |
---|
4872 | int arg2 ; |
---|
4873 | int arg3 ; |
---|
4874 | char *arg4 = (char *) 0 ; |
---|
4875 | struct attropl *arg5 = (struct attropl *) 0 ; |
---|
4876 | char *arg6 = (char *) 0 ; |
---|
4877 | int val1 ; |
---|
4878 | int ecode1 = 0 ; |
---|
4879 | int val2 ; |
---|
4880 | int ecode2 = 0 ; |
---|
4881 | int val3 ; |
---|
4882 | int ecode3 = 0 ; |
---|
4883 | int res4 ; |
---|
4884 | char *buf4 = 0 ; |
---|
4885 | int alloc4 = 0 ; |
---|
4886 | int res6 ; |
---|
4887 | char *buf6 = 0 ; |
---|
4888 | int alloc6 = 0 ; |
---|
4889 | PyObject * obj0 = 0 ; |
---|
4890 | PyObject * obj1 = 0 ; |
---|
4891 | PyObject * obj2 = 0 ; |
---|
4892 | PyObject * obj3 = 0 ; |
---|
4893 | PyObject * obj4 = 0 ; |
---|
4894 | PyObject * obj5 = 0 ; |
---|
4895 | int result; |
---|
4896 | |
---|
4897 | if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; |
---|
4898 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
4899 | if (!SWIG_IsOK(ecode1)) { |
---|
4900 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'"); |
---|
4901 | } |
---|
4902 | arg1 = (int)(val1); |
---|
4903 | ecode2 = SWIG_AsVal_int(obj1, &val2); |
---|
4904 | if (!SWIG_IsOK(ecode2)) { |
---|
4905 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'"); |
---|
4906 | } |
---|
4907 | arg2 = (int)(val2); |
---|
4908 | ecode3 = SWIG_AsVal_int(obj2, &val3); |
---|
4909 | if (!SWIG_IsOK(ecode3)) { |
---|
4910 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'"); |
---|
4911 | } |
---|
4912 | arg3 = (int)(val3); |
---|
4913 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
4914 | if (!SWIG_IsOK(res4)) { |
---|
4915 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'"); |
---|
4916 | } |
---|
4917 | arg4 = (char *)(buf4); |
---|
4918 | { |
---|
4919 | PyObject *py_obj; |
---|
4920 | struct attropl *ptr, *prev; |
---|
4921 | char s[255]; |
---|
4922 | int i=0, size=0; |
---|
4923 | |
---|
4924 | // printf("Python --> C\n"); |
---|
4925 | |
---|
4926 | if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); |
---|
4927 | |
---|
4928 | size = Get_List_Size(obj4); |
---|
4929 | |
---|
4930 | if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size); |
---|
4931 | |
---|
4932 | if ( size == -1 ) { |
---|
4933 | PyErr_SetString(PyExc_TypeError, "not a list"); |
---|
4934 | return NULL; |
---|
4935 | } |
---|
4936 | //printf("Size = %d\n", size); |
---|
4937 | |
---|
4938 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
4939 | |
---|
4940 | arg5 = prev = NULL; |
---|
4941 | for ( i=0; i < size; i++ ) { |
---|
4942 | py_obj = PyList_GetItem(obj4, i); |
---|
4943 | if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { |
---|
4944 | sprintf(s,"list item %d has wrong type", i); |
---|
4945 | PyErr_SetString(PyExc_TypeError, s); |
---|
4946 | return NULL; |
---|
4947 | |
---|
4948 | // This will skipp the wrong entry |
---|
4949 | // continue; |
---|
4950 | } |
---|
4951 | |
---|
4952 | /* |
---|
4953 | * Make first entry head of C linked list |
---|
4954 | */ |
---|
4955 | if ( i == 0) { |
---|
4956 | arg5 = ptr; |
---|
4957 | ptr->next = prev; |
---|
4958 | } |
---|
4959 | else { |
---|
4960 | prev->next = ptr; |
---|
4961 | ptr->next = NULL; |
---|
4962 | } |
---|
4963 | prev = ptr; |
---|
4964 | |
---|
4965 | } // end for |
---|
4966 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
4967 | } |
---|
4968 | res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); |
---|
4969 | if (!SWIG_IsOK(res6)) { |
---|
4970 | SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'"); |
---|
4971 | } |
---|
4972 | arg6 = (char *)(buf6); |
---|
4973 | result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6); |
---|
4974 | resultobj = SWIG_From_int((int)(result)); |
---|
4975 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4976 | if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); |
---|
4977 | return resultobj; |
---|
4978 | fail: |
---|
4979 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
4980 | if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); |
---|
4981 | return NULL; |
---|
4982 | } |
---|
4983 | |
---|
4984 | |
---|
4985 | SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
4986 | PyObject *resultobj = 0; |
---|
4987 | int arg1 ; |
---|
4988 | char *arg2 = (char *) 0 ; |
---|
4989 | char *arg3 = (char *) 0 ; |
---|
4990 | char *arg4 = (char *) 0 ; |
---|
4991 | int val1 ; |
---|
4992 | int ecode1 = 0 ; |
---|
4993 | int res2 ; |
---|
4994 | char *buf2 = 0 ; |
---|
4995 | int alloc2 = 0 ; |
---|
4996 | int res3 ; |
---|
4997 | char *buf3 = 0 ; |
---|
4998 | int alloc3 = 0 ; |
---|
4999 | int res4 ; |
---|
5000 | char *buf4 = 0 ; |
---|
5001 | int alloc4 = 0 ; |
---|
5002 | PyObject * obj0 = 0 ; |
---|
5003 | PyObject * obj1 = 0 ; |
---|
5004 | PyObject * obj2 = 0 ; |
---|
5005 | PyObject * obj3 = 0 ; |
---|
5006 | int result; |
---|
5007 | |
---|
5008 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5009 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5010 | if (!SWIG_IsOK(ecode1)) { |
---|
5011 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'"); |
---|
5012 | } |
---|
5013 | arg1 = (int)(val1); |
---|
5014 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5015 | if (!SWIG_IsOK(res2)) { |
---|
5016 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'"); |
---|
5017 | } |
---|
5018 | arg2 = (char *)(buf2); |
---|
5019 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5020 | if (!SWIG_IsOK(res3)) { |
---|
5021 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'"); |
---|
5022 | } |
---|
5023 | arg3 = (char *)(buf3); |
---|
5024 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5025 | if (!SWIG_IsOK(res4)) { |
---|
5026 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'"); |
---|
5027 | } |
---|
5028 | arg4 = (char *)(buf4); |
---|
5029 | result = (int)pbs_movejob(arg1,arg2,arg3,arg4); |
---|
5030 | resultobj = SWIG_From_int((int)(result)); |
---|
5031 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5032 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5033 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5034 | return resultobj; |
---|
5035 | fail: |
---|
5036 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5037 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5038 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5039 | return NULL; |
---|
5040 | } |
---|
5041 | |
---|
5042 | |
---|
5043 | SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5044 | PyObject *resultobj = 0; |
---|
5045 | int arg1 ; |
---|
5046 | char *arg2 = (char *) 0 ; |
---|
5047 | int arg3 ; |
---|
5048 | char *arg4 = (char *) 0 ; |
---|
5049 | char *arg5 = (char *) 0 ; |
---|
5050 | int val1 ; |
---|
5051 | int ecode1 = 0 ; |
---|
5052 | int res2 ; |
---|
5053 | char *buf2 = 0 ; |
---|
5054 | int alloc2 = 0 ; |
---|
5055 | int val3 ; |
---|
5056 | int ecode3 = 0 ; |
---|
5057 | int res4 ; |
---|
5058 | char *buf4 = 0 ; |
---|
5059 | int alloc4 = 0 ; |
---|
5060 | int res5 ; |
---|
5061 | char *buf5 = 0 ; |
---|
5062 | int alloc5 = 0 ; |
---|
5063 | PyObject * obj0 = 0 ; |
---|
5064 | PyObject * obj1 = 0 ; |
---|
5065 | PyObject * obj2 = 0 ; |
---|
5066 | PyObject * obj3 = 0 ; |
---|
5067 | PyObject * obj4 = 0 ; |
---|
5068 | int result; |
---|
5069 | |
---|
5070 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; |
---|
5071 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5072 | if (!SWIG_IsOK(ecode1)) { |
---|
5073 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'"); |
---|
5074 | } |
---|
5075 | arg1 = (int)(val1); |
---|
5076 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5077 | if (!SWIG_IsOK(res2)) { |
---|
5078 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'"); |
---|
5079 | } |
---|
5080 | arg2 = (char *)(buf2); |
---|
5081 | ecode3 = SWIG_AsVal_int(obj2, &val3); |
---|
5082 | if (!SWIG_IsOK(ecode3)) { |
---|
5083 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'"); |
---|
5084 | } |
---|
5085 | arg3 = (int)(val3); |
---|
5086 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5087 | if (!SWIG_IsOK(res4)) { |
---|
5088 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'"); |
---|
5089 | } |
---|
5090 | arg4 = (char *)(buf4); |
---|
5091 | res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); |
---|
5092 | if (!SWIG_IsOK(res5)) { |
---|
5093 | SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'"); |
---|
5094 | } |
---|
5095 | arg5 = (char *)(buf5); |
---|
5096 | result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5); |
---|
5097 | resultobj = SWIG_From_int((int)(result)); |
---|
5098 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5099 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5100 | if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); |
---|
5101 | return resultobj; |
---|
5102 | fail: |
---|
5103 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5104 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5105 | if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); |
---|
5106 | return NULL; |
---|
5107 | } |
---|
5108 | |
---|
5109 | |
---|
5110 | SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5111 | PyObject *resultobj = 0; |
---|
5112 | int arg1 ; |
---|
5113 | char *arg2 = (char *) 0 ; |
---|
5114 | char *arg3 = (char *) 0 ; |
---|
5115 | char *arg4 = (char *) 0 ; |
---|
5116 | int val1 ; |
---|
5117 | int ecode1 = 0 ; |
---|
5118 | int res2 ; |
---|
5119 | char *buf2 = 0 ; |
---|
5120 | int alloc2 = 0 ; |
---|
5121 | int res3 ; |
---|
5122 | char *buf3 = 0 ; |
---|
5123 | int alloc3 = 0 ; |
---|
5124 | int res4 ; |
---|
5125 | char *buf4 = 0 ; |
---|
5126 | int alloc4 = 0 ; |
---|
5127 | PyObject * obj0 = 0 ; |
---|
5128 | PyObject * obj1 = 0 ; |
---|
5129 | PyObject * obj2 = 0 ; |
---|
5130 | PyObject * obj3 = 0 ; |
---|
5131 | int result; |
---|
5132 | |
---|
5133 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5134 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5135 | if (!SWIG_IsOK(ecode1)) { |
---|
5136 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'"); |
---|
5137 | } |
---|
5138 | arg1 = (int)(val1); |
---|
5139 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5140 | if (!SWIG_IsOK(res2)) { |
---|
5141 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'"); |
---|
5142 | } |
---|
5143 | arg2 = (char *)(buf2); |
---|
5144 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5145 | if (!SWIG_IsOK(res3)) { |
---|
5146 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'"); |
---|
5147 | } |
---|
5148 | arg3 = (char *)(buf3); |
---|
5149 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5150 | if (!SWIG_IsOK(res4)) { |
---|
5151 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'"); |
---|
5152 | } |
---|
5153 | arg4 = (char *)(buf4); |
---|
5154 | result = (int)pbs_orderjob(arg1,arg2,arg3,arg4); |
---|
5155 | resultobj = SWIG_From_int((int)(result)); |
---|
5156 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5157 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5158 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5159 | return resultobj; |
---|
5160 | fail: |
---|
5161 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5162 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5163 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5164 | return NULL; |
---|
5165 | } |
---|
5166 | |
---|
5167 | |
---|
5168 | SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5169 | PyObject *resultobj = 0; |
---|
5170 | int arg1 ; |
---|
5171 | char **arg2 = (char **) 0 ; |
---|
5172 | int arg3 ; |
---|
5173 | int *arg4 = (int *) 0 ; |
---|
5174 | int *arg5 = (int *) 0 ; |
---|
5175 | int *arg6 = (int *) 0 ; |
---|
5176 | int *arg7 = (int *) 0 ; |
---|
5177 | int val1 ; |
---|
5178 | int ecode1 = 0 ; |
---|
5179 | int val3 ; |
---|
5180 | int ecode3 = 0 ; |
---|
5181 | void *argp4 = 0 ; |
---|
5182 | int res4 = 0 ; |
---|
5183 | void *argp5 = 0 ; |
---|
5184 | int res5 = 0 ; |
---|
5185 | void *argp6 = 0 ; |
---|
5186 | int res6 = 0 ; |
---|
5187 | void *argp7 = 0 ; |
---|
5188 | int res7 = 0 ; |
---|
5189 | PyObject * obj0 = 0 ; |
---|
5190 | PyObject * obj1 = 0 ; |
---|
5191 | PyObject * obj2 = 0 ; |
---|
5192 | PyObject * obj3 = 0 ; |
---|
5193 | PyObject * obj4 = 0 ; |
---|
5194 | PyObject * obj5 = 0 ; |
---|
5195 | PyObject * obj6 = 0 ; |
---|
5196 | int result; |
---|
5197 | |
---|
5198 | if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; |
---|
5199 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5200 | if (!SWIG_IsOK(ecode1)) { |
---|
5201 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'"); |
---|
5202 | } |
---|
5203 | arg1 = (int)(val1); |
---|
5204 | { |
---|
5205 | int i=0, size=0; |
---|
5206 | PyObject *py_obj; |
---|
5207 | |
---|
5208 | if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); |
---|
5209 | |
---|
5210 | size = Get_List_Size(obj1); |
---|
5211 | |
---|
5212 | if (SARA_DEBUG) printf("\tSize of List: %d\n", size); |
---|
5213 | |
---|
5214 | if ( size == -1 ) { |
---|
5215 | PyErr_SetString(PyExc_TypeError, "not a list"); |
---|
5216 | return NULL; |
---|
5217 | } |
---|
5218 | // printf("Size = %d\n", size); |
---|
5219 | |
---|
5220 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
5221 | |
---|
5222 | arg2 = (char **) malloc( (size+1) * sizeof(char *)); |
---|
5223 | for (i=0; i < size; i++) { |
---|
5224 | py_obj = PyList_GetItem(obj1, i); |
---|
5225 | if (PyString_Check(py_obj)) { |
---|
5226 | arg2[i] = PyString_AsString(py_obj); |
---|
5227 | if (SARA_DEBUG) printf("%s", arg2[i]); |
---|
5228 | } |
---|
5229 | else { |
---|
5230 | PyErr_SetString(PyExc_TypeError, "not a list of strings"); |
---|
5231 | free(arg2); |
---|
5232 | return NULL; |
---|
5233 | } |
---|
5234 | } // end for |
---|
5235 | arg2[i] = 0; |
---|
5236 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
5237 | } |
---|
5238 | ecode3 = SWIG_AsVal_int(obj2, &val3); |
---|
5239 | if (!SWIG_IsOK(ecode3)) { |
---|
5240 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'"); |
---|
5241 | } |
---|
5242 | arg3 = (int)(val3); |
---|
5243 | res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 ); |
---|
5244 | if (!SWIG_IsOK(res4)) { |
---|
5245 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescquery" "', argument " "4"" of type '" "int *""'"); |
---|
5246 | } |
---|
5247 | arg4 = (int *)(argp4); |
---|
5248 | res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 ); |
---|
5249 | if (!SWIG_IsOK(res5)) { |
---|
5250 | SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_rescquery" "', argument " "5"" of type '" "int *""'"); |
---|
5251 | } |
---|
5252 | arg5 = (int *)(argp5); |
---|
5253 | res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 ); |
---|
5254 | if (!SWIG_IsOK(res6)) { |
---|
5255 | SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_rescquery" "', argument " "6"" of type '" "int *""'"); |
---|
5256 | } |
---|
5257 | arg6 = (int *)(argp6); |
---|
5258 | res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 ); |
---|
5259 | if (!SWIG_IsOK(res7)) { |
---|
5260 | SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_rescquery" "', argument " "7"" of type '" "int *""'"); |
---|
5261 | } |
---|
5262 | arg7 = (int *)(argp7); |
---|
5263 | result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7); |
---|
5264 | resultobj = SWIG_From_int((int)(result)); |
---|
5265 | { |
---|
5266 | free( (char *) arg2); |
---|
5267 | } |
---|
5268 | return resultobj; |
---|
5269 | fail: |
---|
5270 | { |
---|
5271 | free( (char *) arg2); |
---|
5272 | } |
---|
5273 | return NULL; |
---|
5274 | } |
---|
5275 | |
---|
5276 | |
---|
5277 | SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5278 | PyObject *resultobj = 0; |
---|
5279 | int arg1 ; |
---|
5280 | char **arg2 = (char **) 0 ; |
---|
5281 | int arg3 ; |
---|
5282 | resource_t *arg4 = (resource_t *) 0 ; |
---|
5283 | int val1 ; |
---|
5284 | int ecode1 = 0 ; |
---|
5285 | int val3 ; |
---|
5286 | int ecode3 = 0 ; |
---|
5287 | void *argp4 = 0 ; |
---|
5288 | int res4 = 0 ; |
---|
5289 | PyObject * obj0 = 0 ; |
---|
5290 | PyObject * obj1 = 0 ; |
---|
5291 | PyObject * obj2 = 0 ; |
---|
5292 | PyObject * obj3 = 0 ; |
---|
5293 | int result; |
---|
5294 | |
---|
5295 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5296 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5297 | if (!SWIG_IsOK(ecode1)) { |
---|
5298 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'"); |
---|
5299 | } |
---|
5300 | arg1 = (int)(val1); |
---|
5301 | { |
---|
5302 | int i=0, size=0; |
---|
5303 | PyObject *py_obj; |
---|
5304 | |
---|
5305 | if (SARA_DEBUG) printf("Convert python -> c (char **):\n"); |
---|
5306 | |
---|
5307 | size = Get_List_Size(obj1); |
---|
5308 | |
---|
5309 | if (SARA_DEBUG) printf("\tSize of List: %d\n", size); |
---|
5310 | |
---|
5311 | if ( size == -1 ) { |
---|
5312 | PyErr_SetString(PyExc_TypeError, "not a list"); |
---|
5313 | return NULL; |
---|
5314 | } |
---|
5315 | // printf("Size = %d\n", size); |
---|
5316 | |
---|
5317 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
5318 | |
---|
5319 | arg2 = (char **) malloc( (size+1) * sizeof(char *)); |
---|
5320 | for (i=0; i < size; i++) { |
---|
5321 | py_obj = PyList_GetItem(obj1, i); |
---|
5322 | if (PyString_Check(py_obj)) { |
---|
5323 | arg2[i] = PyString_AsString(py_obj); |
---|
5324 | if (SARA_DEBUG) printf("%s", arg2[i]); |
---|
5325 | } |
---|
5326 | else { |
---|
5327 | PyErr_SetString(PyExc_TypeError, "not a list of strings"); |
---|
5328 | free(arg2); |
---|
5329 | return NULL; |
---|
5330 | } |
---|
5331 | } // end for |
---|
5332 | arg2[i] = 0; |
---|
5333 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
5334 | } |
---|
5335 | ecode3 = SWIG_AsVal_int(obj2, &val3); |
---|
5336 | if (!SWIG_IsOK(ecode3)) { |
---|
5337 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'"); |
---|
5338 | } |
---|
5339 | arg3 = (int)(val3); |
---|
5340 | res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 ); |
---|
5341 | if (!SWIG_IsOK(res4)) { |
---|
5342 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescreserve" "', argument " "4"" of type '" "resource_t *""'"); |
---|
5343 | } |
---|
5344 | arg4 = (resource_t *)(argp4); |
---|
5345 | result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4); |
---|
5346 | resultobj = SWIG_From_int((int)(result)); |
---|
5347 | { |
---|
5348 | free( (char *) arg2); |
---|
5349 | } |
---|
5350 | return resultobj; |
---|
5351 | fail: |
---|
5352 | { |
---|
5353 | free( (char *) arg2); |
---|
5354 | } |
---|
5355 | return NULL; |
---|
5356 | } |
---|
5357 | |
---|
5358 | |
---|
5359 | SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5360 | PyObject *resultobj = 0; |
---|
5361 | int arg1 ; |
---|
5362 | resource_t arg2 ; |
---|
5363 | int val1 ; |
---|
5364 | int ecode1 = 0 ; |
---|
5365 | int val2 ; |
---|
5366 | int ecode2 = 0 ; |
---|
5367 | PyObject * obj0 = 0 ; |
---|
5368 | PyObject * obj1 = 0 ; |
---|
5369 | int result; |
---|
5370 | |
---|
5371 | if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail; |
---|
5372 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5373 | if (!SWIG_IsOK(ecode1)) { |
---|
5374 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'"); |
---|
5375 | } |
---|
5376 | arg1 = (int)(val1); |
---|
5377 | ecode2 = SWIG_AsVal_int(obj1, &val2); |
---|
5378 | if (!SWIG_IsOK(ecode2)) { |
---|
5379 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "resource_t""'"); |
---|
5380 | } |
---|
5381 | arg2 = (resource_t)(val2); |
---|
5382 | result = (int)pbs_rescrelease(arg1,arg2); |
---|
5383 | resultobj = SWIG_From_int((int)(result)); |
---|
5384 | return resultobj; |
---|
5385 | fail: |
---|
5386 | return NULL; |
---|
5387 | } |
---|
5388 | |
---|
5389 | |
---|
5390 | SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5391 | PyObject *resultobj = 0; |
---|
5392 | int arg1 ; |
---|
5393 | char *arg2 = (char *) 0 ; |
---|
5394 | char *arg3 = (char *) 0 ; |
---|
5395 | int val1 ; |
---|
5396 | int ecode1 = 0 ; |
---|
5397 | int res2 ; |
---|
5398 | char *buf2 = 0 ; |
---|
5399 | int alloc2 = 0 ; |
---|
5400 | int res3 ; |
---|
5401 | char *buf3 = 0 ; |
---|
5402 | int alloc3 = 0 ; |
---|
5403 | PyObject * obj0 = 0 ; |
---|
5404 | PyObject * obj1 = 0 ; |
---|
5405 | PyObject * obj2 = 0 ; |
---|
5406 | int result; |
---|
5407 | |
---|
5408 | if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail; |
---|
5409 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5410 | if (!SWIG_IsOK(ecode1)) { |
---|
5411 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'"); |
---|
5412 | } |
---|
5413 | arg1 = (int)(val1); |
---|
5414 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5415 | if (!SWIG_IsOK(res2)) { |
---|
5416 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'"); |
---|
5417 | } |
---|
5418 | arg2 = (char *)(buf2); |
---|
5419 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5420 | if (!SWIG_IsOK(res3)) { |
---|
5421 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'"); |
---|
5422 | } |
---|
5423 | arg3 = (char *)(buf3); |
---|
5424 | result = (int)pbs_rerunjob(arg1,arg2,arg3); |
---|
5425 | resultobj = SWIG_From_int((int)(result)); |
---|
5426 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5427 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5428 | return resultobj; |
---|
5429 | fail: |
---|
5430 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5431 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5432 | return NULL; |
---|
5433 | } |
---|
5434 | |
---|
5435 | |
---|
5436 | SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5437 | PyObject *resultobj = 0; |
---|
5438 | int arg1 ; |
---|
5439 | char *arg2 = (char *) 0 ; |
---|
5440 | char *arg3 = (char *) 0 ; |
---|
5441 | char *arg4 = (char *) 0 ; |
---|
5442 | int val1 ; |
---|
5443 | int ecode1 = 0 ; |
---|
5444 | int res2 ; |
---|
5445 | char *buf2 = 0 ; |
---|
5446 | int alloc2 = 0 ; |
---|
5447 | int res3 ; |
---|
5448 | char *buf3 = 0 ; |
---|
5449 | int alloc3 = 0 ; |
---|
5450 | int res4 ; |
---|
5451 | char *buf4 = 0 ; |
---|
5452 | int alloc4 = 0 ; |
---|
5453 | PyObject * obj0 = 0 ; |
---|
5454 | PyObject * obj1 = 0 ; |
---|
5455 | PyObject * obj2 = 0 ; |
---|
5456 | PyObject * obj3 = 0 ; |
---|
5457 | int result; |
---|
5458 | |
---|
5459 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5460 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5461 | if (!SWIG_IsOK(ecode1)) { |
---|
5462 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'"); |
---|
5463 | } |
---|
5464 | arg1 = (int)(val1); |
---|
5465 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5466 | if (!SWIG_IsOK(res2)) { |
---|
5467 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'"); |
---|
5468 | } |
---|
5469 | arg2 = (char *)(buf2); |
---|
5470 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5471 | if (!SWIG_IsOK(res3)) { |
---|
5472 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'"); |
---|
5473 | } |
---|
5474 | arg3 = (char *)(buf3); |
---|
5475 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5476 | if (!SWIG_IsOK(res4)) { |
---|
5477 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'"); |
---|
5478 | } |
---|
5479 | arg4 = (char *)(buf4); |
---|
5480 | result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4); |
---|
5481 | resultobj = SWIG_From_int((int)(result)); |
---|
5482 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5483 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5484 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5485 | return resultobj; |
---|
5486 | fail: |
---|
5487 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5488 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5489 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5490 | return NULL; |
---|
5491 | } |
---|
5492 | |
---|
5493 | |
---|
5494 | SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5495 | PyObject *resultobj = 0; |
---|
5496 | int arg1 ; |
---|
5497 | char *arg2 = (char *) 0 ; |
---|
5498 | char *arg3 = (char *) 0 ; |
---|
5499 | char *arg4 = (char *) 0 ; |
---|
5500 | int val1 ; |
---|
5501 | int ecode1 = 0 ; |
---|
5502 | int res2 ; |
---|
5503 | char *buf2 = 0 ; |
---|
5504 | int alloc2 = 0 ; |
---|
5505 | int res3 ; |
---|
5506 | char *buf3 = 0 ; |
---|
5507 | int alloc3 = 0 ; |
---|
5508 | int res4 ; |
---|
5509 | char *buf4 = 0 ; |
---|
5510 | int alloc4 = 0 ; |
---|
5511 | PyObject * obj0 = 0 ; |
---|
5512 | PyObject * obj1 = 0 ; |
---|
5513 | PyObject * obj2 = 0 ; |
---|
5514 | PyObject * obj3 = 0 ; |
---|
5515 | int result; |
---|
5516 | |
---|
5517 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5518 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5519 | if (!SWIG_IsOK(ecode1)) { |
---|
5520 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'"); |
---|
5521 | } |
---|
5522 | arg1 = (int)(val1); |
---|
5523 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5524 | if (!SWIG_IsOK(res2)) { |
---|
5525 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'"); |
---|
5526 | } |
---|
5527 | arg2 = (char *)(buf2); |
---|
5528 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5529 | if (!SWIG_IsOK(res3)) { |
---|
5530 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_runjob" "', argument " "3"" of type '" "char *""'"); |
---|
5531 | } |
---|
5532 | arg3 = (char *)(buf3); |
---|
5533 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5534 | if (!SWIG_IsOK(res4)) { |
---|
5535 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_runjob" "', argument " "4"" of type '" "char *""'"); |
---|
5536 | } |
---|
5537 | arg4 = (char *)(buf4); |
---|
5538 | result = (int)pbs_runjob(arg1,arg2,arg3,arg4); |
---|
5539 | resultobj = SWIG_From_int((int)(result)); |
---|
5540 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5541 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5542 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5543 | return resultobj; |
---|
5544 | fail: |
---|
5545 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5546 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5547 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5548 | return NULL; |
---|
5549 | } |
---|
5550 | |
---|
5551 | |
---|
5552 | SWIGINTERN PyObject *_wrap_pbs_selectjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5553 | PyObject *resultobj = 0; |
---|
5554 | int arg1 ; |
---|
5555 | struct attropl *arg2 = (struct attropl *) 0 ; |
---|
5556 | char *arg3 = (char *) 0 ; |
---|
5557 | int val1 ; |
---|
5558 | int ecode1 = 0 ; |
---|
5559 | int res3 ; |
---|
5560 | char *buf3 = 0 ; |
---|
5561 | int alloc3 = 0 ; |
---|
5562 | PyObject * obj0 = 0 ; |
---|
5563 | PyObject * obj1 = 0 ; |
---|
5564 | PyObject * obj2 = 0 ; |
---|
5565 | char **result = 0 ; |
---|
5566 | |
---|
5567 | if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) SWIG_fail; |
---|
5568 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5569 | if (!SWIG_IsOK(ecode1)) { |
---|
5570 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selectjob" "', argument " "1"" of type '" "int""'"); |
---|
5571 | } |
---|
5572 | arg1 = (int)(val1); |
---|
5573 | { |
---|
5574 | PyObject *py_obj; |
---|
5575 | struct attropl *ptr, *prev; |
---|
5576 | char s[255]; |
---|
5577 | int i=0, size=0; |
---|
5578 | |
---|
5579 | // printf("Python --> C\n"); |
---|
5580 | |
---|
5581 | if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); |
---|
5582 | |
---|
5583 | size = Get_List_Size(obj1); |
---|
5584 | |
---|
5585 | if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size); |
---|
5586 | |
---|
5587 | if ( size == -1 ) { |
---|
5588 | PyErr_SetString(PyExc_TypeError, "not a list"); |
---|
5589 | return NULL; |
---|
5590 | } |
---|
5591 | //printf("Size = %d\n", size); |
---|
5592 | |
---|
5593 | if (SARA_DEBUG) printf("\t<Contents>\n"); |
---|
5594 | |
---|
5595 | arg2 = prev = NULL; |
---|
5596 | for ( i=0; i < size; i++ ) { |
---|
5597 | py_obj = PyList_GetItem(obj1, i); |
---|
5598 | if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { |
---|
5599 | sprintf(s,"list item %d has wrong type", i); |
---|
5600 | PyErr_SetString(PyExc_TypeError, s); |
---|
5601 | return NULL; |
---|
5602 | |
---|
5603 | // This will skipp the wrong entry |
---|
5604 | // continue; |
---|
5605 | } |
---|
5606 | |
---|
5607 | /* |
---|
5608 | * Make first entry head of C linked list |
---|
5609 | */ |
---|
5610 | if ( i == 0) { |
---|
5611 | arg2 = ptr; |
---|
5612 | ptr->next = prev; |
---|
5613 | } |
---|
5614 | else { |
---|
5615 | prev->next = ptr; |
---|
5616 | ptr->next = NULL; |
---|
5617 | } |
---|
5618 | prev = ptr; |
---|
5619 | |
---|
5620 | } // end for |
---|
5621 | if (SARA_DEBUG) printf("\t</Contents>\n"); |
---|
5622 | } |
---|
5623 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5624 | if (!SWIG_IsOK(res3)) { |
---|
5625 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selectjob" "', argument " "3"" of type '" "char *""'"); |
---|
5626 | } |
---|
5627 | arg3 = (char *)(buf3); |
---|
5628 | result = (char **)pbs_selectjob(arg1,arg2,arg3); |
---|
5629 | { |
---|
5630 | int len=0, i; |
---|
5631 | |
---|
5632 | if (SARA_DEBUG) |
---|
5633 | printf("Converteren char ** -> python list\n"); |
---|
5634 | |
---|
5635 | |
---|
5636 | if (result == NULL) |
---|
5637 | resultobj = PyList_New(0); |
---|
5638 | else { |
---|
5639 | while (result[len]) |
---|
5640 | len++; |
---|
5641 | } |
---|
5642 | |
---|
5643 | if (SARA_DEBUG) |
---|
5644 | printf("\tSize of List: %d\n", len); |
---|
5645 | |
---|
5646 | resultobj = PyList_New(len); |
---|
5647 | if (SARA_DEBUG) |
---|
5648 | printf("\t<Contents>\n"); |
---|
5649 | for (i=0; i < len; i++ ) { |
---|
5650 | PyList_SetItem(resultobj, i , PyString_FromString(result[i])); |
---|
5651 | if (SARA_DEBUG) |
---|
5652 | printf("\t\t- %s\n", result[i]); |
---|
5653 | } |
---|
5654 | if (SARA_DEBUG) |
---|
5655 | printf("\t</Contents>\n"); |
---|
5656 | } |
---|
5657 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5658 | return resultobj; |
---|
5659 | fail: |
---|
5660 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5661 | return NULL; |
---|
5662 | } |
---|
5663 | |
---|
5664 | |
---|
5665 | SWIGINTERN PyObject *_wrap_pbs_sigjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5666 | PyObject *resultobj = 0; |
---|
5667 | int arg1 ; |
---|
5668 | char *arg2 = (char *) 0 ; |
---|
5669 | char *arg3 = (char *) 0 ; |
---|
5670 | char *arg4 = (char *) 0 ; |
---|
5671 | int val1 ; |
---|
5672 | int ecode1 = 0 ; |
---|
5673 | int res2 ; |
---|
5674 | char *buf2 = 0 ; |
---|
5675 | int alloc2 = 0 ; |
---|
5676 | int res3 ; |
---|
5677 | char *buf3 = 0 ; |
---|
5678 | int alloc3 = 0 ; |
---|
5679 | int res4 ; |
---|
5680 | char *buf4 = 0 ; |
---|
5681 | int alloc4 = 0 ; |
---|
5682 | PyObject * obj0 = 0 ; |
---|
5683 | PyObject * obj1 = 0 ; |
---|
5684 | PyObject * obj2 = 0 ; |
---|
5685 | PyObject * obj3 = 0 ; |
---|
5686 | int result; |
---|
5687 | |
---|
5688 | if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; |
---|
5689 | ecode1 = SWIG_AsVal_int(obj0, &val1); |
---|
5690 | if (!SWIG_IsOK(ecode1)) { |
---|
5691 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjob" "', argument " "1"" of type '" "int""'"); |
---|
5692 | } |
---|
5693 | arg1 = (int)(val1); |
---|
5694 | res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); |
---|
5695 | if (!SWIG_IsOK(res2)) { |
---|
5696 | SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjob" "', argument " "2"" of type '" "char *""'"); |
---|
5697 | } |
---|
5698 | arg2 = (char *)(buf2); |
---|
5699 | res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); |
---|
5700 | if (!SWIG_IsOK(res3)) { |
---|
5701 | SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjob" "', argument " "3"" of type '" "char *""'"); |
---|
5702 | } |
---|
5703 | arg3 = (char *)(buf3); |
---|
5704 | res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); |
---|
5705 | if (!SWIG_IsOK(res4)) { |
---|
5706 | SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjob" "', argument " "4"" of type '" "char *""'"); |
---|
5707 | } |
---|
5708 | arg4 = (char *)(buf4); |
---|
5709 | result = (int)pbs_sigjob(arg1,arg2,arg3,arg4); |
---|
5710 | resultobj = SWIG_From_int((int)(result)); |
---|
5711 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5712 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5713 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5714 | return resultobj; |
---|
5715 | fail: |
---|
5716 | if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); |
---|
5717 | if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |
---|
5718 | if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); |
---|
5719 | return NULL; |
---|
5720 | } |
---|
5721 | |
---|
5722 | |
---|
5723 | SWIGINTERN PyObject *_wrap_pbs_statfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
---|
5724 | PyObject *resultobj = 0; |
---|
5725 | struct batch_status *arg1 = (struct batch_status *) 0 ; |
---|
5726 | PyObject * obj0 = 0 ; |
---|
5727 | |
---|
5728 | if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail; |
---|
5729 | { |
---|
5730 | PyObject *py_obj; |
---|
5731 | struct batch_status *ptr, *prev; |
---|
5732 | char s[255]; |
---|
5733 | int i=0, size=0; |
---|
5734 | |
---|
5735 | // printf("Python --> C\n"); |
---|
5736 | |
---|
5737 | if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n"); |
---|
5738 | |
---|
5739 |
---|