command: Fix except declaration for get_comedi_cmd_pointer master
authorW. Trevor King <wking@tremily.us>
Thu, 29 Oct 2015 03:36:04 +0000 (20:36 -0700)
committerW. Trevor King <wking@tremily.us>
Thu, 29 Oct 2015 03:36:04 +0000 (20:36 -0700)
Avoid:

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

  cdef class Command (object):
      cdef _comedi_h.comedi_cmd _cmd
      cdef public list _fields

      cdef _comedi_h.comedi_cmd *get_comedi_cmd_pointer(self)
                               ^
  ------------------------------------------------------------

  pycomedi/command.pxd:26:30: C method 'get_comedi_cmd_pointer' is declared but not defined

Cython is stricter about that sort of thing since 0.22 (2015-02-11)
[1]:

  Mismatching 'except' declarations on signatures in .pxd and .pyx
  files failed to produce a compile error.

[1]: https://github.com/cython/cython/blob/master/CHANGES.rst#022-2015-02-11

pycomedi/command.pxd

index 6aef3c75038a23673cfb677172b5414da3c02154..2cd5332f59ce3f67fbe9ca09bc153c2018b62d97 100644 (file)
@@ -23,4 +23,4 @@ cdef class Command (object):
     cdef _comedi_h.comedi_cmd _cmd
     cdef public list _fields
 
-    cdef _comedi_h.comedi_cmd *get_comedi_cmd_pointer(self)
+    cdef _comedi_h.comedi_cmd *get_comedi_cmd_pointer(self) except *