4 guestfs_h * O_OBJECT_guestfs_h
9 if (sv_isobject ($arg) && sv_derived_from ($arg, \"Sys::Guestfs\") &&
10 SvTYPE ($arg) == SVt_RV &&
11 SvTYPE (SvRV ($arg)) == SVt_PVHV) {
12 HV *hv = (HV *) SvRV ($arg);
13 SV **svp = hv_fetch (hv, \"_g\", 2, 0);
15 croak (\"${Package}::$func_name(): called on a closed handle\");
16 $var = ($type) SvIV (*svp);
18 croak (\"${Package}::$func_name(): $var is not a blessed HV reference\");
23 sv_setiv ($arg, PTR2IV ($var));