Changeset - 295e803f6a5e
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 17 years ago 2008-06-10 04:12:05
drewp@bigasterisk.com
dmx.pyx fixes for new stricter pyrex
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
dmx_usb_module/dmx.pyx
Show inline comments
 
@@ -13,7 +13,7 @@ cdef extern from "Python.h":
 

	
 
cdef class Dmx:
 
    cdef int fd
 
    def __new__(self, port="/dev/dmx0"):
 
    def __cinit__(self, port="/dev/dmx0"):
 
        self.fd = open(port, O_WRONLY)
 
        if self.fd < 0:
 
            raise OSError("open failed")
 
@@ -22,7 +22,7 @@ cdef class Dmx:
 
        cdef char *cbuf
 
        cbuf = PyString_AsString(buf)
 
        if cbuf == NULL:
 
            raise
 
            raise ValueError("string buffer conversion failed")
 
        res = write(self.fd, cbuf, 513)
 
        if res < 0:
 
            raise OSError("write failed")
0 comments (0 inline, 0 general)