Commit 359ed6c4 authored by Denis Bilenko's avatar Denis Bilenko

core_.pyx: define basestring where not present (py3k)

parent 4ea578c8
......@@ -2,6 +2,7 @@
cimport cython
cimport libev
from python cimport *
import sys
__all__ = ['get_version',
......@@ -142,6 +143,12 @@ cpdef _flags_to_list(unsigned int flags):
return result
if sys.version_info[0] >= 3:
basestring = (bytes, str)
else:
basestring = __builtins__.basestring
cpdef unsigned int _flags_to_int(object flags) except? -1:
# Note, that order does not matter, libev has its own predefined order
if flags is None:
......
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