1. Python CFFI
  2. Untitled project
  3. cffi
Issue #118 resolved

Bogus error message when encountering 0xffffffff analog

Leonard Ritter
created an issue

I had to rewrite an enum declaration to make it parseable by cffi:

dAllocateMaskAll = ~0

Assuming the value was unsigned int, I changed ~0 to 0xffffffff, which caused a bogus error message:

  File "/home/lritter/devel/duangle/cffi/cffi/api.py", line 315, in verify
    lib = self.verifier.load_library()
  File "/home/lritter/devel/duangle/cffi/cffi/verifier.py", line 69, in load_library
    return self._load_library()
  File "/home/lritter/devel/duangle/cffi/cffi/verifier.py", line 143, in _load_library
    return self._vengine.load_library()
  File "/home/lritter/devel/duangle/cffi/cffi/vengine_cpy.py", line 163, in load_library
    module._cffi_setup(lst, ffiplatform.VerificationError, library)
VerificationError: enum dAllocateODEDataFlags: dAllocateMaskAll has the real value -1, not -1

Changing the value from ~0 to -1 fixed the error. Arigo asked me to file this as a bug, so here you are.

Comments (1)

  1. Log in to comment