-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevent.c
11685 lines (10908 loc) · 474 KB
/
event.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Generated by Cython 0.14.1 on Fri Jul 15 18:41:35 2011 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
#if PY_VERSION_HEX < 0x02040000
#define METH_COEXIST 0
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
#define PyDict_Contains(d,o) PySequence_Contains(d,o)
#endif
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#define PY_FORMAT_SIZE_T ""
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
#define PyNumber_Index(o) PyNumber_Int(o)
#define PyIndex_Check(o) PyNumber_Check(o)
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif
#if PY_VERSION_HEX < 0x02060000
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
#define PyVarObject_HEAD_INIT(type, size) \
PyObject_HEAD_INIT(type) size,
#define PyType_Modified(t)
typedef struct {
void *buf;
PyObject *obj;
Py_ssize_t len;
Py_ssize_t itemsize;
int readonly;
int ndim;
char *format;
Py_ssize_t *shape;
Py_ssize_t *strides;
Py_ssize_t *suboffsets;
void *internal;
} Py_buffer;
#define PyBUF_SIMPLE 0
#define PyBUF_WRITABLE 0x0001
#define PyBUF_FORMAT 0x0004
#define PyBUF_ND 0x0008
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
#endif
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif
#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_CHECKTYPES 0
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
#define PyBytesObject PyStringObject
#define PyBytes_Type PyString_Type
#define PyBytes_Check PyString_Check
#define PyBytes_CheckExact PyString_CheckExact
#define PyBytes_FromString PyString_FromString
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
#define PyBytes_FromFormat PyString_FromFormat
#define PyBytes_DecodeEscape PyString_DecodeEscape
#define PyBytes_AsString PyString_AsString
#define PyBytes_AsStringAndSize PyString_AsStringAndSize
#define PyBytes_Size PyString_Size
#define PyBytes_AS_STRING PyString_AS_STRING
#define PyBytes_GET_SIZE PyString_GET_SIZE
#define PyBytes_Repr PyString_Repr
#define PyBytes_Concat PyString_Concat
#define PyBytes_ConcatAndDel PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
#define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type)
#define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
#define PyInt_FromString PyLong_FromString
#define PyInt_FromUnicode PyLong_FromUnicode
#define PyInt_FromLong PyLong_FromLong
#define PyInt_FromSize_t PyLong_FromSize_t
#define PyInt_FromSsize_t PyLong_FromSsize_t
#define PyInt_AsLong PyLong_AsLong
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
#define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
#define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
#define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
#define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
#define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
#define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
#define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
#else
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_NAMESTR(n) ((char *)(n))
#define __Pyx_DOCSTR(n) ((char *)(n))
#else
#define __Pyx_NAMESTR(n) (n)
#define __Pyx_DOCSTR(n) (n)
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE_API__event
#include "sys/types.h"
#include "event.h"
#include "evdns.h"
#include "evhttp.h"
#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif
/* inline attribute */
#ifndef CYTHON_INLINE
#if defined(__GNUC__)
#define CYTHON_INLINE __inline__
#elif defined(_MSC_VER)
#define CYTHON_INLINE __inline
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_INLINE inline
#else
#define CYTHON_INLINE
#endif
#endif
/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
# elif defined(__ICC) || defined(__INTEL_COMPILER)
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
/* Type Conversion Predeclarations */
#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s))
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* __GNUC__ > 2 ... */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
static const char *__pyx_f[] = {
"bufferevent.pxi",
"evdns.pxi",
"evhttp.pxi",
"event.pyx",
"simple.pxi",
};
/* Type declarations */
typedef void (*__pyx_t_5event_event_handler)(int, short, void *);
typedef void (*__pyx_t_5event_evbuffer_handler)(struct bufferevent *, void *);
typedef void (*__pyx_t_5event_everror_handler)(struct bufferevent *, short, void *);
/* "event.pyx":86
* (<object>arg).__simple_callback(evtype)
*
* cdef class event: # <<<<<<<<<<<<<<
* """event(callback, arg=None, evtype=0, handle=None) -> event object
*
*/
struct __pyx_obj_5event_event {
PyObject_HEAD
struct event ev;
PyObject *handle;
PyObject *evtype;
PyObject *callback;
PyObject *args;
float timeout;
struct timeval tv;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\simple.pxi":2
*
* cdef class read(event): # <<<<<<<<<<<<<<
* """read(handle, callback, *args) -> event object
*
*/
struct __pyx_obj_5event_read {
struct __pyx_obj_5event_event __pyx_base;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\evhttp.pxi":207
* start_response.end()
*
* cdef class wsgi: # <<<<<<<<<<<<<<
* """wsgi(address='0.0.0.0', port=80) -> WSGI server object
*
*/
struct __pyx_obj_5event_wsgi {
PyObject_HEAD
struct evhttp *_http;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\simple.pxi":58
* self.add()
*
* cdef class timeout(event): # <<<<<<<<<<<<<<
* """timeout(secs, callback, *args) -> event object
*
*/
struct __pyx_obj_5event_timeout {
struct __pyx_obj_5event_event __pyx_base;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\simple.pxi":20
* self.add()
*
* cdef class write(event): # <<<<<<<<<<<<<<
* """write(handle, callback, *args) -> event object
*
*/
struct __pyx_obj_5event_write {
struct __pyx_obj_5event_event __pyx_base;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\evhttp.pxi":89
* int cmd_type, char *uri)
*
* cdef class __start_response: # <<<<<<<<<<<<<<
* cdef evhttp_request *req
* cdef int headers_sent
*/
struct __pyx_obj_5event___start_response {
PyObject_HEAD
struct __pyx_vtabstruct_5event___start_response *__pyx_vtab;
struct evhttp_request *req;
int headers_sent;
PyObject *code;
PyObject *reason;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\simple.pxi":38
* self.add()
*
* cdef class signal(event): # <<<<<<<<<<<<<<
* """signal(sig, callback, *args) -> event object
*
*/
struct __pyx_obj_5event_signal {
struct __pyx_obj_5event_event __pyx_base;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\bufferevent.pxi":49
* o.errorcb(what, *o.args)
*
* cdef class bufferevent: # <<<<<<<<<<<<<<
* """bufferevent(handle, readcb, writecb, errorcb, *args) -> bufferevent object
*
*/
struct __pyx_obj_5event_bufferevent {
PyObject_HEAD
struct bufferevent *bufev;
PyObject *handle;
PyObject *readcb;
PyObject *writecb;
PyObject *errorcb;
PyObject *args;
};
/* "C:\Users\jaraco\projects\G\support\pyevent\evhttp.pxi":136
* evhttp_send_reply_end(self.req)
*
* cdef class __wsgi_input: # <<<<<<<<<<<<<<
* cdef evbuffer *_buf
*
*/
struct __pyx_obj_5event___wsgi_input {
PyObject_HEAD
struct __pyx_vtabstruct_5event___wsgi_input *__pyx_vtab;
struct evbuffer *_buf;
};
struct __pyx_vtabstruct_5event___wsgi_input {
void (*_set_buf)(struct __pyx_obj_5event___wsgi_input *, struct evbuffer *);
};
static struct __pyx_vtabstruct_5event___wsgi_input *__pyx_vtabptr_5event___wsgi_input;
/* "C:\Users\jaraco\projects\G\support\pyevent\evhttp.pxi":89
* int cmd_type, char *uri)
*
* cdef class __start_response: # <<<<<<<<<<<<<<
* cdef evhttp_request *req
* cdef int headers_sent
*/
struct __pyx_vtabstruct_5event___start_response {
void (*_set_req)(struct __pyx_obj_5event___start_response *, struct evhttp_request *);
};
static struct __pyx_vtabstruct_5event___start_response *__pyx_vtabptr_5event___start_response;
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
typedef struct {
void (*INCREF)(void*, PyObject*, int);
void (*DECREF)(void*, PyObject*, int);
void (*GOTREF)(void*, PyObject*, int);
void (*GIVEREF)(void*, PyObject*, int);
void* (*SetupContext)(const char*, int, const char*);
void (*FinishContext)(void**);
} __Pyx_RefNannyAPIStruct;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
PyObject *m = NULL, *p = NULL;
void *r = NULL;
m = PyImport_ImportModule((char *)modname);
if (!m) goto end;
p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
if (!p) goto end;
r = PyLong_AsVoidPtr(p);
end:
Py_XDECREF(p);
Py_XDECREF(m);
return (__Pyx_RefNannyAPIStruct *)r;
}
#define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
#else
#define __Pyx_RefNannySetupContext(name)
#define __Pyx_RefNannyFinishContext()
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r;
if (!j) return NULL;
r = PyObject_GetItem(o, j);
Py_DECREF(j);
return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_GetItemInt_List_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
PyObject *r = PyList_GET_ITEM(o, i);
Py_INCREF(r);
return r;
}
else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
Py_INCREF(r);
return r;
}
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_GetItemInt_Tuple_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, i);
Py_INCREF(r);
return r;
}
else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
Py_INCREF(r);
return r;
}
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_GetItemInt_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
PyObject *r;
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
r = PyList_GET_ITEM(o, i);
Py_INCREF(r);
}
else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
r = PyTuple_GET_ITEM(o, i);
Py_INCREF(r);
}
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
r = PySequence_GetItem(o, i);
}
else {
r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
return r;
}
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name); /*proto*/
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix);
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
if (likely(PyList_CheckExact(L))) {
if (PyList_Append(L, x) < 0) return NULL;
Py_INCREF(Py_None);
return Py_None; /* this is just to have an accurate signature */
}
else {
PyObject *r, *m;
m = __Pyx_GetAttrString(L, "append");
if (!m) return NULL;
r = PyObject_CallFunctionObjArgs(m, x, NULL);
Py_DECREF(m);
return r;
}
}
#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_SetItemInt_Fast(o, i, v) : \
__Pyx_SetItemInt_Generic(o, to_py_func(i), v))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
int r;
if (!j) return -1;
r = PyObject_SetItem(o, j, v);
Py_DECREF(j);
return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
Py_INCREF(v);
Py_DECREF(PyList_GET_ITEM(o, i));
PyList_SET_ITEM(o, i, v);
return 1;
}
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
return PySequence_SetItem(o, i, v);
else {
PyObject *j = PyInt_FromSsize_t(i);
return __Pyx_SetItemInt_Generic(o, j, v);
}
}
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
const char* function_name, int kw_allowed); /*proto*/
static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
#ifndef __PYX_FORCE_INIT_THREADS
#if PY_VERSION_HEX < 0x02040200
#define __PYX_FORCE_INIT_THREADS 1
#else
#define __PYX_FORCE_INIT_THREADS 0
#endif
#endif
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
static void __Pyx_WriteUnraisable(const char *name); /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
/* Module declarations from event */
static PyTypeObject *__pyx_ptype_5event_event = 0;
static PyTypeObject *__pyx_ptype_5event_read = 0;
static PyTypeObject *__pyx_ptype_5event_write = 0;
static PyTypeObject *__pyx_ptype_5event_signal = 0;
static PyTypeObject *__pyx_ptype_5event_timeout = 0;
static PyTypeObject *__pyx_ptype_5event_bufferevent = 0;
static PyTypeObject *__pyx_ptype_5event___start_response = 0;
static PyTypeObject *__pyx_ptype_5event___wsgi_input = 0;
static PyTypeObject *__pyx_ptype_5event_wsgi = 0;
static void __pyx_f_5event___event_abort(void); /*proto*/
static void __pyx_f_5event___event_handler(int, short, void *); /*proto*/
static void __pyx_f_5event___simple_event_handler(int, short, void *); /*proto*/
static void __pyx_f_5event___bufev_readcb(struct bufferevent *, void *); /*proto*/
static void __pyx_f_5event___bufev_writecb(struct bufferevent *, void *); /*proto*/
static void __pyx_f_5event___bufev_errorcb(struct bufferevent *, short, void *); /*proto*/
static void __pyx_f_5event___evdns_callback(int, char, int, int, void *, void *); /*proto*/
static void __pyx_f_5event___path_handler(struct evhttp_request *, void *); /*proto*/
#define __Pyx_MODULE_NAME "event"
static int __pyx_module_is_main_event = 0;
/* Implementation of event */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_OSError;
static char __pyx_k_1[] = "<event flags=0x%x, handle=%s, callback=%s, arg=%s>";
static char __pyx_k_3[] = "<bufferevent handle=%s, readcb=%s, writecb=%s, errorcb=%s, args=%s>";
static char __pyx_k_4[] = "Headers already set!";
static char __pyx_k_7[] = "";
static char __pyx_k_9[] = "Content-Type";
static char __pyx_k_10[] = "Content-Length";
static char __pyx_k_11[] = ":";
static char __pyx_k_13[] = "wsgi.version";
static char __pyx_k_15[] = "wsgi.url_scheme";
static char __pyx_k_16[] = "wsgi.input";
static char __pyx_k_17[] = "wsgi.errors";
static char __pyx_k_18[] = "wsgi.multithread";
static char __pyx_k_19[] = "wsgi.multiprocess";
static char __pyx_k_20[] = "wsgi.run_once";
static char __pyx_k_21[] = "HTTP/%s.%s";
static char __pyx_k_22[] = "%d";
static char __pyx_k_23[] = "0.0.0.0";
static char __pyx_k_24[] = "event library\n\nThis module provides a mechanism to execute a function when a\nspecific event on a file handle, file descriptor, or signal occurs,\nor after a given time has passed.\n";
static char __pyx_k_25[] = "Dug Song <[email protected]>";
static char __pyx_k_26[] = "Martin Murray <[email protected]>";
static char __pyx_k_28[] = "Copyright (c) 2004 Dug Song";
static char __pyx_k_29[] = "Copyright (c) 2003 Martin Murray";
static char __pyx_k_31[] = "http://monkey.org/~dugsong/pyevent/";
static char __pyx_k_32[] = "0.4";
static char __pyx_k_33[] = "DNS_ERR_SERVERFAILED";
static char __pyx_k_34[] = "dns_resolve_reverse_ipv6";
static char __pyx_k__80[] = "80";
static char __pyx_k__ev[] = "ev";
static char __pyx_k__id[] = "id";
static char __pyx_k__ip[] = "ip";
static char __pyx_k__tv[] = "tv";
static char __pyx_k__BSD[] = "BSD";
static char __pyx_k__GET[] = "GET";
static char __pyx_k__add[] = "add";
static char __pyx_k__app[] = "app";
static char __pyx_k__arg[] = "arg";
static char __pyx_k__buf[] = "buf";
static char __pyx_k__end[] = "end";
static char __pyx_k__off[] = "off";
static char __pyx_k__req[] = "req";
static char __pyx_k__sig[] = "sig";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__uri[] = "uri";
static char __pyx_k__HEAD[] = "HEAD";
static char __pyx_k__Host[] = "Host";
static char __pyx_k__POST[] = "POST";
static char __pyx_k___buf[] = "_buf";
static char __pyx_k__args[] = "args";
static char __pyx_k__bind[] = "bind";
static char __pyx_k__code[] = "code";
static char __pyx_k__hint[] = "hint";
static char __pyx_k__http[] = "http";
static char __pyx_k__init[] = "init";
static char __pyx_k__loop[] = "loop";
static char __pyx_k__name[] = "name";
static char __pyx_k__path[] = "path";
static char __pyx_k__port[] = "port";
static char __pyx_k__read[] = "read";
static char __pyx_k__secs[] = "secs";
static char __pyx_k__size[] = "size";
static char __pyx_k__type[] = "type";
static char __pyx_k___http[] = "_http";
static char __pyx_k__abort[] = "abort";
static char __pyx_k__bufev[] = "bufev";
static char __pyx_k__clear[] = "clear";
static char __pyx_k__event[] = "event";
static char __pyx_k__flags[] = "flags";
static char __pyx_k__input[] = "input";
static char __pyx_k__major[] = "major";
static char __pyx_k__minor[] = "minor";
static char __pyx_k__split[] = "split";
static char __pyx_k__write[] = "write";
static char __pyx_k__SIGINT[] = "SIGINT";
static char __pyx_k__delete[] = "delete";
static char __pyx_k__evtype[] = "evtype";
static char __pyx_k__fileno[] = "fileno";
static char __pyx_k__handle[] = "handle";
static char __pyx_k__readcb[] = "readcb";
static char __pyx_k__reason[] = "reason";
static char __pyx_k__signal[] = "signal";
static char __pyx_k__simple[] = "simple";
static char __pyx_k__status[] = "status";
static char __pyx_k__stderr[] = "stderr";
static char __pyx_k__tv_sec[] = "tv_sec";
static char __pyx_k__DNS_PTR[] = "DNS_PTR";
static char __pyx_k__EV_READ[] = "EV_READ";
static char __pyx_k__HTTP_OK[] = "HTTP_OK";
static char __pyx_k__OSError[] = "OSError";
static char __pyx_k__SIGTERM[] = "SIGTERM";
static char __pyx_k____url__[] = "__url__";
static char __pyx_k__address[] = "address";
static char __pyx_k__errorcb[] = "errorcb";
static char __pyx_k__headers[] = "headers";
static char __pyx_k__pending[] = "pending";
static char __pyx_k__timeout[] = "timeout";
static char __pyx_k__tv_usec[] = "tv_usec";
static char __pyx_k__writecb[] = "writecb";
static char __pyx_k__EV_WRITE[] = "EV_WRITE";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k___set_buf[] = "_set_buf";
static char __pyx_k___set_req[] = "_set_req";
static char __pyx_k__callback[] = "callback";
static char __pyx_k__dispatch[] = "dispatch";
static char __pyx_k__dns_init[] = "dns_init";
static char __pyx_k__ev_flags[] = "ev_flags";
static char __pyx_k__exc_info[] = "exc_info";
static char __pyx_k__nonblock[] = "nonblock";
static char __pyx_k__EV_SIGNAL[] = "EV_SIGNAL";
static char __pyx_k__PATH_INFO[] = "PATH_INFO";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k__read_secs[] = "read_secs";
static char __pyx_k__DNS_IPv4_A[] = "DNS_IPv4_A";
static char __pyx_k__EV_PERSIST[] = "EV_PERSIST";
static char __pyx_k__EV_TIMEOUT[] = "EV_TIMEOUT";
static char __pyx_k____author__[] = "__author__";
static char __pyx_k____callback[] = "__callback";
static char __pyx_k__splitlines[] = "splitlines";
static char __pyx_k__write_secs[] = "write_secs";
static char __pyx_k__REMOTE_ADDR[] = "REMOTE_ADDR";
static char __pyx_k__REMOTE_HOST[] = "REMOTE_HOST";
static char __pyx_k__REMOTE_PORT[] = "REMOTE_PORT";
static char __pyx_k__SCRIPT_NAME[] = "SCRIPT_NAME";
static char __pyx_k__SERVER_NAME[] = "SERVER_NAME";
static char __pyx_k__SERVER_PORT[] = "SERVER_PORT";
static char __pyx_k____event_exc[] = "__event_exc";
static char __pyx_k____license__[] = "__license__";
static char __pyx_k____version__[] = "__version__";
static char __pyx_k__remote_host[] = "remote_host";
static char __pyx_k__remote_port[] = "remote_port";
static char __pyx_k__CONTENT_TYPE[] = "CONTENT_TYPE";
static char __pyx_k__DNS_ERR_NONE[] = "DNS_ERR_NONE";
static char __pyx_k__EVBUFFER_EOF[] = "EVBUFFER_EOF";
static char __pyx_k__QUERY_STRING[] = "QUERY_STRING";
static char __pyx_k__dns_shutdown[] = "dns_shutdown";
static char __pyx_k__headers_sent[] = "headers_sent";
static char __pyx_k__input_buffer[] = "input_buffer";
static char __pyx_k__DNS_IPv6_AAAA[] = "DNS_IPv6_AAAA";
static char __pyx_k__EVBUFFER_READ[] = "EVBUFFER_READ";
static char __pyx_k__HTTP_MOVEPERM[] = "HTTP_MOVEPERM";
static char __pyx_k__HTTP_MOVETEMP[] = "HTTP_MOVETEMP";
static char __pyx_k__HTTP_NOTFOUND[] = "HTTP_NOTFOUND";
static char __pyx_k____copyright__[] = "__copyright__";
static char __pyx_k__fail_requests[] = "fail_requests";
static char __pyx_k__input_headers[] = "input_headers";
static char __pyx_k__AssertionError[] = "AssertionError";
static char __pyx_k__CONTENT_LENGTH[] = "CONTENT_LENGTH";
static char __pyx_k__DNS_ERR_FORMAT[] = "DNS_ERR_FORMAT";
static char __pyx_k__EVBUFFER_ERROR[] = "EVBUFFER_ERROR";
static char __pyx_k__EVBUFFER_WRITE[] = "EVBUFFER_WRITE";
static char __pyx_k__EVHTTP_REQUEST[] = "EVHTTP_REQUEST";
static char __pyx_k__EVHTTP_REQ_GET[] = "EVHTTP_REQ_GET";
static char __pyx_k__HTTP_NOCONTENT[] = "HTTP_NOCONTENT";
static char __pyx_k__REQUEST_METHOD[] = "REQUEST_METHOD";
static char __pyx_k____evdns_cbargs[] = "__evdns_cbargs";
static char __pyx_k__output_headers[] = "output_headers";
static char __pyx_k__DNS_ERR_NOTIMPL[] = "DNS_ERR_NOTIMPL";
static char __pyx_k__DNS_ERR_REFUSED[] = "DNS_ERR_REFUSED";
static char __pyx_k__DNS_ERR_TIMEOUT[] = "DNS_ERR_TIMEOUT";
static char __pyx_k__DNS_ERR_UNKNOWN[] = "DNS_ERR_UNKNOWN";
static char __pyx_k__EVHTTP_REQ_HEAD[] = "EVHTTP_REQ_HEAD";
static char __pyx_k__EVHTTP_REQ_POST[] = "EVHTTP_REQ_POST";
static char __pyx_k__EVHTTP_RESPONSE[] = "EVHTTP_RESPONSE";
static char __pyx_k__HTTP_BADREQUEST[] = "HTTP_BADREQUEST";
static char __pyx_k__SERVER_PROTOCOL[] = "SERVER_PROTOCOL";
static char __pyx_k__DNS_ERR_NOTEXIST[] = "DNS_ERR_NOTEXIST";
static char __pyx_k__DNS_ERR_SHUTDOWN[] = "DNS_ERR_SHUTDOWN";
static char __pyx_k__EVBUFFER_TIMEOUT[] = "EVBUFFER_TIMEOUT";
static char __pyx_k__HTTP_NOTMODIFIED[] = "HTTP_NOTMODIFIED";
static char __pyx_k__HTTP_SERVUNAVAIL[] = "HTTP_SERVUNAVAIL";
static char __pyx_k__HTTP_method2name[] = "HTTP_method2name";
static char __pyx_k__HTTP_name2method[] = "HTTP_name2method";
static char __pyx_k__dns_resolve_ipv4[] = "dns_resolve_ipv4";
static char __pyx_k__dns_resolve_ipv6[] = "dns_resolve_ipv6";
static char __pyx_k__DNS_ERR_TRUNCATED[] = "DNS_ERR_TRUNCATED";
static char __pyx_k____simple_callback[] = "__simple_callback";
static char __pyx_k__DNS_QUERY_NO_SEARCH[] = "DNS_QUERY_NO_SEARCH";
static char __pyx_k___check_headers_sent[] = "_check_headers_sent";
static char __pyx_k__dns_resolve_reverse[] = "dns_resolve_reverse";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_kp_s_23;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_s_26;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_31;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_n_s_33;
static PyObject *__pyx_n_s_34;
static PyObject *__pyx_kp_s_4;
static PyObject *__pyx_kp_s_7;
static PyObject *__pyx_kp_s__80;
static PyObject *__pyx_n_s__AssertionError;
static PyObject *__pyx_n_s__BSD;
static PyObject *__pyx_n_s__CONTENT_LENGTH;
static PyObject *__pyx_n_s__CONTENT_TYPE;
static PyObject *__pyx_n_s__DNS_ERR_FORMAT;
static PyObject *__pyx_n_s__DNS_ERR_NONE;
static PyObject *__pyx_n_s__DNS_ERR_NOTEXIST;
static PyObject *__pyx_n_s__DNS_ERR_NOTIMPL;
static PyObject *__pyx_n_s__DNS_ERR_REFUSED;
static PyObject *__pyx_n_s__DNS_ERR_SHUTDOWN;
static PyObject *__pyx_n_s__DNS_ERR_TIMEOUT;
static PyObject *__pyx_n_s__DNS_ERR_TRUNCATED;
static PyObject *__pyx_n_s__DNS_ERR_UNKNOWN;
static PyObject *__pyx_n_s__DNS_IPv4_A;
static PyObject *__pyx_n_s__DNS_IPv6_AAAA;
static PyObject *__pyx_n_s__DNS_PTR;
static PyObject *__pyx_n_s__DNS_QUERY_NO_SEARCH;
static PyObject *__pyx_n_s__EVBUFFER_EOF;
static PyObject *__pyx_n_s__EVBUFFER_ERROR;
static PyObject *__pyx_n_s__EVBUFFER_READ;
static PyObject *__pyx_n_s__EVBUFFER_TIMEOUT;
static PyObject *__pyx_n_s__EVBUFFER_WRITE;
static PyObject *__pyx_n_s__EVHTTP_REQUEST;
static PyObject *__pyx_n_s__EVHTTP_REQ_GET;
static PyObject *__pyx_n_s__EVHTTP_REQ_HEAD;
static PyObject *__pyx_n_s__EVHTTP_REQ_POST;
static PyObject *__pyx_n_s__EVHTTP_RESPONSE;
static PyObject *__pyx_n_s__EV_PERSIST;
static PyObject *__pyx_n_s__EV_READ;
static PyObject *__pyx_n_s__EV_SIGNAL;
static PyObject *__pyx_n_s__EV_TIMEOUT;
static PyObject *__pyx_n_s__EV_WRITE;
static PyObject *__pyx_n_s__GET;
static PyObject *__pyx_n_s__HEAD;
static PyObject *__pyx_n_s__HTTP_BADREQUEST;
static PyObject *__pyx_n_s__HTTP_MOVEPERM;
static PyObject *__pyx_n_s__HTTP_MOVETEMP;
static PyObject *__pyx_n_s__HTTP_NOCONTENT;
static PyObject *__pyx_n_s__HTTP_NOTFOUND;
static PyObject *__pyx_n_s__HTTP_NOTMODIFIED;
static PyObject *__pyx_n_s__HTTP_OK;
static PyObject *__pyx_n_s__HTTP_SERVUNAVAIL;
static PyObject *__pyx_n_s__HTTP_method2name;
static PyObject *__pyx_n_s__HTTP_name2method;
static PyObject *__pyx_n_s__OSError;
static PyObject *__pyx_n_s__PATH_INFO;
static PyObject *__pyx_n_s__POST;
static PyObject *__pyx_n_s__QUERY_STRING;
static PyObject *__pyx_n_s__REMOTE_ADDR;
static PyObject *__pyx_n_s__REMOTE_HOST;
static PyObject *__pyx_n_s__REMOTE_PORT;
static PyObject *__pyx_n_s__REQUEST_METHOD;
static PyObject *__pyx_n_s__SCRIPT_NAME;
static PyObject *__pyx_n_s__SERVER_NAME;
static PyObject *__pyx_n_s__SERVER_PORT;
static PyObject *__pyx_n_s__SERVER_PROTOCOL;
static PyObject *__pyx_n_s__SIGINT;
static PyObject *__pyx_n_s__SIGTERM;