Data Structures | Defines | Functions | Variables

# python/header-py.c File Reference

`#include "system.h"`
`#include "rpmio_internal.h"`
`#include "legacy.h"`
`#include "header_internal.h"`
`#include "rpmcli.h"`
`#include "pkgio.h"`
`#include "rpmts.h"`
`#include "rpmevr.h"`
`#include "header-py.h"`
`#include "rpmds-py.h"`
`#include "rpmfi-py.h"`
`#include "debug.h"`
Include dependency graph for header-py.c:

Go to the source code of this file.

## Data Structures
struct | hdrObject_s
## Defines
#define | _RPMTAG_INTERNAL
#define | _RPMEVR_INTERNAL
## Functions
static Header | headerAllocated (Header h)
static int | hdr_compare (hdrObject *a, hdrObject *b)
static long | hdr_hash (PyObject *h)
static void | hdr_dealloc (hdrObject *s)
static PyObject * | hdr_subscript (hdrObject *s, PyObject *item)
static PyObject * | hdr_getattro (hdrObject *o, PyObject *n)
static int | hdr_setattro (hdrObject *o, PyObject *n, PyObject *v)
hdrObject * | hdr_Wrap (Header h)
Header | hdrGetHeader (hdrObject *s)
PyObject * | hdrLoad (PyObject *self, PyObject *args, PyObject *kwds)
PyObject * | rpmReadHeaders (FD_t fd)
PyObject * | rpmHeaderFromFD (PyObject *self, PyObject *args, PyObject *kwds)
PyObject * | rpmHeaderFromFile (PyObject *self, PyObject *args, PyObject *kwds)
PyObject * | rpmSingleHeaderFromFD (PyObject *self, PyObject *args, PyObject *kwds)
PyObject * | versionCompare (PyObject *self, PyObject *args, PyObject *kwds)
PyObject * | labelCompare (PyObject *self, PyObject *args)
Class: Rpmhdr
static PyObject * | hdrKeyList (hdrObject *s)
static PyObject * | hdrUnload (hdrObject *s, PyObject *args, PyObject *keywords)
static PyObject * | hdrGetOrigin (hdrObject *s)
static PyObject * | hdrSetOrigin (hdrObject *s, PyObject *args, PyObject *kwds)
static PyObject * | hdrSprintf (hdrObject *s, PyObject *args, PyObject *kwds)
Type: _rpm.hdr
long | tagNumFromPyObject (PyObject *item)
## Variables
static struct PyMethodDef | hdr_methods []
static PyMappingMethods | hdr_as_mapping
static char | hdr_doc [] = ""
PyTypeObject | hdr_Type

## Detailed Description

Definition in file header-py.c.

## Define Documentation

#define _RPMEVR_INTERNAL

Definition at line 16 of file header-py.c.

#define _RPMTAG_INTERNAL

Definition at line 10 of file header-py.c.

## Function Documentation

static int hdr_compare | ( | hdrObject * | a,
|  | hdrObject * | b
| ) |  | `[static]`

Definition at line 317 of file header-py.c.

References hdrObject_s::h, and rpmVersionCompare().

Referenced by versionCompare().

static PyObject* hdr_getattro | ( | hdrObject * | o,
|  | PyObject * | n
| ) |  | `[static]`

Definition at line 548 of file header-py.c.

References hdr_subscript().

static long hdr_hash | ( | PyObject * | h ) | `[static]`

Definition at line 323 of file header-py.c.

static int hdr_setattro | ( | hdrObject * | o,
|  | PyObject * | n,
|  | PyObject * | v
| ) |  | `[static]`

Definition at line 558 of file header-py.c.

static PyObject* hdrGetOrigin | ( | hdrObject * | s ) | `[static]`

Definition at line 231 of file header-py.c.

References hdrObject_s::h, and headerGetOrigin().

static PyObject* hdrKeyList | ( | hdrObject * | s ) | `[static]`

Definition at line 156 of file header-py.c.

References _free(), alloca(), hdrObject_s::h, HEADER_I18NTABLE, headerFini(), headerInit(), headerNext(), _HE_s::p, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPM_UINT16_TYPE, RPM_UINT32_TYPE, RPM_UINT64_TYPE, RPM_UINT8_TYPE, _HE_s::t, and _HE_s::tag.

static PyObject* hdrSetOrigin | ( | hdrObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  | `[static]`

Definition at line 246 of file header-py.c.

References hdrObject_s::h, and headerSetOrigin().

static PyObject* hdrSprintf | ( | hdrObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  | `[static]`

Definition at line 264 of file header-py.c.

References _free(), hdrObject_s::h, headerSprintf(), pyrpmError, and rpmHeaderFormats.

static PyObject* hdrUnload | ( | hdrObject * | s,
|  | PyObject * | args,
|  | PyObject * | keywords
| ) |  | `[static]`

Definition at line 192 of file header-py.c.

References _free(), hdrObject_s::h, headerCopy(), headerFree(), headerLink(), headerUnload(), and pyrpmError.

static Header headerAllocated | ( | Header | h ) | `[inline, static]`

< Is 1st header region allocated?

Definition at line 142 of file header-py.c.

References headerToken_s::flags, and HEADERFLAG_ALLOCATED.

Referenced by hdrLoad().

## Variable Documentation

char hdr_doc[] = ""`[static]`

Definition at line 566 of file header-py.c.