qmsk/net/libc.pyx
author Tero Marttila <terom@fixme.fi>
Sun, 16 Aug 2009 20:22:06 +0300
changeset 11 7ae92c2b433f
parent 10 94b0d5a208c1
child 19 e6b670dbfe3b
permissions -rw-r--r--
move libc+py back to qmsk.net.x
11
7ae92c2b433f move libc+py back to qmsk.net.x
Tero Marttila <terom@fixme.fi>
parents: 10
diff changeset
     1
from qmsk.net.libc cimport *
7ae92c2b433f move libc+py back to qmsk.net.x
Tero Marttila <terom@fixme.fi>
parents: 10
diff changeset
     2
from qmsk.net.py cimport raise_errno
7
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
#cdef class Errno (py.OSError) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
#    def __init__ (self, func) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
#        self.func = func
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
#        self.err = errno
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
#        self.strerror = strerror(errno)
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
#
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
#    def __str__ (self) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
#        return "%s: %s" % (self.func, self.strerror)
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
#
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
#cdef class GAIError (py.OSError) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
#    def __init__ (self, func, err) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
#        self.func = func
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
#        self.err = err
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
#        self.strerror = gai_strerror(err)
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
#
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    19
#    def __str__ (self) :
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
#        return "%s: %s" % (self.func, self.strerror)
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
#