Justin Cormack wrote: > Would it be possible to add an ffi function that takes a ctype and returns > the ctype of a pointer to that type? (ffi.ptrtype(ct) or something? Well, it's not that difficult to do for the pointer case. But I'd rather go for parameterized types, e.g. ffi.typeof("$ *", foo_t) ffi.typeof("struct { $ k; $ v; }[?]", foo_t, bar_t) But I'm not sure whether the complexity is really worth it. > I seem to have a lot of code that needs to cast bits of memory returned > from ffi C functions to different types Why is that? Can you give an example? --Mike