1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
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 * ----------------------------------------------------------------------------- */
13 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
14 # if defined(__SUNPRO_CC)
15 # define SWIG_TEMPLATE_DISAMBIGUATOR template
17 # define SWIG_TEMPLATE_DISAMBIGUATOR
24 /***********************************************************************
27 * This file contains generic CAPI SWIG runtime support for pointer
30 ************************************************************************/
32 /* This should only be incremented when either the layout of swig_type_info changes,
33 or for whatever reason, the runtime changes incompatibly */
34 #define SWIG_RUNTIME_VERSION "1"
36 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
37 #ifdef SWIG_TYPE_TABLE
38 #define SWIG_QUOTE_STRING(x) #x
39 #define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
40 #define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
42 #define SWIG_TYPE_TABLE_NAME
48 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
49 # define SWIGINLINE inline
56 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
57 creating a static or dynamic library from the swig runtime code.
58 In 99.9% of the cases, swig just needs to declare them as 'static'.
60 But only do this if is strictly necessary, ie, if you have problems
61 with your compiler or so.
64 #define SWIGRUNTIME static
66 #ifndef SWIGRUNTIMEINLINE
67 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
74 typedef void *(*swig_converter_func
)(void *);
75 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
77 typedef struct swig_type_info
{
79 swig_converter_func converter
;
82 swig_dycast_func dcast
;
83 struct swig_type_info
*next
;
84 struct swig_type_info
*prev
;
88 Compare two type names skipping the space characters, therefore
89 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
91 Return 0 when the two name types are equivalent, as in
92 strncmp, but skipping ' '.
95 SWIG_TypeNameComp(const char *f1
, const char *l1
,
96 const char *f2
, const char *l2
) {
97 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
98 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
99 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
100 if (*f1
!= *f2
) return *f1
- *f2
;
102 return (l1
- f1
) - (l2
- f2
);
106 Check type equivalence in a name list like <name1>|<name2>|...
109 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
111 const char* te
= tb
+ strlen(tb
);
113 while (!equiv
&& *ne
) {
114 for (nb
= ne
; *ne
; ++ne
) {
115 if (*ne
== '|') break;
117 equiv
= SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0;
124 Register a type mapping with the type-checking
126 SWIGRUNTIME swig_type_info
*
127 SWIG_TypeRegisterTL(swig_type_info
**tl
, swig_type_info
*ti
) {
128 swig_type_info
*tc
, *head
, *ret
, *next
;
129 /* Check to see if this type has already been registered */
132 /* check simple type equivalence */
133 int typeequiv
= (strcmp(tc
->name
, ti
->name
) == 0);
134 /* check full type equivalence, resolving typedefs */
136 /* only if tc is not a typedef (no '|' on it) */
137 if (tc
->str
&& ti
->str
&& !strstr(tc
->str
,"|")) {
138 typeequiv
= SWIG_TypeEquiv(ti
->str
,tc
->str
);
142 /* Already exists in the table. Just add additional types to the list */
143 if (ti
->clientdata
) tc
->clientdata
= ti
->clientdata
;
157 /* Build linked lists */
161 /* Patch up the rest of the links */
168 if (next
) next
->prev
= head
;
177 SWIGRUNTIME swig_type_info
*
178 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
180 if (!ty
) return 0; /* Void pointer */
181 s
= ty
->next
; /* First element always just a name */
183 if (strcmp(s
->name
,c
) == 0) {
184 if (s
== ty
->next
) return s
;
185 /* Move s to the top of the linked list */
186 s
->prev
->next
= s
->next
;
188 s
->next
->prev
= s
->prev
;
190 /* Insert s as second element in the list */
192 if (ty
->next
) ty
->next
->prev
= s
;
198 } while (s
&& (s
!= ty
->next
));
203 Cast a pointer up an inheritance hierarchy
205 SWIGRUNTIMEINLINE
void *
206 SWIG_TypeCast(swig_type_info
*ty
, void *ptr
) {
207 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
);
211 Dynamic pointer casting. Down an inheritance hierarchy
213 SWIGRUNTIME swig_type_info
*
214 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
215 swig_type_info
*lastty
= ty
;
216 if (!ty
|| !ty
->dcast
) return ty
;
217 while (ty
&& (ty
->dcast
)) {
218 ty
= (*ty
->dcast
)(ptr
);
225 Return the name associated with this type
227 SWIGRUNTIMEINLINE
const char *
228 SWIG_TypeName(const swig_type_info
*ty
) {
233 Return the pretty name associated with this type,
234 that is an unmangled type name in a form presentable to the user.
236 SWIGRUNTIME
const char *
237 SWIG_TypePrettyName(const swig_type_info
*type
) {
238 /* The "str" field contains the equivalent pretty names of the
239 type, separated by vertical-bar characters. We choose
240 to print the last name, as it is often (?) the most
242 if (type
->str
!= NULL
) {
243 const char *last_name
= type
->str
;
245 for (s
= type
->str
; *s
; s
++)
246 if (*s
== '|') last_name
= s
+1;
254 Search for a swig_type_info structure
256 SWIGRUNTIME swig_type_info
*
257 SWIG_TypeQueryTL(swig_type_info
*tl
, const char *name
) {
258 swig_type_info
*ty
= tl
;
260 if (ty
->str
&& (SWIG_TypeEquiv(ty
->str
,name
))) return ty
;
261 if (ty
->name
&& (strcmp(name
,ty
->name
) == 0)) return ty
;
268 Set the clientdata field for a type
271 SWIG_TypeClientDataTL(swig_type_info
*tl
, swig_type_info
*ti
, void *clientdata
) {
272 swig_type_info
*tc
, *equiv
;
273 if (ti
->clientdata
) return;
274 /* if (ti->clientdata == clientdata) return; */
275 ti
->clientdata
= clientdata
;
278 if (!equiv
->converter
) {
281 if ((strcmp(tc
->name
, equiv
->name
) == 0))
282 SWIG_TypeClientDataTL(tl
,tc
,clientdata
);
291 Pack binary data into a string
294 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
295 static char hex
[17] = "0123456789abcdef";
296 unsigned char *u
= (unsigned char *) ptr
;
297 const unsigned char *eu
= u
+ sz
;
298 register unsigned char uu
;
299 for (; u
!= eu
; ++u
) {
301 *(c
++) = hex
[(uu
& 0xf0) >> 4];
302 *(c
++) = hex
[uu
& 0xf];
308 Unpack binary data from a string
310 SWIGRUNTIME
const char *
311 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
312 register unsigned char *u
= (unsigned char *) ptr
;
313 register const unsigned char *eu
= u
+ sz
;
314 for (; u
!= eu
; ++u
) {
315 register int d
= *(c
++);
316 register unsigned char uu
= 0;
317 if ((d
>= '0') && (d
<= '9'))
318 uu
= ((d
- '0') << 4);
319 else if ((d
>= 'a') && (d
<= 'f'))
320 uu
= ((d
- ('a'-10)) << 4);
324 if ((d
>= '0') && (d
<= '9'))
326 else if ((d
>= 'a') && (d
<= 'f'))
327 uu
|= (d
- ('a'-10));
336 This function will propagate the clientdata field of type to any new
337 swig_type_info structures that have been added into the list of
338 equivalent types. It is like calling SWIG_TypeClientData(type,
339 clientdata) a second time.
342 SWIG_PropagateClientDataTL(swig_type_info
*tl
, swig_type_info
*type
) {
343 swig_type_info
*equiv
= type
->next
;
345 if (!type
->clientdata
) return;
347 if (!equiv
->converter
) {
350 if ((strcmp(tc
->name
, equiv
->name
) == 0) && !tc
->clientdata
)
351 SWIG_TypeClientDataTL(tl
,tc
, type
->clientdata
);
360 Pack 'void *' into a string buffer.
363 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
365 if ((2*sizeof(void *) + 2) > bsz
) return 0;
367 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
368 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
373 SWIGRUNTIME
const char *
374 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
376 if (strcmp(c
,"NULL") == 0) {
383 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
387 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
389 size_t lname
= (name
? strlen(name
) : 0);
390 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
392 r
= SWIG_PackData(r
,ptr
,sz
);
394 strncpy(r
,name
,lname
+1);
401 SWIGRUNTIME
const char *
402 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
404 if (strcmp(c
,"NULL") == 0) {
411 return SWIG_UnpackData(++c
,ptr
,sz
);
418 /***********************************************************************
421 * This file contains generic SWIG runtime support for pointer
422 * type checking as well as a few commonly used macros to control
425 * Author : David Beazley (beazley@cs.uchicago.edu)
427 * Copyright (c) 1999-2000, The University of Chicago
429 * This file may be freely redistributed without license or fee provided
430 * this copyright message remains intact.
431 ************************************************************************/
434 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
435 # if !defined(STATIC_LINKED)
436 # define SWIGEXPORT(a) __declspec(dllexport) a
438 # define SWIGEXPORT(a) a
441 # define SWIGEXPORT(a) a
449 /*************************************************************************/
452 /* The static type info list */
454 static swig_type_info
*swig_type_list
= 0;
455 static swig_type_info
**swig_type_list_handle
= &swig_type_list
;
458 /* Register a type mapping with the type-checking */
459 static swig_type_info
*
460 SWIG_TypeRegister(swig_type_info
*ti
) {
461 return SWIG_TypeRegisterTL(swig_type_list_handle
, ti
);
464 /* Search for a swig_type_info structure */
465 static swig_type_info
*
466 SWIG_TypeQuery(const char *name
) {
467 return SWIG_TypeQueryTL(*swig_type_list_handle
, name
);
470 /* Set the clientdata field for a type */
472 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
473 SWIG_TypeClientDataTL(*swig_type_list_handle
, ti
, clientdata
);
476 /* This function will propagate the clientdata field of type to
477 * any new swig_type_info structures that have been added into the list
478 * of equivalent types. It is like calling
479 * SWIG_TypeClientData(type, clientdata) a second time.
482 SWIG_PropagateClientData(swig_type_info
*type
) {
483 SWIG_PropagateClientDataTL(*swig_type_list_handle
, type
);
490 /* -----------------------------------------------------------------------------
491 * SWIG API. Portion that goes into the runtime
492 * ----------------------------------------------------------------------------- */
498 /* -----------------------------------------------------------------------------
499 * for internal method declarations
500 * ----------------------------------------------------------------------------- */
503 #define SWIGINTERN static
506 #ifndef SWIGINTERNSHORT
508 #define SWIGINTERNSHORT static inline
510 #define SWIGINTERNSHORT static
511 #endif /* __cplusplus */
516 Exception handling in wrappers
518 #define SWIG_fail goto fail
519 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
520 #define SWIG_append_errmsg(msg) SWIG_Python_AddErrMesg(msg,0)
521 #define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)
522 #define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)
523 #define SWIG_null_ref(type) SWIG_Python_NullRef(type)
528 #define SWIG_contract_assert(expr, msg) \
529 if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
531 /* -----------------------------------------------------------------------------
532 * Constant declarations
533 * ----------------------------------------------------------------------------- */
536 #define SWIG_PY_INT 1
537 #define SWIG_PY_FLOAT 2
538 #define SWIG_PY_STRING 3
539 #define SWIG_PY_POINTER 4
540 #define SWIG_PY_BINARY 5
542 /* Constant information structure */
543 typedef struct swig_const_info
{
549 swig_type_info
**ptype
;
553 /* -----------------------------------------------------------------------------
554 * Alloc. memory flags
555 * ----------------------------------------------------------------------------- */
556 #define SWIG_OLDOBJ 1
557 #define SWIG_NEWOBJ SWIG_OLDOBJ + 1
558 #define SWIG_PYSTR SWIG_NEWOBJ + 1
565 /***********************************************************************
568 * This file contains the runtime support for Python modules
569 * and includes code for managing global variables and pointer
572 * Author : David Beazley (beazley@cs.uchicago.edu)
573 ************************************************************************/
575 /* Common SWIG API */
576 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags)
577 #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags)
578 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
581 /* Python-specific SWIG API */
582 #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
583 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
586 /* -----------------------------------------------------------------------------
587 * Pointer declarations
588 * ----------------------------------------------------------------------------- */
590 Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent
591 C/C++ pointers in the python side. Very useful for debugging, but
594 #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
595 # define SWIG_COBJECT_TYPES
598 /* Flags for pointer conversion */
599 #define SWIG_POINTER_EXCEPTION 0x1
600 #define SWIG_POINTER_DISOWN 0x2
607 /* -----------------------------------------------------------------------------
608 * Create a new pointer string
609 * ----------------------------------------------------------------------------- */
611 #ifndef SWIG_BUFFER_SIZE
612 #define SWIG_BUFFER_SIZE 1024
615 #if defined(SWIG_COBJECT_TYPES)
616 #if !defined(SWIG_COBJECT_PYTHON)
617 /* -----------------------------------------------------------------------------
618 * Implements a simple Swig Object type, and use it instead of PyCObject
619 * ----------------------------------------------------------------------------- */
627 /* Declarations for objects of type PySwigObject */
630 PySwigObject_print(PySwigObject
*v
, FILE *fp
, int flags
)
632 char result
[SWIG_BUFFER_SIZE
];
633 if (SWIG_PackVoidPtr(result
, v
->ptr
, v
->desc
, sizeof(result
))) {
634 fputs("<Swig Object at ", fp
); fputs(result
, fp
); fputs(">", fp
);
641 SWIGRUNTIME PyObject
*
642 PySwigObject_repr(PySwigObject
*v
)
644 char result
[SWIG_BUFFER_SIZE
];
645 return SWIG_PackVoidPtr(result
, v
->ptr
, v
->desc
, sizeof(result
)) ?
646 PyString_FromFormat("<Swig Object at %s>", result
) : 0;
649 SWIGRUNTIME PyObject
*
650 PySwigObject_str(PySwigObject
*v
)
652 char result
[SWIG_BUFFER_SIZE
];
653 return SWIG_PackVoidPtr(result
, v
->ptr
, v
->desc
, sizeof(result
)) ?
654 PyString_FromString(result
) : 0;
657 SWIGRUNTIME PyObject
*
658 PySwigObject_long(PySwigObject
*v
)
660 return PyLong_FromUnsignedLong((unsigned long) v
->ptr
);
663 SWIGRUNTIME PyObject
*
664 PySwigObject_oct(PySwigObject
*v
)
667 unsigned long x
= (unsigned long)v
->ptr
;
671 PyOS_snprintf(buf
, sizeof(buf
), "0%lo", x
);
672 return PyString_FromString(buf
);
675 SWIGRUNTIME PyObject
*
676 PySwigObject_hex(PySwigObject
*v
)
679 PyOS_snprintf(buf
, sizeof(buf
), "0x%lx", (unsigned long)v
->ptr
);
680 return PyString_FromString(buf
);
684 PySwigObject_compare(PySwigObject
*v
, PySwigObject
*w
)
686 int c
= strcmp(v
->desc
, w
->desc
);
692 return (i
< j
) ? -1 : (i
> j
) ? 1 : 0;
697 PySwigObject_dealloc(PySwigObject
*self
)
702 SWIGRUNTIME PyTypeObject
*
703 PySwigObject_GetType() {
704 static char PySwigObject_Type__doc__
[] =
705 "Swig object carries a C/C++ instance pointer";
707 static PyNumberMethods PySwigObject_as_number
= {
708 (binaryfunc
)0, /*nb_add*/
709 (binaryfunc
)0, /*nb_subtract*/
710 (binaryfunc
)0, /*nb_multiply*/
711 (binaryfunc
)0, /*nb_divide*/
712 (binaryfunc
)0, /*nb_remainder*/
713 (binaryfunc
)0, /*nb_divmod*/
714 (ternaryfunc
)0,/*nb_power*/
715 (unaryfunc
)0, /*nb_negative*/
716 (unaryfunc
)0, /*nb_positive*/
717 (unaryfunc
)0, /*nb_absolute*/
718 (inquiry
)0, /*nb_nonzero*/
725 (coercion
)0, /*nb_coerce*/
726 (unaryfunc
)PySwigObject_long
, /*nb_int*/
727 (unaryfunc
)PySwigObject_long
, /*nb_long*/
728 (unaryfunc
)0, /*nb_float*/
729 (unaryfunc
)PySwigObject_oct
, /*nb_oct*/
730 (unaryfunc
)PySwigObject_hex
, /*nb_hex*/
731 #if PY_VERSION_HEX >= 0x02000000
732 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
736 static int type_init
= 0;
737 static PyTypeObject PySwigObject_Type
;
741 PyObject_HEAD_INIT(&PyType_Type
)
743 "PySwigObject", /*tp_name*/
744 sizeof(PySwigObject
), /*tp_basicsize*/
747 (destructor
)PySwigObject_dealloc
, /*tp_dealloc*/
748 (printfunc
)PySwigObject_print
, /*tp_print*/
749 (getattrfunc
)0, /*tp_getattr*/
750 (setattrfunc
)0, /*tp_setattr*/
751 (cmpfunc
)PySwigObject_compare
, /*tp_compare*/
752 (reprfunc
)PySwigObject_repr
, /*tp_repr*/
753 &PySwigObject_as_number
, /*tp_as_number*/
754 0, /*tp_as_sequence*/
756 (hashfunc
)0, /*tp_hash*/
757 (ternaryfunc
)0, /*tp_call*/
758 (reprfunc
)PySwigObject_str
, /*tp_str*/
759 /* Space for future expansion */
761 PySwigObject_Type__doc__
, /* Documentation string */
762 #if PY_VERSION_HEX >= 0x02000000
766 #if PY_VERSION_HEX >= 0x02010000
767 0, /* tp_richcompare */
768 0, /* tp_weaklistoffset */
770 #if PY_VERSION_HEX >= 0x02020000
771 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
773 #if PY_VERSION_HEX >= 0x02030000
777 0,0,0,0 /* tp_alloc -> tp_next */
781 PySwigObject_Type
= tmp
;
785 return &PySwigObject_Type
;
788 SWIGRUNTIME PyObject
*
789 PySwigObject_FromVoidPtrAndDesc(void *ptr
, const char *desc
)
791 PySwigObject
*self
= PyObject_NEW(PySwigObject
, PySwigObject_GetType());
792 if (self
== NULL
) return NULL
;
795 return (PyObject
*)self
;
798 SWIGRUNTIMEINLINE
void *
799 PySwigObject_AsVoidPtr(PyObject
*self
)
801 return ((PySwigObject
*)self
)->ptr
;
804 SWIGRUNTIMEINLINE
const char *
805 PySwigObject_GetDesc(PyObject
*self
)
807 return ((PySwigObject
*)self
)->desc
;
810 SWIGRUNTIMEINLINE
int
811 PySwigObject_Check(PyObject
*op
) {
812 return ((op
)->ob_type
== PySwigObject_GetType())
813 || (strcmp((op
)->ob_type
->tp_name
,"PySwigObject") == 0);
816 /* -----------------------------------------------------------------------------
817 * Implements a simple Swig Packed type, and use it instead of string
818 * ----------------------------------------------------------------------------- */
828 PySwigPacked_print(PySwigPacked
*v
, FILE *fp
, int flags
)
830 char result
[SWIG_BUFFER_SIZE
];
831 fputs("<Swig Packed ", fp
);
832 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
841 SWIGRUNTIME PyObject
*
842 PySwigPacked_repr(PySwigPacked
*v
)
844 char result
[SWIG_BUFFER_SIZE
];
845 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
846 return PyString_FromFormat("<Swig Packed at %s%s>", result
, v
->desc
);
848 return PyString_FromFormat("<Swig Packed %s>", v
->desc
);
852 SWIGRUNTIME PyObject
*
853 PySwigPacked_str(PySwigPacked
*v
)
855 char result
[SWIG_BUFFER_SIZE
];
856 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))){
857 return PyString_FromFormat("%s%s", result
, v
->desc
);
859 return PyString_FromFormat("%s", v
->desc
);
864 PySwigPacked_compare(PySwigPacked
*v
, PySwigPacked
*w
)
866 int c
= strcmp(v
->desc
, w
->desc
);
872 int s
= (i
< j
) ? -1 : (i
> j
) ? 1 : 0;
873 return s
? s
: strncmp((char *)v
->pack
, (char *)w
->pack
, 2*v
->size
);
878 PySwigPacked_dealloc(PySwigPacked
*self
)
884 SWIGRUNTIME PyTypeObject
*
885 PySwigPacked_GetType() {
886 static char PySwigPacked_Type__doc__
[] =
887 "Swig object carries a C/C++ instance pointer";
888 static int type_init
= 0;
890 static PyTypeObject PySwigPacked_Type
;
893 PyObject_HEAD_INIT(&PyType_Type
)
895 "PySwigPacked", /*tp_name*/
896 sizeof(PySwigPacked
), /*tp_basicsize*/
899 (destructor
)PySwigPacked_dealloc
, /*tp_dealloc*/
900 (printfunc
)PySwigPacked_print
, /*tp_print*/
901 (getattrfunc
)0, /*tp_getattr*/
902 (setattrfunc
)0, /*tp_setattr*/
903 (cmpfunc
)PySwigPacked_compare
, /*tp_compare*/
904 (reprfunc
)PySwigPacked_repr
, /*tp_repr*/
906 0, /*tp_as_sequence*/
908 (hashfunc
)0, /*tp_hash*/
909 (ternaryfunc
)0, /*tp_call*/
910 (reprfunc
)PySwigPacked_str
, /*tp_str*/
911 /* Space for future expansion */
913 PySwigPacked_Type__doc__
, /* Documentation string */
914 #if PY_VERSION_HEX >= 0x02000000
918 #if PY_VERSION_HEX >= 0x02010000
919 0, /* tp_richcompare */
920 0, /* tp_weaklistoffset */
922 #if PY_VERSION_HEX >= 0x02020000
923 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
925 #if PY_VERSION_HEX >= 0x02030000
929 0,0,0,0 /* tp_alloc -> tp_next */
933 PySwigPacked_Type
= tmp
;
939 return &PySwigPacked_Type
;
942 SWIGRUNTIME PyObject
*
943 PySwigPacked_FromDataAndDesc(void *ptr
, size_t size
, const char *desc
)
945 PySwigPacked
*self
= PyObject_NEW(PySwigPacked
, PySwigPacked_GetType());
949 void *pack
= malloc(size
);
950 memcpy(pack
, ptr
, size
);
954 return (PyObject
*) self
;
958 SWIGRUNTIMEINLINE
const char *
959 PySwigPacked_UnpackData(PyObject
*obj
, void *ptr
, size_t size
)
961 PySwigPacked
*self
= (PySwigPacked
*)obj
;
962 if (self
->size
!= size
) return 0;
963 memcpy(ptr
, self
->pack
, size
);
967 SWIGRUNTIMEINLINE
const char *
968 PySwigPacked_GetDesc(PyObject
*self
)
970 return ((PySwigPacked
*)self
)->desc
;
973 SWIGRUNTIMEINLINE
int
974 PySwigPacked_Check(PyObject
*op
) {
975 return ((op
)->ob_type
== PySwigPacked_GetType())
976 || (strcmp((op
)->ob_type
->tp_name
,"PySwigPacked") == 0);
980 /* -----------------------------------------------------------------------------
981 * Use the old Python PyCObject instead of PySwigObject
982 * ----------------------------------------------------------------------------- */
984 #define PySwigObject_GetDesc(obj) PyCObject_GetDesc(obj)
985 #define PySwigObject_Check(obj) PyCObject_Check(obj)
986 #define PySwigObject_AsVoidPtr(obj) PyCObject_AsVoidPtr(obj)
987 #define PySwigObject_FromVoidPtrAndDesc(p, d) PyCObject_FromVoidPtrAndDesc(p, d, NULL)
993 /* -----------------------------------------------------------------------------
994 * errors manipulation
995 * ----------------------------------------------------------------------------- */
998 SWIG_Python_TypeError(const char *type
, PyObject
*obj
)
1001 #if defined(SWIG_COBJECT_TYPES)
1002 if (PySwigObject_Check(obj
)) {
1003 const char *otype
= (const char *) PySwigObject_GetDesc(obj
);
1005 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, 'PySwigObject(%s)' is received",
1012 const char *otype
= (obj
? obj
->ob_type
->tp_name
: 0);
1014 PyObject
*str
= PyObject_Str(obj
);
1015 const char *cstr
= str
? PyString_AsString(str
) : 0;
1017 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s(%s)' is received",
1020 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s' is received",
1027 PyErr_Format(PyExc_TypeError
, "a '%s' is expected", type
);
1029 PyErr_Format(PyExc_TypeError
, "unexpected type is received");
1033 SWIGRUNTIMEINLINE
void
1034 SWIG_Python_NullRef(const char *type
)
1037 PyErr_Format(PyExc_TypeError
, "null reference of type '%s' was received",type
);
1039 PyErr_Format(PyExc_TypeError
, "null reference was received");
1044 SWIG_Python_AddErrMesg(const char* mesg
, int infront
)
1046 if (PyErr_Occurred()) {
1048 PyObject
*value
= 0;
1049 PyObject
*traceback
= 0;
1050 PyErr_Fetch(&type
, &value
, &traceback
);
1052 PyObject
*old_str
= PyObject_Str(value
);
1056 PyErr_Format(type
, "%s %s", mesg
, PyString_AsString(old_str
));
1058 PyErr_Format(type
, "%s %s", PyString_AsString(old_str
), mesg
);
1069 SWIG_Python_ArgFail(int argnum
)
1071 if (PyErr_Occurred()) {
1072 /* add information about failing argument */
1074 sprintf(mesg
, "argument number %d:", argnum
);
1075 return SWIG_Python_AddErrMesg(mesg
, 1);
1082 /* -----------------------------------------------------------------------------
1083 * pointers/data manipulation
1084 * ----------------------------------------------------------------------------- */
1086 /* Convert a pointer value */
1088 SWIG_Python_ConvertPtr(PyObject
*obj
, void **ptr
, swig_type_info
*ty
, int flags
) {
1091 static PyObject
*SWIG_this
= 0;
1093 PyObject
*pyobj
= 0;
1097 if (obj
== Py_None
) {
1102 #ifdef SWIG_COBJECT_TYPES
1103 if (!(PySwigObject_Check(obj
))) {
1105 SWIG_this
= PyString_FromString("this");
1107 obj
= PyObject_GetAttr(obj
,SWIG_this
);
1109 if (!obj
) goto type_error
;
1110 if (!PySwigObject_Check(obj
)) {
1115 vptr
= PySwigObject_AsVoidPtr(obj
);
1116 c
= (const char *) PySwigObject_GetDesc(obj
);
1117 if (newref
) { Py_DECREF(obj
); }
1120 if (!(PyString_Check(obj
))) {
1122 SWIG_this
= PyString_FromString("this");
1124 obj
= PyObject_GetAttr(obj
,SWIG_this
);
1126 if (!obj
) goto type_error
;
1127 if (!PyString_Check(obj
)) {
1132 c
= PyString_AS_STRING(obj
);
1133 /* Pointer values must start with leading underscore */
1134 c
= SWIG_UnpackVoidPtr(c
, &vptr
, ty
->name
);
1135 if (newref
) { Py_DECREF(obj
); }
1136 if (!c
) goto type_error
;
1142 tc
= SWIG_TypeCheck(c
,ty
);
1143 if (!tc
) goto type_error
;
1144 *ptr
= SWIG_TypeCast(tc
,vptr
);
1149 if ((pyobj
) && (flags
& SWIG_POINTER_DISOWN
)) {
1150 PyObject_SetAttrString(pyobj
,(char*)"thisown",Py_False
);
1156 if (pyobj
&& !obj
) {
1158 if (PyCFunction_Check(obj
)) {
1159 /* here we get the method pointer for callbacks */
1160 char *doc
= (((PyCFunctionObject
*)obj
) -> m_ml
-> ml_doc
);
1161 c
= doc
? strstr(doc
, "swig_ptr: ") : 0;
1163 c
= SWIG_UnpackVoidPtr(c
+ 10, &vptr
, ty
->name
);
1164 if (!c
) goto type_error
;
1169 if (flags
& SWIG_POINTER_EXCEPTION
) {
1171 SWIG_Python_TypeError(SWIG_TypePrettyName(ty
), obj
);
1173 SWIG_Python_TypeError("C/C++ pointer", obj
);
1179 /* Convert a pointer value, signal an exception on a type mismatch */
1181 SWIG_Python_MustGetPtr(PyObject
*obj
, swig_type_info
*ty
, int argnum
, int flags
) {
1183 if (SWIG_Python_ConvertPtr(obj
, &result
, ty
, flags
) == -1) {
1185 if (flags
& SWIG_POINTER_EXCEPTION
) {
1186 SWIG_Python_TypeError(SWIG_TypePrettyName(ty
), obj
);
1187 SWIG_Python_ArgFail(argnum
);
1193 /* Convert a packed value value */
1195 SWIG_Python_ConvertPacked(PyObject
*obj
, void *ptr
, size_t sz
, swig_type_info
*ty
, int flags
) {
1199 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
1200 c
= PySwigPacked_UnpackData(obj
, ptr
, sz
);
1202 if ((!obj
) || (!PyString_Check(obj
))) goto type_error
;
1203 c
= PyString_AS_STRING(obj
);
1204 /* Pointer values must start with leading underscore */
1205 c
= SWIG_UnpackDataName(c
, ptr
, sz
, ty
->name
);
1207 if (!c
) goto type_error
;
1209 tc
= SWIG_TypeCheck(c
,ty
);
1210 if (!tc
) goto type_error
;
1216 if (flags
& SWIG_POINTER_EXCEPTION
) {
1218 SWIG_Python_TypeError(SWIG_TypePrettyName(ty
), obj
);
1220 SWIG_Python_TypeError("C/C++ packed data", obj
);
1226 /* Create a new array object */
1227 SWIGRUNTIME PyObject
*
1228 SWIG_Python_NewPointerObj(void *ptr
, swig_type_info
*type
, int own
) {
1234 #ifdef SWIG_COBJECT_TYPES
1235 robj
= PySwigObject_FromVoidPtrAndDesc((void *) ptr
, (char *)type
->name
);
1238 char result
[SWIG_BUFFER_SIZE
];
1239 robj
= SWIG_PackVoidPtr(result
, ptr
, type
->name
, sizeof(result
)) ?
1240 PyString_FromString(result
) : 0;
1243 if (!robj
|| (robj
== Py_None
)) return robj
;
1244 if (type
->clientdata
) {
1246 PyObject
*args
= Py_BuildValue((char*)"(O)", robj
);
1248 inst
= PyObject_CallObject((PyObject
*) type
->clientdata
, args
);
1252 PyObject_SetAttrString(inst
,(char*)"thisown",Py_True
);
1260 SWIGRUNTIME PyObject
*
1261 SWIG_Python_NewPackedObj(void *ptr
, size_t sz
, swig_type_info
*type
) {
1267 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
1268 robj
= PySwigPacked_FromDataAndDesc((void *) ptr
, sz
, (char *)type
->name
);
1271 char result
[SWIG_BUFFER_SIZE
];
1272 robj
= SWIG_PackDataName(result
, ptr
, sz
, type
->name
, sizeof(result
)) ?
1273 PyString_FromString(result
) : 0;
1279 /* -----------------------------------------------------------------------------*
1281 * -----------------------------------------------------------------------------*/
1283 #ifdef SWIG_LINK_RUNTIME
1284 void *SWIG_ReturnGlobalTypeList(void *);
1287 SWIGRUNTIME swig_type_info
**
1288 SWIG_Python_GetTypeListHandle() {
1289 static void *type_pointer
= (void *)0;
1290 /* first check if module already created */
1291 if (!type_pointer
) {
1292 #ifdef SWIG_LINK_RUNTIME
1293 type_pointer
= SWIG_ReturnGlobalTypeList((void *)0);
1295 type_pointer
= PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
,
1296 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
);
1297 if (PyErr_Occurred()) {
1299 type_pointer
= (void *)0;
1303 return (swig_type_info
**) type_pointer
;
1307 Search for a swig_type_info structure
1309 SWIGRUNTIMEINLINE swig_type_info
*
1310 SWIG_Python_GetTypeList() {
1311 swig_type_info
**tlh
= SWIG_Python_GetTypeListHandle();
1312 return tlh
? *tlh
: (swig_type_info
*)0;
1315 #define SWIG_Runtime_GetTypeList SWIG_Python_GetTypeList
1322 /* -------- TYPES TABLE (BEGIN) -------- */
1324 #define SWIGTYPE_p_lwes_event swig_types[0]
1325 #define SWIGTYPE_size_t swig_types[1]
1326 #define SWIGTYPE_p_unsigned_int swig_types[2]
1327 #define SWIGTYPE_p_long_long swig_types[3]
1328 #define SWIGTYPE_p_unsigned_long_long swig_types[4]
1329 #define SWIGTYPE_p_short swig_types[5]
1330 #define SWIGTYPE_p_unsigned_short swig_types[6]
1331 #define SWIGTYPE_p_p_char swig_types[7]
1332 #define SWIGTYPE_p_char swig_types[8]
1333 #define SWIGTYPE_ptrdiff_t swig_types[9]
1334 #define SWIGTYPE_p_lwes_emitter swig_types[10]
1335 #define SWIGTYPE_p_in_addr swig_types[11]
1336 #define SWIGTYPE_p_int swig_types[12]
1337 #define SWIGTYPE_p_lwes_event_type_db swig_types[13]
1338 static swig_type_info
*swig_types
[15];
1340 /* -------- TYPES TABLE (END) -------- */
1343 /*-----------------------------------------------
1344 @(target):= _lwes.so
1345 ------------------------------------------------*/
1346 #define SWIG_init init_lwes
1348 #define SWIG_name "_lwes"
1350 #define SWIG_FILE_WITH_INIT
1354 /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
1356 SWIG_AsCharPtrAndSize(PyObject
*obj
, char** cptr
, size_t* psize
)
1358 static swig_type_info
* pchar_info
= 0;
1360 if (!pchar_info
) pchar_info
= SWIG_TypeQuery("char *");
1361 if (SWIG_ConvertPtr(obj
, (void**)&vptr
, pchar_info
, 0) != -1) {
1362 if (cptr
) *cptr
= vptr
;
1363 if (psize
) *psize
= vptr
? (strlen(vptr
) + 1) : 0;
1367 if (PyString_Check(obj
)) {
1369 *cptr
= PyString_AS_STRING(obj
);
1371 *psize
= PyString_GET_SIZE(obj
) + 1;
1378 SWIG_type_error("char *", obj
);
1385 SWIG_AsCharPtr(PyObject
*obj
, char **val
)
1387 if (SWIG_AsCharPtrAndSize(obj
, val
, (size_t*)(0))) {
1392 SWIG_type_error("char *", obj
);
1398 /*@/usr/share/swig/1.3.24/python/pymacros.swg,66,SWIG_define@*/
1399 #define SWIG_From_int PyInt_FromLong
1407 SWIG_CheckLongInRange(long value
, long min_value
, long max_value
,
1410 if (value
< min_value
) {
1412 PyErr_Format(PyExc_OverflowError
,
1413 "value %ld is less than '%s' minimum %ld",
1414 value
, errmsg
, min_value
);
1417 } else if (value
> max_value
) {
1419 PyErr_Format(PyExc_OverflowError
,
1420 "value %ld is greater than '%s' maximum %ld",
1421 value
, errmsg
, max_value
);
1430 SWIG_AsVal_long(PyObject
* obj
, long* val
)
1432 if (PyInt_Check(obj
)) {
1433 if (val
) *val
= PyInt_AS_LONG(obj
);
1436 if (PyLong_Check(obj
)) {
1437 long v
= PyLong_AsLong(obj
);
1438 if (!PyErr_Occurred()) {
1442 if (!val
) PyErr_Clear();
1447 SWIG_type_error("long", obj
);
1453 #if INT_MAX != LONG_MAX
1455 SWIG_AsVal_int(PyObject
*obj
, int *val
)
1457 const char* errmsg
= val
? "int" : (char*)0;
1459 if (SWIG_AsVal_long(obj
, &v
)) {
1460 if (SWIG_CheckLongInRange(v
, INT_MIN
,INT_MAX
, errmsg
)) {
1461 if (val
) *val
= (int)(v
);
1470 SWIG_type_error(errmsg
, obj
);
1476 SWIG_AsVal_int(PyObject
*obj
, int *val
)
1478 return SWIG_AsVal_long(obj
,(long*)val
);
1484 SWIG_As_int(PyObject
* obj
)
1487 if (!SWIG_AsVal_int(obj
, &v
)) {
1489 this is needed to make valgrind/purify happier.
1491 memset((void*)&v
, 0, sizeof(int));
1498 SWIG_AsVal_short(PyObject
*obj
, short *val
)
1500 const char* errmsg
= val
? "short" : (char*)0;
1502 if (SWIG_AsVal_long(obj
, &v
)) {
1503 if (SWIG_CheckLongInRange(v
, SHRT_MIN
, SHRT_MAX
, errmsg
)) {
1504 if (val
) *val
= (short)(v
);
1513 SWIG_type_error(errmsg
, obj
);
1519 SWIGINTERNSHORT
short
1520 SWIG_As_short(PyObject
* obj
)
1523 if (!SWIG_AsVal_short(obj
, &v
)) {
1525 this is needed to make valgrind/purify happier.
1527 memset((void*)&v
, 0, sizeof(short));
1534 SWIG_Check_int(PyObject
* obj
)
1536 return SWIG_AsVal_int(obj
, (int*)0);
1541 SWIG_Check_short(PyObject
* obj
)
1543 return SWIG_AsVal_short(obj
, (short*)0);
1548 SWIG_CheckUnsignedLongInRange(unsigned long value
,
1549 unsigned long max_value
,
1552 if (value
> max_value
) {
1554 PyErr_Format(PyExc_OverflowError
,
1555 "value %lu is greater than '%s' minimum %lu",
1556 value
, errmsg
, max_value
);
1565 SWIG_AsVal_unsigned_SS_long(PyObject
*obj
, unsigned long *val
)
1567 if (PyInt_Check(obj
)) {
1568 long v
= PyInt_AS_LONG(obj
);
1574 if (PyLong_Check(obj
)) {
1575 unsigned long v
= PyLong_AsUnsignedLong(obj
);
1576 if (!PyErr_Occurred()) {
1580 if (!val
) PyErr_Clear();
1585 SWIG_type_error("unsigned long", obj
);
1592 SWIG_AsVal_unsigned_SS_short(PyObject
*obj
, unsigned short *val
)
1594 const char* errmsg
= val
? "unsigned short" : (char*)0;
1596 if (SWIG_AsVal_unsigned_SS_long(obj
, &v
)) {
1597 if (SWIG_CheckUnsignedLongInRange(v
, USHRT_MAX
, errmsg
)) {
1598 if (val
) *val
= (unsigned short)(v
);
1607 SWIG_type_error(errmsg
, obj
);
1613 SWIGINTERNSHORT
unsigned short
1614 SWIG_As_unsigned_SS_short(PyObject
* obj
)
1617 if (!SWIG_AsVal_unsigned_SS_short(obj
, &v
)) {
1619 this is needed to make valgrind/purify happier.
1621 memset((void*)&v
, 0, sizeof(unsigned short));
1628 SWIG_Check_unsigned_SS_short(PyObject
* obj
)
1630 return SWIG_AsVal_unsigned_SS_short(obj
, (unsigned short*)0);
1634 #if UINT_MAX != ULONG_MAX
1636 SWIG_AsVal_unsigned_SS_int(PyObject
*obj
, unsigned int *val
)
1638 const char* errmsg
= val
? "unsigned int" : (char*)0;
1640 if (SWIG_AsVal_unsigned_SS_long(obj
, &v
)) {
1641 if (SWIG_CheckUnsignedLongInRange(v
, INT_MAX
, errmsg
)) {
1642 if (val
) *val
= (unsigned int)(v
);
1649 SWIG_type_error(errmsg
, obj
);
1654 SWIGINTERNSHORT
unsigned int
1655 SWIG_AsVal_unsigned_SS_int(PyObject
*obj
, unsigned int *val
)
1657 return SWIG_AsVal_unsigned_SS_long(obj
,(unsigned long *)val
);
1662 SWIGINTERNSHORT
unsigned int
1663 SWIG_As_unsigned_SS_int(PyObject
* obj
)
1666 if (!SWIG_AsVal_unsigned_SS_int(obj
, &v
)) {
1668 this is needed to make valgrind/purify happier.
1670 memset((void*)&v
, 0, sizeof(unsigned int));
1677 SWIG_Check_unsigned_SS_int(PyObject
* obj
)
1679 return SWIG_AsVal_unsigned_SS_int(obj
, (unsigned int*)0);
1684 SWIG_AsVal_unsigned_SS_long_SS_long(PyObject
*obj
, unsigned long long *val
)
1687 if (PyLong_Check(obj
)) {
1688 unsigned long long v
= PyLong_AsUnsignedLongLong(obj
);
1689 if (!PyErr_Occurred()) {
1693 if (!val
) PyErr_Clear();
1697 if (SWIG_AsVal_unsigned_SS_long(obj
,&v
)) {
1704 SWIG_type_error("unsigned long long", obj
);
1710 SWIGINTERNSHORT
unsigned long long
1711 SWIG_As_unsigned_SS_long_SS_long(PyObject
* obj
)
1713 unsigned long long v
;
1714 if (!SWIG_AsVal_unsigned_SS_long_SS_long(obj
, &v
)) {
1716 this is needed to make valgrind/purify happier.
1718 memset((void*)&v
, 0, sizeof(unsigned long long));
1725 SWIG_Check_unsigned_SS_long_SS_long(PyObject
* obj
)
1727 return SWIG_AsVal_unsigned_SS_long_SS_long(obj
, (unsigned long long*)0);
1732 SWIG_AsVal_long_SS_long(PyObject
*obj
, long long *val
)
1734 if (PyLong_Check(obj
)) {
1735 long long v
= PyLong_AsLongLong(obj
);
1736 if (!PyErr_Occurred()) {
1740 if (!val
) PyErr_Clear();
1744 if (PyInt_Check(obj
)) {
1745 if (val
) *val
= PyInt_AS_LONG(obj
);
1749 SWIG_type_error("long long", obj
);
1755 SWIGINTERNSHORT
long long
1756 SWIG_As_long_SS_long(PyObject
* obj
)
1759 if (!SWIG_AsVal_long_SS_long(obj
, &v
)) {
1761 this is needed to make valgrind/purify happier.
1763 memset((void*)&v
, 0, sizeof(long long));
1770 SWIG_Check_long_SS_long(PyObject
* obj
)
1772 return SWIG_AsVal_long_SS_long(obj
, (long long*)0);
1778 static PyObject
*_wrap_lwes_event_type_db_create(PyObject
*self
, PyObject
*args
) {
1779 PyObject
*resultobj
;
1780 char *arg1
= (char *) 0 ;
1781 struct lwes_event_type_db
*result
;
1782 PyObject
* obj0
= 0 ;
1784 if(!PyArg_ParseTuple(args
,(char *)"O:lwes_event_type_db_create",&obj0
)) goto fail
;
1785 if (!SWIG_AsCharPtr(obj0
, (char**)&arg1
)) {
1786 SWIG_arg_fail(1);SWIG_fail
;
1788 result
= (struct lwes_event_type_db
*)lwes_event_type_db_create(arg1
);
1790 resultobj
= SWIG_NewPointerObj((void*)(result
), SWIGTYPE_p_lwes_event_type_db
, 0);
1797 static PyObject
*_wrap_lwes_event_type_db_destroy(PyObject
*self
, PyObject
*args
) {
1798 PyObject
*resultobj
;
1799 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
1801 PyObject
* obj0
= 0 ;
1803 if(!PyArg_ParseTuple(args
,(char *)"O:lwes_event_type_db_destroy",&obj0
)) goto fail
;
1804 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event_type_db
, SWIG_POINTER_EXCEPTION
| 0);
1805 if (SWIG_arg_fail(1)) SWIG_fail
;
1806 result
= (int)lwes_event_type_db_destroy(arg1
);
1809 resultobj
= SWIG_From_int((int)(result
));
1817 static PyObject
*_wrap_lwes_emitter_create(PyObject
*self
, PyObject
*args
) {
1818 PyObject
*resultobj
;
1819 char *arg1
= (char *) 0 ;
1820 char *arg2
= (char *) 0 ;
1824 struct lwes_emitter
*result
;
1825 PyObject
* obj0
= 0 ;
1826 PyObject
* obj1
= 0 ;
1827 PyObject
* obj2
= 0 ;
1828 PyObject
* obj3
= 0 ;
1829 PyObject
* obj4
= 0 ;
1831 if(!PyArg_ParseTuple(args
,(char *)"OOOOO:lwes_emitter_create",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
)) goto fail
;
1832 if (!SWIG_AsCharPtr(obj0
, (char**)&arg1
)) {
1833 SWIG_arg_fail(1);SWIG_fail
;
1835 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
1836 SWIG_arg_fail(2);SWIG_fail
;
1839 arg3
= (int)(SWIG_As_int(obj2
));
1840 if (SWIG_arg_fail(3)) SWIG_fail
;
1843 arg4
= (int)(SWIG_As_int(obj3
));
1844 if (SWIG_arg_fail(4)) SWIG_fail
;
1847 arg5
= (short)(SWIG_As_short(obj4
));
1848 if (SWIG_arg_fail(5)) SWIG_fail
;
1850 result
= (struct lwes_emitter
*)lwes_emitter_create(arg1
,arg2
,arg3
,arg4
,arg5
);
1852 resultobj
= SWIG_NewPointerObj((void*)(result
), SWIGTYPE_p_lwes_emitter
, 0);
1859 static PyObject
*_wrap_lwes_emitter_create_with_ttl(PyObject
*self
, PyObject
*args
) {
1860 PyObject
*resultobj
;
1861 char *arg1
= (char *) 0 ;
1862 char *arg2
= (char *) 0 ;
1867 struct lwes_emitter
*result
;
1868 PyObject
* obj0
= 0 ;
1869 PyObject
* obj1
= 0 ;
1870 PyObject
* obj2
= 0 ;
1871 PyObject
* obj3
= 0 ;
1872 PyObject
* obj4
= 0 ;
1873 PyObject
* obj5
= 0 ;
1875 if(!PyArg_ParseTuple(args
,(char *)"OOOOOO:lwes_emitter_create_with_ttl",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
,&obj5
)) goto fail
;
1876 if (!SWIG_AsCharPtr(obj0
, (char**)&arg1
)) {
1877 SWIG_arg_fail(1);SWIG_fail
;
1879 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
1880 SWIG_arg_fail(2);SWIG_fail
;
1883 arg3
= (int)(SWIG_As_int(obj2
));
1884 if (SWIG_arg_fail(3)) SWIG_fail
;
1887 arg4
= (int)(SWIG_As_int(obj3
));
1888 if (SWIG_arg_fail(4)) SWIG_fail
;
1891 arg5
= (short)(SWIG_As_short(obj4
));
1892 if (SWIG_arg_fail(5)) SWIG_fail
;
1895 arg6
= (int)(SWIG_As_int(obj5
));
1896 if (SWIG_arg_fail(6)) SWIG_fail
;
1898 result
= (struct lwes_emitter
*)lwes_emitter_create_with_ttl(arg1
,arg2
,arg3
,arg4
,arg5
,arg6
);
1900 resultobj
= SWIG_NewPointerObj((void*)(result
), SWIGTYPE_p_lwes_emitter
, 0);
1907 static PyObject
*_wrap_lwes_emitter_emit(PyObject
*self
, PyObject
*args
) {
1908 PyObject
*resultobj
;
1909 struct lwes_emitter
*arg1
= (struct lwes_emitter
*) 0 ;
1910 struct lwes_event
*arg2
= (struct lwes_event
*) 0 ;
1912 PyObject
* obj0
= 0 ;
1913 PyObject
* obj1
= 0 ;
1915 if(!PyArg_ParseTuple(args
,(char *)"OO:lwes_emitter_emit",&obj0
,&obj1
)) goto fail
;
1916 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_emitter
, SWIG_POINTER_EXCEPTION
| 0);
1917 if (SWIG_arg_fail(1)) SWIG_fail
;
1918 SWIG_Python_ConvertPtr(obj1
, (void **)&arg2
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
1919 if (SWIG_arg_fail(2)) SWIG_fail
;
1920 result
= (int)lwes_emitter_emit(arg1
,arg2
);
1923 resultobj
= SWIG_From_int((int)(result
));
1931 static PyObject
*_wrap_lwes_emitter_emitto(PyObject
*self
, PyObject
*args
) {
1932 PyObject
*resultobj
;
1933 char *arg1
= (char *) 0 ;
1934 char *arg2
= (char *) 0 ;
1936 struct lwes_emitter
*arg4
= (struct lwes_emitter
*) 0 ;
1937 struct lwes_event
*arg5
= (struct lwes_event
*) 0 ;
1939 PyObject
* obj0
= 0 ;
1940 PyObject
* obj1
= 0 ;
1941 PyObject
* obj2
= 0 ;
1942 PyObject
* obj3
= 0 ;
1943 PyObject
* obj4
= 0 ;
1945 if(!PyArg_ParseTuple(args
,(char *)"OOOOO:lwes_emitter_emitto",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
)) goto fail
;
1946 if (!SWIG_AsCharPtr(obj0
, (char**)&arg1
)) {
1947 SWIG_arg_fail(1);SWIG_fail
;
1949 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
1950 SWIG_arg_fail(2);SWIG_fail
;
1953 arg3
= (int)(SWIG_As_int(obj2
));
1954 if (SWIG_arg_fail(3)) SWIG_fail
;
1956 SWIG_Python_ConvertPtr(obj3
, (void **)&arg4
, SWIGTYPE_p_lwes_emitter
, SWIG_POINTER_EXCEPTION
| 0);
1957 if (SWIG_arg_fail(4)) SWIG_fail
;
1958 SWIG_Python_ConvertPtr(obj4
, (void **)&arg5
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
1959 if (SWIG_arg_fail(5)) SWIG_fail
;
1960 result
= (int)lwes_emitter_emitto(arg1
,arg2
,arg3
,arg4
,arg5
);
1963 resultobj
= SWIG_From_int((int)(result
));
1971 static PyObject
*_wrap_lwes_emitter_destroy(PyObject
*self
, PyObject
*args
) {
1972 PyObject
*resultobj
;
1973 struct lwes_emitter
*arg1
= (struct lwes_emitter
*) 0 ;
1975 PyObject
* obj0
= 0 ;
1977 if(!PyArg_ParseTuple(args
,(char *)"O:lwes_emitter_destroy",&obj0
)) goto fail
;
1978 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_emitter
, SWIG_POINTER_EXCEPTION
| 0);
1979 if (SWIG_arg_fail(1)) SWIG_fail
;
1980 result
= (int)lwes_emitter_destroy(arg1
);
1983 resultobj
= SWIG_From_int((int)(result
));
1991 static PyObject
*_wrap_lwes_event_create(PyObject
*self
, PyObject
*args
) {
1992 PyObject
*resultobj
;
1993 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
1994 char *arg2
= (char *) 0 ;
1995 struct lwes_event
*result
;
1996 PyObject
* obj0
= 0 ;
1997 PyObject
* obj1
= 0 ;
1999 if(!PyArg_ParseTuple(args
,(char *)"OO:lwes_event_create",&obj0
,&obj1
)) goto fail
;
2000 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event_type_db
, SWIG_POINTER_EXCEPTION
| 0);
2001 if (SWIG_arg_fail(1)) SWIG_fail
;
2002 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2003 SWIG_arg_fail(2);SWIG_fail
;
2005 result
= (struct lwes_event
*)lwes_event_create(arg1
,arg2
);
2007 resultobj
= SWIG_NewPointerObj((void*)(result
), SWIGTYPE_p_lwes_event
, 0);
2014 static PyObject
*_wrap_lwes_event_create_with_encoding(PyObject
*self
, PyObject
*args
) {
2015 PyObject
*resultobj
;
2016 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
2017 char *arg2
= (char *) 0 ;
2019 struct lwes_event
*result
;
2020 PyObject
* obj0
= 0 ;
2021 PyObject
* obj1
= 0 ;
2022 PyObject
* obj2
= 0 ;
2024 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_create_with_encoding",&obj0
,&obj1
,&obj2
)) goto fail
;
2025 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event_type_db
, SWIG_POINTER_EXCEPTION
| 0);
2026 if (SWIG_arg_fail(1)) SWIG_fail
;
2027 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2028 SWIG_arg_fail(2);SWIG_fail
;
2031 arg3
= (short)(SWIG_As_short(obj2
));
2032 if (SWIG_arg_fail(3)) SWIG_fail
;
2034 result
= (struct lwes_event
*)lwes_event_create_with_encoding(arg1
,arg2
,arg3
);
2036 resultobj
= SWIG_NewPointerObj((void*)(result
), SWIGTYPE_p_lwes_event
, 0);
2043 static PyObject
*_wrap_lwes_event_set_U_INT_16(PyObject
*self
, PyObject
*args
) {
2044 PyObject
*resultobj
;
2045 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2046 char *arg2
= (char *) 0 ;
2047 unsigned short arg3
;
2049 PyObject
* obj0
= 0 ;
2050 PyObject
* obj1
= 0 ;
2051 PyObject
* obj2
= 0 ;
2053 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_U_INT_16",&obj0
,&obj1
,&obj2
)) goto fail
;
2054 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2055 if (SWIG_arg_fail(1)) SWIG_fail
;
2056 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2057 SWIG_arg_fail(2);SWIG_fail
;
2060 arg3
= (unsigned short)(SWIG_As_unsigned_SS_short(obj2
));
2061 if (SWIG_arg_fail(3)) SWIG_fail
;
2063 result
= (int)lwes_event_set_U_INT_16(arg1
,arg2
,arg3
);
2066 resultobj
= SWIG_From_int((int)(result
));
2074 static PyObject
*_wrap_lwes_event_get_U_INT_16(PyObject
*self
, PyObject
*args
) {
2075 PyObject
*resultobj
;
2076 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2077 char *arg2
= (char *) 0 ;
2078 unsigned short *arg3
= (unsigned short *) 0 ;
2080 PyObject
* obj0
= 0 ;
2081 PyObject
* obj1
= 0 ;
2082 PyObject
* obj2
= 0 ;
2084 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_U_INT_16",&obj0
,&obj1
,&obj2
)) goto fail
;
2085 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2086 if (SWIG_arg_fail(1)) SWIG_fail
;
2087 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2088 SWIG_arg_fail(2);SWIG_fail
;
2090 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_unsigned_short
, SWIG_POINTER_EXCEPTION
| 0);
2091 if (SWIG_arg_fail(3)) SWIG_fail
;
2092 result
= (int)lwes_event_get_U_INT_16(arg1
,arg2
,arg3
);
2095 resultobj
= SWIG_From_int((int)(result
));
2103 static PyObject
*_wrap_lwes_event_set_INT_16(PyObject
*self
, PyObject
*args
) {
2104 PyObject
*resultobj
;
2105 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2106 char *arg2
= (char *) 0 ;
2109 PyObject
* obj0
= 0 ;
2110 PyObject
* obj1
= 0 ;
2111 PyObject
* obj2
= 0 ;
2113 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_INT_16",&obj0
,&obj1
,&obj2
)) goto fail
;
2114 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2115 if (SWIG_arg_fail(1)) SWIG_fail
;
2116 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2117 SWIG_arg_fail(2);SWIG_fail
;
2120 arg3
= (short)(SWIG_As_short(obj2
));
2121 if (SWIG_arg_fail(3)) SWIG_fail
;
2123 result
= (int)lwes_event_set_INT_16(arg1
,arg2
,arg3
);
2126 resultobj
= SWIG_From_int((int)(result
));
2134 static PyObject
*_wrap_lwes_event_get_INT_16(PyObject
*self
, PyObject
*args
) {
2135 PyObject
*resultobj
;
2136 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2137 char *arg2
= (char *) 0 ;
2138 short *arg3
= (short *) 0 ;
2140 PyObject
* obj0
= 0 ;
2141 PyObject
* obj1
= 0 ;
2142 PyObject
* obj2
= 0 ;
2144 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_INT_16",&obj0
,&obj1
,&obj2
)) goto fail
;
2145 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2146 if (SWIG_arg_fail(1)) SWIG_fail
;
2147 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2148 SWIG_arg_fail(2);SWIG_fail
;
2150 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_short
, SWIG_POINTER_EXCEPTION
| 0);
2151 if (SWIG_arg_fail(3)) SWIG_fail
;
2152 result
= (int)lwes_event_get_INT_16(arg1
,arg2
,arg3
);
2155 resultobj
= SWIG_From_int((int)(result
));
2163 static PyObject
*_wrap_lwes_event_set_U_INT_32(PyObject
*self
, PyObject
*args
) {
2164 PyObject
*resultobj
;
2165 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2166 char *arg2
= (char *) 0 ;
2169 PyObject
* obj0
= 0 ;
2170 PyObject
* obj1
= 0 ;
2171 PyObject
* obj2
= 0 ;
2173 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_U_INT_32",&obj0
,&obj1
,&obj2
)) goto fail
;
2174 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2175 if (SWIG_arg_fail(1)) SWIG_fail
;
2176 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2177 SWIG_arg_fail(2);SWIG_fail
;
2180 arg3
= (unsigned int)(SWIG_As_unsigned_SS_int(obj2
));
2181 if (SWIG_arg_fail(3)) SWIG_fail
;
2183 result
= (int)lwes_event_set_U_INT_32(arg1
,arg2
,arg3
);
2186 resultobj
= SWIG_From_int((int)(result
));
2194 static PyObject
*_wrap_lwes_event_get_U_INT_32(PyObject
*self
, PyObject
*args
) {
2195 PyObject
*resultobj
;
2196 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2197 char *arg2
= (char *) 0 ;
2198 unsigned int *arg3
= (unsigned int *) 0 ;
2200 PyObject
* obj0
= 0 ;
2201 PyObject
* obj1
= 0 ;
2202 PyObject
* obj2
= 0 ;
2204 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_U_INT_32",&obj0
,&obj1
,&obj2
)) goto fail
;
2205 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2206 if (SWIG_arg_fail(1)) SWIG_fail
;
2207 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2208 SWIG_arg_fail(2);SWIG_fail
;
2210 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_unsigned_int
, SWIG_POINTER_EXCEPTION
| 0);
2211 if (SWIG_arg_fail(3)) SWIG_fail
;
2212 result
= (int)lwes_event_get_U_INT_32(arg1
,arg2
,arg3
);
2215 resultobj
= SWIG_From_int((int)(result
));
2223 static PyObject
*_wrap_lwes_event_set_INT_32(PyObject
*self
, PyObject
*args
) {
2224 PyObject
*resultobj
;
2225 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2226 char *arg2
= (char *) 0 ;
2229 PyObject
* obj0
= 0 ;
2230 PyObject
* obj1
= 0 ;
2231 PyObject
* obj2
= 0 ;
2233 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_INT_32",&obj0
,&obj1
,&obj2
)) goto fail
;
2234 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2235 if (SWIG_arg_fail(1)) SWIG_fail
;
2236 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2237 SWIG_arg_fail(2);SWIG_fail
;
2240 arg3
= (int)(SWIG_As_int(obj2
));
2241 if (SWIG_arg_fail(3)) SWIG_fail
;
2243 result
= (int)lwes_event_set_INT_32(arg1
,arg2
,arg3
);
2246 resultobj
= SWIG_From_int((int)(result
));
2254 static PyObject
*_wrap_lwes_event_get_INT_32(PyObject
*self
, PyObject
*args
) {
2255 PyObject
*resultobj
;
2256 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2257 char *arg2
= (char *) 0 ;
2258 int *arg3
= (int *) 0 ;
2260 PyObject
* obj0
= 0 ;
2261 PyObject
* obj1
= 0 ;
2262 PyObject
* obj2
= 0 ;
2264 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_INT_32",&obj0
,&obj1
,&obj2
)) goto fail
;
2265 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2266 if (SWIG_arg_fail(1)) SWIG_fail
;
2267 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2268 SWIG_arg_fail(2);SWIG_fail
;
2270 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_int
, SWIG_POINTER_EXCEPTION
| 0);
2271 if (SWIG_arg_fail(3)) SWIG_fail
;
2272 result
= (int)lwes_event_get_INT_32(arg1
,arg2
,arg3
);
2275 resultobj
= SWIG_From_int((int)(result
));
2283 static PyObject
*_wrap_lwes_event_set_U_INT_64(PyObject
*self
, PyObject
*args
) {
2284 PyObject
*resultobj
;
2285 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2286 char *arg2
= (char *) 0 ;
2287 unsigned long long arg3
;
2289 PyObject
* obj0
= 0 ;
2290 PyObject
* obj1
= 0 ;
2291 PyObject
* obj2
= 0 ;
2293 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_U_INT_64",&obj0
,&obj1
,&obj2
)) goto fail
;
2294 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2295 if (SWIG_arg_fail(1)) SWIG_fail
;
2296 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2297 SWIG_arg_fail(2);SWIG_fail
;
2300 arg3
= (unsigned long long)(SWIG_As_unsigned_SS_long_SS_long(obj2
));
2301 if (SWIG_arg_fail(3)) SWIG_fail
;
2303 result
= (int)lwes_event_set_U_INT_64(arg1
,arg2
,arg3
);
2306 resultobj
= SWIG_From_int((int)(result
));
2314 static PyObject
*_wrap_lwes_event_get_U_INT_64(PyObject
*self
, PyObject
*args
) {
2315 PyObject
*resultobj
;
2316 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2317 char *arg2
= (char *) 0 ;
2318 unsigned long long *arg3
= (unsigned long long *) 0 ;
2320 PyObject
* obj0
= 0 ;
2321 PyObject
* obj1
= 0 ;
2322 PyObject
* obj2
= 0 ;
2324 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_U_INT_64",&obj0
,&obj1
,&obj2
)) goto fail
;
2325 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2326 if (SWIG_arg_fail(1)) SWIG_fail
;
2327 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2328 SWIG_arg_fail(2);SWIG_fail
;
2330 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_unsigned_long_long
, SWIG_POINTER_EXCEPTION
| 0);
2331 if (SWIG_arg_fail(3)) SWIG_fail
;
2332 result
= (int)lwes_event_get_U_INT_64(arg1
,arg2
,arg3
);
2335 resultobj
= SWIG_From_int((int)(result
));
2343 static PyObject
*_wrap_lwes_event_set_INT_64(PyObject
*self
, PyObject
*args
) {
2344 PyObject
*resultobj
;
2345 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2346 char *arg2
= (char *) 0 ;
2349 PyObject
* obj0
= 0 ;
2350 PyObject
* obj1
= 0 ;
2351 PyObject
* obj2
= 0 ;
2353 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_INT_64",&obj0
,&obj1
,&obj2
)) goto fail
;
2354 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2355 if (SWIG_arg_fail(1)) SWIG_fail
;
2356 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2357 SWIG_arg_fail(2);SWIG_fail
;
2360 arg3
= (long long)(SWIG_As_long_SS_long(obj2
));
2361 if (SWIG_arg_fail(3)) SWIG_fail
;
2363 result
= (int)lwes_event_set_INT_64(arg1
,arg2
,arg3
);
2366 resultobj
= SWIG_From_int((int)(result
));
2374 static PyObject
*_wrap_lwes_event_get_INT_64(PyObject
*self
, PyObject
*args
) {
2375 PyObject
*resultobj
;
2376 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2377 char *arg2
= (char *) 0 ;
2378 long long *arg3
= (long long *) 0 ;
2380 PyObject
* obj0
= 0 ;
2381 PyObject
* obj1
= 0 ;
2382 PyObject
* obj2
= 0 ;
2384 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_INT_64",&obj0
,&obj1
,&obj2
)) goto fail
;
2385 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2386 if (SWIG_arg_fail(1)) SWIG_fail
;
2387 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2388 SWIG_arg_fail(2);SWIG_fail
;
2390 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_long_long
, SWIG_POINTER_EXCEPTION
| 0);
2391 if (SWIG_arg_fail(3)) SWIG_fail
;
2392 result
= (int)lwes_event_get_INT_64(arg1
,arg2
,arg3
);
2395 resultobj
= SWIG_From_int((int)(result
));
2403 static PyObject
*_wrap_lwes_event_set_STRING(PyObject
*self
, PyObject
*args
) {
2404 PyObject
*resultobj
;
2405 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2406 char *arg2
= (char *) 0 ;
2407 char *arg3
= (char *) 0 ;
2409 PyObject
* obj0
= 0 ;
2410 PyObject
* obj1
= 0 ;
2411 PyObject
* obj2
= 0 ;
2413 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_STRING",&obj0
,&obj1
,&obj2
)) goto fail
;
2414 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2415 if (SWIG_arg_fail(1)) SWIG_fail
;
2416 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2417 SWIG_arg_fail(2);SWIG_fail
;
2419 if (!SWIG_AsCharPtr(obj2
, (char**)&arg3
)) {
2420 SWIG_arg_fail(3);SWIG_fail
;
2422 result
= (int)lwes_event_set_STRING(arg1
,arg2
,arg3
);
2425 resultobj
= SWIG_From_int((int)(result
));
2433 static PyObject
*_wrap_lwes_event_get_STRING(PyObject
*self
, PyObject
*args
) {
2434 PyObject
*resultobj
;
2435 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2436 char *arg2
= (char *) 0 ;
2437 char **arg3
= (char **) 0 ;
2439 PyObject
* obj0
= 0 ;
2440 PyObject
* obj1
= 0 ;
2441 PyObject
* obj2
= 0 ;
2443 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_STRING",&obj0
,&obj1
,&obj2
)) goto fail
;
2444 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2445 if (SWIG_arg_fail(1)) SWIG_fail
;
2446 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2447 SWIG_arg_fail(2);SWIG_fail
;
2449 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_p_char
, SWIG_POINTER_EXCEPTION
| 0);
2450 if (SWIG_arg_fail(3)) SWIG_fail
;
2451 result
= (int)lwes_event_get_STRING(arg1
,arg2
,arg3
);
2454 resultobj
= SWIG_From_int((int)(result
));
2462 static PyObject
*_wrap_lwes_event_set_IP_ADDR_w_string(PyObject
*self
, PyObject
*args
) {
2463 PyObject
*resultobj
;
2464 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2465 char *arg2
= (char *) 0 ;
2466 char *arg3
= (char *) 0 ;
2468 PyObject
* obj0
= 0 ;
2469 PyObject
* obj1
= 0 ;
2470 PyObject
* obj2
= 0 ;
2472 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_IP_ADDR_w_string",&obj0
,&obj1
,&obj2
)) goto fail
;
2473 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2474 if (SWIG_arg_fail(1)) SWIG_fail
;
2475 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2476 SWIG_arg_fail(2);SWIG_fail
;
2478 if (!SWIG_AsCharPtr(obj2
, (char**)&arg3
)) {
2479 SWIG_arg_fail(3);SWIG_fail
;
2481 result
= (int)lwes_event_set_IP_ADDR_w_string(arg1
,arg2
,arg3
);
2484 resultobj
= SWIG_From_int((int)(result
));
2492 static PyObject
*_wrap_lwes_event_get_IP_ADDR(PyObject
*self
, PyObject
*args
) {
2493 PyObject
*resultobj
;
2494 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2495 char *arg2
= (char *) 0 ;
2496 struct in_addr
*arg3
= (struct in_addr
*) 0 ;
2498 PyObject
* obj0
= 0 ;
2499 PyObject
* obj1
= 0 ;
2500 PyObject
* obj2
= 0 ;
2502 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_IP_ADDR",&obj0
,&obj1
,&obj2
)) goto fail
;
2503 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2504 if (SWIG_arg_fail(1)) SWIG_fail
;
2505 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2506 SWIG_arg_fail(2);SWIG_fail
;
2508 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_in_addr
, SWIG_POINTER_EXCEPTION
| 0);
2509 if (SWIG_arg_fail(3)) SWIG_fail
;
2510 result
= (int)lwes_event_get_IP_ADDR(arg1
,arg2
,arg3
);
2513 resultobj
= SWIG_From_int((int)(result
));
2521 static PyObject
*_wrap_lwes_event_set_BOOLEAN(PyObject
*self
, PyObject
*args
) {
2522 PyObject
*resultobj
;
2523 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2524 char *arg2
= (char *) 0 ;
2527 PyObject
* obj0
= 0 ;
2528 PyObject
* obj1
= 0 ;
2529 PyObject
* obj2
= 0 ;
2531 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_set_BOOLEAN",&obj0
,&obj1
,&obj2
)) goto fail
;
2532 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2533 if (SWIG_arg_fail(1)) SWIG_fail
;
2534 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2535 SWIG_arg_fail(2);SWIG_fail
;
2538 arg3
= (int)(SWIG_As_int(obj2
));
2539 if (SWIG_arg_fail(3)) SWIG_fail
;
2541 result
= (int)lwes_event_set_BOOLEAN(arg1
,arg2
,arg3
);
2544 resultobj
= SWIG_From_int((int)(result
));
2552 static PyObject
*_wrap_lwes_event_get_BOOLEAN(PyObject
*self
, PyObject
*args
) {
2553 PyObject
*resultobj
;
2554 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2555 char *arg2
= (char *) 0 ;
2556 int *arg3
= (int *) 0 ;
2558 PyObject
* obj0
= 0 ;
2559 PyObject
* obj1
= 0 ;
2560 PyObject
* obj2
= 0 ;
2562 if(!PyArg_ParseTuple(args
,(char *)"OOO:lwes_event_get_BOOLEAN",&obj0
,&obj1
,&obj2
)) goto fail
;
2563 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2564 if (SWIG_arg_fail(1)) SWIG_fail
;
2565 if (!SWIG_AsCharPtr(obj1
, (char**)&arg2
)) {
2566 SWIG_arg_fail(2);SWIG_fail
;
2568 SWIG_Python_ConvertPtr(obj2
, (void **)&arg3
, SWIGTYPE_p_int
, SWIG_POINTER_EXCEPTION
| 0);
2569 if (SWIG_arg_fail(3)) SWIG_fail
;
2570 result
= (int)lwes_event_get_BOOLEAN(arg1
,arg2
,arg3
);
2573 resultobj
= SWIG_From_int((int)(result
));
2581 static PyObject
*_wrap_lwes_event_destroy(PyObject
*self
, PyObject
*args
) {
2582 PyObject
*resultobj
;
2583 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2585 PyObject
* obj0
= 0 ;
2587 if(!PyArg_ParseTuple(args
,(char *)"O:lwes_event_destroy",&obj0
)) goto fail
;
2588 SWIG_Python_ConvertPtr(obj0
, (void **)&arg1
, SWIGTYPE_p_lwes_event
, SWIG_POINTER_EXCEPTION
| 0);
2589 if (SWIG_arg_fail(1)) SWIG_fail
;
2590 result
= (int)lwes_event_destroy(arg1
);
2593 resultobj
= SWIG_From_int((int)(result
));
2601 static PyMethodDef SwigMethods
[] = {
2602 { (char *)"lwes_event_type_db_create", _wrap_lwes_event_type_db_create
, METH_VARARGS
, NULL
},
2603 { (char *)"lwes_event_type_db_destroy", _wrap_lwes_event_type_db_destroy
, METH_VARARGS
, NULL
},
2604 { (char *)"lwes_emitter_create", _wrap_lwes_emitter_create
, METH_VARARGS
, NULL
},
2605 { (char *)"lwes_emitter_create_with_ttl", _wrap_lwes_emitter_create_with_ttl
, METH_VARARGS
, NULL
},
2606 { (char *)"lwes_emitter_emit", _wrap_lwes_emitter_emit
, METH_VARARGS
, NULL
},
2607 { (char *)"lwes_emitter_emitto", _wrap_lwes_emitter_emitto
, METH_VARARGS
, NULL
},
2608 { (char *)"lwes_emitter_destroy", _wrap_lwes_emitter_destroy
, METH_VARARGS
, NULL
},
2609 { (char *)"lwes_event_create", _wrap_lwes_event_create
, METH_VARARGS
, NULL
},
2610 { (char *)"lwes_event_create_with_encoding", _wrap_lwes_event_create_with_encoding
, METH_VARARGS
, NULL
},
2611 { (char *)"lwes_event_set_U_INT_16", _wrap_lwes_event_set_U_INT_16
, METH_VARARGS
, NULL
},
2612 { (char *)"lwes_event_get_U_INT_16", _wrap_lwes_event_get_U_INT_16
, METH_VARARGS
, NULL
},
2613 { (char *)"lwes_event_set_INT_16", _wrap_lwes_event_set_INT_16
, METH_VARARGS
, NULL
},
2614 { (char *)"lwes_event_get_INT_16", _wrap_lwes_event_get_INT_16
, METH_VARARGS
, NULL
},
2615 { (char *)"lwes_event_set_U_INT_32", _wrap_lwes_event_set_U_INT_32
, METH_VARARGS
, NULL
},
2616 { (char *)"lwes_event_get_U_INT_32", _wrap_lwes_event_get_U_INT_32
, METH_VARARGS
, NULL
},
2617 { (char *)"lwes_event_set_INT_32", _wrap_lwes_event_set_INT_32
, METH_VARARGS
, NULL
},
2618 { (char *)"lwes_event_get_INT_32", _wrap_lwes_event_get_INT_32
, METH_VARARGS
, NULL
},
2619 { (char *)"lwes_event_set_U_INT_64", _wrap_lwes_event_set_U_INT_64
, METH_VARARGS
, NULL
},
2620 { (char *)"lwes_event_get_U_INT_64", _wrap_lwes_event_get_U_INT_64
, METH_VARARGS
, NULL
},
2621 { (char *)"lwes_event_set_INT_64", _wrap_lwes_event_set_INT_64
, METH_VARARGS
, NULL
},
2622 { (char *)"lwes_event_get_INT_64", _wrap_lwes_event_get_INT_64
, METH_VARARGS
, NULL
},
2623 { (char *)"lwes_event_set_STRING", _wrap_lwes_event_set_STRING
, METH_VARARGS
, NULL
},
2624 { (char *)"lwes_event_get_STRING", _wrap_lwes_event_get_STRING
, METH_VARARGS
, NULL
},
2625 { (char *)"lwes_event_set_IP_ADDR_w_string", _wrap_lwes_event_set_IP_ADDR_w_string
, METH_VARARGS
, NULL
},
2626 { (char *)"lwes_event_get_IP_ADDR", _wrap_lwes_event_get_IP_ADDR
, METH_VARARGS
, NULL
},
2627 { (char *)"lwes_event_set_BOOLEAN", _wrap_lwes_event_set_BOOLEAN
, METH_VARARGS
, NULL
},
2628 { (char *)"lwes_event_get_BOOLEAN", _wrap_lwes_event_get_BOOLEAN
, METH_VARARGS
, NULL
},
2629 { (char *)"lwes_event_destroy", _wrap_lwes_event_destroy
, METH_VARARGS
, NULL
},
2630 { NULL
, NULL
, 0, NULL
}
2634 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2636 static swig_type_info _swigt__p_lwes_event
[] = {{"_p_lwes_event", 0, "struct lwes_event *", 0, 0, 0, 0},{"_p_lwes_event", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2637 static swig_type_info _swigt__size_t
[] = {{"_size_t", 0, "size_t", 0, 0, 0, 0},{"_size_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2638 static swig_type_info _swigt__p_unsigned_int
[] = {{"_p_unsigned_int", 0, "unsigned int *", 0, 0, 0, 0},{"_p_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2639 static swig_type_info _swigt__p_long_long
[] = {{"_p_long_long", 0, "long long *", 0, 0, 0, 0},{"_p_long_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2640 static swig_type_info _swigt__p_unsigned_long_long
[] = {{"_p_unsigned_long_long", 0, "unsigned long long *", 0, 0, 0, 0},{"_p_unsigned_long_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2641 static swig_type_info _swigt__p_short
[] = {{"_p_short", 0, "short *", 0, 0, 0, 0},{"_p_short", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2642 static swig_type_info _swigt__p_unsigned_short
[] = {{"_p_unsigned_short", 0, "unsigned short *", 0, 0, 0, 0},{"_p_unsigned_short", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2643 static swig_type_info _swigt__p_p_char
[] = {{"_p_p_char", 0, "char **", 0, 0, 0, 0},{"_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2644 static swig_type_info _swigt__p_char
[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2645 static swig_type_info _swigt__ptrdiff_t
[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2646 static swig_type_info _swigt__p_lwes_emitter
[] = {{"_p_lwes_emitter", 0, "struct lwes_emitter *", 0, 0, 0, 0},{"_p_lwes_emitter", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2647 static swig_type_info _swigt__p_in_addr
[] = {{"_p_in_addr", 0, "struct in_addr *", 0, 0, 0, 0},{"_p_in_addr", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2648 static swig_type_info _swigt__p_int
[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2649 static swig_type_info _swigt__p_lwes_event_type_db
[] = {{"_p_lwes_event_type_db", 0, "struct lwes_event_type_db *", 0, 0, 0, 0},{"_p_lwes_event_type_db", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2651 static swig_type_info
*swig_types_initial
[] = {
2652 _swigt__p_lwes_event
,
2654 _swigt__p_unsigned_int
,
2655 _swigt__p_long_long
,
2656 _swigt__p_unsigned_long_long
,
2658 _swigt__p_unsigned_short
,
2662 _swigt__p_lwes_emitter
,
2665 _swigt__p_lwes_event_type_db
,
2670 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2672 static swig_const_info swig_const_table
[] = {
2673 {0, 0, 0, 0.0, 0, 0}};
2684 /* Python-specific SWIG API */
2685 #define SWIG_newvarlink() SWIG_Python_newvarlink()
2686 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
2687 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
2689 /* -----------------------------------------------------------------------------
2690 * global variable support code.
2691 * ----------------------------------------------------------------------------- */
2693 typedef struct swig_globalvar
{
2694 char *name
; /* Name of global variable */
2695 PyObject
*(*get_attr
)(); /* Return the current value */
2696 int (*set_attr
)(PyObject
*); /* Set the value */
2697 struct swig_globalvar
*next
;
2700 typedef struct swig_varlinkobject
{
2702 swig_globalvar
*vars
;
2703 } swig_varlinkobject
;
2706 swig_varlink_repr(swig_varlinkobject
*v
) {
2708 return PyString_FromString("<Swig global variables>");
2712 swig_varlink_print(swig_varlinkobject
*v
, FILE *fp
, int flags
) {
2713 swig_globalvar
*var
;
2715 fprintf(fp
,"Swig global variables { ");
2716 for (var
= v
->vars
; var
; var
=var
->next
) {
2717 fprintf(fp
,"%s", var
->name
);
2718 if (var
->next
) fprintf(fp
,", ");
2725 swig_varlink_getattr(swig_varlinkobject
*v
, char *n
) {
2726 swig_globalvar
*var
= v
->vars
;
2728 if (strcmp(var
->name
,n
) == 0) {
2729 return (*var
->get_attr
)();
2733 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
2738 swig_varlink_setattr(swig_varlinkobject
*v
, char *n
, PyObject
*p
) {
2739 swig_globalvar
*var
= v
->vars
;
2741 if (strcmp(var
->name
,n
) == 0) {
2742 return (*var
->set_attr
)(p
);
2746 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
2750 static PyTypeObject varlinktype
= {
2751 PyObject_HEAD_INIT(0)
2752 0, /* Number of items in variable part (ob_size) */
2753 (char *)"swigvarlink", /* Type name (tp_name) */
2754 sizeof(swig_varlinkobject
), /* Basic size (tp_basicsize) */
2755 0, /* Itemsize (tp_itemsize) */
2756 0, /* Deallocator (tp_dealloc) */
2757 (printfunc
) swig_varlink_print
, /* Print (tp_print) */
2758 (getattrfunc
) swig_varlink_getattr
, /* get attr (tp_getattr) */
2759 (setattrfunc
) swig_varlink_setattr
, /* Set attr (tp_setattr) */
2761 (reprfunc
) swig_varlink_repr
, /* tp_repr */
2762 0, /* tp_as_number */
2763 0, /* tp_as_sequence */
2764 0, /* tp_as_mapping */
2768 0, /* tp_getattro */
2769 0, /* tp_setattro */
2770 0, /* tp_as_buffer */
2773 #if PY_VERSION_HEX >= 0x02000000
2774 0, /* tp_traverse */
2777 #if PY_VERSION_HEX >= 0x02010000
2778 0, /* tp_richcompare */
2779 0, /* tp_weaklistoffset */
2781 #if PY_VERSION_HEX >= 0x02020000
2782 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
2784 #if PY_VERSION_HEX >= 0x02030000
2788 0,0,0,0 /* tp_alloc -> tp_next */
2792 /* Create a variable linking object for use later */
2794 SWIG_Python_newvarlink(void) {
2795 swig_varlinkobject
*result
= 0;
2796 result
= PyMem_NEW(swig_varlinkobject
,1);
2797 varlinktype
.ob_type
= &PyType_Type
; /* Patch varlinktype into a PyType */
2798 result
->ob_type
= &varlinktype
;
2800 result
->ob_refcnt
= 0;
2801 Py_XINCREF((PyObject
*) result
);
2802 return ((PyObject
*) result
);
2806 SWIG_Python_addvarlink(PyObject
*p
, char *name
, PyObject
*(*get_attr
)(void), int (*set_attr
)(PyObject
*p
)) {
2807 swig_varlinkobject
*v
;
2809 v
= (swig_varlinkobject
*) p
;
2810 gv
= (swig_globalvar
*) malloc(sizeof(swig_globalvar
));
2811 gv
->name
= (char *) malloc(strlen(name
)+1);
2812 strcpy(gv
->name
,name
);
2813 gv
->get_attr
= get_attr
;
2814 gv
->set_attr
= set_attr
;
2819 /* -----------------------------------------------------------------------------
2820 * constants/methods manipulation
2821 * ----------------------------------------------------------------------------- */
2823 /* Install Constants */
2825 SWIG_Python_InstallConstants(PyObject
*d
, swig_const_info constants
[]) {
2828 for (i
= 0; constants
[i
].type
; i
++) {
2829 switch(constants
[i
].type
) {
2831 obj
= PyInt_FromLong(constants
[i
].lvalue
);
2834 obj
= PyFloat_FromDouble(constants
[i
].dvalue
);
2836 case SWIG_PY_STRING
:
2837 if (constants
[i
].pvalue
) {
2838 obj
= PyString_FromString((char *) constants
[i
].pvalue
);
2844 case SWIG_PY_POINTER
:
2845 obj
= SWIG_NewPointerObj(constants
[i
].pvalue
, *(constants
[i
]).ptype
,0);
2847 case SWIG_PY_BINARY
:
2848 obj
= SWIG_NewPackedObj(constants
[i
].pvalue
, constants
[i
].lvalue
, *(constants
[i
].ptype
));
2855 PyDict_SetItemString(d
,constants
[i
].name
,obj
);
2861 /* -----------------------------------------------------------------------------*/
2862 /* Fix SwigMethods to carry the callback ptrs when needed */
2863 /* -----------------------------------------------------------------------------*/
2866 SWIG_Python_FixMethods(PyMethodDef
*methods
,
2867 swig_const_info
*const_table
,
2868 swig_type_info
**types
,
2869 swig_type_info
**types_initial
) {
2871 for (i
= 0; methods
[i
].ml_name
; ++i
) {
2872 char *c
= methods
[i
].ml_doc
;
2873 if (c
&& (c
= strstr(c
, "swig_ptr: "))) {
2875 swig_const_info
*ci
= 0;
2876 char *name
= c
+ 10;
2877 for (j
= 0; const_table
[j
].type
; j
++) {
2878 if (strncmp(const_table
[j
].name
, name
,
2879 strlen(const_table
[j
].name
)) == 0) {
2880 ci
= &(const_table
[j
]);
2885 size_t shift
= (ci
->ptype
) - types
;
2886 swig_type_info
*ty
= types_initial
[shift
];
2887 size_t ldoc
= (c
- methods
[i
].ml_doc
);
2888 size_t lptr
= strlen(ty
->name
)+2*sizeof(void*)+2;
2889 char *ndoc
= (char*)malloc(ldoc
+ lptr
+ 10);
2891 void *ptr
= (ci
->type
== SWIG_PY_POINTER
) ? ci
->pvalue
: (void *)(ci
->lvalue
);
2892 strncpy(buff
, methods
[i
].ml_doc
, ldoc
);
2894 strncpy(buff
, "swig_ptr: ", 10);
2896 SWIG_PackVoidPtr(buff
, ptr
, ty
->name
, lptr
);
2897 methods
[i
].ml_doc
= ndoc
;
2903 /* -----------------------------------------------------------------------------*
2904 * Initialize type list
2905 * -----------------------------------------------------------------------------*/
2907 #if PY_MAJOR_VERSION < 2
2908 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2909 is copied out of Python/modsupport.c in python version 2.3.4 */
2911 PyModule_AddObject(PyObject
*m
, char *name
, PyObject
*o
)
2914 if (!PyModule_Check(m
)) {
2915 PyErr_SetString(PyExc_TypeError
,
2916 "PyModule_AddObject() needs module as first arg");
2920 PyErr_SetString(PyExc_TypeError
,
2921 "PyModule_AddObject() needs non-NULL value");
2925 dict
= PyModule_GetDict(m
);
2927 /* Internal error -- modules must have a dict! */
2928 PyErr_Format(PyExc_SystemError
, "module '%s' has no __dict__",
2929 PyModule_GetName(m
));
2932 if (PyDict_SetItemString(dict
, name
, o
))
2939 static swig_type_info
**
2940 SWIG_Python_SetTypeListHandle(swig_type_info
**type_list_handle
) {
2941 static PyMethodDef swig_empty_runtime_method_table
[] = {
2947 PyObject
*module
= Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
,
2948 swig_empty_runtime_method_table
);
2949 PyObject
*pointer
= PyCObject_FromVoidPtr((void *) type_list_handle
, NULL
);
2950 if (pointer
&& module
) {
2951 PyModule_AddObject(module
, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
, pointer
);
2953 return type_list_handle
;
2956 static swig_type_info
**
2957 SWIG_Python_LookupTypePointer(swig_type_info
**type_list_handle
) {
2958 swig_type_info
**type_pointer
;
2960 /* first check if module already created */
2961 type_pointer
= SWIG_Python_GetTypeListHandle();
2963 return type_pointer
;
2965 /* create a new module and variable */
2966 return SWIG_Python_SetTypeListHandle(type_list_handle
);
2974 /* -----------------------------------------------------------------------------*
2975 * Partial Init method
2976 * -----------------------------------------------------------------------------*/
2978 #ifdef SWIG_LINK_RUNTIME
2982 SWIGEXPORT(void *) SWIG_ReturnGlobalTypeList(void *);
2988 SWIGEXPORT(void) SWIG_init(void) {
2989 static PyObject
*SWIG_globals
= 0;
2990 static int typeinit
= 0;
2993 if (!SWIG_globals
) SWIG_globals
= SWIG_newvarlink();
2995 /* Fix SwigMethods to carry the callback ptrs when needed */
2996 SWIG_Python_FixMethods(SwigMethods
, swig_const_table
, swig_types
, swig_types_initial
);
2998 m
= Py_InitModule((char *) SWIG_name
, SwigMethods
);
2999 d
= PyModule_GetDict(m
);
3002 #ifdef SWIG_LINK_RUNTIME
3003 swig_type_list_handle
= (swig_type_info
**) SWIG_ReturnGlobalTypeList(swig_type_list_handle
);
3005 # ifndef SWIG_STATIC_RUNTIME
3006 swig_type_list_handle
= SWIG_Python_LookupTypePointer(swig_type_list_handle
);
3009 for (i
= 0; swig_types_initial
[i
]; i
++) {
3010 swig_types
[i
] = SWIG_TypeRegister(swig_types_initial
[i
]);
3014 SWIG_InstallConstants(d
,swig_const_table
);