diff options
Diffstat (limited to 'devel')
31 files changed, 0 insertions, 3072 deletions
diff --git a/devel/Makefile b/devel/Makefile index 97bc8f7c1725..35159e326116 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -296,7 +296,6 @@ SUBDIR += cl-alexandria-sbcl SUBDIR += cl-asdf SUBDIR += cl-cffi - SUBDIR += cl-cffi-sbcl SUBDIR += cl-infix SUBDIR += cl-infix-sbcl SUBDIR += cl-port @@ -475,7 +474,6 @@ SUBDIR += dulwich SUBDIR += duplo SUBDIR += dwarfdump - SUBDIR += dwarves SUBDIR += dxa65 SUBDIR += dyncall SUBDIR += e00compr @@ -4068,7 +4066,6 @@ SUBDIR += pig SUBDIR += pijul SUBDIR += piklab - SUBDIR += pinba_engine SUBDIR += pipestatus SUBDIR += pire SUBDIR += pit @@ -4377,7 +4374,6 @@ SUBDIR += py-epdb SUBDIR += py-epsilon SUBDIR += py-evdev - SUBDIR += py-event SUBDIR += py-exam SUBDIR += py-extras SUBDIR += py-extremes diff --git a/devel/cl-cffi-sbcl/Makefile b/devel/cl-cffi-sbcl/Makefile deleted file mode 100644 index 936528195b4e..000000000000 --- a/devel/cl-cffi-sbcl/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# $FreeBSD$ - -PORTNAME= cffi -PORTVERSION= 0.16.1 -CATEGORIES= devel lisp -PKGNAMEPREFIX= cl- -DISTFILES= # none - -MAINTAINER= olgeni@FreeBSD.org -COMMENT= Portable foreign function interface for Common Lisp - -BROKEN= does not build with new sbcl 1.13 -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2017-11-09 - -BUILD_DEPENDS= cl-cffi>=0:devel/cl-cffi \ - cl-alexandria-sbcl>=0:devel/cl-alexandria-sbcl \ - cl-trivial-features-sbcl>=0:devel/cl-trivial-features-sbcl \ - cl-babel-sbcl>=0:converters/cl-babel-sbcl -RUN_DEPENDS:= ${BUILD_DEPENDS} - -USE_ASDF_FASL= yes -FASL_TARGET= sbcl -FASL_BUILD= yes -ASDF_MODULES= cffi cffi-grovel cffi-uffi-compat - -.include "${.CURDIR}/../../devel/cl-asdf/bsd.cl-asdf.mk" -.include <bsd.port.mk> diff --git a/devel/cl-cffi-sbcl/pkg-descr b/devel/cl-cffi-sbcl/pkg-descr deleted file mode 100644 index 523ae4a8b94d..000000000000 --- a/devel/cl-cffi-sbcl/pkg-descr +++ /dev/null @@ -1,16 +0,0 @@ -CFFI, the Common Foreign Function Interface, purports to be a -portable foreign function interface for Common Lisp. The CFFI library -is composed of a Lisp-implementation-specific backend in the CFFI-SYS -package, and a portable frontend in the CFFI package. - -The CFFI-SYS backend package defines a low-level interface to the -native FFI support in the Lisp implementation. It offers operators -for allocating and dereferencing foreign memory, calling foreign -functions, and loading shared libraries. The CFFI frontend provides -a declarative interface for defining foreign functions, structures, -typedefs, enumerated types, etc. It is implemented in portable ANSI -CL making use of the low-level operators exported by CFFI-SYS. - -This package is compiled with SBCL. - -WWW: http://common-lisp.net/project/cffi/ diff --git a/devel/dwarves/Makefile b/devel/dwarves/Makefile deleted file mode 100644 index ba84dfe1757a..000000000000 --- a/devel/dwarves/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# Created by: Conrad Meyer <cem@FreeBSD.org> -# $FreeBSD$ - -PORTNAME= dwarves -PORTVERSION= 1.10.20160713 -PORTREVISION= 1 -CATEGORIES= devel -#MASTER_SITES= https://fedorapeople.org/~acme/dwarves/ -MASTER_SITES= http://repo.or.cz/dwarves.git/snapshot/ -DISTFILES= b52386d041fac2dc6decf3a9e8e85385784a2de9.tar.gz -# git: http://repo.or.cz/dwarves.git -# ML: http://news.gmane.org/gmane.comp.debugging.dwarves - -MAINTAINER= cem@FreeBSD.org -COMMENT= Debugging Information Manipulation Tools - -LICENSE= GPLv2 -LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING - -BROKEN= does not build (/usr/local/include/libelf.h:308:8: error: unknown type name 'Elf32_Chdr') -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2017-11-09 - -LIB_DEPENDS= libargp.so:devel/argp-standalone \ - libdw.so:devel/elfutils -PATCH_DEPENDS= gnulib>=0:devel/gnulib - -WRKSRC= ${WRKDIR}/dwarves-b52386d - -USES= cmake:outsource localbase shebangfix tar:bzip2 -USE_LDCONFIG= yes - -SHEBANG_FILES= ostra/ostra-cg - -post-patch: - @${CP} -a \ - ${LOCALBASE}/share/gnulib/lib/gettext.h \ - ${LOCALBASE}/share/gnulib/lib/obstack.c \ - ${LOCALBASE}/share/gnulib/lib/obstack.h \ - ${WRKSRC}/ - @${REINPLACE_CMD} -e 's|_GL_ATTRIBUTE_PURE|__attribute__((__pure__))|g' \ - ${WRKSRC}/obstack.h ${WRKSRC}/obstack.c - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 1200000 -IGNORE= requires FreeBSD 12.0 (ElfNN_Chdr) -.endif - -.include <bsd.port.post.mk> diff --git a/devel/dwarves/distinfo b/devel/dwarves/distinfo deleted file mode 100644 index b16de50f7b9b..000000000000 --- a/devel/dwarves/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1468476328 -SHA256 (b52386d041fac2dc6decf3a9e8e85385784a2de9.tar.gz) = 7c86a956b273f26c2c3300db787de11a9e240b8e81a016cbb11e9c488e8fe248 -SIZE (b52386d041fac2dc6decf3a9e8e85385784a2de9.tar.gz) = 132977 diff --git a/devel/dwarves/files/patch-CMakeLists.txt b/devel/dwarves/files/patch-CMakeLists.txt deleted file mode 100644 index 2e7dde2fc181..000000000000 --- a/devel/dwarves/files/patch-CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ ---- CMakeLists.txt.orig 2016-06-30 19:30:28 UTC -+++ CMakeLists.txt -@@ -31,11 +31,14 @@ add_definitions(-D_GNU_SOURCE -DDWARVES_ - find_package(DWARF REQUIRED) - find_package(ZLIB REQUIRED) - --_set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${__LIB}" "libdir") -+# For argp-standalone -+find_library(ARGP argp ${LOCALBASE}/lib) -+ -+_set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/lib${__LIB}" "libdir") - - set(dwarves_LIB_SRCS dwarves.c dwarves_fprintf.c gobuffer strings - ctf_encoder.c ctf_loader.c libctf.c dwarf_loader.c -- dutil.c elf_symtab.c rbtree.c) -+ dutil.c elf_symtab.c rbtree.c obstack.c) - add_library(dwarves SHARED ${dwarves_LIB_SRCS}) - set_target_properties(dwarves PROPERTIES VERSION 1.0.0 SOVERSION 1) - set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "") -@@ -53,11 +56,11 @@ target_link_libraries(dwarves_reorganize - - set(codiff_SRCS codiff.c) - add_executable(codiff ${codiff_SRCS}) --target_link_libraries(codiff dwarves) -+target_link_libraries(codiff dwarves ${ARGP}) - - set(ctracer_SRCS ctracer.c) - add_executable(ctracer ${ctracer_SRCS}) --target_link_libraries(ctracer dwarves dwarves_emit dwarves_reorganize ${ELF_LIBRARY}) -+target_link_libraries(ctracer dwarves dwarves_emit dwarves_reorganize ${ELF_LIBRARY} ${ARGP}) - - set(dtagnames_SRCS dtagnames.c) - add_executable(dtagnames ${dtagnames_SRCS}) -@@ -65,19 +68,19 @@ target_link_libraries(dtagnames dwarves) - - set(pahole_SRCS pahole.c) - add_executable(pahole ${pahole_SRCS}) --target_link_libraries(pahole dwarves dwarves_reorganize) -+target_link_libraries(pahole dwarves dwarves_reorganize ${ARGP}) - - set(pdwtags_SRCS pdwtags.c) - add_executable(pdwtags ${pdwtags_SRCS}) --target_link_libraries(pdwtags dwarves) -+target_link_libraries(pdwtags dwarves ${ARGP}) - - set(pglobal_SRCS pglobal.c) - add_executable(pglobal ${pglobal_SRCS}) --target_link_libraries(pglobal dwarves) -+target_link_libraries(pglobal dwarves ${ARGP}) - - set(pfunct_SRCS pfunct.c ) - add_executable(pfunct ${pfunct_SRCS}) --target_link_libraries(pfunct dwarves dwarves_emit ${ELF_LIBRARY}) -+target_link_libraries(pfunct dwarves dwarves_emit ${ELF_LIBRARY} ${ARGP}) - - set(prefcnt_SRCS prefcnt.c) - add_executable(prefcnt ${prefcnt_SRCS}) -@@ -89,7 +92,7 @@ target_link_libraries(scncopy dwarves ${ - - set(syscse_SRCS syscse.c) - add_executable(syscse ${syscse_SRCS}) --target_link_libraries(syscse dwarves) -+target_link_libraries(syscse dwarves ${ARGP}) - - install(TARGETS codiff ctracer dtagnames pahole pdwtags - pfunct pglobal prefcnt scncopy syscse RUNTIME DESTINATION diff --git a/devel/dwarves/files/patch-ctf__loader.c b/devel/dwarves/files/patch-ctf__loader.c deleted file mode 100644 index 00778a231220..000000000000 --- a/devel/dwarves/files/patch-ctf__loader.c +++ /dev/null @@ -1,10 +0,0 @@ ---- ctf_loader.c.orig 2016-06-30 19:30:28 UTC -+++ ctf_loader.c -@@ -11,7 +11,6 @@ - #include <unistd.h> - #include <stdlib.h> - #include <stddef.h> --#include <malloc.h> - #include <string.h> - #include <limits.h> - #include <libgen.h> diff --git a/devel/dwarves/files/patch-dtagnames.c b/devel/dwarves/files/patch-dtagnames.c deleted file mode 100644 index 51c5df50141d..000000000000 --- a/devel/dwarves/files/patch-dtagnames.c +++ /dev/null @@ -1,37 +0,0 @@ ---- dtagnames.c.orig 2016-06-30 19:30:28 UTC -+++ dtagnames.c -@@ -9,16 +9,33 @@ - - #include <stdio.h> - #include <stdlib.h> --#include <malloc.h> -+ -+/* For mallctl */ -+#include <err.h> -+#include <errno.h> -+#include <malloc_np.h> - - #include "dwarves.h" - #include "dutil.h" - - static void print_malloc_stats(void) - { -+#if 0 - struct mallinfo m = mallinfo(); - - fprintf(stderr, "size: %u\n", m.uordblks); -+#else -+ size_t allocated, olen; -+ int rc; -+ -+ olen = sizeof(allocated); -+ rc = mallctl("stats.allocated", &allocated, &olen, NULL, 0); -+ if (rc != 0) { -+ errno = rc; -+ err(1, "mallctl stats.allocated"); -+ } -+ fprintf(stderr, "size: %zu\n", allocated); -+#endif - } - - static int class__tag_name(struct tag *tag, struct cu *cu __unused, diff --git a/devel/dwarves/files/patch-dutil.h b/devel/dwarves/files/patch-dutil.h deleted file mode 100644 index 5b413fe052dc..000000000000 --- a/devel/dwarves/files/patch-dutil.h +++ /dev/null @@ -1,30 +0,0 @@ ---- dutil.h.orig 2016-06-30 19:30:28 UTC -+++ dutil.h -@@ -15,7 +15,17 @@ - #include <stddef.h> - #include <elf.h> - #include <gelf.h> -+#if 0 - #include <asm/bitsperlong.h> -+#else -+# if __SIZEOF_LONG__ == 8 -+# define __BITS_PER_LONG 64 -+# elif __SIZEOF_LONG__ == 4 -+# define __BITS_PER_LONG 32 -+# else -+# error What are you -+# endif -+#endif - #include "rbtree.h" - - #define BITS_PER_LONG __BITS_PER_LONG -@@ -28,7 +38,9 @@ - #define __pure __attribute__ ((pure)) - #endif - -+#ifndef roundup - #define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y)) -+#endif - - static inline __attribute__((const)) bool is_power_of_2(unsigned long n) - { diff --git a/devel/dwarves/files/patch-dwarves.c b/devel/dwarves/files/patch-dwarves.c deleted file mode 100644 index 5f64a8e51005..000000000000 --- a/devel/dwarves/files/patch-dwarves.c +++ /dev/null @@ -1,11 +0,0 @@ ---- dwarves.c.orig 2016-06-30 19:30:28 UTC -+++ dwarves.c -@@ -16,6 +16,8 @@ - #include <fcntl.h> - #include <fnmatch.h> - #include <libelf.h> -+/* For PATH_MAX */ -+#include <limits.h> - #include <search.h> - #include <stdio.h> - #include <stdlib.h> diff --git a/devel/dwarves/files/patch-dwarves__fprintf.c b/devel/dwarves/files/patch-dwarves__fprintf.c deleted file mode 100644 index 6e9285066880..000000000000 --- a/devel/dwarves/files/patch-dwarves__fprintf.c +++ /dev/null @@ -1,27 +0,0 @@ ---- dwarves_fprintf.c.orig 2016-06-30 19:30:28 UTC -+++ dwarves_fprintf.c -@@ -9,6 +9,9 @@ - published by the Free Software Foundation. - */ - -+/* For CACHE_LINE_SIZE */ -+#include <sys/param.h> -+ - #include <dwarf.h> - #include <errno.h> - #include <stdio.h> -@@ -1699,7 +1702,14 @@ void cus__print_error_msg(const char *pr - void dwarves__fprintf_init(uint16_t user_cacheline_size) - { - if (user_cacheline_size == 0) { -+#if 0 - long sys_cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE); -+#else -+ /* -+ * CEM: Ideally we could get this programmatically. -+ */ -+ long sys_cacheline_size = CACHE_LINE_SIZE; -+#endif - - if (sys_cacheline_size > 0) - cacheline_size = sys_cacheline_size; diff --git a/devel/dwarves/files/patch-elf__symtab.c b/devel/dwarves/files/patch-elf__symtab.c deleted file mode 100644 index ae7a090678d0..000000000000 --- a/devel/dwarves/files/patch-elf__symtab.c +++ /dev/null @@ -1,12 +0,0 @@ ---- elf_symtab.c.orig 2016-06-30 19:30:28 UTC -+++ elf_symtab.c -@@ -7,8 +7,8 @@ - published by the Free Software Foundation. - */ - --#include <malloc.h> - #include <stdio.h> -+#include <stdlib.h> - #include <string.h> - - #include "dutil.h" diff --git a/devel/dwarves/files/patch-exitfail.h b/devel/dwarves/files/patch-exitfail.h deleted file mode 100644 index 86a7a4b2ff0f..000000000000 --- a/devel/dwarves/files/patch-exitfail.h +++ /dev/null @@ -1,5 +0,0 @@ ---- exitfail.h.orig 2016-07-14 06:29:38 UTC -+++ exitfail.h -@@ -0,0 +1,2 @@ -+#pragma once -+#define exit_failure EXIT_FAILURE diff --git a/devel/dwarves/files/patch-libctf.c b/devel/dwarves/files/patch-libctf.c deleted file mode 100644 index 0434118d4590..000000000000 --- a/devel/dwarves/files/patch-libctf.c +++ /dev/null @@ -1,12 +0,0 @@ ---- libctf.c.orig 2016-06-30 19:30:28 UTC -+++ libctf.c -@@ -1,7 +1,8 @@ -+#include <sys/stat.h> -+ - #include <fcntl.h> - #include <gelf.h> - #include <limits.h> --#include <malloc.h> - #include <errno.h> - #include <stdio.h> - #include <stdlib.h> diff --git a/devel/dwarves/files/patch-pdwtags.c b/devel/dwarves/files/patch-pdwtags.c deleted file mode 100644 index 78b457831278..000000000000 --- a/devel/dwarves/files/patch-pdwtags.c +++ /dev/null @@ -1,10 +0,0 @@ ---- pdwtags.c.orig 2016-06-30 19:30:28 UTC -+++ pdwtags.c -@@ -9,7 +9,6 @@ - #include <argp.h> - #include <stdio.h> - #include <stdlib.h> --#include <malloc.h> - - #include "dwarves.h" - #include "dutil.h" diff --git a/devel/dwarves/files/patch-pglobal.c b/devel/dwarves/files/patch-pglobal.c deleted file mode 100644 index c443daf6827c..000000000000 --- a/devel/dwarves/files/patch-pglobal.c +++ /dev/null @@ -1,38 +0,0 @@ ---- pglobal.c.orig 2016-06-30 19:30:28 UTC -+++ pglobal.c -@@ -8,7 +8,6 @@ - */ - - #include <argp.h> --#include <malloc.h> - #include <search.h> - #include <stdio.h> - #include <stdlib.h> -@@ -92,7 +91,7 @@ static void extvar__add(const struct var - nodep = tsearch(gvar, &tree, extvar__compare); - if (nodep == NULL) - oom("tsearch"); -- else if (*nodep != gvar) -+ else if (*nodep != gvar) { - if (gvar->var->declaration) { - gvar->next = (*nodep)->next; - (*nodep)->next = gvar; -@@ -100,6 +99,7 @@ static void extvar__add(const struct var - gvar->next = *nodep; - *nodep = gvar; - } -+ } - } - } - -@@ -315,7 +315,10 @@ int main(int argc, char *argv[]) - twalk(tree, function_action__walk); - } - -+#if 0 -+ /* Our search.h doesn't implement tdestroy; leak for now. */ - tdestroy(tree, free_node); -+#endif - rc = EXIT_SUCCESS; - out_cus_delete: - cus__delete(cus); diff --git a/devel/dwarves/files/patch-prefcnt.c b/devel/dwarves/files/patch-prefcnt.c deleted file mode 100644 index 0dc76204a97a..000000000000 --- a/devel/dwarves/files/patch-prefcnt.c +++ /dev/null @@ -1,16 +0,0 @@ ---- prefcnt.c.orig 2016-06-30 19:30:28 UTC -+++ prefcnt.c -@@ -66,9 +66,11 @@ static void refcnt_tag(struct tag *tag, - - tag->visited = 1; - -- if (tag__is_struct(tag) || tag__is_union(tag)) -- type__for_each_member(tag__type(tag), member) -+ if (tag__is_struct(tag) || tag__is_union(tag)) { -+ type__for_each_member(tag__type(tag), member) { - refcnt_member(member, cu); -+ } -+ } - } - - static void refcnt_lexblock(const struct lexblock *lexblock, const struct cu *cu) diff --git a/devel/dwarves/files/patch-strings.c b/devel/dwarves/files/patch-strings.c deleted file mode 100644 index 387ffcaa5a86..000000000000 --- a/devel/dwarves/files/patch-strings.c +++ /dev/null @@ -1,13 +0,0 @@ ---- strings.c.orig 2016-06-30 19:30:28 UTC -+++ strings.c -@@ -39,7 +39,10 @@ void strings__delete(struct strings *str - { - if (strs == NULL) - return; -+#if 0 -+ /* Our search.h doesn't implement tdestroy; leak for now. */ - tdestroy(strs->tree, do_nothing); -+#endif - __gobuffer__delete(&strs->gb); - free(strs); - } diff --git a/devel/dwarves/pkg-descr b/devel/dwarves/pkg-descr deleted file mode 100644 index 4c10b9b55bc5..000000000000 --- a/devel/dwarves/pkg-descr +++ /dev/null @@ -1,18 +0,0 @@ -Dwarves is a set of tools that use the debugging information inserted in ELF -binaries by compilers such as GCC, used by well known debuggers such as GDB, -and more recent ones such as systemtap. - -Utilities in the dwarves suite include pahole, that can be used to find -alignment holes in structs and classes in languages such as C, C++, but not -limited to these. - -It also extracts other information such as CPU cacheline alignment, helping -pack those structures to achieve more cache hits. - -A diff like tool, codiff can be used to compare the effects changes in source -code generate on the resulting binaries. - -Another tool is pfunct, that can be used to find all sorts of information about -functions, inlines, decisions made by the compiler about inlining, etc. - -WWW: http://acmel.wordpress.com/ diff --git a/devel/dwarves/pkg-plist b/devel/dwarves/pkg-plist deleted file mode 100644 index 93766df97ca7..000000000000 --- a/devel/dwarves/pkg-plist +++ /dev/null @@ -1,34 +0,0 @@ -bin/codiff -bin/ctracer -bin/dtagnames -bin/ostra-cg -bin/pahole -bin/pdwtags -bin/pfunct -bin/pglobal -bin/prefcnt -bin/scncopy -bin/syscse -include/dwarves/dutil.h -include/dwarves/dwarves.h -include/dwarves/dwarves_emit.h -include/dwarves/dwarves_reorganize.h -include/dwarves/gobuffer.h -include/dwarves/list.h -include/dwarves/rbtree.h -include/dwarves/strings.h -lib/libdwarves.so -lib/libdwarves.so.1 -lib/libdwarves.so.1.0.0 -lib/libdwarves_emit.so -lib/libdwarves_emit.so.1 -lib/libdwarves_emit.so.1.0.0 -lib/libdwarves_reorganize.so -lib/libdwarves_reorganize.so.1 -lib/libdwarves_reorganize.so.1.0.0 -%%DATADIR%%/runtime/Makefile -%%DATADIR%%/runtime/ctracer_relay.c -%%DATADIR%%/runtime/ctracer_relay.h -%%DATADIR%%/runtime/linux.blacklist.cu -%%DATADIR%%/runtime/python/ostra.py -share/man/man1/pahole.1 diff --git a/devel/pinba_engine/Makefile b/devel/pinba_engine/Makefile deleted file mode 100644 index cc9953be0dea..000000000000 --- a/devel/pinba_engine/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# Created by: raven428 <raven428@gmail.com> -# $FreeBSD$ - -PORTNAME= pinba_engine -PORTVERSION= 2011.08.18 -PORTREVISION= 10 -CATEGORIES= devel - -MAINTAINER= raven428@gmail.com -COMMENT= Mysql-engine part of statistics server for PHP - -BUILD_DEPENDS= ${LOCALBASE}/include/google/protobuf/descriptor.h:devel/protobuf \ - ${LOCALBASE}/include/event.h:devel/libevent \ - ${LOCALBASE}/include/Judy.h:devel/judy \ - ${LOCALBASE}/lib/mysql/plugin:${_MYSQL_SERVER} \ - ${NONEXISTENT}:${_MYSQL_SERVER}:configure \ - bison:devel/bison \ - cmake:devel/cmake -LIB_DEPENDS= libprotobuf.so:devel/protobuf - -BROKEN= fails to configure (error: Failed to find required header file include/mysql_version.h) -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2017-11-09 - -USE_GITHUB= yes -GH_ACCOUNT= tony2001 -GH_TAGNAME= 3a0cb51 - -USE_MYSQL= yes -IGNORE_WITH_MYSQL= 50 - -MYSQL_WRKSRC= $$(cd ${PORTSDIR}/${_MYSQL_SERVER} && ${MAKE} -V WRKSRC) - -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip -USES= autoreconf gmake libtool -USE_LDCONFIG= ${PREFIX}/lib/mysql/plugin - -CONFIGURE_ARGS= --disable-static \ - --with-mysql=${MYSQL_WRKSRC} \ - --libdir=${PREFIX}/lib/mysql/plugin -CFLAGS+= -I${LOCALBASE}/include/mysql - -SUB_FILES= pkg-message -PORTDOCS= NEWS TODO README - -BROKEN_aarch64= Fails to configure: failed to find required header file include/mysql_version.h - -post-install: - @${MKDIR} ${STAGEDIR}${DATADIR} - @${INSTALL} ${WRKSRC}/default_tables.sql ${STAGEDIR}${DATADIR} - @${MKDIR} ${STAGEDIR}${DOCSDIR} - cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR} - -.include <bsd.port.mk> diff --git a/devel/pinba_engine/distinfo b/devel/pinba_engine/distinfo deleted file mode 100644 index bb92c3822959..000000000000 --- a/devel/pinba_engine/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (tony2001-pinba_engine-2011.08.18-3a0cb51_GH0.tar.gz) = f538abf886e8cc21885436d399f4eeb866e4a291f81df3a76fce244f0e9f8f8c -SIZE (tony2001-pinba_engine-2011.08.18-3a0cb51_GH0.tar.gz) = 50018 diff --git a/devel/pinba_engine/files/patch-src__ha_pinba.cc b/devel/pinba_engine/files/patch-src__ha_pinba.cc deleted file mode 100644 index 3c991903d75a..000000000000 --- a/devel/pinba_engine/files/patch-src__ha_pinba.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- ./src/ha_pinba.cc.orig 2011-07-26 18:52:53.000000000 +0400 -+++ ./src/ha_pinba.cc 2011-08-27 18:58:00.000000000 +0400 -@@ -45,6 +45,10 @@ - - #include "ha_pinba.h" - -+#ifdef PINBA_ENGINE_HAVE_PTHREAD_SETAFFINITY_NP -+#include <pthread_np.h> -+#endif -+ - #ifdef PINBA_ENGINE_MYSQL_VERSION_5_5 - # define pinba_free(a, b) my_free(a) - #else -@@ -427,13 +431,13 @@ - unsigned long mask; - - mask = 1; -- pthread_setaffinity_np(collector_thread, sizeof(mask), (cpu_set_t *)&mask); -+ pthread_setaffinity_np(collector_thread, sizeof(mask), (cpuset_t *)&mask); - - mask = 2; -- pthread_setaffinity_np(data_thread, sizeof(mask), (cpu_set_t *)&mask); -+ pthread_setaffinity_np(data_thread, sizeof(mask), (cpuset_t *)&mask); - - mask = 4; -- pthread_setaffinity_np(stats_thread, sizeof(mask), (cpu_set_t *)&mask); -+ pthread_setaffinity_np(stats_thread, sizeof(mask), (cpuset_t *)&mask); - #endif - } - -@@ -452,6 +456,7 @@ - int error = 0; - DBUG_ENTER("pinba_engine_shutdown"); - -+ pthread_detach(collector_thread); - pthread_cancel(collector_thread); - pthread_join(collector_thread, NULL); - diff --git a/devel/pinba_engine/files/pkg-message.in b/devel/pinba_engine/files/pkg-message.in deleted file mode 100644 index 39857182ce32..000000000000 --- a/devel/pinba_engine/files/pkg-message.in +++ /dev/null @@ -1,10 +0,0 @@ -After you've installed the plugin, you need to enable it in MySQL. -To do this log in to the MySQL console (as root) and execute the -following: -mysql> INSTALL PLUGIN pinba SONAME 'libpinba_engine.so'; - -We'd also suggest you to create a separate database, this way: -mysql> CREATE DATABASE pinba; - -And then create the default tables: -mysql -D pinba < %%DATADIR%%/default_tables.sql diff --git a/devel/pinba_engine/pkg-descr b/devel/pinba_engine/pkg-descr deleted file mode 100644 index edc9b7d410e4..000000000000 --- a/devel/pinba_engine/pkg-descr +++ /dev/null @@ -1,17 +0,0 @@ -Pinba is a statistics server for PHP using MySQL as a read-only -interface. - -It accumulates and processes data sent over UDP by multiple PHP -processes and displays statistics in a nice human-readable form of -simple "reports", also providing a read-only interface to the raw -data to enable generation of more sophisticated reports. - -With the Pinba extension, users can also measure particular parts -of the code using timers with arbitrary tags. - -Pinba is not a debugging tool in the common sense, since you're not -supposed to do debugging on production servers, but its main goal -is to help developers to locate bottlenecks in realtime and direct -their attention to the code that really needs it. - -WWW: http://pinba.org/ diff --git a/devel/pinba_engine/pkg-plist b/devel/pinba_engine/pkg-plist deleted file mode 100644 index 6351283ecd0c..000000000000 --- a/devel/pinba_engine/pkg-plist +++ /dev/null @@ -1,4 +0,0 @@ -lib/mysql/plugin/libpinba_engine.so -lib/mysql/plugin/libpinba_engine.so.0 -lib/mysql/plugin/libpinba_engine.so.0.0.0 -%%DATADIR%%/default_tables.sql diff --git a/devel/py-event/Makefile b/devel/py-event/Makefile deleted file mode 100644 index 043bd08b0c40..000000000000 --- a/devel/py-event/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Created by: Alexander Botero-Lowry <alexbl@FreeBSD.org> -# $FreeBSD$ - -PORTNAME= event -DISTVERSIONPREFIX= PYEVENT_ -DISTVERSION= 0_3 -PORTREVISION= 11 -CATEGORIES= devel net python -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} - -MAINTAINER= ports@FreeBSD.org -COMMENT= Python bindings for libevent - -LICENSE= BSD3CLAUSE -LICENSE_FILE= ${WRKSRC}/LICENSE - -LIB_DEPENDS= libevent.so:devel/libevent - -USE_GITHUB= yes -GH_ACCOUNT= jaraco -GH_PROJECT= pyevent - -BROKEN= fails to build with libevent 2.1 -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2017-11-09 - -USES= python -USE_PYTHON= distutils autoplist - -post-install: - ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/event.so - -.include <bsd.port.mk> diff --git a/devel/py-event/distinfo b/devel/py-event/distinfo deleted file mode 100644 index b22e12424270..000000000000 --- a/devel/py-event/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (jaraco-pyevent-PYEVENT_0_3_GH0.tar.gz) = 99e26d36cfdcbc7c67668b200f4f4144d02e005a2863b7ab9b71f63fc616725c -SIZE (jaraco-pyevent-PYEVENT_0_3_GH0.tar.gz) = 30393 diff --git a/devel/py-event/files/patch-event.c b/devel/py-event/files/patch-event.c deleted file mode 100644 index 0c4847247ac1..000000000000 --- a/devel/py-event/files/patch-event.c +++ /dev/null @@ -1,2403 +0,0 @@ ---- event.c.orig 2005-09-12 03:44:04 UTC -+++ event.c -@@ -1,47 +1,69 @@ --/* Generated by Pyrex 0.9.3 on Sun Sep 11 23:51:17 2005 */ -+/* Generated by Pyrex 0.9.8.5 on Tue Dec 15 11:56:37 2009 */ - -+#define PY_SSIZE_T_CLEAN - #include "Python.h" - #include "structmember.h" - #ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG - #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 PyInt_FromSsize_t(z) PyInt_FromLong(z) -+ #define PyInt_AsSsize_t(o) PyInt_AsLong(o) -+#endif -+#if !defined(WIN32) && !defined(MS_WINDOWS) -+ #ifndef __stdcall -+ #define __stdcall -+ #endif -+ #ifndef __cdecl -+ #define __cdecl -+ #endif -+#endif -+#ifdef __cplusplus -+#define __PYX_EXTERN_C extern "C" -+#else -+#define __PYX_EXTERN_C extern -+#endif -+#include <math.h> - #include "event.h" - - --typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ --typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ --static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/ --static int __Pyx_EndUnpack(PyObject *, int); /*proto*/ --static int __Pyx_PrintItem(PyObject *); /*proto*/ --static int __Pyx_PrintNewline(void); /*proto*/ --static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ --static void __Pyx_ReRaise(void); /*proto*/ --static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ --static PyObject *__Pyx_GetExcValue(void); /*proto*/ --static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ --static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ --static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ --static void __Pyx_WriteUnraisable(char *name); /*proto*/ --static void __Pyx_AddTraceback(char *funcname); /*proto*/ --static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ --static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ --static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/ --static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ --static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ --static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ --static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ -+typedef struct {PyObject **p; int i; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ - - static PyObject *__pyx_m; - static PyObject *__pyx_b; - static int __pyx_lineno; - static char *__pyx_filename; --staticforward char **__pyx_f; -+static char **__pyx_f; - - static char __pyx_mdoc[] = "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 void __Pyx_WriteUnraisable(char *name); /*proto*/ -+ -+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -+ -+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ -+ -+static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], Py_ssize_t nargs, PyObject **args2, PyObject **kwds2, char rqd_kwds[]); /*proto*/ -+ -+static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i); /*proto*/ -+ -+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -+ -+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -+ -+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ -+ -+static void __Pyx_AddTraceback(char *funcname); /*proto*/ -+ - /* Declarations from event */ - --staticforward PyTypeObject __pyx_type_5event_event; -+ -+/* Declarations from implementation of event */ -+ -+typedef void (*__pyx_t_5event_event_handler)(int,short,void *); - - struct __pyx_obj_5event_event { - PyObject_HEAD -@@ -54,115 +76,155 @@ struct __pyx_obj_5event_event { - struct timeval tv; - }; - --staticforward PyTypeObject __pyx_type_5event_read; -- - struct __pyx_obj_5event_read { - struct __pyx_obj_5event_event __pyx_base; - }; - --staticforward PyTypeObject __pyx_type_5event_write; -- - struct __pyx_obj_5event_write { - struct __pyx_obj_5event_event __pyx_base; - }; - --staticforward PyTypeObject __pyx_type_5event_signal; -- - struct __pyx_obj_5event_signal { - struct __pyx_obj_5event_event __pyx_base; - }; - --staticforward PyTypeObject __pyx_type_5event_timeout; -- - struct __pyx_obj_5event_timeout { - struct __pyx_obj_5event_event __pyx_base; - }; - -+ -+ -+ -+ -+ - 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 PyObject *__pyx_k9; --static short __pyx_k10; --static PyObject *__pyx_k11; --static PyObject *__pyx_k12; --static float __pyx_k13; --static PyObject *__pyx_k14; --static int (__pyx_f_5event___event_sigcb(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*/ -- --/* Implementation of event */ -+static void __pyx_f_5event___event_handler(int,short,void *); /*proto*/ -+static void __pyx_f_5event___simple_event_handler(int,short,void *); /*proto*/ - --static char (__pyx_k1[]) = "Dug Song <dugsong@monkey.org>"; --static char (__pyx_k2[]) = "Martin Murray <mmurray@monkey.org>"; --static char (__pyx_k3[]) = "Copyright (c) 2004 Dug Song"; --static char (__pyx_k4[]) = "Copyright (c) 2003 Martin Murray"; --static char (__pyx_k6[]) = "http://monkey.org/~dugsong/pyevent/"; --static char (__pyx_k7[]) = "0.3"; -+static char __pyx_k1[] = "__callback"; -+static char __pyx_k2[] = "__simple_callback"; -+static char __pyx_k3[] = "fileno"; -+static char __pyx_k4[] = "sys"; -+static char __pyx_k5[] = "exc_info"; -+static char __pyx_k6[] = "__event_exc"; -+static char __pyx_k7[] = "EV_SIGNAL"; -+static char __pyx_k8[] = "EV_READ"; -+static char __pyx_k9[] = "EV_WRITE"; -+static char __pyx_k10[] = "EV_TIMEOUT"; -+static char __pyx_k11[] = "pending"; -+static char __pyx_k12[] = "delete"; -+static char __pyx_k13[] = "<event flags=0x%x, handle=%s, callback=%s, arg=%s>"; -+static char __pyx_k14[] = "__init__"; -+static char __pyx_k15[] = "simple"; -+static char __pyx_k16[] = "add"; -+static char __pyx_k17[] = "EV_PERSIST"; -+static char __pyx_k18[] = "Dug Song <dugsong@monkey.org>"; -+static char __pyx_k19[] = "Martin Murray <mmurray@monkey.org>"; -+static char __pyx_k20[] = "__author__"; -+static char __pyx_k21[] = "Copyright (c) 2004 Dug Song"; -+static char __pyx_k22[] = "Copyright (c) 2003 Martin Murray"; -+static char __pyx_k23[] = "__copyright__"; -+static char __pyx_k24[] = "BSD"; -+static char __pyx_k25[] = "__license__"; -+static char __pyx_k26[] = "http://monkey.org/~dugsong/pyevent/"; -+static char __pyx_k27[] = "__url__"; -+static char __pyx_k28[] = "0.3"; -+static char __pyx_k29[] = "__version__"; -+static char __pyx_k30[] = "init"; - -+static PyObject *__pyx_n_BSD; -+static PyObject *__pyx_n_EV_PERSIST; -+static PyObject *__pyx_n_EV_READ; -+static PyObject *__pyx_n_EV_SIGNAL; -+static PyObject *__pyx_n_EV_TIMEOUT; -+static PyObject *__pyx_n_EV_WRITE; - static PyObject *__pyx_n___author__; -+static PyObject *__pyx_n___callback; - static PyObject *__pyx_n___copyright__; -+static PyObject *__pyx_n___event_exc; -+static PyObject *__pyx_n___init__; - static PyObject *__pyx_n___license__; -+static PyObject *__pyx_n___simple_callback; - static PyObject *__pyx_n___url__; - static PyObject *__pyx_n___version__; --static PyObject *__pyx_n_sys; --static PyObject *__pyx_n_EV_TIMEOUT; --static PyObject *__pyx_n_EV_READ; --static PyObject *__pyx_n_EV_WRITE; --static PyObject *__pyx_n_EV_SIGNAL; --static PyObject *__pyx_n_EV_PERSIST; --static PyObject *__pyx_n___event_exc; -+static PyObject *__pyx_n_add; -+static PyObject *__pyx_n_delete; -+static PyObject *__pyx_n_exc_info; -+static PyObject *__pyx_n_fileno; - static PyObject *__pyx_n_init; --static PyObject *__pyx_n_dispatch; --static PyObject *__pyx_n_loop; --static PyObject *__pyx_n_abort; --static PyObject *__pyx_n_BSD; --static PyObject *__pyx_n_False; -+static PyObject *__pyx_n_pending; -+static PyObject *__pyx_n_simple; -+static PyObject *__pyx_n_sys; - --static PyObject *__pyx_k1p; --static PyObject *__pyx_k2p; --static PyObject *__pyx_k3p; --static PyObject *__pyx_k4p; --static PyObject *__pyx_k6p; --static PyObject *__pyx_k7p; -+static PyObject *__pyx_k13p; -+static PyObject *__pyx_k18p; -+static PyObject *__pyx_k19p; -+static PyObject *__pyx_k21p; -+static PyObject *__pyx_k22p; -+static PyObject *__pyx_k26p; -+static PyObject *__pyx_k28p; - --static int __pyx_f_5event___event_sigcb(void) { -- int __pyx_r; -+static __Pyx_StringTabEntry __pyx_string_tab[] = { -+ {&__pyx_n_BSD, 1, __pyx_k24, sizeof(__pyx_k24)}, -+ {&__pyx_n_EV_PERSIST, 1, __pyx_k17, sizeof(__pyx_k17)}, -+ {&__pyx_n_EV_READ, 1, __pyx_k8, sizeof(__pyx_k8)}, -+ {&__pyx_n_EV_SIGNAL, 1, __pyx_k7, sizeof(__pyx_k7)}, -+ {&__pyx_n_EV_TIMEOUT, 1, __pyx_k10, sizeof(__pyx_k10)}, -+ {&__pyx_n_EV_WRITE, 1, __pyx_k9, sizeof(__pyx_k9)}, -+ {&__pyx_n___author__, 1, __pyx_k20, sizeof(__pyx_k20)}, -+ {&__pyx_n___callback, 1, __pyx_k1, sizeof(__pyx_k1)}, -+ {&__pyx_n___copyright__, 1, __pyx_k23, sizeof(__pyx_k23)}, -+ {&__pyx_n___event_exc, 1, __pyx_k6, sizeof(__pyx_k6)}, -+ {&__pyx_n___init__, 1, __pyx_k14, sizeof(__pyx_k14)}, -+ {&__pyx_n___license__, 1, __pyx_k25, sizeof(__pyx_k25)}, -+ {&__pyx_n___simple_callback, 1, __pyx_k2, sizeof(__pyx_k2)}, -+ {&__pyx_n___url__, 1, __pyx_k27, sizeof(__pyx_k27)}, -+ {&__pyx_n___version__, 1, __pyx_k29, sizeof(__pyx_k29)}, -+ {&__pyx_n_add, 1, __pyx_k16, sizeof(__pyx_k16)}, -+ {&__pyx_n_delete, 1, __pyx_k12, sizeof(__pyx_k12)}, -+ {&__pyx_n_exc_info, 1, __pyx_k5, sizeof(__pyx_k5)}, -+ {&__pyx_n_fileno, 1, __pyx_k3, sizeof(__pyx_k3)}, -+ {&__pyx_n_init, 1, __pyx_k30, sizeof(__pyx_k30)}, -+ {&__pyx_n_pending, 1, __pyx_k11, sizeof(__pyx_k11)}, -+ {&__pyx_n_simple, 1, __pyx_k15, sizeof(__pyx_k15)}, -+ {&__pyx_n_sys, 1, __pyx_k4, sizeof(__pyx_k4)}, -+ {&__pyx_k13p, 0, __pyx_k13, sizeof(__pyx_k13)}, -+ {&__pyx_k18p, 0, __pyx_k18, sizeof(__pyx_k18)}, -+ {&__pyx_k19p, 0, __pyx_k19, sizeof(__pyx_k19)}, -+ {&__pyx_k21p, 0, __pyx_k21, sizeof(__pyx_k21)}, -+ {&__pyx_k22p, 0, __pyx_k22, sizeof(__pyx_k22)}, -+ {&__pyx_k26p, 0, __pyx_k26, sizeof(__pyx_k26)}, -+ {&__pyx_k28p, 0, __pyx_k28, sizeof(__pyx_k28)}, -+ {0, 0, 0, 0} -+}; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":66 */ -- __pyx_r = (-1); -- goto __pyx_L0; -+static PyObject *__pyx_d1; -+static short __pyx_d2; -+static PyObject *__pyx_d3; -+static PyObject *__pyx_d4; -+static float __pyx_d5; -+static PyObject *__pyx_d6; - -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1:; -- __Pyx_WriteUnraisable("event.__event_sigcb"); -- __pyx_L0:; -- return __pyx_r; --} - --static PyObject *__pyx_n___callback; -+/* Implementation of event */ - --static void __pyx_f_5event___event_handler(int __pyx_v_fd,short __pyx_v_evtype,void (*__pyx_v_arg)) { -+static void __pyx_f_5event___event_handler(int __pyx_v_fd,short __pyx_v_evtype,void *__pyx_v_arg) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":69 */ -- __pyx_1 = (PyObject *)__pyx_v_arg; -- Py_INCREF(__pyx_1); -- __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n___callback); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arg), __pyx_n___callback); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} -+ __pyx_2 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} -+ __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} -+ PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); -+ __pyx_2 = 0; -+ __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); -- __pyx_1 = 0; -- __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- Py_DECREF(__pyx_1); __pyx_1 = 0; -+ Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; -@@ -173,26 +235,19 @@ static void __pyx_f_5event___event_handl - __pyx_L0:; - } - --static PyObject *__pyx_n___simple_callback; -- --static void __pyx_f_5event___simple_event_handler(int __pyx_v_fd,short __pyx_v_evtype,void (*__pyx_v_arg)) { -+static void __pyx_f_5event___simple_event_handler(int __pyx_v_fd,short __pyx_v_evtype,void *__pyx_v_arg) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":72 */ -- __pyx_1 = (PyObject *)__pyx_v_arg; -- Py_INCREF(__pyx_1); -- __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n___simple_callback); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arg), __pyx_n___simple_callback); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -+ __pyx_2 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -+ __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} -+ PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); -+ __pyx_2 = 0; -+ __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} -- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); -- __pyx_1 = 0; -- __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- Py_DECREF(__pyx_1); __pyx_1 = 0; -+ Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; -@@ -203,10 +258,6 @@ static void __pyx_f_5event___simple_even - __pyx_L0:; - } - --static PyObject *__pyx_n_isinstance; --static PyObject *__pyx_n_int; --static PyObject *__pyx_n_fileno; -- - static int __pyx_f_5event_5event___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_f_5event_5event___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_callback = 0; -@@ -214,18 +265,17 @@ static int __pyx_f_5event_5event___init_ - short __pyx_v_evtype; - PyObject *__pyx_v_handle = 0; - PyObject *__pyx_v_simple = 0; -- void ((*__pyx_v_handler)(int ,short ,void (*))); -+ __pyx_t_5event_event_handler __pyx_v_handler; - int __pyx_r; - PyObject *__pyx_1 = 0; - int __pyx_2; - int __pyx_3; - PyObject *__pyx_4 = 0; -- PyObject *__pyx_5 = 0; - static char *__pyx_argnames[] = {"callback","arg","evtype","handle","simple",0}; -- __pyx_v_arg = __pyx_k9; -- __pyx_v_evtype = __pyx_k10; -- __pyx_v_handle = __pyx_k11; -- __pyx_v_simple = __pyx_k12; -+ __pyx_v_arg = __pyx_d1; -+ __pyx_v_evtype = __pyx_d2; -+ __pyx_v_handle = __pyx_d3; -+ __pyx_v_simple = __pyx_d4; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OhOO", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg, &__pyx_v_evtype, &__pyx_v_handle, &__pyx_v_simple)) return -1; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_callback); -@@ -233,78 +283,57 @@ static int __pyx_f_5event_5event___init_ - Py_INCREF(__pyx_v_handle); - Py_INCREF(__pyx_v_simple); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":96 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":93 */ - Py_INCREF(__pyx_v_callback); - Py_DECREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->callback); - ((struct __pyx_obj_5event_event *)__pyx_v_self)->callback = __pyx_v_callback; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":97 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":94 */ - Py_INCREF(__pyx_v_arg); - Py_DECREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->args); - ((struct __pyx_obj_5event_event *)__pyx_v_self)->args = __pyx_v_arg; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":98 */ -- __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":95 */ -+ __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} - Py_DECREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->evtype); - ((struct __pyx_obj_5event_event *)__pyx_v_self)->evtype = __pyx_1; - __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":99 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":96 */ - Py_INCREF(__pyx_v_handle); - Py_DECREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->handle); - ((struct __pyx_obj_5event_event *)__pyx_v_self)->handle = __pyx_v_handle; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":100 */ -- __pyx_2 = PyObject_IsTrue(__pyx_v_simple); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":97 */ -+ __pyx_2 = PyObject_IsTrue(__pyx_v_simple); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} - if (__pyx_2) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":101 */ - __pyx_v_handler = __pyx_f_5event___simple_event_handler; - goto __pyx_L2; - } - /*else*/ { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":103 */ - __pyx_v_handler = __pyx_f_5event___event_handler; - } - __pyx_L2:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":104 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":101 */ - __pyx_2 = (__pyx_v_evtype == 0); - if (__pyx_2) { -- __pyx_3 = PyObject_IsTrue(__pyx_v_handle); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} -+ __pyx_3 = PyObject_IsTrue(__pyx_v_handle); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;} - __pyx_2 = (!__pyx_3); - } - if (__pyx_2) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":105 */ -- evtimer_set((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_v_handler,((void (*))__pyx_v_self)); -+ evtimer_set((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_v_handler,((void *)__pyx_v_self)); - goto __pyx_L3; - } - /*else*/ { - -- /* "/Users/dugsong/projects/pyevent/event.pyx":107 */ -- __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} -- __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} -- __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} -- Py_INCREF(__pyx_v_handle); -- PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_handle); -- PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); -- __pyx_4 = 0; -- __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} -- Py_DECREF(__pyx_1); __pyx_1 = 0; -- Py_DECREF(__pyx_5); __pyx_5 = 0; -- __pyx_3 = PyObject_IsTrue(__pyx_4); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} -- Py_DECREF(__pyx_4); __pyx_4 = 0; -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":104 */ -+ __pyx_3 = PyObject_IsInstance(__pyx_v_handle,((PyObject *)(&PyInt_Type))); if (__pyx_3 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} - __pyx_2 = (!__pyx_3); - if (__pyx_2) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":108 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_handle, __pyx_n_fileno); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;} -- __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;} -- __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;} -+ __pyx_1 = PyObject_GetAttr(__pyx_v_handle, __pyx_n_fileno); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} -+ __pyx_4 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(__pyx_v_handle); - __pyx_v_handle = __pyx_4; - __pyx_4 = 0; -@@ -312,9 +341,9 @@ static int __pyx_f_5event_5event___init_ - } - __pyx_L4:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":109 */ -- __pyx_3 = PyInt_AsLong(__pyx_v_handle); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} -- event_set((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_3,__pyx_v_evtype,__pyx_v_handler,((void (*))__pyx_v_self)); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":106 */ -+ __pyx_3 = PyInt_AsLong(__pyx_v_handle); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} -+ event_set((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_3,__pyx_v_evtype,__pyx_v_handler,((void *)__pyx_v_self)); - } - __pyx_L3:; - -@@ -323,7 +352,6 @@ static int __pyx_f_5event_5event___init_ - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_4); -- Py_XDECREF(__pyx_5); - __Pyx_AddTraceback("event.event.__init__"); - __pyx_r = -1; - __pyx_L0:; -@@ -335,51 +363,41 @@ static int __pyx_f_5event_5event___init_ - return __pyx_r; - } - --static PyObject *__pyx_n_exc_info; -- - static PyObject *__pyx_f_5event_5event___simple_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static PyObject *__pyx_f_5event_5event___simple_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - short __pyx_v_evtype; -- extern int event_gotsig; -- extern int ((*event_sigcb)(void)); - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - int __pyx_3; - PyObject *__pyx_4 = 0; -- int __pyx_5; -- short __pyx_6; -+ PyObject *__pyx_5 = 0; -+ PyObject *__pyx_6 = 0; -+ int __pyx_7; -+ short __pyx_8; - static char *__pyx_argnames[] = {"evtype",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "h", __pyx_argnames, &__pyx_v_evtype)) return 0; - Py_INCREF(__pyx_v_self); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":115 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":110 */ - /*try:*/ { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":116 */ -- __pyx_1 = PySequence_Tuple(((struct __pyx_obj_5event_event *)__pyx_v_self)->args); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L2;} -- __pyx_2 = PyObject_CallObject(((struct __pyx_obj_5event_event *)__pyx_v_self)->callback, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L2;} -+ __pyx_1 = PySequence_Tuple(((struct __pyx_obj_5event_event *)__pyx_v_self)->args); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L2;} -+ __pyx_2 = PyObject_CallObject(((struct __pyx_obj_5event_event *)__pyx_v_self)->callback, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L2;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- if (PyObject_Cmp(__pyx_2, Py_None, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L2;} -+ if (PyObject_Cmp(__pyx_2, Py_None, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L2;} - __pyx_3 = __pyx_3 != 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_3) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":117 */ - __pyx_3 = ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec; - if (!__pyx_3) { - __pyx_3 = ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_usec; - } - if (__pyx_3) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":118 */ - event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),(&((struct __pyx_obj_5event_event *)__pyx_v_self)->tv)); - goto __pyx_L5; - } - /*else*/ { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":120 */ -- event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),0); -+ event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),NULL); - } - __pyx_L5:; - goto __pyx_L4; -@@ -391,73 +409,65 @@ static PyObject *__pyx_f_5event_5event__ - Py_XDECREF(__pyx_1); __pyx_1 = 0; - Py_XDECREF(__pyx_2); __pyx_2 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":121 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":116 */ - /*except:*/ { - __Pyx_AddTraceback("event.__simple_callback"); -- __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} -- Py_DECREF(__pyx_1); __pyx_1 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":122 */ -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} -- __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_exc_info); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} -- __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} -+ if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} -+ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} -+ __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_exc_info); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ __pyx_5 = PyObject_CallObject(__pyx_6, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} -+ Py_DECREF(__pyx_6); __pyx_6 = 0; -+ if (PyObject_SetAttr(__pyx_m, __pyx_n___event_exc, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} -+ Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; -- if (PyObject_SetAttr(__pyx_m, __pyx_n___event_exc, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":123 */ -- event_sigcb = __pyx_f_5event___event_sigcb; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":124 */ -- event_gotsig = 1; - goto __pyx_L3; - } - __pyx_L3:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":126 */ -- __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} -- __pyx_4 = PyNumber_And(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":119 */ -+ __pyx_6 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} -+ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} -+ __pyx_1 = PyNumber_And(__pyx_6, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} -+ Py_DECREF(__pyx_6); __pyx_6 = 0; -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ __pyx_7 = PyObject_IsTrue(__pyx_1); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} -- Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_3 = (!__pyx_5); -+ __pyx_3 = (!__pyx_7); - if (__pyx_3) { -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- __pyx_4 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- Py_DECREF(__pyx_1); __pyx_1 = 0; -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} -+ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} -+ __pyx_6 = PyNumber_Or(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- __pyx_2 = PyNumber_Or(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -+ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} -+ __pyx_1 = PyNumber_Or(__pyx_6, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} -+ Py_DECREF(__pyx_6); __pyx_6 = 0; -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} -+ __pyx_4 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- __pyx_1 = PyNumber_Or(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; -+ __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_6 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -- Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_3 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_6,0)); -+ __pyx_3 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_8,NULL)); - } - if (__pyx_3) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":128 */ - Py_DECREF(__pyx_v_self); - goto __pyx_L6; - } - __pyx_L6:; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_4); -+ Py_XDECREF(__pyx_5); -+ Py_XDECREF(__pyx_6); - __Pyx_AddTraceback("event.event.__simple_callback"); - __pyx_r = 0; - __pyx_L0:; -@@ -468,24 +478,22 @@ static PyObject *__pyx_f_5event_5event__ - static PyObject *__pyx_f_5event_5event___callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static PyObject *__pyx_f_5event_5event___callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - short __pyx_v_evtype; -- extern int event_gotsig; -- extern int ((*event_sigcb)(void)); - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; -- short __pyx_4; -- int __pyx_5; -+ PyObject *__pyx_4 = 0; -+ PyObject *__pyx_5 = 0; -+ short __pyx_6; -+ int __pyx_7; - static char *__pyx_argnames[] = {"evtype",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "h", __pyx_argnames, &__pyx_v_evtype)) return 0; - Py_INCREF(__pyx_v_self); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":134 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":125 */ - /*try:*/ { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":135 */ -- __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L2;} -- __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L2;} -+ __pyx_1 = PyInt_FromLong(__pyx_v_evtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L2;} -+ __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L2;} - Py_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); - Py_INCREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->handle); -@@ -494,7 +502,7 @@ static PyObject *__pyx_f_5event_5event__ - Py_INCREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->args); - PyTuple_SET_ITEM(__pyx_2, 3, ((struct __pyx_obj_5event_event *)__pyx_v_self)->args); - __pyx_1 = 0; -- __pyx_1 = PyObject_CallObject(((struct __pyx_obj_5event_event *)__pyx_v_self)->callback, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L2;} -+ __pyx_1 = PyObject_CallObject(((struct __pyx_obj_5event_event *)__pyx_v_self)->callback, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L2;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - } -@@ -503,63 +511,55 @@ static PyObject *__pyx_f_5event_5event__ - Py_XDECREF(__pyx_2); __pyx_2 = 0; - Py_XDECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":136 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":127 */ - /*except:*/ { - __Pyx_AddTraceback("event.__callback"); -- __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":137 */ -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;} -- __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_exc_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;} -- Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;} -- __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;} -+ if (__Pyx_GetException(&__pyx_2, &__pyx_1, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;} -+ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} -+ __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_exc_info); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} -+ Py_DECREF(__pyx_4); __pyx_4 = 0; -+ __pyx_4 = PyObject_CallObject(__pyx_5, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ if (PyObject_SetAttr(__pyx_m, __pyx_n___event_exc, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} -+ Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; -- if (PyObject_SetAttr(__pyx_m, __pyx_n___event_exc, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":138 */ -- event_sigcb = __pyx_f_5event___event_sigcb; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":139 */ -- event_gotsig = 1; - goto __pyx_L3; - } - __pyx_L3:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":140 */ -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- __pyx_3 = PyNumber_Or(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; -- Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- __pyx_1 = PyNumber_Or(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- Py_DECREF(__pyx_3); __pyx_3 = 0; -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":129 */ -+ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ __pyx_2 = PyNumber_Or(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ Py_DECREF(__pyx_4); __pyx_4 = 0; -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ __pyx_3 = PyNumber_Or(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- __pyx_2 = PyNumber_Or(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -+ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ __pyx_4 = PyNumber_Or(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;} -- Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_5 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_4,0)); -- if (__pyx_5) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":141 */ -+ Py_DECREF(__pyx_5); __pyx_5 = 0; -+ __pyx_6 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} -+ Py_DECREF(__pyx_4); __pyx_4 = 0; -+ __pyx_7 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_6,NULL)); -+ if (__pyx_7) { - Py_DECREF(__pyx_v_self); - goto __pyx_L4; - } - __pyx_L4:; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); -+ Py_XDECREF(__pyx_4); -+ Py_XDECREF(__pyx_5); - __Pyx_AddTraceback("event.event.__callback"); - __pyx_r = 0; - __pyx_L0:; -@@ -578,64 +578,62 @@ static PyObject *__pyx_f_5event_5event_a - short __pyx_4; - int __pyx_5; - static char *__pyx_argnames[] = {"timeout",0}; -- __pyx_v_timeout = __pyx_k13; -+ __pyx_v_timeout = __pyx_d5; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|f", __pyx_argnames, &__pyx_v_timeout)) return 0; - Py_INCREF(__pyx_v_self); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":150 */ -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -- __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":139 */ -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} -+ __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -- __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} -+ __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -- __pyx_1 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -+ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} -+ __pyx_1 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;} -+ __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_5 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_4,0)); -+ __pyx_5 = (!event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_4,NULL)); - if (__pyx_5) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":152 */ - Py_INCREF(__pyx_v_self); - goto __pyx_L2; - } - __pyx_L2:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":153 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":142 */ - ((struct __pyx_obj_5event_event *)__pyx_v_self)->timeout = __pyx_v_timeout; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":154 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":143 */ - __pyx_5 = (__pyx_v_timeout >= 0.0); - if (__pyx_5) { - -- /* "/Users/dugsong/projects/pyevent/event.pyx":155 */ -- ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec = ((long )__pyx_v_timeout); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":144 */ -+ ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec = ((unsigned int)__pyx_v_timeout); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":156 */ -- ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_usec = ((__pyx_v_timeout - ((float )((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec)) * 1000000.0); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":145 */ -+ ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_usec = (((long)(__pyx_v_timeout - ((float)((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec))) * 1000000); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":157 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":146 */ - event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),(&((struct __pyx_obj_5event_event *)__pyx_v_self)->tv)); - goto __pyx_L3; - } - /*else*/ { - -- /* "/Users/dugsong/projects/pyevent/event.pyx":159 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":148 */ - ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_sec = 0; - ((struct __pyx_obj_5event_event *)__pyx_v_self)->tv.tv_usec = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":160 */ -- event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),0); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":149 */ -+ event_add((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),NULL); - } - __pyx_L3:; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); -@@ -659,29 +657,27 @@ static PyObject *__pyx_f_5event_5event_p - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":164 */ -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -- __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_TIMEOUT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} -+ __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -- __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} -+ __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -- __pyx_1 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -+ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} -+ __pyx_1 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -+ __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- __pyx_2 = PyInt_FromLong(event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_4,0)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;} -+ __pyx_2 = PyInt_FromLong(event_pending((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev),__pyx_4,NULL)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); -@@ -694,45 +690,37 @@ static PyObject *__pyx_f_5event_5event_p - return __pyx_r; - } - --static PyObject *__pyx_n_pending; -- - static PyObject *__pyx_f_5event_5event_delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static char __pyx_doc_5event_5event_delete[] = "Remove event from the event queue."; - static PyObject *__pyx_f_5event_5event_delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; -- PyObject *__pyx_3 = 0; -- int __pyx_4; -+ int __pyx_3; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":168 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pending); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} -- __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pending); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;} -+ __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -+ __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; -- __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} -- Py_DECREF(__pyx_3); __pyx_3 = 0; -- if (__pyx_4) { -+ if (__pyx_3) { - -- /* "/Users/dugsong/projects/pyevent/event.pyx":169 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":158 */ - event_del((&((struct __pyx_obj_5event_event *)__pyx_v_self)->ev)); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":170 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":159 */ - Py_DECREF(__pyx_v_self); - goto __pyx_L2; - } - __pyx_L2:; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); -- Py_XDECREF(__pyx_3); - __Pyx_AddTraceback("event.event.delete"); - __pyx_r = 0; - __pyx_L0:; -@@ -740,47 +728,33 @@ static PyObject *__pyx_f_5event_5event_d - return __pyx_r; - } - --static PyObject *__pyx_n_delete; -- - static void __pyx_f_5event_5event___dealloc__(PyObject *__pyx_v_self); /*proto*/ - static void __pyx_f_5event_5event___dealloc__(PyObject *__pyx_v_self) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; -- PyObject *__pyx_3 = 0; - Py_INCREF(__pyx_v_self); -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":173 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_delete); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} -- __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_delete); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} -+ __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; -- Py_DECREF(__pyx_3); __pyx_3 = 0; - - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); -- Py_XDECREF(__pyx_3); - __Pyx_AddTraceback("event.event.__dealloc__"); - __pyx_L0:; - Py_DECREF(__pyx_v_self); - } - --static PyObject *__pyx_k15p; -- --static char (__pyx_k15[]) = "<event flags=0x%x, handle=%s, callback=%s, arg=%s>"; -- - static PyObject *__pyx_f_5event_5event___repr__(PyObject *__pyx_v_self); /*proto*/ - static PyObject *__pyx_f_5event_5event___repr__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":176 */ -- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_5event_event *)__pyx_v_self)->ev.ev_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;} -+ __pyx_1 = PyInt_FromLong(((struct __pyx_obj_5event_event *)__pyx_v_self)->ev.ev_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} -+ __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); - Py_INCREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->handle); - PyTuple_SET_ITEM(__pyx_2, 1, ((struct __pyx_obj_5event_event *)__pyx_v_self)->handle); -@@ -789,13 +763,13 @@ static PyObject *__pyx_f_5event_5event__ - Py_INCREF(((struct __pyx_obj_5event_event *)__pyx_v_self)->args); - PyTuple_SET_ITEM(__pyx_2, 3, ((struct __pyx_obj_5event_event *)__pyx_v_self)->args); - __pyx_1 = 0; -- __pyx_1 = PyNumber_Remainder(__pyx_k15p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} -+ __pyx_1 = PyNumber_Remainder(__pyx_k13p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); -@@ -807,11 +781,6 @@ static PyObject *__pyx_f_5event_5event__ - return __pyx_r; - } - --static PyObject *__pyx_n___init__; --static PyObject *__pyx_n_simple; --static PyObject *__pyx_n_add; -- -- - static int __pyx_f_5event_4read___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_f_5event_4read___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_handle = 0; -@@ -823,7 +792,7 @@ static int __pyx_f_5event_4read___init__ - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - static char *__pyx_argnames[] = {"handle","callback",0}; -- if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0) < 0) return -1; -+ if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0, 0) < 0) return -1; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_handle, &__pyx_v_callback)) { - Py_XDECREF(__pyx_args); - Py_XDECREF(__pyx_kwds); -@@ -834,11 +803,11 @@ static int __pyx_f_5event_4read___init__ - Py_INCREF(__pyx_v_handle); - Py_INCREF(__pyx_v_callback); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":193 */ -- __pyx_1 = PyObject_GetAttr(((PyObject*)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -- Py_INCREF((PyObject *)__pyx_v_self); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":182 */ -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_READ); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} -+ __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} -+ Py_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); - Py_INCREF(__pyx_v_callback); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_callback); -@@ -848,28 +817,26 @@ static int __pyx_f_5event_4read___init__ - Py_INCREF(__pyx_v_handle); - PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_handle); - __pyx_2 = 0; -- __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -- if (PyDict_SetItem(__pyx_2, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -+ __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} -+ __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} -+ if (PyDict_SetItem(__pyx_2, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} -+ __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":194 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":183 */ - Py_INCREF(__pyx_v_args); - Py_DECREF(((struct __pyx_obj_5event_read *)__pyx_v_self)->__pyx_base.args); - ((struct __pyx_obj_5event_read *)__pyx_v_self)->__pyx_base.args = __pyx_v_args; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":195 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} -- __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":184 */ -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;} -+ __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; -@@ -890,7 +857,6 @@ static int __pyx_f_5event_4read___init__ - return __pyx_r; - } - -- - static int __pyx_f_5event_5write___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_f_5event_5write___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_handle = 0; -@@ -902,7 +868,7 @@ static int __pyx_f_5event_5write___init_ - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - static char *__pyx_argnames[] = {"handle","callback",0}; -- if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0) < 0) return -1; -+ if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0, 0) < 0) return -1; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_handle, &__pyx_v_callback)) { - Py_XDECREF(__pyx_args); - Py_XDECREF(__pyx_kwds); -@@ -913,11 +879,11 @@ static int __pyx_f_5event_5write___init_ - Py_INCREF(__pyx_v_handle); - Py_INCREF(__pyx_v_callback); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":211 */ -- __pyx_1 = PyObject_GetAttr(((PyObject*)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -- Py_INCREF((PyObject *)__pyx_v_self); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":200 */ -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_WRITE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} -+ __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} -+ Py_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); - Py_INCREF(__pyx_v_callback); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_callback); -@@ -927,28 +893,26 @@ static int __pyx_f_5event_5write___init_ - Py_INCREF(__pyx_v_handle); - PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_handle); - __pyx_2 = 0; -- __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -- if (PyDict_SetItem(__pyx_2, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -+ __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} -+ __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} -+ if (PyDict_SetItem(__pyx_2, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;} -+ __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":212 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":201 */ - Py_INCREF(__pyx_v_args); - Py_DECREF(((struct __pyx_obj_5event_write *)__pyx_v_self)->__pyx_base.args); - ((struct __pyx_obj_5event_write *)__pyx_v_self)->__pyx_base.args = __pyx_v_args; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":213 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} -- __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} -- __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":202 */ -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} -+ __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; -@@ -969,7 +933,6 @@ static int __pyx_f_5event_5write___init_ - return __pyx_r; - } - -- - static int __pyx_f_5event_6signal___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_f_5event_6signal___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_sig = 0; -@@ -981,7 +944,7 @@ static int __pyx_f_5event_6signal___init - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - static char *__pyx_argnames[] = {"sig","callback",0}; -- if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0) < 0) return -1; -+ if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0, 0) < 0) return -1; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_sig, &__pyx_v_callback)) { - Py_XDECREF(__pyx_args); - Py_XDECREF(__pyx_kwds); -@@ -992,15 +955,15 @@ static int __pyx_f_5event_6signal___init - Py_INCREF(__pyx_v_sig); - Py_INCREF(__pyx_v_callback); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":230 */ -- __pyx_1 = PyObject_GetAttr(((PyObject*)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -- __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_PERSIST); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -- __pyx_4 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":219 */ -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} -+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_EV_SIGNAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} -+ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_EV_PERSIST); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} -+ __pyx_4 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_2 = PyTuple_New(5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -- Py_INCREF((PyObject *)__pyx_v_self); -+ __pyx_2 = PyTuple_New(5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} -+ Py_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); - Py_INCREF(__pyx_v_callback); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_callback); -@@ -1010,28 +973,26 @@ static int __pyx_f_5event_6signal___init - Py_INCREF(__pyx_v_sig); - PyTuple_SET_ITEM(__pyx_2, 4, __pyx_v_sig); - __pyx_4 = 0; -- __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} -- if (PyDict_SetItem(__pyx_3, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -+ __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} -+ __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} -+ if (PyDict_SetItem(__pyx_3, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} -+ __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":232 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":221 */ - Py_INCREF(__pyx_v_args); - Py_DECREF(((struct __pyx_obj_5event_signal *)__pyx_v_self)->__pyx_base.args); - ((struct __pyx_obj_5event_signal *)__pyx_v_self)->__pyx_base.args = __pyx_v_args; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":233 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; goto __pyx_L1;} -- __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":222 */ -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} -+ __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; -- Py_DECREF(__pyx_3); __pyx_3 = 0; - - __pyx_r = 0; - goto __pyx_L0; -@@ -1052,7 +1013,6 @@ static int __pyx_f_5event_6signal___init - return __pyx_r; - } - -- - static int __pyx_f_5event_7timeout___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_f_5event_7timeout___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_secs = 0; -@@ -1064,7 +1024,7 @@ static int __pyx_f_5event_7timeout___ini - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - static char *__pyx_argnames[] = {"secs","callback",0}; -- if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0) < 0) return -1; -+ if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, &__pyx_v_args, 0, 0) < 0) return -1; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_secs, &__pyx_v_callback)) { - Py_XDECREF(__pyx_args); - Py_XDECREF(__pyx_kwds); -@@ -1075,36 +1035,36 @@ static int __pyx_f_5event_7timeout___ini - Py_INCREF(__pyx_v_secs); - Py_INCREF(__pyx_v_callback); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":249 */ -- __pyx_1 = PyObject_GetAttr(((PyObject*)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -- Py_INCREF((PyObject *)__pyx_v_self); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":238 */ -+ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_ptype_5event_event), __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} -+ __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} -+ Py_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); - Py_INCREF(__pyx_v_callback); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_callback); - Py_INCREF(__pyx_v_args); - PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_args); -- __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -- if (PyDict_SetItem(__pyx_3, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -+ __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} -+ __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} -+ if (PyDict_SetItem(__pyx_3, __pyx_n_simple, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; -- __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} -+ __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":250 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":239 */ - Py_INCREF(__pyx_v_args); - Py_DECREF(((struct __pyx_obj_5event_timeout *)__pyx_v_self)->__pyx_base.args); - ((struct __pyx_obj_5event_timeout *)__pyx_v_self)->__pyx_base.args = __pyx_v_args; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":251 */ -- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -- __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":240 */ -+ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; goto __pyx_L1;} -+ __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; goto __pyx_L1;} - Py_INCREF(__pyx_v_secs); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_secs); -- __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -+ __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; -@@ -1134,16 +1094,9 @@ static PyObject *__pyx_f_5event_init(PyO - PyObject *__pyx_r; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":255 */ - event_init(); - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -- goto __pyx_L0; -- __pyx_L1:; -- __Pyx_AddTraceback("event.init"); -- __pyx_r = 0; -- __pyx_L0:; -+ __pyx_r = Py_None; Py_INCREF(Py_None); - return __pyx_r; - } - -@@ -1156,52 +1109,42 @@ static PyObject *__pyx_f_5event_dispatch - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_5 = 0; -- PyObject *__pyx_6 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":260 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":249 */ - event_dispatch(); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":261 */ -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} -- __pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":250 */ -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} -+ __pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_2) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":262 */ -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_4 = PyObject_GetItem(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -+ __pyx_3 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -+ __pyx_4 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -- Py_DECREF(__pyx_3); __pyx_3 = 0; -- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_3 = PyInt_FromLong(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -- __pyx_6 = PyObject_GetItem(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___event_exc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} -+ __pyx_5 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; -+ __Pyx_Raise(__pyx_3, __pyx_4, __pyx_5); - Py_DECREF(__pyx_3); __pyx_3 = 0; -- __Pyx_Raise(__pyx_4, __pyx_5, __pyx_6); - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; -- Py_DECREF(__pyx_6); __pyx_6 = 0; -- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} -+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} - goto __pyx_L2; - } - __pyx_L2:; - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_5); -- Py_XDECREF(__pyx_6); - __Pyx_AddTraceback("event.dispatch"); - __pyx_r = 0; - __pyx_L0:; -@@ -1216,27 +1159,25 @@ static PyObject *__pyx_f_5event_loop(PyO - PyObject *__pyx_r; - int __pyx_1; - static char *__pyx_argnames[] = {"nonblock",0}; -- __pyx_v_nonblock = __pyx_k14; -+ __pyx_v_nonblock = __pyx_d6; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_nonblock)) return 0; - Py_INCREF(__pyx_v_nonblock); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":267 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":256 */ - __pyx_v_flags = EVLOOP_ONCE; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":268 */ -- __pyx_1 = PyObject_IsTrue(__pyx_v_nonblock); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":257 */ -+ __pyx_1 = PyObject_IsTrue(__pyx_v_nonblock); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L1;} - if (__pyx_1) { -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":269 */ - __pyx_v_flags = (EVLOOP_ONCE | EVLOOP_NONBLOCK); - goto __pyx_L2; - } - __pyx_L2:; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":270 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":259 */ - event_loop(__pyx_v_flags); - -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -+ __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("event.loop"); -@@ -1249,78 +1190,23 @@ static PyObject *__pyx_f_5event_loop(PyO - static PyObject *__pyx_f_5event_abort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static char __pyx_doc_5event_abort[] = "Abort event dispatch loop."; - static PyObject *__pyx_f_5event_abort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { -- extern int event_gotsig; -- extern int ((*event_sigcb)(void)); - PyObject *__pyx_r; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":276 */ -- event_sigcb = __pyx_f_5event___event_sigcb; -- -- /* "/Users/dugsong/projects/pyevent/event.pyx":277 */ -- event_gotsig = 1; -- -- __pyx_r = Py_None; Py_INCREF(__pyx_r); -- goto __pyx_L0; -- __pyx_L1:; -- __Pyx_AddTraceback("event.abort"); -- __pyx_r = 0; -- __pyx_L0:; -+ __pyx_r = Py_None; Py_INCREF(Py_None); - return __pyx_r; - } - --static __Pyx_InternTabEntry __pyx_intern_tab[] = { -- {&__pyx_n_BSD, "BSD"}, -- {&__pyx_n_EV_PERSIST, "EV_PERSIST"}, -- {&__pyx_n_EV_READ, "EV_READ"}, -- {&__pyx_n_EV_SIGNAL, "EV_SIGNAL"}, -- {&__pyx_n_EV_TIMEOUT, "EV_TIMEOUT"}, -- {&__pyx_n_EV_WRITE, "EV_WRITE"}, -- {&__pyx_n_False, "False"}, -- {&__pyx_n___author__, "__author__"}, -- {&__pyx_n___callback, "__callback"}, -- {&__pyx_n___copyright__, "__copyright__"}, -- {&__pyx_n___event_exc, "__event_exc"}, -- {&__pyx_n___init__, "__init__"}, -- {&__pyx_n___license__, "__license__"}, -- {&__pyx_n___simple_callback, "__simple_callback"}, -- {&__pyx_n___url__, "__url__"}, -- {&__pyx_n___version__, "__version__"}, -- {&__pyx_n_abort, "abort"}, -- {&__pyx_n_add, "add"}, -- {&__pyx_n_delete, "delete"}, -- {&__pyx_n_dispatch, "dispatch"}, -- {&__pyx_n_exc_info, "exc_info"}, -- {&__pyx_n_fileno, "fileno"}, -- {&__pyx_n_init, "init"}, -- {&__pyx_n_int, "int"}, -- {&__pyx_n_isinstance, "isinstance"}, -- {&__pyx_n_loop, "loop"}, -- {&__pyx_n_pending, "pending"}, -- {&__pyx_n_simple, "simple"}, -- {&__pyx_n_sys, "sys"}, -- {0, 0} --}; -- --static __Pyx_StringTabEntry __pyx_string_tab[] = { -- {&__pyx_k1p, __pyx_k1, sizeof(__pyx_k1)}, -- {&__pyx_k2p, __pyx_k2, sizeof(__pyx_k2)}, -- {&__pyx_k3p, __pyx_k3, sizeof(__pyx_k3)}, -- {&__pyx_k4p, __pyx_k4, sizeof(__pyx_k4)}, -- {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6)}, -- {&__pyx_k7p, __pyx_k7, sizeof(__pyx_k7)}, -- {&__pyx_k15p, __pyx_k15, sizeof(__pyx_k15)}, -- {0, 0, 0} --}; -- - static PyObject *__pyx_tp_new_5event_event(PyTypeObject *t, PyObject *a, PyObject *k) { -+ struct __pyx_obj_5event_event *p; - PyObject *o = (*t->tp_alloc)(t, 0); -- struct __pyx_obj_5event_event *p = (struct __pyx_obj_5event_event *)o; -- p->handle = Py_None; Py_INCREF(p->handle); -- p->evtype = Py_None; Py_INCREF(p->evtype); -- p->callback = Py_None; Py_INCREF(p->callback); -- p->args = Py_None; Py_INCREF(p->args); -+ if (!o) return 0; -+ p = ((struct __pyx_obj_5event_event *)o); -+ p->handle = Py_None; Py_INCREF(Py_None); -+ p->evtype = Py_None; Py_INCREF(Py_None); -+ p->callback = Py_None; Py_INCREF(Py_None); -+ p->args = Py_None; Py_INCREF(Py_None); - return o; - } - -@@ -1362,14 +1248,19 @@ static int __pyx_tp_traverse_5event_even - - static int __pyx_tp_clear_5event_event(PyObject *o) { - struct __pyx_obj_5event_event *p = (struct __pyx_obj_5event_event *)o; -- Py_XDECREF(p->handle); -- p->handle = Py_None; Py_INCREF(p->handle); -- Py_XDECREF(p->evtype); -- p->evtype = Py_None; Py_INCREF(p->evtype); -- Py_XDECREF(p->callback); -- p->callback = Py_None; Py_INCREF(p->callback); -- Py_XDECREF(p->args); -- p->args = Py_None; Py_INCREF(p->args); -+ PyObject *t; -+ t = p->handle; -+ p->handle = Py_None; Py_INCREF(Py_None); -+ Py_XDECREF(t); -+ t = p->evtype; -+ p->evtype = Py_None; Py_INCREF(Py_None); -+ Py_XDECREF(t); -+ t = p->callback; -+ p->callback = Py_None; Py_INCREF(Py_None); -+ Py_XDECREF(t); -+ t = p->args; -+ p->args = Py_None; Py_INCREF(Py_None); -+ Py_XDECREF(t); - return 0; - } - -@@ -1421,6 +1312,9 @@ static PyNumberMethods __pyx_tp_as_numbe - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ -+ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX -+ 0, /*nb_index*/ -+ #endif - }; - - static PySequenceMethods __pyx_tp_as_sequence_event = { -@@ -1449,7 +1343,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ - 0, /*bf_getcharbuffer*/ - }; - --statichere PyTypeObject __pyx_type_5event_event = { -+PyTypeObject __pyx_type_5event_event = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "event.event", /*tp_name*/ -@@ -1500,28 +1394,14 @@ statichere PyTypeObject __pyx_type_5even - - static PyObject *__pyx_tp_new_5event_read(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_ptype_5event_event->tp_new(t, a, k); -- struct __pyx_obj_5event_read *p = (struct __pyx_obj_5event_read *)o; -+ if (!o) return 0; - return o; - } - - static void __pyx_tp_dealloc_5event_read(PyObject *o) { -- struct __pyx_obj_5event_read *p = (struct __pyx_obj_5event_read *)o; - __pyx_ptype_5event_event->tp_dealloc(o); - } - --static int __pyx_tp_traverse_5event_read(PyObject *o, visitproc v, void *a) { -- int e; -- struct __pyx_obj_5event_read *p = (struct __pyx_obj_5event_read *)o; -- __pyx_ptype_5event_event->tp_traverse(o, v, a); -- return 0; --} -- --static int __pyx_tp_clear_5event_read(PyObject *o) { -- struct __pyx_obj_5event_read *p = (struct __pyx_obj_5event_read *)o; -- __pyx_ptype_5event_event->tp_clear(o); -- return 0; --} -- - static struct PyMethodDef __pyx_methods_5event_read[] = { - {0, 0, 0, 0} - }; -@@ -1565,6 +1445,9 @@ static PyNumberMethods __pyx_tp_as_numbe - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ -+ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX -+ 0, /*nb_index*/ -+ #endif - }; - - static PySequenceMethods __pyx_tp_as_sequence_read = { -@@ -1593,7 +1476,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ - 0, /*bf_getcharbuffer*/ - }; - --statichere PyTypeObject __pyx_type_5event_read = { -+PyTypeObject __pyx_type_5event_read = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "event.read", /*tp_name*/ -@@ -1616,8 +1499,8 @@ statichere PyTypeObject __pyx_type_5even - &__pyx_tp_as_buffer_read, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - "read(handle, callback, *args) -> event object\n \n Simplified event interface:\n Create a new read event, and add it to the event queue.\n \n Arguments:\n\n handle -- file handle, descriptor, or socket\n callback -- user callback with (*args) prototype, which can return\n a non-None value to be rescheduled\n *args -- optional callback arguments\n ", /*tp_doc*/ -- __pyx_tp_traverse_5event_read, /*tp_traverse*/ -- __pyx_tp_clear_5event_read, /*tp_clear*/ -+ 0, /*tp_traverse*/ -+ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ -@@ -1644,28 +1527,14 @@ statichere PyTypeObject __pyx_type_5even - - static PyObject *__pyx_tp_new_5event_write(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_ptype_5event_event->tp_new(t, a, k); -- struct __pyx_obj_5event_write *p = (struct __pyx_obj_5event_write *)o; -+ if (!o) return 0; - return o; - } - - static void __pyx_tp_dealloc_5event_write(PyObject *o) { -- struct __pyx_obj_5event_write *p = (struct __pyx_obj_5event_write *)o; - __pyx_ptype_5event_event->tp_dealloc(o); - } - --static int __pyx_tp_traverse_5event_write(PyObject *o, visitproc v, void *a) { -- int e; -- struct __pyx_obj_5event_write *p = (struct __pyx_obj_5event_write *)o; -- __pyx_ptype_5event_event->tp_traverse(o, v, a); -- return 0; --} -- --static int __pyx_tp_clear_5event_write(PyObject *o) { -- struct __pyx_obj_5event_write *p = (struct __pyx_obj_5event_write *)o; -- __pyx_ptype_5event_event->tp_clear(o); -- return 0; --} -- - static struct PyMethodDef __pyx_methods_5event_write[] = { - {0, 0, 0, 0} - }; -@@ -1709,6 +1578,9 @@ static PyNumberMethods __pyx_tp_as_numbe - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ -+ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX -+ 0, /*nb_index*/ -+ #endif - }; - - static PySequenceMethods __pyx_tp_as_sequence_write = { -@@ -1737,7 +1609,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ - 0, /*bf_getcharbuffer*/ - }; - --statichere PyTypeObject __pyx_type_5event_write = { -+PyTypeObject __pyx_type_5event_write = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "event.write", /*tp_name*/ -@@ -1760,8 +1632,8 @@ statichere PyTypeObject __pyx_type_5even - &__pyx_tp_as_buffer_write, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - "write(handle, callback, *args) -> event object\n\n Simplified event interface:\n Create a new write event, and add it to the event queue.\n \n Arguments:\n\n handle -- file handle, descriptor, or socket\n callback -- user callback with (*args) prototype, which can return\n a non-None value to be rescheduled\n *args -- optional callback arguments\n ", /*tp_doc*/ -- __pyx_tp_traverse_5event_write, /*tp_traverse*/ -- __pyx_tp_clear_5event_write, /*tp_clear*/ -+ 0, /*tp_traverse*/ -+ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ -@@ -1788,28 +1660,14 @@ statichere PyTypeObject __pyx_type_5even - - static PyObject *__pyx_tp_new_5event_signal(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_ptype_5event_event->tp_new(t, a, k); -- struct __pyx_obj_5event_signal *p = (struct __pyx_obj_5event_signal *)o; -+ if (!o) return 0; - return o; - } - - static void __pyx_tp_dealloc_5event_signal(PyObject *o) { -- struct __pyx_obj_5event_signal *p = (struct __pyx_obj_5event_signal *)o; - __pyx_ptype_5event_event->tp_dealloc(o); - } - --static int __pyx_tp_traverse_5event_signal(PyObject *o, visitproc v, void *a) { -- int e; -- struct __pyx_obj_5event_signal *p = (struct __pyx_obj_5event_signal *)o; -- __pyx_ptype_5event_event->tp_traverse(o, v, a); -- return 0; --} -- --static int __pyx_tp_clear_5event_signal(PyObject *o) { -- struct __pyx_obj_5event_signal *p = (struct __pyx_obj_5event_signal *)o; -- __pyx_ptype_5event_event->tp_clear(o); -- return 0; --} -- - static struct PyMethodDef __pyx_methods_5event_signal[] = { - {0, 0, 0, 0} - }; -@@ -1853,6 +1711,9 @@ static PyNumberMethods __pyx_tp_as_numbe - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ -+ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX -+ 0, /*nb_index*/ -+ #endif - }; - - static PySequenceMethods __pyx_tp_as_sequence_signal = { -@@ -1881,7 +1742,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ - 0, /*bf_getcharbuffer*/ - }; - --statichere PyTypeObject __pyx_type_5event_signal = { -+PyTypeObject __pyx_type_5event_signal = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "event.signal", /*tp_name*/ -@@ -1904,8 +1765,8 @@ statichere PyTypeObject __pyx_type_5even - &__pyx_tp_as_buffer_signal, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - "signal(sig, callback, *args) -> event object\n\n Simplified event interface:\n Create a new signal event, and add it to the event queue.\n XXX - persistent event is added with EV_PERSIST, like signal_set()\n \n Arguments:\n\n sig -- signal number\n callback -- user callback with (*args) prototype, which can return\n a non-None value to be rescheduled\n *args -- optional callback arguments\n ", /*tp_doc*/ -- __pyx_tp_traverse_5event_signal, /*tp_traverse*/ -- __pyx_tp_clear_5event_signal, /*tp_clear*/ -+ 0, /*tp_traverse*/ -+ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ -@@ -1932,28 +1793,14 @@ statichere PyTypeObject __pyx_type_5even - - static PyObject *__pyx_tp_new_5event_timeout(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_ptype_5event_event->tp_new(t, a, k); -- struct __pyx_obj_5event_timeout *p = (struct __pyx_obj_5event_timeout *)o; -+ if (!o) return 0; - return o; - } - - static void __pyx_tp_dealloc_5event_timeout(PyObject *o) { -- struct __pyx_obj_5event_timeout *p = (struct __pyx_obj_5event_timeout *)o; - __pyx_ptype_5event_event->tp_dealloc(o); - } - --static int __pyx_tp_traverse_5event_timeout(PyObject *o, visitproc v, void *a) { -- int e; -- struct __pyx_obj_5event_timeout *p = (struct __pyx_obj_5event_timeout *)o; -- __pyx_ptype_5event_event->tp_traverse(o, v, a); -- return 0; --} -- --static int __pyx_tp_clear_5event_timeout(PyObject *o) { -- struct __pyx_obj_5event_timeout *p = (struct __pyx_obj_5event_timeout *)o; -- __pyx_ptype_5event_event->tp_clear(o); -- return 0; --} -- - static struct PyMethodDef __pyx_methods_5event_timeout[] = { - {0, 0, 0, 0} - }; -@@ -1997,6 +1844,9 @@ static PyNumberMethods __pyx_tp_as_numbe - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ -+ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX -+ 0, /*nb_index*/ -+ #endif - }; - - static PySequenceMethods __pyx_tp_as_sequence_timeout = { -@@ -2025,7 +1875,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ - 0, /*bf_getcharbuffer*/ - }; - --statichere PyTypeObject __pyx_type_5event_timeout = { -+PyTypeObject __pyx_type_5event_timeout = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "event.timeout", /*tp_name*/ -@@ -2048,8 +1898,8 @@ statichere PyTypeObject __pyx_type_5even - &__pyx_tp_as_buffer_timeout, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - "timeout(secs, callback, *args) -> event object\n\n Simplified event interface:\n Create a new timer event, and add it to the event queue.\n\n Arguments:\n\n secs -- event timeout in seconds\n callback -- user callback with (*args) prototype, which can return\n a non-None value to be rescheduled\n *args -- optional callback arguments\n ", /*tp_doc*/ -- __pyx_tp_traverse_5event_timeout, /*tp_traverse*/ -- __pyx_tp_clear_5event_timeout, /*tp_clear*/ -+ 0, /*tp_traverse*/ -+ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ -@@ -2082,155 +1932,199 @@ static struct PyMethodDef __pyx_methods[ - {0, 0, 0, 0} - }; - --DL_EXPORT(void) initevent(void); /*proto*/ --DL_EXPORT(void) initevent(void) { -+static void __pyx_init_filenames(void); /*proto*/ -+ -+PyMODINIT_FUNC initevent(void); /*proto*/ -+PyMODINIT_FUNC initevent(void) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; -- PyObject *__pyx_5 = 0; -- PyObject *__pyx_6 = 0; -+ __pyx_init_filenames(); - __pyx_m = Py_InitModule4("event", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION); - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}; -+ Py_INCREF(__pyx_m); - __pyx_b = PyImport_AddModule("__builtin__"); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}; - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}; -- if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}; - __pyx_type_5event_event.tp_free = _PyObject_GC_Del; -- if (PyType_Ready(&__pyx_type_5event_event) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} -- if (PyObject_SetAttrString(__pyx_m, "event", (PyObject *)&__pyx_type_5event_event) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} -+ if (PyType_Ready(&__pyx_type_5event_event) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;} -+ if (PyObject_SetAttrString(__pyx_m, "event", (PyObject *)&__pyx_type_5event_event) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;} - __pyx_ptype_5event_event = &__pyx_type_5event_event; - __pyx_type_5event_read.tp_base = __pyx_ptype_5event_event; -- if (PyType_Ready(&__pyx_type_5event_read) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} -- if (PyObject_SetAttrString(__pyx_m, "read", (PyObject *)&__pyx_type_5event_read) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} -+ if (PyType_Ready(&__pyx_type_5event_read) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} -+ if (PyObject_SetAttrString(__pyx_m, "read", (PyObject *)&__pyx_type_5event_read) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} - __pyx_ptype_5event_read = &__pyx_type_5event_read; - __pyx_type_5event_write.tp_base = __pyx_ptype_5event_event; -- if (PyType_Ready(&__pyx_type_5event_write) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} -- if (PyObject_SetAttrString(__pyx_m, "write", (PyObject *)&__pyx_type_5event_write) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} -+ if (PyType_Ready(&__pyx_type_5event_write) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} -+ if (PyObject_SetAttrString(__pyx_m, "write", (PyObject *)&__pyx_type_5event_write) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} - __pyx_ptype_5event_write = &__pyx_type_5event_write; - __pyx_type_5event_signal.tp_base = __pyx_ptype_5event_event; -- if (PyType_Ready(&__pyx_type_5event_signal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} -- if (PyObject_SetAttrString(__pyx_m, "signal", (PyObject *)&__pyx_type_5event_signal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} -+ if (PyType_Ready(&__pyx_type_5event_signal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} -+ if (PyObject_SetAttrString(__pyx_m, "signal", (PyObject *)&__pyx_type_5event_signal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} - __pyx_ptype_5event_signal = &__pyx_type_5event_signal; - __pyx_type_5event_timeout.tp_base = __pyx_ptype_5event_event; -- if (PyType_Ready(&__pyx_type_5event_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} -- if (PyObject_SetAttrString(__pyx_m, "timeout", (PyObject *)&__pyx_type_5event_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} -+ if (PyType_Ready(&__pyx_type_5event_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} -+ if (PyObject_SetAttrString(__pyx_m, "timeout", (PyObject *)&__pyx_type_5event_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} - __pyx_ptype_5event_timeout = &__pyx_type_5event_timeout; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":18 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":18 */ - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} -- Py_INCREF(__pyx_k1p); -- PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k1p); -- Py_INCREF(__pyx_k2p); -- PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k2p); -+ Py_INCREF(__pyx_k18p); -+ PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k18p); -+ Py_INCREF(__pyx_k19p); -+ PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k19p); - if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":20 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":20 */ - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;} -- Py_INCREF(__pyx_k3p); -- PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k3p); -- Py_INCREF(__pyx_k4p); -- PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k4p); -+ Py_INCREF(__pyx_k21p); -+ PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k21p); -+ Py_INCREF(__pyx_k22p); -+ PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k22p); - if (PyObject_SetAttr(__pyx_m, __pyx_n___copyright__, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":22 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":22 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___license__, __pyx_n_BSD) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - -- /* "/Users/dugsong/projects/pyevent/event.pyx":23 */ -- if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k6p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":23 */ -+ if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k26p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} - -- /* "/Users/dugsong/projects/pyevent/event.pyx":24 */ -- if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k7p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":24 */ -+ if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k28p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;} - -- /* "/Users/dugsong/projects/pyevent/event.pyx":26 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":26 */ - __pyx_1 = __Pyx_Import(__pyx_n_sys, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":57 */ -- __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":57 */ -+ __pyx_1 = PyInt_FromLong(0x01); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_EV_TIMEOUT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":58 */ -- __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":58 */ -+ __pyx_1 = PyInt_FromLong(0x02); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_EV_READ, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":59 */ -- __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":59 */ -+ __pyx_1 = PyInt_FromLong(0x04); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_EV_WRITE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":60 */ -- __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":60 */ -+ __pyx_1 = PyInt_FromLong(0x08); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_EV_SIGNAL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":61 */ -- __pyx_1 = PyInt_FromLong(16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":61 */ -+ __pyx_1 = PyInt_FromLong(0x10); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_EV_PERSIST, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":63 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":63 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___event_exc, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - -- /* "/Users/dugsong/projects/pyevent/event.pyx":92 */ -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":89 */ - Py_INCREF(Py_None); -- __pyx_k9 = Py_None; -- __pyx_k10 = 0; -- __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;} -- __pyx_k11 = __pyx_1; -+ __pyx_d1 = Py_None; -+ __pyx_d2 = 0; -+ __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;} -+ __pyx_d3 = __pyx_1; - __pyx_1 = 0; -- __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;} -- __pyx_k12 = __pyx_2; -+ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} -+ __pyx_d4 = __pyx_2; - __pyx_2 = 0; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":143 */ -- __pyx_k13 = (-1); -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":132 */ -+ __pyx_d5 = (-1); - -- /* "/Users/dugsong/projects/pyevent/event.pyx":264 */ -- __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;} -- __pyx_k14 = __pyx_3; -- __pyx_3 = 0; -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":253 */ -+ Py_INCREF(Py_False); -+ __pyx_d6 = Py_False; - -- /* "/Users/dugsong/projects/pyevent/event.pyx":280 */ -- __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_init); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} -- __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} -- __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} -+ /* "/usr/home/clsung/cvsroot/ports/devel/py-event/work/pyevent-0.3/event.pyx":265 */ -+ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_init); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} -+ __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} -+ Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; -- Py_DECREF(__pyx_5); __pyx_5 = 0; -- Py_DECREF(__pyx_6); __pyx_6 = 0; - return; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); -- Py_XDECREF(__pyx_5); -- Py_XDECREF(__pyx_6); - __Pyx_AddTraceback("event"); - } - - static char *__pyx_filenames[] = { - "event.pyx", - }; --statichere char **__pyx_f = __pyx_filenames; - - /* Runtime support code */ - -+static void __pyx_init_filenames(void) { -+ __pyx_f = __pyx_filenames; -+} -+ -+static void __Pyx_WriteUnraisable(char *name) { -+ PyObject *old_exc, *old_val, *old_tb; -+ PyObject *ctx; -+ PyErr_Fetch(&old_exc, &old_val, &old_tb); -+ ctx = PyString_FromString(name); -+ PyErr_Restore(old_exc, old_val, old_tb); -+ if (!ctx) -+ ctx = Py_None; -+ PyErr_WriteUnraisable(ctx); -+} -+ -+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { -+ PyThreadState *tstate = PyThreadState_Get(); -+ PyErr_Fetch(type, value, tb); -+ PyErr_NormalizeException(type, value, tb); -+ if (PyErr_Occurred()) -+ goto bad; -+ Py_INCREF(*type); -+ Py_INCREF(*value); -+ Py_INCREF(*tb); -+ Py_XDECREF(tstate->exc_type); -+ Py_XDECREF(tstate->exc_value); -+ Py_XDECREF(tstate->exc_traceback); -+ tstate->exc_type = *type; -+ tstate->exc_value = *value; -+ tstate->exc_traceback = *tb; -+ return 0; -+bad: -+ Py_XDECREF(*type); -+ Py_XDECREF(*value); -+ Py_XDECREF(*tb); -+ return -1; -+} -+ -+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { -+ PyObject *result; -+ result = PyObject_GetAttr(dict, name); -+ if (!result) -+ PyErr_SetObject(PyExc_NameError, name); -+ return result; -+} -+ - static int __Pyx_GetStarArgs( - PyObject **args, - PyObject **kwds, - char *kwd_list[], -- int nargs, -+ Py_ssize_t nargs, - PyObject **args2, -- PyObject **kwds2) -+ PyObject **kwds2, -+ char rqd_kwds[]) - { - PyObject *x = 0, *args1 = 0, *kwds1 = 0; -+ int i; -+ char **p; - - if (args2) - *args2 = 0; -@@ -2241,25 +2135,37 @@ static int __Pyx_GetStarArgs( - args1 = PyTuple_GetSlice(*args, 0, nargs); - if (!args1) - goto bad; -- *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args)); -+ *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_GET_SIZE(*args)); - if (!*args2) - goto bad; - } -+ else if (PyTuple_GET_SIZE(*args) > nargs) { -+ int m = nargs; -+ int n = PyTuple_GET_SIZE(*args); -+ PyErr_Format(PyExc_TypeError, -+ "function takes at most %d positional arguments (%d given)", -+ m, n); -+ goto bad; -+ } - else { - args1 = *args; - Py_INCREF(args1); - } - -+ if (rqd_kwds && !*kwds) -+ for (i = 0, p = kwd_list; *p; i++, p++) -+ if (rqd_kwds[i]) -+ goto missing_kwarg; -+ - if (kwds2) { - if (*kwds) { -- char **p; - kwds1 = PyDict_New(); -- if (!kwds) -+ if (!kwds1) - goto bad; - *kwds2 = PyDict_Copy(*kwds); - if (!*kwds2) - goto bad; -- for (p = kwd_list; *p; p++) { -+ for (i = 0, p = kwd_list; *p; i++, p++) { - x = PyDict_GetItemString(*kwds, *p); - if (x) { - if (PyDict_SetItemString(kwds1, *p, x) < 0) -@@ -2267,6 +2173,8 @@ static int __Pyx_GetStarArgs( - if (PyDict_DelItemString(*kwds2, *p) < 0) - goto bad; - } -+ else if (rqd_kwds && rqd_kwds[i]) -+ goto missing_kwarg; - } - } - else { -@@ -2278,101 +2186,43 @@ static int __Pyx_GetStarArgs( - else { - kwds1 = *kwds; - Py_XINCREF(kwds1); -+ if (rqd_kwds && *kwds) -+ for (i = 0, p = kwd_list; *p; i++, p++) -+ if (rqd_kwds[i] && !PyDict_GetItemString(*kwds, *p)) -+ goto missing_kwarg; - } - - *args = args1; - *kwds = kwds1; - return 0; -+missing_kwarg: -+ PyErr_Format(PyExc_TypeError, -+ "required keyword argument '%s' is missing", *p); - bad: - Py_XDECREF(args1); - Py_XDECREF(kwds1); -- if (*args2) -+ if (args2) { - Py_XDECREF(*args2); -- if (*kwds2) -+ } -+ if (kwds2) { - Py_XDECREF(*kwds2); -+ } - return -1; - } - --static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { -- PyObject *__import__ = 0; -- PyObject *empty_list = 0; -- PyObject *module = 0; -- PyObject *global_dict = 0; -- PyObject *empty_dict = 0; -- PyObject *list; -- __import__ = PyObject_GetAttrString(__pyx_b, "__import__"); -- if (!__import__) -- goto bad; -- if (from_list) -- list = from_list; -+static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i) { -+ PyTypeObject *t = o->ob_type; -+ PyObject *r; -+ if (t->tp_as_sequence && t->tp_as_sequence->sq_item) -+ r = PySequence_GetItem(o, i); - else { -- empty_list = PyList_New(0); -- if (!empty_list) -- goto bad; -- list = empty_list; -- } -- global_dict = PyModule_GetDict(__pyx_m); -- if (!global_dict) -- goto bad; -- empty_dict = PyDict_New(); -- if (!empty_dict) -- goto bad; -- module = PyObject_CallFunction(__import__, "OOOO", -- name, global_dict, empty_dict, list); --bad: -- Py_XDECREF(empty_list); -- Py_XDECREF(__import__); -- Py_XDECREF(empty_dict); -- return module; --} -- --static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { -- PyObject *result; -- result = PyObject_GetAttr(dict, name); -- if (!result) -- PyErr_SetObject(PyExc_NameError, name); -- return result; --} -- --static void __Pyx_WriteUnraisable(char *name) { -- PyObject *old_exc, *old_val, *old_tb; -- PyObject *ctx; -- PyErr_Fetch(&old_exc, &old_val, &old_tb); -- ctx = PyString_FromString(name); -- PyErr_Restore(old_exc, old_val, old_tb); -- if (!ctx) -- ctx = Py_None; -- PyErr_WriteUnraisable(ctx); --} -- --static PyObject *__Pyx_GetExcValue(void) { -- PyObject *type = 0, *value = 0, *tb = 0; -- PyObject *result = 0; -- PyThreadState *tstate = PyThreadState_Get(); -- PyErr_Fetch(&type, &value, &tb); -- PyErr_NormalizeException(&type, &value, &tb); -- if (PyErr_Occurred()) -- goto bad; -- if (!value) { -- value = Py_None; -- Py_INCREF(value); -+ PyObject *j = PyInt_FromLong(i); -+ if (!j) -+ return 0; -+ r = PyObject_GetItem(o, j); -+ Py_DECREF(j); - } -- Py_XDECREF(tstate->exc_type); -- Py_XDECREF(tstate->exc_value); -- Py_XDECREF(tstate->exc_traceback); -- tstate->exc_type = type; -- tstate->exc_value = value; -- tstate->exc_traceback = tb; -- result = value; -- Py_XINCREF(result); -- type = 0; -- value = 0; -- tb = 0; --bad: -- Py_XDECREF(type); -- Py_XDECREF(value); -- Py_XDECREF(tb); -- return result; -+ return r; - } - - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { -@@ -2394,39 +2244,40 @@ static void __Pyx_Raise(PyObject *type, - value = Py_None; - Py_INCREF(value); - } -- /* Next, repeatedly, replace a tuple exception with its first item */ -- while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { -- PyObject *tmp = type; -- type = PyTuple_GET_ITEM(type, 0); -- Py_INCREF(type); -- Py_DECREF(tmp); -- } -- if (PyString_Check(type)) -- ; -- else if (PyClass_Check(type)) -- ; /*PyErr_NormalizeException(&type, &value, &tb);*/ -- else if (PyInstance_Check(type)) { -+ #if PY_VERSION_HEX < 0x02050000 -+ if (!PyClass_Check(type)) -+ #else -+ if (!PyType_Check(type)) -+ #endif -+ { - /* Raising an instance. The value should be a dummy. */ - if (value != Py_None) { - PyErr_SetString(PyExc_TypeError, -- "instance exception may not have a separate value"); -+ "instance exception may not have a separate value"); - goto raise_error; - } -- else { -- /* Normalize to raise <class>, <instance> */ -- Py_DECREF(value); -- value = type; -- type = (PyObject*) ((PyInstanceObject*)type)->in_class; -+ /* Normalize to raise <class>, <instance> */ -+ Py_DECREF(value); -+ value = type; -+ #if PY_VERSION_HEX < 0x02050000 -+ if (PyInstance_Check(type)) { -+ type = (PyObject*) ((PyInstanceObject*)type)->in_class; -+ Py_INCREF(type); -+ } -+ else { -+ PyErr_SetString(PyExc_TypeError, -+ "raise: exception must be an old-style class or instance"); -+ goto raise_error; -+ } -+ #else -+ type = (PyObject*) type->ob_type; - Py_INCREF(type); -- } -- } -- else { -- /* Not something you can raise. You get an exception -- anyway, just not what you specified :-) */ -- PyErr_Format(PyExc_TypeError, -- "exceptions must be strings, classes, or " -- "instances, not %s", type->ob_type->tp_name); -- goto raise_error; -+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { -+ PyErr_SetString(PyExc_TypeError, -+ "raise: exception class must be a subclass of BaseException"); -+ goto raise_error; -+ } -+ #endif - } - PyErr_Restore(type, value, tb); - return; -@@ -2437,24 +2288,49 @@ raise_error: - return; - } - --static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { -+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { - while (t->p) { -- *t->p = PyString_InternFromString(t->s); -+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1); - if (!*t->p) - return -1; -+ if (t->i) -+ PyString_InternInPlace(t->p); - ++t; - } - return 0; - } - --static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { -- while (t->p) { -- *t->p = PyString_FromStringAndSize(t->s, t->n - 1); -- if (!*t->p) -- return -1; -- ++t; -+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { -+ PyObject *__import__ = 0; -+ PyObject *empty_list = 0; -+ PyObject *module = 0; -+ PyObject *global_dict = 0; -+ PyObject *empty_dict = 0; -+ PyObject *list; -+ __import__ = PyObject_GetAttrString(__pyx_b, "__import__"); -+ if (!__import__) -+ goto bad; -+ if (from_list) -+ list = from_list; -+ else { -+ empty_list = PyList_New(0); -+ if (!empty_list) -+ goto bad; -+ list = empty_list; - } -- return 0; -+ global_dict = PyModule_GetDict(__pyx_m); -+ if (!global_dict) -+ goto bad; -+ empty_dict = PyDict_New(); -+ if (!empty_dict) -+ goto bad; -+ module = PyObject_CallFunction(__import__, "OOOO", -+ name, global_dict, empty_dict, list); -+bad: -+ Py_XDECREF(empty_list); -+ Py_XDECREF(__import__); -+ Py_XDECREF(empty_dict); -+ return module; - } - - #include "compile.h" diff --git a/devel/py-event/files/patch-event.pyx b/devel/py-event/files/patch-event.pyx deleted file mode 100644 index a08ea048c03e..000000000000 --- a/devel/py-event/files/patch-event.pyx +++ /dev/null @@ -1,65 +0,0 @@ ---- event.pyx.orig 2005-09-12 03:44:04 UTC -+++ event.pyx -@@ -62,9 +62,6 @@ EV_PERSIST = 0x10 - - __event_exc = None - --cdef int __event_sigcb(): -- return -1 -- - cdef void __event_handler(int fd, short evtype, void *arg): - (<object>arg).__callback(evtype) - -@@ -109,8 +106,6 @@ cdef class event: - event_set(&self.ev, handle, evtype, handler, <void *>self) - - def __simple_callback(self, short evtype): -- cdef extern int event_gotsig -- cdef extern int (*event_sigcb)() - global __event_exc - try: - if self.callback(*self.args) != None: -@@ -120,23 +115,17 @@ cdef class event: - event_add(&self.ev, NULL) - except: - __event_exc = sys.exc_info() -- event_sigcb = __event_sigcb -- event_gotsig = 1 - # XXX - account for event.signal() EV_PERSIST - if not (evtype & EV_SIGNAL) and \ - not event_pending(&self.ev, EV_READ|EV_WRITE|EV_SIGNAL|EV_TIMEOUT, NULL): - Py_DECREF(self) - - def __callback(self, short evtype): -- cdef extern int event_gotsig -- cdef extern int (*event_sigcb)() - global __event_exc - try: - self.callback(self, self.handle, evtype, self.args) - except: - __event_exc = sys.exc_info() -- event_sigcb = __event_sigcb -- event_gotsig = 1 - if not event_pending(&self.ev, EV_READ|EV_WRITE|EV_SIGNAL|EV_TIMEOUT, NULL): - Py_DECREF(self) - -@@ -153,7 +142,7 @@ cdef class event: - self.timeout = timeout - if timeout >= 0.0: - self.tv.tv_sec = <long>timeout -- self.tv.tv_usec = (timeout - <float>self.tv.tv_sec) * 1000000.0 -+ self.tv.tv_usec = <long>(timeout - <float>self.tv.tv_sec) * 1000000 - event_add(&self.ev, &self.tv) - else: - self.tv.tv_sec = self.tv.tv_usec = 0 -@@ -271,10 +260,6 @@ def loop(nonblock=False): - - def abort(): - """Abort event dispatch loop.""" -- cdef extern int event_gotsig -- cdef extern int (*event_sigcb)() -- event_sigcb = __event_sigcb -- event_gotsig = 1 - - # XXX - make sure event queue is always initialized. - init() diff --git a/devel/py-event/pkg-descr b/devel/py-event/pkg-descr deleted file mode 100644 index 3c4aa4f34389..000000000000 --- a/devel/py-event/pkg-descr +++ /dev/null @@ -1,3 +0,0 @@ -Python Bindings for libevent - -WWW: https://github.com/jaraco/pyevent |