TYPEMAP
char *		T_PV
const char *	T_PV
hive_h *	O_OBJECT_hive_h
int64_t		T_IV

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

OUTPUT
O_OBJECT_hive_h
    sv_setref_pv ($arg, "Win::Hivex", (void *) $var);
