Support for non-simple const struct elements

Issue #64 resolved
Tom Nixon
created an issue

The following generates a initialization discards ‘const’ qualifier from pointer target type warning:

import cffi
ffi = cffi.FFI()
ffi.cdef("struct foo { int * const bar; };")
lib = ffi.verify("struct foo { int * const bar; };")

This would require the model to keep track of more const information than it already does (pointers to const data). I started implementing this, but for a number of reasons it looks like doing it properly would involve quite extensive changes across a number of modules, so I'm probably not the best person to do it.

This isn't really a big issue, but it's nicer when things compile without warnings.


Comments (2)

  1. Log in to comment