# O_OBJECT	-> link an opaque C or C++ object to a blessed Perl object.
srl_encoder_t * O_OBJECT
srl_decoder_t * O_OBJECT
srl_merger_t  * O_OBJECT
srl_path_t    * O_OBJECT
srl_iterator_t * O_OBJECT
sereal_iterator_tied_hash_t  * O_OBJECT
sereal_iterator_tied_array_t * O_OBJECT
sereal_iterator_tied_scalar_t * O_OBJECT

# T_OBJECT
Sereal::Splitter  T_PTROBJ

######################################################################
OUTPUT

# The Perl object is blessed into 'CLASS', which should be a
# char* having the name of the package for the blessing.
O_OBJECT
	sv_setref_pv( $arg, CLASS, (void*)$var );

######################################################################
INPUT

O_OBJECT
	if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
		$var = INT2PTR($type, SvIV((SV*)SvRV( $arg )));
	else{
		warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
		XSRETURN_UNDEF;
	}
