Hi devs,

Being able to convert between simple C structs and Python dictionaries is
great, but it doesn't work if there is a fixed-size array field in the
struct.  It seems like the following struct should be convertible safely:

cdef struct state_t:
    int i, j, k
    float x[3]
    float v[3]

Along with that, I'd expect that converting between fixed-sized C arrays
and Python iterables should work as well:

def auto_convert(list ll):
    cdef int arr[10] = ll
    # ...
    return arr

If this is deemed something worth doing and if someone is willing to give
pointers when I get stuck, I'm offering to put in the development time to
implement this.

Thoughts?

Kurt
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to