summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-13 09:25:10 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-13 09:25:10 +0200
commitc8f2927227471758abbdb36781d885b01798f0f8 (patch)
treed3fced97892138d64913efabcf3a0f58411457ea /python
parent50f608b42f55e1d2c89dc22a01c58b7621b620a5 (diff)
downloadrpm-c8f2927227471758abbdb36781d885b01798f0f8.tar.gz
rpm-c8f2927227471758abbdb36781d885b01798f0f8.tar.bz2
rpm-c8f2927227471758abbdb36781d885b01798f0f8.zip
Use rpm_count_t everywhere for header data count
- typedef'ed as uint32_t as that's the key size limit imposed by BDB, relevant for RPM_BIN_TYPE - easy to change to whatever later on as it's now consistent everywhere
Diffstat (limited to 'python')
-rw-r--r--python/header-py.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 09568b3f2..da2086ee5 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -228,7 +228,7 @@ static PyObject * hdrCompressFilelist(hdrObject * s)
static void mungeFilelist(Header h)
{
const char ** fileNames = NULL;
- int count = 0;
+ rpm_count_t count = 0;
if (!headerIsEntry (h, RPMTAG_BASENAMES)
|| !headerIsEntry (h, RPMTAG_DIRNAMES)
@@ -357,12 +357,12 @@ long tagNumFromPyObject (PyObject *item)
* @return 0 on success, 1 on bad magic, 2 on error
*/
static int dressedHeaderGetEntry(Header h, int32_t tag, int32_t *type,
- void **p, int32_t *c)
+ void **p, rpm_count_t *c)
{
switch (tag) {
case RPMTAG_OLDFILENAMES:
{ const char ** fl = NULL;
- int count;
+ rpm_count_t count;
rpmfiBuildFNames(h, RPMTAG_BASENAMES, &fl, &count);
if (count > 0) {
*p = fl;
@@ -407,7 +407,8 @@ static int dressedHeaderGetEntry(Header h, int32_t tag, int32_t *type,
*/
static PyObject * hdr_subscript(hdrObject * s, PyObject * item)
{
- int tagtype, type, count, i, tag = -1;
+ int tagtype, type, tag = -1;
+ rpm_count_t count, i;
void * data;
PyObject * o, * metao;
char ** stringArray;
@@ -771,8 +772,8 @@ int rpmMergeHeaders(PyObject * list, FD_t fd, int matchTag)
int32_t * newMatch;
int32_t * oldMatch;
hdrObject * hdr;
- int count = 0;
- int type, c, tag;
+ rpm_count_t c, count = 0;
+ int type, tag;
void * p;
Py_BEGIN_ALLOW_THREADS