[Pkg-libvirt-commits] [libguestfs] 85/384: perl: Implement Pointer ("virDomainPtr", _).
Hilko Bengen
bengen at moszumanska.debian.org
Sun Mar 29 16:55:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 1e7a6d9f10008a922ae63e2893d76e44bd61b5b0
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Fri Dec 12 14:32:11 2014 +0000
perl: Implement Pointer ("virDomainPtr", _).
This allows the Perl binding of guestfs_add_libvirt_dom to work.
This relies on the internal Perl representation of virDomainPtr, but
Dan assures me this isn't going to change.
---
perl/typemap | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/perl/typemap b/perl/typemap
index e6f95d2..508e378 100644
--- a/perl/typemap
+++ b/perl/typemap
@@ -23,7 +23,15 @@ O_OBJECT_int64
$var = my_SvIV64 ($arg);
O_OBJECT_virDomainPtr
- $var = POINTER_NOT_IMPLEMENTED (\"virDomainPtr\");
+ /* This is copied directly from the Sys::Virt typemap. Dan has assured
+ * me that he doesn't intend to change this implementation!
+ */
+ if (sv_isobject ($arg) && SvTYPE (SvRV ($arg)) == SVt_PVMG)
+ $var = INT2PTR (void *, SvIV ((SV*) SvRV ($arg)));
+ else {
+ warn (\"${Package}::$func_name() -- $var is not a blessed SV reference\");
+ XSRETURN_UNDEF;
+ }
OUTPUT
O_OBJECT_guestfs_h
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list