rpmdb-py.c File Reference
PYTHON-C Language Bindings.
`#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

static int | rpmdb_length (rpmdbObject *s)
static hdrObject * | rpmdb_subscript (rpmdbObject *s, PyObject *key)
static void | rpmdb_dealloc (rpmdbObject *s)
static PyObject * | rpmdb_getattro (PyObject *o, PyObject *n)
static int | rpmdb_setattro (PyObject *o, PyObject *n, PyObject *v)
Class: Rpmdb
static rpmmiObject * | rpmdb_Match (rpmdbObject *s, PyObject *args, PyObject *kwds)

## Variables

static struct PyMethodDef | rpmdb_methods []
static PyMappingMethods | rpmdb_as_mapping
static char | rpmdb_doc []
PyTypeObject | rpmdb_Type

## Function Documentation

static void rpmdb_dealloc | ( | rpmdbObject * | s | ) |

static

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

References rpmdbObject_s::db, and rpmdbClose().

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

static

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

static int rpmdb_length | ( | rpmdbObject * | s | ) |

static

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

References rpmdbObject_s::db, RPMDBI_PACKAGES, rpmmiFree(), rpmmiInit(), and rpmmiNext().

static rpmmiObject* rpmdb_Match | ( | rpmdbObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |

static

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

References rpmdbObject_s::db, RPMDBI_PACKAGES, rpmmi_Wrap(), rpmmiInit(), and tagNumFromPyObject().

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

static

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

static hdrObject* rpmdb_subscript | ( | rpmdbObject * | s,
|  | PyObject * | key
| ) |  |

static

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

References rpmdbObject_s::db, hdr_Wrap(), headerFree(), pyrpmError, RPMDBI_PACKAGES, rpmmiFree(), rpmmiInit(), and rpmmiNext().

## Variable Documentation

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}
}

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