This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix Py_BuildValue for i386

see https://bugzilla.redhat.com/show_bug.cgi?id=881989

Signed-off-by: James Antill <james.antill@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
  • Loading branch information...
1 parent fc6815e commit 70a5fce2300270061c7f2afbac3e36bb55520a22 James Antill committed with Dec 6, 2012
Showing with 14 additions and 14 deletions.
  1. +14 −14 liblvm.c
View
@@ -566,47 +566,47 @@ liblvm_lvm_vg_get_seqno(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_seqno(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_seqno(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_size(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_size(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_size(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_free_size(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_free_size(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_free_size(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_extent_size(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_extent_size(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_extent_size(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_extent_count(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_extent_count(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_extent_count(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_free_extent_count(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_free_extent_count(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_free_extent_count(self->vg));
}
/* Builds a python tuple ([string|number], bool) from a struct lvm_property_value */
@@ -757,23 +757,23 @@ liblvm_lvm_vg_get_pv_count(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_pv_count(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_pv_count(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_max_pv(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_max_pv(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_max_pv(self->vg));
}
static PyObject *
liblvm_lvm_vg_get_max_lv(vgobject *self)
{
VG_VALID(self);
- return Py_BuildValue("l", lvm_vg_get_max_lv(self->vg));
+ return Py_BuildValue("K", (unsigned long long)lvm_vg_get_max_lv(self->vg));
}
static PyObject *
@@ -1135,7 +1135,7 @@ liblvm_lvm_lv_get_size(lvobject *self)
{
LV_VALID(self);
- return Py_BuildValue("l", lvm_lv_get_size(self->lv));
+ return Py_BuildValue("K", (unsigned long long)lvm_lv_get_size(self->lv));
}
static PyObject *
@@ -1348,7 +1348,7 @@ liblvm_lvm_pv_get_mda_count(pvobject *self)
{
PV_VALID(self);
- return Py_BuildValue("l", lvm_pv_get_mda_count(self->pv));
+ return Py_BuildValue("K", (unsigned long long)lvm_pv_get_mda_count(self->pv));
}
static PyObject *
@@ -1371,23 +1371,23 @@ liblvm_lvm_pv_get_dev_size(pvobject *self)
{
PV_VALID(self);
- return Py_BuildValue("l", lvm_pv_get_dev_size(self->pv));
+ return Py_BuildValue("K", (unsigned long long)lvm_pv_get_dev_size(self->pv));
}
static PyObject *
liblvm_lvm_pv_get_size(pvobject *self)
{
PV_VALID(self);
- return Py_BuildValue("l", lvm_pv_get_size(self->pv));
+ return Py_BuildValue("K", (unsigned long long)lvm_pv_get_size(self->pv));
}
static PyObject *
liblvm_lvm_pv_get_free(pvobject *self)
{
PV_VALID(self);
- return Py_BuildValue("l", lvm_pv_get_free(self->pv));
+ return Py_BuildValue("K", (unsigned long long)lvm_pv_get_free(self->pv));
}
static PyObject *

0 comments on commit 70a5fce

Please sign in to comment.