Yah, I realize that this is not a practical wish. I could probably be managed for FFI cases, but then the language would start to gain some weird semantic garbage. I guess I'll just have to man up and keep toughing it out. Probably a better scanner/converter could spot these, and come up with proper wrappers where necessary. but, realistically, it happens infrequently enough that all the cases will need to be hand inspected and tuned anyway. =============================== > > This is something a PUC-Rio Lua implementation of ffi would not be able to do. > > Adding inout for ffi alone seems odd. For consistency, straight Lua functions > should have this ability too. Saaaay, what happens when you put something > which isn't a local lvalue in an inout slot? > > Multiple return values, as in > > buff, len = getvalue(nil, len) > > would not be as nifty, but preserves immutability of parameters, and has > well-defined semantics.