adding LICENSE
[lwes-python/github-mirror.git] / lwes_wrap.c
blobaa7da1470f9bee3d240ee20492c0ee7e7f29a30f
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.24
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 * ----------------------------------------------------------------------------- */
11 #define SWIGPYTHON
13 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
14 # if defined(__SUNPRO_CC)
15 # define SWIG_TEMPLATE_DISAMBIGUATOR template
16 # else
17 # define SWIG_TEMPLATE_DISAMBIGUATOR
18 # endif
19 #endif
22 #include <Python.h>
24 /***********************************************************************
25 * swigrun.swg
27 * This file contains generic CAPI SWIG runtime support for pointer
28 * type checking.
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)
41 #else
42 #define SWIG_TYPE_TABLE_NAME
43 #endif
45 #include <string.h>
47 #ifndef SWIGINLINE
48 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
49 # define SWIGINLINE inline
50 #else
51 # define SWIGINLINE
52 #endif
53 #endif
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.
63 #ifndef SWIGRUNTIME
64 #define SWIGRUNTIME static
65 #endif
66 #ifndef SWIGRUNTIMEINLINE
67 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
68 #endif
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
74 typedef void *(*swig_converter_func)(void *);
75 typedef struct swig_type_info *(*swig_dycast_func)(void **);
77 typedef struct swig_type_info {
78 const char *name;
79 swig_converter_func converter;
80 const char *str;
81 void *clientdata;
82 swig_dycast_func dcast;
83 struct swig_type_info *next;
84 struct swig_type_info *prev;
85 } swig_type_info;
87 /*
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 ' '.
94 SWIGRUNTIME int
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>|...
108 SWIGRUNTIME int
109 SWIG_TypeEquiv(const char *nb, const char *tb) {
110 int equiv = 0;
111 const char* te = tb + strlen(tb);
112 const char* ne = nb;
113 while (!equiv && *ne) {
114 for (nb = ne; *ne; ++ne) {
115 if (*ne == '|') break;
117 equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
118 if (*ne) ++ne;
120 return equiv;
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 */
130 tc = *tl;
131 while (tc) {
132 /* check simple type equivalence */
133 int typeequiv = (strcmp(tc->name, ti->name) == 0);
134 /* check full type equivalence, resolving typedefs */
135 if (!typeequiv) {
136 /* only if tc is not a typedef (no '|' on it) */
137 if (tc->str && ti->str && !strstr(tc->str,"|")) {
138 typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
141 if (typeequiv) {
142 /* Already exists in the table. Just add additional types to the list */
143 if (ti->clientdata) tc->clientdata = ti->clientdata;
144 head = tc;
145 next = tc->next;
146 goto l1;
148 tc = tc->prev;
150 head = ti;
151 next = 0;
153 /* Place in list */
154 ti->prev = *tl;
155 *tl = ti;
157 /* Build linked lists */
159 ret = head;
160 tc = ti + 1;
161 /* Patch up the rest of the links */
162 while (tc->name) {
163 head->next = tc;
164 tc->prev = head;
165 head = tc;
166 tc++;
168 if (next) next->prev = head;
169 head->next = next;
171 return ret;
175 Check the typename
177 SWIGRUNTIME swig_type_info *
178 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
179 swig_type_info *s;
180 if (!ty) return 0; /* Void pointer */
181 s = ty->next; /* First element always just a name */
182 do {
183 if (strcmp(s->name,c) == 0) {
184 if (s == ty->next) return s;
185 /* Move s to the top of the linked list */
186 s->prev->next = s->next;
187 if (s->next) {
188 s->next->prev = s->prev;
190 /* Insert s as second element in the list */
191 s->next = ty->next;
192 if (ty->next) ty->next->prev = s;
193 ty->next = s;
194 s->prev = ty;
195 return s;
197 s = s->next;
198 } while (s && (s != ty->next));
199 return 0;
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);
219 if (ty) lastty = ty;
221 return lastty;
225 Return the name associated with this type
227 SWIGRUNTIMEINLINE const char *
228 SWIG_TypeName(const swig_type_info *ty) {
229 return ty->name;
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
241 specific. */
242 if (type->str != NULL) {
243 const char *last_name = type->str;
244 const char *s;
245 for (s = type->str; *s; s++)
246 if (*s == '|') last_name = s+1;
247 return last_name;
249 else
250 return type->name;
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;
259 while (ty) {
260 if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
261 if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
262 ty = ty->prev;
264 return 0;
268 Set the clientdata field for a type
270 SWIGRUNTIME void
271 SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) {
272 swig_type_info *tc, *equiv;
273 if (ti->clientdata) return;
274 /* if (ti->clientdata == clientdata) return; */
275 ti->clientdata = clientdata;
276 equiv = ti->next;
277 while (equiv) {
278 if (!equiv->converter) {
279 tc = tl;
280 while (tc) {
281 if ((strcmp(tc->name, equiv->name) == 0))
282 SWIG_TypeClientDataTL(tl,tc,clientdata);
283 tc = tc->prev;
286 equiv = equiv->next;
291 Pack binary data into a string
293 SWIGRUNTIME char *
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) {
300 uu = *u;
301 *(c++) = hex[(uu & 0xf0) >> 4];
302 *(c++) = hex[uu & 0xf];
304 return c;
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);
321 else
322 return (char *) 0;
323 d = *(c++);
324 if ((d >= '0') && (d <= '9'))
325 uu |= (d - '0');
326 else if ((d >= 'a') && (d <= 'f'))
327 uu |= (d - ('a'-10));
328 else
329 return (char *) 0;
330 *u = uu;
332 return c;
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.
341 SWIGRUNTIME void
342 SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
343 swig_type_info *equiv = type->next;
344 swig_type_info *tc;
345 if (!type->clientdata) return;
346 while (equiv) {
347 if (!equiv->converter) {
348 tc = tl;
349 while (tc) {
350 if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
351 SWIG_TypeClientDataTL(tl,tc, type->clientdata);
352 tc = tc->prev;
355 equiv = equiv->next;
360 Pack 'void *' into a string buffer.
362 SWIGRUNTIME char *
363 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
364 char *r = buff;
365 if ((2*sizeof(void *) + 2) > bsz) return 0;
366 *(r++) = '_';
367 r = SWIG_PackData(r,&ptr,sizeof(void *));
368 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
369 strcpy(r,name);
370 return buff;
373 SWIGRUNTIME const char *
374 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
375 if (*c != '_') {
376 if (strcmp(c,"NULL") == 0) {
377 *ptr = (void *) 0;
378 return name;
379 } else {
380 return 0;
383 return SWIG_UnpackData(++c,ptr,sizeof(void *));
386 SWIGRUNTIME char *
387 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
388 char *r = buff;
389 size_t lname = (name ? strlen(name) : 0);
390 if ((2*sz + 2 + lname) > bsz) return 0;
391 *(r++) = '_';
392 r = SWIG_PackData(r,ptr,sz);
393 if (lname) {
394 strncpy(r,name,lname+1);
395 } else {
396 *r = 0;
398 return buff;
401 SWIGRUNTIME const char *
402 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
403 if (*c != '_') {
404 if (strcmp(c,"NULL") == 0) {
405 memset(ptr,0,sz);
406 return name;
407 } else {
408 return 0;
411 return SWIG_UnpackData(++c,ptr,sz);
414 #ifdef __cplusplus
416 #endif
418 /***********************************************************************
419 * common.swg
421 * This file contains generic SWIG runtime support for pointer
422 * type checking as well as a few commonly used macros to control
423 * external linkage.
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
437 # else
438 # define SWIGEXPORT(a) a
439 # endif
440 #else
441 # define SWIGEXPORT(a) a
442 #endif
444 #ifdef __cplusplus
445 extern "C" {
446 #endif
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 */
471 static void
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.
481 static void
482 SWIG_PropagateClientData(swig_type_info *type) {
483 SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
486 #ifdef __cplusplus
488 #endif
490 /* -----------------------------------------------------------------------------
491 * SWIG API. Portion that goes into the runtime
492 * ----------------------------------------------------------------------------- */
494 #ifdef __cplusplus
495 extern "C" {
496 #endif
498 /* -----------------------------------------------------------------------------
499 * for internal method declarations
500 * ----------------------------------------------------------------------------- */
502 #ifndef SWIGINTERN
503 #define SWIGINTERN static
504 #endif
506 #ifndef SWIGINTERNSHORT
507 #ifdef __cplusplus
508 #define SWIGINTERNSHORT static inline
509 #else /* C case */
510 #define SWIGINTERNSHORT static
511 #endif /* __cplusplus */
512 #endif
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)
526 Contract support
528 #define SWIG_contract_assert(expr, msg) \
529 if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
531 /* -----------------------------------------------------------------------------
532 * Constant declarations
533 * ----------------------------------------------------------------------------- */
535 /* Constant Types */
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 {
544 int type;
545 char *name;
546 long lvalue;
547 double dvalue;
548 void *pvalue;
549 swig_type_info **ptype;
550 } swig_const_info;
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
560 #ifdef __cplusplus
562 #endif
565 /***********************************************************************
566 * pyrun.swg
568 * This file contains the runtime support for Python modules
569 * and includes code for managing global variables and pointer
570 * type checking.
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
592 not always safe.
594 #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
595 # define SWIG_COBJECT_TYPES
596 #endif
598 /* Flags for pointer conversion */
599 #define SWIG_POINTER_EXCEPTION 0x1
600 #define SWIG_POINTER_DISOWN 0x2
603 #ifdef __cplusplus
604 extern "C" {
605 #endif
607 /* -----------------------------------------------------------------------------
608 * Create a new pointer string
609 * ----------------------------------------------------------------------------- */
611 #ifndef SWIG_BUFFER_SIZE
612 #define SWIG_BUFFER_SIZE 1024
613 #endif
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 * ----------------------------------------------------------------------------- */
621 typedef struct {
622 PyObject_HEAD
623 void *ptr;
624 const char *desc;
625 } PySwigObject;
627 /* Declarations for objects of type PySwigObject */
629 SWIGRUNTIME int
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);
635 return 0;
636 } else {
637 return 1;
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)
666 char buf[100];
667 unsigned long x = (unsigned long)v->ptr;
668 if (x == 0)
669 strcpy(buf, "0");
670 else
671 PyOS_snprintf(buf, sizeof(buf), "0%lo", x);
672 return PyString_FromString(buf);
675 SWIGRUNTIME PyObject *
676 PySwigObject_hex(PySwigObject *v)
678 char buf[100];
679 PyOS_snprintf(buf, sizeof(buf), "0x%lx", (unsigned long)v->ptr);
680 return PyString_FromString(buf);
683 SWIGRUNTIME int
684 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
686 int c = strcmp(v->desc, w->desc);
687 if (c) {
688 return c;
689 } else {
690 void *i = v->ptr;
691 void *j = w->ptr;
692 return (i < j) ? -1 : (i > j) ? 1 : 0;
696 SWIGRUNTIME void
697 PySwigObject_dealloc(PySwigObject *self)
699 PyObject_DEL(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*/
719 0, /*nb_invert*/
720 0, /*nb_lshift*/
721 0, /*nb_rshift*/
722 0, /*nb_and*/
723 0, /*nb_xor*/
724 0, /*nb_or*/
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 */
733 #endif
736 static int type_init = 0;
737 static PyTypeObject PySwigObject_Type;
739 if (!type_init) {
740 PyTypeObject tmp = {
741 PyObject_HEAD_INIT(&PyType_Type)
742 0, /*ob_size*/
743 "PySwigObject", /*tp_name*/
744 sizeof(PySwigObject), /*tp_basicsize*/
745 0, /*tp_itemsize*/
746 /* methods */
747 (destructor)PySwigObject_dealloc, /*tp_dealloc*/
748 (printfunc)PySwigObject_print, /*tp_print*/
749 (getattrfunc)0, /*tp_getattr*/
750 (setattrfunc)0, /*tp_setattr*/
751 (cmpfunc)PySwigObject_compare, /*tp_compare*/
752 (reprfunc)PySwigObject_repr, /*tp_repr*/
753 &PySwigObject_as_number, /*tp_as_number*/
754 0, /*tp_as_sequence*/
755 0, /*tp_as_mapping*/
756 (hashfunc)0, /*tp_hash*/
757 (ternaryfunc)0, /*tp_call*/
758 (reprfunc)PySwigObject_str, /*tp_str*/
759 /* Space for future expansion */
760 0L,0L,0L,0L,
761 PySwigObject_Type__doc__, /* Documentation string */
762 #if PY_VERSION_HEX >= 0x02000000
763 0, /* tp_traverse */
764 0, /* tp_clear */
765 #endif
766 #if PY_VERSION_HEX >= 0x02010000
767 0, /* tp_richcompare */
768 0, /* tp_weaklistoffset */
769 #endif
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 */
772 #endif
773 #if PY_VERSION_HEX >= 0x02030000
774 0, /* tp_del */
775 #endif
776 #ifdef COUNT_ALLOCS
777 0,0,0,0 /* tp_alloc -> tp_next */
778 #endif
781 PySwigObject_Type = tmp;
782 type_init = 1;
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;
793 self->ptr = ptr;
794 self->desc = desc;
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 * ----------------------------------------------------------------------------- */
820 typedef struct {
821 PyObject_HEAD
822 void *pack;
823 const char *desc;
824 size_t size;
825 } PySwigPacked;
827 SWIGRUNTIME int
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))) {
833 fputs("at ", fp);
834 fputs(result, fp);
836 fputs(v->desc,fp);
837 fputs(">", fp);
838 return 0;
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);
847 } else {
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);
858 } else {
859 return PyString_FromFormat("%s", v->desc);
863 SWIGRUNTIME int
864 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
866 int c = strcmp(v->desc, w->desc);
867 if (c) {
868 return c;
869 } else {
870 size_t i = v->size;
871 size_t j = w->size;
872 int s = (i < j) ? -1 : (i > j) ? 1 : 0;
873 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
877 SWIGRUNTIME void
878 PySwigPacked_dealloc(PySwigPacked *self)
880 free(self->pack);
881 PyObject_DEL(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;
891 if (!type_init) {
892 PyTypeObject tmp = {
893 PyObject_HEAD_INIT(&PyType_Type)
894 0, /*ob_size*/
895 "PySwigPacked", /*tp_name*/
896 sizeof(PySwigPacked), /*tp_basicsize*/
897 0, /*tp_itemsize*/
898 /* methods */
899 (destructor)PySwigPacked_dealloc, /*tp_dealloc*/
900 (printfunc)PySwigPacked_print, /*tp_print*/
901 (getattrfunc)0, /*tp_getattr*/
902 (setattrfunc)0, /*tp_setattr*/
903 (cmpfunc)PySwigPacked_compare, /*tp_compare*/
904 (reprfunc)PySwigPacked_repr, /*tp_repr*/
905 0, /*tp_as_number*/
906 0, /*tp_as_sequence*/
907 0, /*tp_as_mapping*/
908 (hashfunc)0, /*tp_hash*/
909 (ternaryfunc)0, /*tp_call*/
910 (reprfunc)PySwigPacked_str, /*tp_str*/
911 /* Space for future expansion */
912 0L,0L,0L,0L,
913 PySwigPacked_Type__doc__, /* Documentation string */
914 #if PY_VERSION_HEX >= 0x02000000
915 0, /* tp_traverse */
916 0, /* tp_clear */
917 #endif
918 #if PY_VERSION_HEX >= 0x02010000
919 0, /* tp_richcompare */
920 0, /* tp_weaklistoffset */
921 #endif
922 #if PY_VERSION_HEX >= 0x02020000
923 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
924 #endif
925 #if PY_VERSION_HEX >= 0x02030000
926 0, /* tp_del */
927 #endif
928 #ifdef COUNT_ALLOCS
929 0,0,0,0 /* tp_alloc -> tp_next */
930 #endif
933 PySwigPacked_Type = tmp;
934 type_init = 1;
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());
946 if (self == NULL) {
947 return NULL;
948 } else {
949 void *pack = malloc(size);
950 memcpy(pack, ptr, size);
951 self->pack = pack;
952 self->desc = desc;
953 self->size = size;
954 return (PyObject *) self;
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);
964 return self->desc;
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);
979 #else
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)
989 #endif
991 #endif
993 /* -----------------------------------------------------------------------------
994 * errors manipulation
995 * ----------------------------------------------------------------------------- */
997 SWIGRUNTIME void
998 SWIG_Python_TypeError(const char *type, PyObject *obj)
1000 if (type) {
1001 #if defined(SWIG_COBJECT_TYPES)
1002 if (PySwigObject_Check(obj)) {
1003 const char *otype = (const char *) PySwigObject_GetDesc(obj);
1004 if (otype) {
1005 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
1006 type, otype);
1007 return;
1009 } else
1010 #endif
1012 const char *otype = (obj ? obj->ob_type->tp_name : 0);
1013 if (otype) {
1014 PyObject *str = PyObject_Str(obj);
1015 const char *cstr = str ? PyString_AsString(str) : 0;
1016 if (cstr) {
1017 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
1018 type, otype, cstr);
1019 } else {
1020 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
1021 type, otype);
1023 Py_DECREF(str);
1024 return;
1027 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
1028 } else {
1029 PyErr_Format(PyExc_TypeError, "unexpected type is received");
1033 SWIGRUNTIMEINLINE void
1034 SWIG_Python_NullRef(const char *type)
1036 if (type) {
1037 PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type);
1038 } else {
1039 PyErr_Format(PyExc_TypeError, "null reference was received");
1043 SWIGRUNTIME int
1044 SWIG_Python_AddErrMesg(const char* mesg, int infront)
1046 if (PyErr_Occurred()) {
1047 PyObject *type = 0;
1048 PyObject *value = 0;
1049 PyObject *traceback = 0;
1050 PyErr_Fetch(&type, &value, &traceback);
1051 if (value) {
1052 PyObject *old_str = PyObject_Str(value);
1053 Py_XINCREF(type);
1054 PyErr_Clear();
1055 if (infront) {
1056 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
1057 } else {
1058 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
1060 Py_DECREF(old_str);
1062 return 1;
1063 } else {
1064 return 0;
1068 SWIGRUNTIME int
1069 SWIG_Python_ArgFail(int argnum)
1071 if (PyErr_Occurred()) {
1072 /* add information about failing argument */
1073 char mesg[256];
1074 sprintf(mesg, "argument number %d:", argnum);
1075 return SWIG_Python_AddErrMesg(mesg, 1);
1076 } else {
1077 return 0;
1082 /* -----------------------------------------------------------------------------
1083 * pointers/data manipulation
1084 * ----------------------------------------------------------------------------- */
1086 /* Convert a pointer value */
1087 SWIGRUNTIME int
1088 SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
1089 swig_type_info *tc;
1090 const char *c = 0;
1091 static PyObject *SWIG_this = 0;
1092 int newref = 0;
1093 PyObject *pyobj = 0;
1094 void *vptr;
1096 if (!obj) return 0;
1097 if (obj == Py_None) {
1098 *ptr = 0;
1099 return 0;
1102 #ifdef SWIG_COBJECT_TYPES
1103 if (!(PySwigObject_Check(obj))) {
1104 if (!SWIG_this)
1105 SWIG_this = PyString_FromString("this");
1106 pyobj = obj;
1107 obj = PyObject_GetAttr(obj,SWIG_this);
1108 newref = 1;
1109 if (!obj) goto type_error;
1110 if (!PySwigObject_Check(obj)) {
1111 Py_DECREF(obj);
1112 goto type_error;
1115 vptr = PySwigObject_AsVoidPtr(obj);
1116 c = (const char *) PySwigObject_GetDesc(obj);
1117 if (newref) { Py_DECREF(obj); }
1118 goto type_check;
1119 #else
1120 if (!(PyString_Check(obj))) {
1121 if (!SWIG_this)
1122 SWIG_this = PyString_FromString("this");
1123 pyobj = obj;
1124 obj = PyObject_GetAttr(obj,SWIG_this);
1125 newref = 1;
1126 if (!obj) goto type_error;
1127 if (!PyString_Check(obj)) {
1128 Py_DECREF(obj);
1129 goto type_error;
1132 c = PyString_AS_STRING(obj);
1133 /* Pointer values must start with leading underscore */
1134 c = SWIG_UnpackVoidPtr(c, &vptr, ty->name);
1135 if (newref) { Py_DECREF(obj); }
1136 if (!c) goto type_error;
1137 #endif
1139 type_check:
1141 if (ty) {
1142 tc = SWIG_TypeCheck(c,ty);
1143 if (!tc) goto type_error;
1144 *ptr = SWIG_TypeCast(tc,vptr);
1145 } else {
1146 *ptr = vptr;
1149 if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
1150 PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
1152 return 0;
1154 type_error:
1155 PyErr_Clear();
1156 if (pyobj && !obj) {
1157 obj = pyobj;
1158 if (PyCFunction_Check(obj)) {
1159 /* here we get the method pointer for callbacks */
1160 char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
1161 c = doc ? strstr(doc, "swig_ptr: ") : 0;
1162 if (c) {
1163 c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);
1164 if (!c) goto type_error;
1165 goto type_check;
1169 if (flags & SWIG_POINTER_EXCEPTION) {
1170 if (ty) {
1171 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
1172 } else {
1173 SWIG_Python_TypeError("C/C++ pointer", obj);
1176 return -1;
1179 /* Convert a pointer value, signal an exception on a type mismatch */
1180 SWIGRUNTIME void *
1181 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
1182 void *result;
1183 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
1184 PyErr_Clear();
1185 if (flags & SWIG_POINTER_EXCEPTION) {
1186 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
1187 SWIG_Python_ArgFail(argnum);
1190 return result;
1193 /* Convert a packed value value */
1194 SWIGRUNTIME int
1195 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
1196 swig_type_info *tc;
1197 const char *c = 0;
1199 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
1200 c = PySwigPacked_UnpackData(obj, ptr, sz);
1201 #else
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);
1206 #endif
1207 if (!c) goto type_error;
1208 if (ty) {
1209 tc = SWIG_TypeCheck(c,ty);
1210 if (!tc) goto type_error;
1212 return 0;
1214 type_error:
1215 PyErr_Clear();
1216 if (flags & SWIG_POINTER_EXCEPTION) {
1217 if (ty) {
1218 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
1219 } else {
1220 SWIG_Python_TypeError("C/C++ packed data", obj);
1223 return -1;
1226 /* Create a new array object */
1227 SWIGRUNTIME PyObject *
1228 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
1229 PyObject *robj = 0;
1230 if (!ptr) {
1231 Py_INCREF(Py_None);
1232 return Py_None;
1234 #ifdef SWIG_COBJECT_TYPES
1235 robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name);
1236 #else
1238 char result[SWIG_BUFFER_SIZE];
1239 robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ?
1240 PyString_FromString(result) : 0;
1242 #endif
1243 if (!robj || (robj == Py_None)) return robj;
1244 if (type->clientdata) {
1245 PyObject *inst;
1246 PyObject *args = Py_BuildValue((char*)"(O)", robj);
1247 Py_DECREF(robj);
1248 inst = PyObject_CallObject((PyObject *) type->clientdata, args);
1249 Py_DECREF(args);
1250 if (inst) {
1251 if (own) {
1252 PyObject_SetAttrString(inst,(char*)"thisown",Py_True);
1254 robj = inst;
1257 return robj;
1260 SWIGRUNTIME PyObject *
1261 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
1262 PyObject *robj = 0;
1263 if (!ptr) {
1264 Py_INCREF(Py_None);
1265 return Py_None;
1267 #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
1268 robj = PySwigPacked_FromDataAndDesc((void *) ptr, sz, (char *)type->name);
1269 #else
1271 char result[SWIG_BUFFER_SIZE];
1272 robj = SWIG_PackDataName(result, ptr, sz, type->name, sizeof(result)) ?
1273 PyString_FromString(result) : 0;
1275 #endif
1276 return robj;
1279 /* -----------------------------------------------------------------------------*
1280 * Get type list
1281 * -----------------------------------------------------------------------------*/
1283 #ifdef SWIG_LINK_RUNTIME
1284 void *SWIG_ReturnGlobalTypeList(void *);
1285 #endif
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);
1294 #else
1295 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
1296 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
1297 if (PyErr_Occurred()) {
1298 PyErr_Clear();
1299 type_pointer = (void *)0;
1302 #endif
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
1317 #ifdef __cplusplus
1319 #endif
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
1351 #include "lwes.h"
1354 /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
1355 SWIGINTERN int
1356 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
1358 static swig_type_info* pchar_info = 0;
1359 char* vptr = 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;
1364 return SWIG_OLDOBJ;
1365 } else {
1366 PyErr_Clear();
1367 if (PyString_Check(obj)) {
1368 if (cptr) {
1369 *cptr = PyString_AS_STRING(obj);
1370 if (psize) {
1371 *psize = PyString_GET_SIZE(obj) + 1;
1374 return SWIG_PYSTR;
1377 if (cptr) {
1378 SWIG_type_error("char *", obj);
1380 return 0;
1384 SWIGINTERNSHORT int
1385 SWIG_AsCharPtr(PyObject *obj, char **val)
1387 if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
1388 return 1;
1390 if (val) {
1391 PyErr_Clear();
1392 SWIG_type_error("char *", obj);
1394 return 0;
1398 /*@/usr/share/swig/1.3.24/python/pymacros.swg,66,SWIG_define@*/
1399 #define SWIG_From_int PyInt_FromLong
1400 /*@@*/
1403 #include <limits.h>
1406 SWIGINTERN int
1407 SWIG_CheckLongInRange(long value, long min_value, long max_value,
1408 const char *errmsg)
1410 if (value < min_value) {
1411 if (errmsg) {
1412 PyErr_Format(PyExc_OverflowError,
1413 "value %ld is less than '%s' minimum %ld",
1414 value, errmsg, min_value);
1416 return 0;
1417 } else if (value > max_value) {
1418 if (errmsg) {
1419 PyErr_Format(PyExc_OverflowError,
1420 "value %ld is greater than '%s' maximum %ld",
1421 value, errmsg, max_value);
1423 return 0;
1425 return 1;
1429 SWIGINTERN int
1430 SWIG_AsVal_long(PyObject * obj, long* val)
1432 if (PyInt_Check(obj)) {
1433 if (val) *val = PyInt_AS_LONG(obj);
1434 return 1;
1436 if (PyLong_Check(obj)) {
1437 long v = PyLong_AsLong(obj);
1438 if (!PyErr_Occurred()) {
1439 if (val) *val = v;
1440 return 1;
1441 } else {
1442 if (!val) PyErr_Clear();
1443 return 0;
1446 if (val) {
1447 SWIG_type_error("long", obj);
1449 return 0;
1453 #if INT_MAX != LONG_MAX
1454 SWIGINTERN int
1455 SWIG_AsVal_int(PyObject *obj, int *val)
1457 const char* errmsg = val ? "int" : (char*)0;
1458 long v;
1459 if (SWIG_AsVal_long(obj, &v)) {
1460 if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) {
1461 if (val) *val = (int)(v);
1462 return 1;
1463 } else {
1464 return 0;
1466 } else {
1467 PyErr_Clear();
1469 if (val) {
1470 SWIG_type_error(errmsg, obj);
1472 return 0;
1474 #else
1475 SWIGINTERNSHORT int
1476 SWIG_AsVal_int(PyObject *obj, int *val)
1478 return SWIG_AsVal_long(obj,(long*)val);
1480 #endif
1483 SWIGINTERNSHORT int
1484 SWIG_As_int(PyObject* obj)
1486 int v;
1487 if (!SWIG_AsVal_int(obj, &v)) {
1489 this is needed to make valgrind/purify happier.
1491 memset((void*)&v, 0, sizeof(int));
1493 return v;
1497 SWIGINTERN int
1498 SWIG_AsVal_short(PyObject *obj, short *val)
1500 const char* errmsg = val ? "short" : (char*)0;
1501 long v;
1502 if (SWIG_AsVal_long(obj, &v)) {
1503 if (SWIG_CheckLongInRange(v, SHRT_MIN, SHRT_MAX, errmsg)) {
1504 if (val) *val = (short)(v);
1505 return 1;
1506 } else {
1507 return 0;
1509 } else {
1510 PyErr_Clear();
1512 if (val) {
1513 SWIG_type_error(errmsg, obj);
1515 return 0;
1519 SWIGINTERNSHORT short
1520 SWIG_As_short(PyObject* obj)
1522 short v;
1523 if (!SWIG_AsVal_short(obj, &v)) {
1525 this is needed to make valgrind/purify happier.
1527 memset((void*)&v, 0, sizeof(short));
1529 return v;
1533 SWIGINTERNSHORT int
1534 SWIG_Check_int(PyObject* obj)
1536 return SWIG_AsVal_int(obj, (int*)0);
1540 SWIGINTERNSHORT int
1541 SWIG_Check_short(PyObject* obj)
1543 return SWIG_AsVal_short(obj, (short*)0);
1547 SWIGINTERNSHORT int
1548 SWIG_CheckUnsignedLongInRange(unsigned long value,
1549 unsigned long max_value,
1550 const char *errmsg)
1552 if (value > max_value) {
1553 if (errmsg) {
1554 PyErr_Format(PyExc_OverflowError,
1555 "value %lu is greater than '%s' minimum %lu",
1556 value, errmsg, max_value);
1558 return 0;
1560 return 1;
1564 SWIGINTERN int
1565 SWIG_AsVal_unsigned_SS_long(PyObject *obj, unsigned long *val)
1567 if (PyInt_Check(obj)) {
1568 long v = PyInt_AS_LONG(obj);
1569 if (v >= 0) {
1570 if (val) *val = v;
1571 return 1;
1574 if (PyLong_Check(obj)) {
1575 unsigned long v = PyLong_AsUnsignedLong(obj);
1576 if (!PyErr_Occurred()) {
1577 if (val) *val = v;
1578 return 1;
1579 } else {
1580 if (!val) PyErr_Clear();
1581 return 0;
1584 if (val) {
1585 SWIG_type_error("unsigned long", obj);
1587 return 0;
1591 SWIGINTERN int
1592 SWIG_AsVal_unsigned_SS_short(PyObject *obj, unsigned short *val)
1594 const char* errmsg = val ? "unsigned short" : (char*)0;
1595 unsigned long v;
1596 if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
1597 if (SWIG_CheckUnsignedLongInRange(v, USHRT_MAX, errmsg)) {
1598 if (val) *val = (unsigned short)(v);
1599 return 1;
1600 } else {
1601 return 0;
1603 } else {
1604 PyErr_Clear();
1606 if (val) {
1607 SWIG_type_error(errmsg, obj);
1609 return 0;
1613 SWIGINTERNSHORT unsigned short
1614 SWIG_As_unsigned_SS_short(PyObject* obj)
1616 unsigned short v;
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));
1623 return v;
1627 SWIGINTERNSHORT int
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
1635 SWIGINTERN int
1636 SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val)
1638 const char* errmsg = val ? "unsigned int" : (char*)0;
1639 unsigned long v;
1640 if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
1641 if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) {
1642 if (val) *val = (unsigned int)(v);
1643 return 1;
1645 } else {
1646 PyErr_Clear();
1648 if (val) {
1649 SWIG_type_error(errmsg, obj);
1651 return 0;
1653 #else
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);
1659 #endif
1662 SWIGINTERNSHORT unsigned int
1663 SWIG_As_unsigned_SS_int(PyObject* obj)
1665 unsigned int v;
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));
1672 return v;
1676 SWIGINTERNSHORT int
1677 SWIG_Check_unsigned_SS_int(PyObject* obj)
1679 return SWIG_AsVal_unsigned_SS_int(obj, (unsigned int*)0);
1683 SWIGINTERN int
1684 SWIG_AsVal_unsigned_SS_long_SS_long(PyObject *obj, unsigned long long *val)
1686 unsigned long v;
1687 if (PyLong_Check(obj)) {
1688 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
1689 if (!PyErr_Occurred()) {
1690 if (val) *val = v;
1691 return 1;
1692 } else {
1693 if (!val) PyErr_Clear();
1694 return 0;
1697 if (SWIG_AsVal_unsigned_SS_long(obj,&v)) {
1698 if (val) *val = v;
1699 return 1;
1700 } else {
1701 PyErr_Clear();
1703 if (val) {
1704 SWIG_type_error("unsigned long long", obj);
1706 return 0;
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));
1720 return v;
1724 SWIGINTERNSHORT int
1725 SWIG_Check_unsigned_SS_long_SS_long(PyObject* obj)
1727 return SWIG_AsVal_unsigned_SS_long_SS_long(obj, (unsigned long long*)0);
1731 SWIGINTERN int
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()) {
1737 if (val) *val = v;
1738 return 1;
1739 } else {
1740 if (!val) PyErr_Clear();
1741 return 0;
1744 if (PyInt_Check(obj)) {
1745 if (val) *val = PyInt_AS_LONG(obj);
1746 return 1;
1748 if (val) {
1749 SWIG_type_error("long long", obj);
1751 return 0;
1755 SWIGINTERNSHORT long long
1756 SWIG_As_long_SS_long(PyObject* obj)
1758 long long v;
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));
1765 return v;
1769 SWIGINTERNSHORT int
1770 SWIG_Check_long_SS_long(PyObject* obj)
1772 return SWIG_AsVal_long_SS_long(obj, (long long*)0);
1775 #ifdef __cplusplus
1776 extern "C" {
1777 #endif
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);
1791 return resultobj;
1792 fail:
1793 return NULL;
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 ;
1800 int result;
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));
1811 return resultobj;
1812 fail:
1813 return NULL;
1817 static PyObject *_wrap_lwes_emitter_create(PyObject *self, PyObject *args) {
1818 PyObject *resultobj;
1819 char *arg1 = (char *) 0 ;
1820 char *arg2 = (char *) 0 ;
1821 int arg3 ;
1822 int arg4 ;
1823 short arg5 ;
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);
1853 return resultobj;
1854 fail:
1855 return NULL;
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 ;
1863 int arg3 ;
1864 int arg4 ;
1865 short arg5 ;
1866 int arg6 ;
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);
1901 return resultobj;
1902 fail:
1903 return NULL;
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 ;
1911 int result;
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));
1925 return resultobj;
1926 fail:
1927 return NULL;
1931 static PyObject *_wrap_lwes_emitter_emitto(PyObject *self, PyObject *args) {
1932 PyObject *resultobj;
1933 char *arg1 = (char *) 0 ;
1934 char *arg2 = (char *) 0 ;
1935 int arg3 ;
1936 struct lwes_emitter *arg4 = (struct lwes_emitter *) 0 ;
1937 struct lwes_event *arg5 = (struct lwes_event *) 0 ;
1938 int result;
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));
1965 return resultobj;
1966 fail:
1967 return NULL;
1971 static PyObject *_wrap_lwes_emitter_destroy(PyObject *self, PyObject *args) {
1972 PyObject *resultobj;
1973 struct lwes_emitter *arg1 = (struct lwes_emitter *) 0 ;
1974 int result;
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));
1985 return resultobj;
1986 fail:
1987 return NULL;
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);
2008 return resultobj;
2009 fail:
2010 return NULL;
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 ;
2018 short arg3 ;
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);
2037 return resultobj;
2038 fail:
2039 return NULL;
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 ;
2048 int result;
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));
2068 return resultobj;
2069 fail:
2070 return NULL;
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 ;
2079 int result;
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));
2097 return resultobj;
2098 fail:
2099 return NULL;
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 ;
2107 short arg3 ;
2108 int result;
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));
2128 return resultobj;
2129 fail:
2130 return NULL;
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 ;
2139 int result;
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));
2157 return resultobj;
2158 fail:
2159 return NULL;
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 ;
2167 unsigned int arg3 ;
2168 int result;
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));
2188 return resultobj;
2189 fail:
2190 return NULL;
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 ;
2199 int result;
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));
2217 return resultobj;
2218 fail:
2219 return NULL;
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 ;
2227 int arg3 ;
2228 int result;
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));
2248 return resultobj;
2249 fail:
2250 return NULL;
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 ;
2259 int result;
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));
2277 return resultobj;
2278 fail:
2279 return NULL;
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 ;
2288 int result;
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));
2308 return resultobj;
2309 fail:
2310 return NULL;
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 ;
2319 int result;
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));
2337 return resultobj;
2338 fail:
2339 return NULL;
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 ;
2347 long long arg3 ;
2348 int result;
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));
2368 return resultobj;
2369 fail:
2370 return NULL;
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 ;
2379 int result;
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));
2397 return resultobj;
2398 fail:
2399 return NULL;
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 ;
2408 int result;
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));
2427 return resultobj;
2428 fail:
2429 return NULL;
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 ;
2438 int result;
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));
2456 return resultobj;
2457 fail:
2458 return NULL;
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 ;
2467 int result;
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));
2486 return resultobj;
2487 fail:
2488 return NULL;
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 ;
2497 int result;
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));
2515 return resultobj;
2516 fail:
2517 return NULL;
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 ;
2525 int arg3 ;
2526 int result;
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));
2546 return resultobj;
2547 fail:
2548 return NULL;
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 ;
2557 int result;
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));
2575 return resultobj;
2576 fail:
2577 return NULL;
2581 static PyObject *_wrap_lwes_event_destroy(PyObject *self, PyObject *args) {
2582 PyObject *resultobj;
2583 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
2584 int result;
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));
2595 return resultobj;
2596 fail:
2597 return NULL;
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,
2653 _swigt__size_t,
2654 _swigt__p_unsigned_int,
2655 _swigt__p_long_long,
2656 _swigt__p_unsigned_long_long,
2657 _swigt__p_short,
2658 _swigt__p_unsigned_short,
2659 _swigt__p_p_char,
2660 _swigt__p_char,
2661 _swigt__ptrdiff_t,
2662 _swigt__p_lwes_emitter,
2663 _swigt__p_in_addr,
2664 _swigt__p_int,
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}};
2675 #ifdef __cplusplus
2677 #endif
2680 #ifdef __cplusplus
2681 extern "C" {
2682 #endif
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;
2698 } swig_globalvar;
2700 typedef struct swig_varlinkobject {
2701 PyObject_HEAD
2702 swig_globalvar *vars;
2703 } swig_varlinkobject;
2705 static PyObject *
2706 swig_varlink_repr(swig_varlinkobject *v) {
2707 v = v;
2708 return PyString_FromString("<Swig global variables>");
2711 static int
2712 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
2713 swig_globalvar *var;
2714 flags = flags;
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,", ");
2720 fprintf(fp," }\n");
2721 return 0;
2724 static PyObject *
2725 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
2726 swig_globalvar *var = v->vars;
2727 while (var) {
2728 if (strcmp(var->name,n) == 0) {
2729 return (*var->get_attr)();
2731 var = var->next;
2733 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
2734 return NULL;
2737 static int
2738 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
2739 swig_globalvar *var = v->vars;
2740 while (var) {
2741 if (strcmp(var->name,n) == 0) {
2742 return (*var->set_attr)(p);
2744 var = var->next;
2746 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
2747 return 1;
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) */
2760 0, /* tp_compare */
2761 (reprfunc) swig_varlink_repr, /* tp_repr */
2762 0, /* tp_as_number */
2763 0, /* tp_as_sequence */
2764 0, /* tp_as_mapping */
2765 0, /* tp_hash */
2766 0, /* tp_call */
2767 0, /* tp_str */
2768 0, /* tp_getattro */
2769 0, /* tp_setattro */
2770 0, /* tp_as_buffer */
2771 0, /* tp_flags */
2772 0, /* tp_doc */
2773 #if PY_VERSION_HEX >= 0x02000000
2774 0, /* tp_traverse */
2775 0, /* tp_clear */
2776 #endif
2777 #if PY_VERSION_HEX >= 0x02010000
2778 0, /* tp_richcompare */
2779 0, /* tp_weaklistoffset */
2780 #endif
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 */
2783 #endif
2784 #if PY_VERSION_HEX >= 0x02030000
2785 0, /* tp_del */
2786 #endif
2787 #ifdef COUNT_ALLOCS
2788 0,0,0,0 /* tp_alloc -> tp_next */
2789 #endif
2792 /* Create a variable linking object for use later */
2793 static PyObject *
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;
2799 result->vars = 0;
2800 result->ob_refcnt = 0;
2801 Py_XINCREF((PyObject *) result);
2802 return ((PyObject*) result);
2805 static void
2806 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
2807 swig_varlinkobject *v;
2808 swig_globalvar *gv;
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;
2815 gv->next = v->vars;
2816 v->vars = gv;
2819 /* -----------------------------------------------------------------------------
2820 * constants/methods manipulation
2821 * ----------------------------------------------------------------------------- */
2823 /* Install Constants */
2824 static void
2825 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
2826 PyObject *obj = 0;
2827 size_t i;
2828 for (i = 0; constants[i].type; i++) {
2829 switch(constants[i].type) {
2830 case SWIG_PY_INT:
2831 obj = PyInt_FromLong(constants[i].lvalue);
2832 break;
2833 case SWIG_PY_FLOAT:
2834 obj = PyFloat_FromDouble(constants[i].dvalue);
2835 break;
2836 case SWIG_PY_STRING:
2837 if (constants[i].pvalue) {
2838 obj = PyString_FromString((char *) constants[i].pvalue);
2839 } else {
2840 Py_INCREF(Py_None);
2841 obj = Py_None;
2843 break;
2844 case SWIG_PY_POINTER:
2845 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
2846 break;
2847 case SWIG_PY_BINARY:
2848 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
2849 break;
2850 default:
2851 obj = 0;
2852 break;
2854 if (obj) {
2855 PyDict_SetItemString(d,constants[i].name,obj);
2856 Py_DECREF(obj);
2861 /* -----------------------------------------------------------------------------*/
2862 /* Fix SwigMethods to carry the callback ptrs when needed */
2863 /* -----------------------------------------------------------------------------*/
2865 static void
2866 SWIG_Python_FixMethods(PyMethodDef *methods,
2867 swig_const_info *const_table,
2868 swig_type_info **types,
2869 swig_type_info **types_initial) {
2870 size_t i;
2871 for (i = 0; methods[i].ml_name; ++i) {
2872 char *c = methods[i].ml_doc;
2873 if (c && (c = strstr(c, "swig_ptr: "))) {
2874 int j;
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]);
2881 break;
2884 if (ci) {
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);
2890 char *buff = ndoc;
2891 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue: (void *)(ci->lvalue);
2892 strncpy(buff, methods[i].ml_doc, ldoc);
2893 buff += ldoc;
2894 strncpy(buff, "swig_ptr: ", 10);
2895 buff += 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 */
2910 static int
2911 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2913 PyObject *dict;
2914 if (!PyModule_Check(m)) {
2915 PyErr_SetString(PyExc_TypeError,
2916 "PyModule_AddObject() needs module as first arg");
2917 return -1;
2919 if (!o) {
2920 PyErr_SetString(PyExc_TypeError,
2921 "PyModule_AddObject() needs non-NULL value");
2922 return -1;
2925 dict = PyModule_GetDict(m);
2926 if (dict == NULL) {
2927 /* Internal error -- modules must have a dict! */
2928 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2929 PyModule_GetName(m));
2930 return -1;
2932 if (PyDict_SetItemString(dict, name, o))
2933 return -1;
2934 Py_DECREF(o);
2935 return 0;
2937 #endif
2939 static swig_type_info **
2940 SWIG_Python_SetTypeListHandle(swig_type_info **type_list_handle) {
2941 static PyMethodDef swig_empty_runtime_method_table[] = {
2943 NULL, NULL, 0, NULL
2945 };/* Sentinel */
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();
2962 if (type_pointer) {
2963 return type_pointer;
2964 } else {
2965 /* create a new module and variable */
2966 return SWIG_Python_SetTypeListHandle(type_list_handle);
2970 #ifdef __cplusplus
2972 #endif
2974 /* -----------------------------------------------------------------------------*
2975 * Partial Init method
2976 * -----------------------------------------------------------------------------*/
2978 #ifdef SWIG_LINK_RUNTIME
2979 #ifdef __cplusplus
2980 extern "C"
2981 #endif
2982 SWIGEXPORT(void *) SWIG_ReturnGlobalTypeList(void *);
2983 #endif
2985 #ifdef __cplusplus
2986 extern "C"
2987 #endif
2988 SWIGEXPORT(void) SWIG_init(void) {
2989 static PyObject *SWIG_globals = 0;
2990 static int typeinit = 0;
2991 PyObject *m, *d;
2992 int i;
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);
3001 if (!typeinit) {
3002 #ifdef SWIG_LINK_RUNTIME
3003 swig_type_list_handle = (swig_type_info **) SWIG_ReturnGlobalTypeList(swig_type_list_handle);
3004 #else
3005 # ifndef SWIG_STATIC_RUNTIME
3006 swig_type_list_handle = SWIG_Python_LookupTypePointer(swig_type_list_handle);
3007 # endif
3008 #endif
3009 for (i = 0; swig_types_initial[i]; i++) {
3010 swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
3012 typeinit = 1;
3014 SWIG_InstallConstants(d,swig_const_table);