rpm  5.4.10
Data Structures | Functions | Variables
rpmfd-py.c File Reference
#include "system.h"
#include <glob.h>
#include <dirent.h>
#include <rpmio_internal.h>
#include <rpmcb.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include "header-py.h"
#include "rpmfd-py.h"
#include "debug.h"
Include dependency graph for rpmfd-py.c:

Go to the source code of this file.

Data Structures

struct  FDlist_t
 

Functions

static void rpmfd_dealloc (rpmfdObject *s)
 
static PyObject * rpmfd_getattro (PyObject *o, PyObject *n)
 
static int rpmfd_setattro (PyObject *o, PyObject *n, PyObject *v)
 
static int rpmfd_init (rpmfdObject *s, PyObject *args, PyObject *kwds)
 
static void rpmfd_free (rpmfdObject *s)
 
static PyObject * rpmfd_alloc (PyTypeObject *subtype, int nitems)
 
static rpmfdObjectrpmfd_new (PyTypeObject *subtype, PyObject *args, PyObject *kwds)
 
rpmfdObjectrpmfd_Wrap (FD_t fd)
 

Variables

static int _rpmfd_debug = 1
 
static struct PyMethodDef rpmfd_methods []
 
static char rpmfd_doc []
 
PyTypeObject rpmfd_Type
 

Class: Rpmfd

typedef struct FDlist_t FDlist
 
static FDlistfdhead = NULL
 
static FDlistfdtail = NULL
 
static int closeCallback (FILE *f)
 
static PyObject * rpmfd_Debug (rpmfdObject *s, PyObject *args, PyObject *kwds)
 
static PyObject * rpmfd_Fopen (PyObject *s, PyObject *args, PyObject *kwds)
 

Typedef Documentation

§ FDlist

typedef struct FDlist_t FDlist

Definition at line 32 of file rpmfd-py.c.

Function Documentation

§ closeCallback()

static int closeCallback ( FILE *  f)
static

Definition at line 53 of file rpmfd-py.c.

References _free(), FDlist_t::f, Fclose(), FDlist_t::fd, fdFree(), fdhead, fdLink(), FDlist_t::next, and FDlist_t::note.

Referenced by rpmfd_Fopen().

§ rpmfd_alloc()

static PyObject* rpmfd_alloc ( PyTypeObject *  subtype,
int  nitems 
)
static

Definition at line 255 of file rpmfd-py.c.

References _rpmfd_debug.

§ rpmfd_dealloc()

static void rpmfd_dealloc ( rpmfdObject s)
static

Definition at line 184 of file rpmfd-py.c.

References Fclose(), and rpmfdObject_s::fd.

§ rpmfd_Debug()

static PyObject* rpmfd_Debug ( rpmfdObject s,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 92 of file rpmfd-py.c.

References _rpmfd_debug.

§ rpmfd_Fopen()

static PyObject* rpmfd_Fopen ( PyObject *  s,
PyObject *  args,
PyObject *  kwds 
)
static

§ rpmfd_free()

static void rpmfd_free ( rpmfdObject s)
static

Definition at line 242 of file rpmfd-py.c.

References _rpmfd_debug, Fclose(), and rpmfdObject_s::fd.

Referenced by rpmfd_new().

§ rpmfd_getattro()

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

Definition at line 194 of file rpmfd-py.c.

§ rpmfd_init()

static int rpmfd_init ( rpmfdObject s,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 208 of file rpmfd-py.c.

References _rpmfd_debug, Fclose(), rpmfdObject_s::fd, Ferror(), Fopen(), Fstrerror(), and pyrpmError.

Referenced by rpmfd_new().

§ rpmfd_new()

static rpmfdObject* rpmfd_new ( PyTypeObject *  subtype,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 268 of file rpmfd-py.c.

References _rpmfd_debug, rpmfdObject_s::fd, rpmfd_free(), and rpmfd_init().

§ rpmfd_setattro()

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

Definition at line 200 of file rpmfd-py.c.

§ rpmfd_Wrap()

rpmfdObject* rpmfd_Wrap ( FD_t  fd)

Definition at line 342 of file rpmfd-py.c.

References rpmfdObject_s::fd, FDlist_t::fd, and rpmfd_Type.

Variable Documentation

§ _rpmfd_debug

int _rpmfd_debug = 1
static

Definition at line 22 of file rpmfd-py.c.

Referenced by rpmfd_alloc(), rpmfd_Debug(), rpmfd_free(), rpmfd_init(), and rpmfd_new().

§ fdhead

FDlist* fdhead = NULL
static

Definition at line 45 of file rpmfd-py.c.

Referenced by closeCallback().

§ fdtail

FDlist* fdtail = NULL
static

Definition at line 49 of file rpmfd-py.c.

§ rpmfd_doc

char rpmfd_doc[]
static
Initial value:
=
""

Definition at line 288 of file rpmfd-py.c.

§ rpmfd_methods

struct PyMethodDef rpmfd_methods[]
static
Initial value:
= {
{"Debug", (PyCFunction)rpmfd_Debug, METH_VARARGS|METH_KEYWORDS,
NULL},
{"Fopen", (PyCFunction)rpmfd_Fopen, METH_VARARGS|METH_KEYWORDS,
NULL},
{NULL, NULL}
}
static PyObject * rpmfd_Fopen(PyObject *s, PyObject *args, PyObject *kwds)
Definition: rpmfd-py.c:110
static PyObject * rpmfd_Debug(rpmfdObject *s, PyObject *args, PyObject *kwds)
Definition: rpmfd-py.c:92

Definition at line 170 of file rpmfd-py.c.

§ rpmfd_Type

PyTypeObject rpmfd_Type

Definition at line 294 of file rpmfd-py.c.

Referenced by init_rpm(), and rpmfd_Wrap().