Commit 5f9ff4f0 authored by Ralf Schmitt's avatar Ralf Schmitt

core.pyx: set the EV_* constants from inside the core module.

This has the following advantages:

1. replacing core with another implementation should be easier. I had
   to remove these constants while playing with a libev
   implementation, they use different constants.

2. one can implement deferred imports.

3. the core module is now self contained, i.e. one can "import core" from in
parent fabe5644
......@@ -38,12 +38,6 @@ del sys
from gevent import core
core.EV_TIMEOUT = 0x01
core.EV_READ = 0x02
core.EV_WRITE = 0x04
core.EV_SIGNAL = 0x08
core.EV_PERSIST = 0x10
from gevent.greenlet import Greenlet, joinall, killall
spawn = Greenlet.spawn
spawn_later = Greenlet.spawn_later
......
......@@ -30,6 +30,11 @@ from pprint import pformat
import weakref
cimport levent
EV_TIMEOUT = levent.EV_TIMEOUT
EV_READ = levent.EV_READ
EV_WRITE = levent.EV_WRITE
EV_SIGNAL = levent.EV_SIGNAL
EV_PERSIST = levent.EV_PERSIST
import _socket
gaierror = _socket.gaierror
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment