Add c_pointer method to classes.v1.2.11
commite3da7ade421a1fbb5f1789dea9903a3ae6243ced
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 11 Dec 2014 11:16:12 +0000 (11 11:16 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 11 Dec 2014 11:21:36 +0000 (11 11:21 +0000)
treeadaed021be15a8c6251de8a1c5ddc9a6ef964df3
parent8b0e955d9563e519340a95fc9d678b30e0001134
Add c_pointer method to classes.

This returns the raw C pointer to the underlying object, eg:

  conn = libvirt.open(None)
  print "0x%x" % conn.c_pointer()   # returns virConnectPtr of the connection
  dom = conn.lookupByName("test")
  print "0x%x" % dom.c_pointer()    # returns virDomainPtr of the domain

The reason behind this is to allow us to transparently pass Python dom
objects through the libguestfs Python API.

https://bugzilla.redhat.com/show_bug.cgi?id=1075164
generator.py
sanitytest.py