Apparently we were just missing the fact that T_IN and T_OUT are
pointers to PerlIO structs, not PerlIO structs themselves, which
kinda makes sense as you wouldn't normally have an entire struct
as a return value.
typedef short shortOPQ; /* T_OPAQUE */
typedef int intOpq; /* T_OPAQUEPTR */
typedef unsigned intUnsigned; /* T_U_INT */
-typedef PerlIO inputfh; /* T_IN */
-typedef PerlIO outputfh; /* T_OUT */
+typedef PerlIO * inputfh; /* T_IN */
+typedef PerlIO * outputfh; /* T_OUT */
/* A structure to test T_OPAQUEPTR and T_PACKED */
struct t_opaqueptr {