import utility as _utility
-cdef void _python_to_charp(char **charp, object obj, object encoding):
+cdef void _python_to_charp(
+ char **charp, object obj, object encoding) except *:
"""Convert a Python string into a `char *`.
Cython automatically converts string or byte array to a `char *`
charp[0] = ret
cdef void _setup_comedi_polynomial_t(
- _comedilib_h.comedi_polynomial_t *p, coefficients, expansion_origin):
+ _comedilib_h.comedi_polynomial_t *p, coefficients, expansion_origin
+ ) except *:
"""Setup the `comedi_polynomial_t` at `p`
* `coefficients` is an iterable containing polynomial coefficients
self.subdevice = subdevice
self.index = index
- cdef _comedilib_h.comedi_t * _device(self):
+ cdef _comedilib_h.comedi_t * _device(self) except *:
return <_comedilib_h.comedi_t *> self.subdevice.device.device
def get_maxdata(self):
if self._cmd.data is not NULL:
_stdlib.free(self._cmd.data)
- cdef _comedi_h.comedi_cmd *get_comedi_cmd_pointer(self):
+ cdef _comedi_h.comedi_cmd *get_comedi_cmd_pointer(self) except *:
return &self._cmd
def __str__(self):
cdef public object device # pycomedi.device.Device
cdef public int index
- cdef _comedilib_h.comedi_t * _device(self)
+ cdef _comedilib_h.comedi_t * _device(self) except *
cpdef dio_bitfield(self, unsigned int bits=*, write_mask=*, base_channel=*)
cdef class StreamingSubdevice (Subdevice):
self.device = device
self.index = index
- cdef _comedilib_h.comedi_t * _device(self):
+ cdef _comedilib_h.comedi_t * _device(self) except *:
return <_comedilib_h.comedi_t *> self.device.device
def get_type(self):