rpm  5.4.14
Functions | Variables
rpmdb-py.c File Reference
#include "system.h"
#include <rpmio.h>
#include <rpmcb.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include "rpmdb-py.h"
#include "rpmmi-py.h"
#include "header-py.h"
#include "debug.h"
Include dependency graph for rpmdb-py.c:

Go to the source code of this file.

Functions

 if (!PyInt_Check(key))
 
 if (!(h=rpmmiNext(mi)))
 
void headerFree (h)
 
static void rpmdb_dealloc (rpmdbObject *s)
 
static PyObject * rpmdb_getattro (PyObject *o, PyObject *n)
 
static int rpmdb_setattro (PyObject *o, PyObject *n, PyObject *v)
 

Variables

static struct PyMethodDef rpmdb_methods []
 
static int
 
int count = 0
 
 mi = rpmmiInit(s->db, RPMDBI_PACKAGES, NULL, 0)
 
Header h = NULL
 
 offset = (int) PyInt_AsLong(key)
 
static PyMappingMethods rpmdb_as_mapping
 
static char rpmdb_doc []
 
PyTypeObject rpmdb_Type
 
Class: Rpmts
static hdrObject *hdrObjectho
 

Class: Rpmdb

static rpmmiObject *char * key = NULL
 
int len = 0
 
int tag = RPMDBI_PACKAGES
 
char * kwlist [] = {"tagNumber", "key", "len", NULL}
 
 if (!PyArg_ParseTupleAndKeywords(args, kwds,"|Ozi", kwlist,&TagN,&key,&len)) return NULL
 
 if (TagN &&(tag=tagNumFromPyObject(TagN))==-1)
 
return rpmmi_Wrap (rpmmiInit(s->db, tag, key, len))
 

Function Documentation

void headerFree ( h  )
if ( PyArg_ParseTupleAndKeywordsargs, kwds,"|Ozi", kwlist,&TagN,&key,&len)
if ( TagN &&  tag=tagNumFromPyObject(TagN) = = -1)

Definition at line 127 of file rpmdb-py.c.

References NULL.

if ( PyInt_Checkkey)

Definition at line 180 of file rpmdb-py.c.

References NULL.

if ( h=rpmmiNext(mi))

Definition at line 188 of file rpmdb-py.c.

References NULL, pyrpmError, and rpmmiFree().

static void rpmdb_dealloc ( rpmdbObject s)
static

Definition at line 212 of file rpmdb-py.c.

References rpmdbObject_s::db, NULL, PyObject_Del(), and rpmdbClose().

static PyObject* rpmdb_getattro ( PyObject *  o,
PyObject *  n 
)
static

Definition at line 220 of file rpmdb-py.c.

static int rpmdb_setattro ( PyObject *  o,
PyObject *  n,
PyObject *  v 
)
static

Definition at line 226 of file rpmdb-py.c.

return rpmmi_Wrap ( rpmmiInit(s->db, tag, key, len )

Variable Documentation

return count = 0
h = NULL

Definition at line 177 of file rpmdb-py.c.

PyObject * ho
Initial value:
{
int offset
offset
Definition: rpmdb-py.c:185

Definition at line 174 of file rpmdb-py.c.

Referenced by hdr_dsFromHeader(), hdr_dsOfHeader(), hdr_fiFromHeader(), rpmds_init(), and rpmfi_init().

int
static
Initial value:
{
Definition: rpmdb.c:436
mi
Definition: rpmdb-py.c:159

Definition at line 155 of file rpmdb-py.c.

rpmmiObject* char* key = NULL

Definition at line 118 of file rpmdb-py.c.

char* kwlist[] = {"tagNumber", "key", "len", NULL}

Definition at line 121 of file rpmdb-py.c.

int len = 0
offset = (int) PyInt_AsLong(key)
PyMappingMethods rpmdb_as_mapping
static
Initial value:
= {
(lenfunc) rpmdb_length,
(binaryfunc) rpmdb_subscript,
(objobjargproc)0,
}

Definition at line 204 of file rpmdb-py.c.

char rpmdb_doc[]
static
Initial value:
=
""

Definition at line 235 of file rpmdb-py.c.

struct PyMethodDef rpmdb_methods[]
static
Initial value:
= {
{"match", (PyCFunction) rpmdb_Match, METH_VARARGS|METH_KEYWORDS,
"db.match([TagN, [key, [len]]]) -> mi\n\
- Create an rpm db match iterator.\n" },
{NULL, NULL}
}
return NULL
Definition: poptALL.c:613

Definition at line 141 of file rpmdb-py.c.

Definition at line 120 of file rpmdb-py.c.