rpm  5.4.15
Data Structures | Functions | Variables
rpmfd-py.c File Reference
#include "system-py.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 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

typedef struct FDlist_t FDlist

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

Function Documentation

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().

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

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

References _rpmfd_debug.

static void rpmfd_dealloc ( rpmfdObject s)
static

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

References Fclose(), and rpmfdObject_s::fd.

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

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

References _rpmfd_debug.

static PyObject* rpmfd_Fopen ( PyObject *  s,
PyObject *  args,
PyObject *  kwds 
)
static
static void rpmfd_free ( rpmfdObject s)
static

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

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

Referenced by rpmfd_new().

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

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

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

Referenced by rpmfd_new().

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

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

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

rpmfdObject* rpmfd_Wrap ( FD_t  fd)

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

References rpmfdObject_s::fd.

Variable Documentation

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().

FDlist* fdhead = NULL
static

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

Referenced by closeCallback().

FDlist* fdtail = NULL
static

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

char rpmfd_doc[]
static
Initial value:
=
""

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

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:109
static PyObject * rpmfd_Debug(rpmfdObject *s, PyObject *args, PyObject *kwds)
Definition: rpmfd-py.c:92

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

PyTypeObject rpmfd_Type

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

Referenced by init_rpm().