constant: Avoid non-integer values in _Enum
When my lowercase names collide (e.g. for COMEDI_TO_PHYSICAL and
comedi_to_physical), we want to add the integer value to the enum, not
the function value. This avoids:
>>> from pycomedi.device import Device
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "instruction.pxd", line 22, in init pycomedi.device (pycomedi/device.c:4532)
File "instruction.pyx", line 25, in init pycomedi.instruction (pycomedi/instruction.c:2427)
File "chanspec.pyx", line 20, in init pycomedi.chanspec (pycomedi/chanspec.c:2571)
File "constant.pyx", line 469, in init pycomedi.constant (pycomedi/constant.c:10017)
File "constant.pyx", line 244, in pycomedi.constant._Enum.__init__ (pycomedi/constant.c:3804)
File "constant.pyx", line 260, in pycomedi.constant._Enum._add_item (pycomedi/constant.c:4305)
TypeError: unorderable types: builtin_function_or_method() < int()
I'm not sure how I haven't bumped into this before. Perhaps Cython
0.19.1 has stronger type-checking for its comparison operaters than my
old 0.17.4.