Displaying 4 results from an estimated 4 matches for "hv_fetch".
2016 May 06
1
[PATCH] perl: use INT2PTR macro for casting back to guestfs_h * (RHBZ#1150298)
...l | 2 +-
perl/typemap | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/generator/perl.ml b/generator/perl.ml
index 19cabb6..a665051 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -242,7 +242,7 @@ DESTROY (sv)
HV *hv = (HV *) SvRV (sv);
SV **svp = hv_fetch (hv, \"_g\", 2, 0);
if (svp != NULL) {
- guestfs_h *g = (guestfs_h *) SvIV (*svp);
+ guestfs_h *g = INT2PTR (guestfs_h *, SvIV (*svp));
_close_handle (g);
}
diff --git a/perl/typemap b/perl/typemap
index 508e378..0a92e53 100644
--- a/perl/typemap
+++...
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...*sv)
+{
+ hive_set_value *ret;
+
+ if (!sv || !SvROK (sv) || SvTYPE (SvRV (sv)) != SVt_PVHV)
+ croak (\"not a hash ref\");
+
+ ret = malloc (sizeof (hive_set_value));
+ if (ret == NULL)
+ croak (\"malloc failed\");
+
+ HV *hv = (HV *)SvRV(sv);
+
+ SV **svp;
+ svp = hv_fetch (hv, \"key\", 3, 0);
+ if (!svp || !*svp)
+ croak (\"missing 'key' in hash\");
+ ret->key = SvPV_nolen (*svp);
+
+ svp = hv_fetch (hv, \"t\", 1, 0);
+ if (!svp || !*svp)
+ croak (\"missing 't' in hash\");
+ ret->t = SvIV (*svp...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call and perl bindings, tests
...*sv)
+{
+ hive_set_value *ret;
+
+ if (!sv || !SvROK (sv) || SvTYPE (SvRV (sv)) != SVt_PVHV)
+ croak (\"not a hash ref\");
+
+ ret = malloc (sizeof (hive_set_value));
+ if (ret == NULL)
+ croak (\"malloc failed\");
+
+ HV *hv = (HV *)SvRV(sv);
+
+ SV **svp;
+ svp = hv_fetch (hv, \"key\", 3, 0);
+ if (!svp || !*svp)
+ croak (\"missing 'key' in hash\");
+ ret->key = SvPV_nolen (*svp);
+
+ svp = hv_fetch (hv, \"t\", 1, 0);
+ if (!svp || !*svp)
+ croak (\"missing 't' in hash\");
+ ret->t = SvIV (*svp...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch:
https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html
This adds OCaml and Perl bindings (both tested), support for
progress bars in virt-resize, and adds progress notifications
to a number of the simpler commands.
Still to do is to add progress messages to more commands. There
are still a few commands which would be