calibration: fix Python-to-caldac cast in CalibrationSetting._caldacs_set.
authorW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 17:12:31 +0000 (13:12 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 17:12:31 +0000 (13:12 -0400)
commit31b24aac5102335f6029c035212271bd8d09fdf6
tree336cf99803ec0350f9883edebd8a2d3de1c0d911
parent34093150da3826712e04ada84bfe52eee40e5bb0
calibration: fix Python-to-caldac cast in CalibrationSetting._caldacs_set.

Pointed out by Éric Piel using Cython 0.15.1:

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              raise MemoryError()
          self.setting.num_caldacs = length
          for i,x in enumerate(value):
              if i >= length:
                  raise ValueError((i, length))
              self.setting.caldacs[i] = x
                                        ^
  ------------------------------------------------------------

  pycomedi/calibration.pyx:505:39: Cannot convert Python object to
  'comedi_caldac_t'
pycomedi/calibration.pxd
pycomedi/calibration.pyx