<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libvirt-python.git/typewrappers.c, branch v2.4.0</title>
<subtitle>libvirt.org: git/libvirt-python.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/'/>
<entry>
<title>Use VIR_PY_NONE instead of increment and Py_None</title>
<updated>2015-10-05T06:50:14+00:00</updated>
<author>
<name>Pavel Hrdina</name>
<email>phrdina@redhat.com</email>
</author>
<published>2015-08-21T19:38:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=b9314f145038989f7fded66e3dc2abcc8422c61b'/>
<id>b9314f145038989f7fded66e3dc2abcc8422c61b</id>
<content type='text'>
To insert Py_None into some other python object like dict or tuple, you
need to increase reference to the Py_None.  We have a macro to do that.

Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To insert Py_None into some other python object like dict or tuple, you
need to increase reference to the Py_None.  We have a macro to do that.

Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix indentation</title>
<updated>2015-10-05T06:35:37+00:00</updated>
<author>
<name>Pavel Hrdina</name>
<email>phrdina@redhat.com</email>
</author>
<published>2015-09-22T08:41:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=7178a63e2351a70312a33cca862ce4eca8cf9de7'/>
<id>7178a63e2351a70312a33cca862ce4eca8cf9de7</id>
<content type='text'>
Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cleanup functions definition</title>
<updated>2015-10-05T06:35:15+00:00</updated>
<author>
<name>Pavel Hrdina</name>
<email>phrdina@redhat.com</email>
</author>
<published>2015-09-29T14:37:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=862a94aebfe1d14229c8e92893514dab577a56db'/>
<id>862a94aebfe1d14229c8e92893514dab577a56db</id>
<content type='text'>
Follow the libvirt hacking guide and make the code consistent.

Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow the libvirt hacking guide and make the code consistent.

Signed-off-by: Pavel Hrdina &lt;phrdina@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix libvirt_longlongWrap returning a very large value</title>
<updated>2014-08-11T14:28:26+00:00</updated>
<author>
<name>Zhou Yimin</name>
<email>zhouyimin@huawei.com</email>
</author>
<published>2014-08-11T12:59:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=86ee51ce97525fd474d3a155d67bf0730597c23a'/>
<id>86ee51ce97525fd474d3a155d67bf0730597c23a</id>
<content type='text'>
If hypervisor is not Xen, the errs in struct _virDomainBlockStats will be -1.
But in KVM when we call domain.blockStats(), errs is 18446744073709551615.

To fix that, this patch has two changes:
1. Replace use of the PyLong_FromUnsignedLongLong with PyLong_FromLongLong
   in function libvirt_longlongWrap
2. If the paramemter of libvirt_longlongWrap is unsigned long long,
   use libvirt_ulonglongWrap instead because of above change.

After this patch, errs is -1 which is consistent with virDomainBlockStats api.

Signed-off-by: Zhou Yimin &lt;zhouyimin@huawei.com&gt;
Signed-off-by: Wang Rui &lt;moon.wangrui@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If hypervisor is not Xen, the errs in struct _virDomainBlockStats will be -1.
But in KVM when we call domain.blockStats(), errs is 18446744073709551615.

To fix that, this patch has two changes:
1. Replace use of the PyLong_FromUnsignedLongLong with PyLong_FromLongLong
   in function libvirt_longlongWrap
2. If the paramemter of libvirt_longlongWrap is unsigned long long,
   use libvirt_ulonglongWrap instead because of above change.

After this patch, errs is -1 which is consistent with virDomainBlockStats api.

Signed-off-by: Zhou Yimin &lt;zhouyimin@huawei.com&gt;
Signed-off-by: Wang Rui &lt;moon.wangrui@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite libvirt_charPtrUnwrap to work with Python 3.0-&gt;3.2</title>
<updated>2013-12-12T18:15:05+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-12T18:15:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=a06d78b4a1ce0ce2e46fe41be2c373647e79cec7'/>
<id>a06d78b4a1ce0ce2e46fe41be2c373647e79cec7</id>
<content type='text'>
The PyUnicode_AsUTF8 method doesn't exist prior to Python 3.3.
It is also somewhat inefficient, so rewrite it to use an
intermediate PyBytes object.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PyUnicode_AsUTF8 method doesn't exist prior to Python 3.3.
It is also somewhat inefficient, so rewrite it to use an
intermediate PyBytes object.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>override: Switch virStreamSend wrapper to use libvirt_charPtrSizeUnwrap</title>
<updated>2013-12-11T16:14:46+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-09T14:53:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=d40861012ca5c7eaf93650b827409b5026223724'/>
<id>d40861012ca5c7eaf93650b827409b5026223724</id>
<content type='text'>
Instead of using a 'z#i' format string to receive byte array,
use 'O' and then libvirt_charPtrSizeUnwrap. This lets us hide
the Python 3 vs 2 differences in typewrappers.c

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using a 'z#i' format string to receive byte array,
use 'O' and then libvirt_charPtrSizeUnwrap. This lets us hide
the Python 3 vs 2 differences in typewrappers.c

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>typewrappers: PyInt/PyLong merge for Python3</title>
<updated>2013-12-11T16:14:46+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-09T14:00:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=a65df7c7a574e99e65223eb29b58b4b5b7cbeb8a'/>
<id>a65df7c7a574e99e65223eb29b58b4b5b7cbeb8a</id>
<content type='text'>
In Python3 the PyInt / PyLong types have merged into a single
PyLong type. Conditionalize the use of PyInt to Python 2 only

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python3 the PyInt / PyLong types have merged into a single
PyLong type. Conditionalize the use of PyInt to Python 2 only

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>typewrappers: Replace use of PyString class</title>
<updated>2013-12-11T16:14:46+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-05T17:10:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=b4d886346905e735827235fb881e3e547350a41a'/>
<id>b4d886346905e735827235fb881e3e547350a41a</id>
<content type='text'>
Replace use of PyString with either PyBytes or PyUnicode.
The former is used for buffers with explicit sizes, which
are used by APIs processing raw bytes.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace use of PyString with either PyBytes or PyUnicode.
The former is used for buffers with explicit sizes, which
are used by APIs processing raw bytes.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>override: Replace Py{Int,Long}_FromLong with helpers</title>
<updated>2013-12-11T16:12:54+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-05T16:08:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=a933b7f5d10d9f00b3df5e80dedef3f235c34e4e'/>
<id>a933b7f5d10d9f00b3df5e80dedef3f235c34e4e</id>
<content type='text'>
Replace use of the PyInt_FromLong and PyLong_FromLongLong
with libvirt_{int,uint,longlong,ulonglong}Wrap helpers.
This isolates the need for Python3 specific code in one
place.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace use of the PyInt_FromLong and PyLong_FromLongLong
with libvirt_{int,uint,longlong,ulonglong}Wrap helpers.
This isolates the need for Python3 specific code in one
place.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>override: Replace PyString_AsString with libvirt_charPtrUnwrap</title>
<updated>2013-12-11T16:12:54+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2013-12-05T16:36:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libvirt-python.git/commit/?id=aac76e7630f5899e221672ef63b46baa066e1b8e'/>
<id>aac76e7630f5899e221672ef63b46baa066e1b8e</id>
<content type='text'>
Replace calls to PyString_AsString with the helper method
libvirt_charPtrUnwrap. This isolates the code that will
change in Python3.

In making this change, all callers now have responsibility
for free'ing the string.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace calls to PyString_AsString with the helper method
libvirt_charPtrUnwrap. This isolates the code that will
change in Python3.

In making this change, all callers now have responsibility
for free'ing the string.

Signed-off-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
