in reply to Inline/XS multiple input and output parameters
See 'perldoc Inline::C-Cookbook'. Look for "Variable Argument Lists" and "Multiple Return Values". The Inline_Stack_Vars types are just aliases for various XS macros (see Inline.h in your script's build directory for the definitions of the Inline_Stack_Vars). You can, of course, use the XS macros in preference to Inline_Stack_Vars. And, when it comes to callbacks, you'll be forced to use XS macros as the Inline_Stack_Vars types are incomplete (and therefore often inadequate for callbacks).
I haven't delved into the script you posted - so perhaps I've missed the point, but it's not (generally) difficult to both pass and return variable length lists - as demonstrated by the examples given in the Cookbook.
Cheers,
Rob