fix compilation with cython 0.15.1
authorÉric Piel <piel@delmic.com>
Thu, 18 Oct 2012 08:32:48 +0000 (10:32 +0200)
committerW. Trevor King <wking@tremily.us>
Thu, 18 Oct 2012 18:02:34 +0000 (14:02 -0400)
Need to help cython to find out that a new CalibrationSetting is a CalibrationSetting, otherwise
it thinks that its properties are python objects.

pycomedi/calibration.pyx

index f68eb96ff25d9fd727796796a65cf5b56cc1c865..248745befb20ce3b13f7126b4242b85c10761918 100644 (file)
@@ -673,7 +673,7 @@ cdef class Calibration (object):
             return None
         ret = []
         for i in range(self.calibration.num_settings):
-            s = CalibrationSetting(
+            s = <CalibrationSetting> CalibrationSetting(
                 subdevice=self.device.subdevice(
                     index=self.calibration.settings[i].subdevice))
             s.setting = &self.calibration.settings[i]