rpm  5.4.14
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

rpmfdObjectrpmfd_Wrap (FD_t fd)
 

Variables

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

Class: Rpmfd

typedef struct FDlist_t FDlist
 
static FDlistfdhead = NULL
 
static FDlistfdtail = NULL
 
static PyObject *char * mode = "r.fdio"
 
FDlistnode = xmalloc (sizeof(FDlist))
 
char * kwlist [] = {"path", "mode", NULL}
 
return NULL
 
node fd = Fopen(path, mode)
 
node note = xstrdup (path)
 
node f = fdGetFp(node->fd)
 
node next = NULL
 
 else
 
static int closeCallback (FILE *f)
 
static PyObject * rpmfd_Debug (rpmfdObject *s, PyObject *args, PyObject *kwds)
 
 if (!node->fd)
 
 if (Ferror(node->fd))
 
 if (!fdhead)
 
else if (fdtail)
 
return PyFile_FromFile (node->f, path, mode, closeCallback)
 

Typedef Documentation

typedef struct FDlist_t FDlist

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

Function Documentation

static int closeCallback ( FILE *  f)
static
if ( !node->  fd)

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

References _free(), NULL, pyrpmError, and void.

if ( Ferror(node->fd )

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

References _free(), FDlist_t::fd, Fstrerror(), NULL, and pyrpmError.

if ( fdhead)

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

References node.

else if ( fdtail  )

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

return PyFile_FromFile ( node->  f,
path  ,
mode  ,
closeCallback   
)
static PyObject* rpmfd_Debug ( rpmfdObject s,
PyObject *  args,
PyObject *  kwds 
)
static

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

References _rpmfd_debug, kwlist, NULL, Py_INCREF(), and Py_None.

Variable Documentation

int _rpmfd_debug = 1
static

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

Referenced by rpmfd_Debug().

else
Initial value:
{
static FDlist * fdhead
Definition: rpmfd-py.c:45
FDlist * node
Definition: rpmfd-py.c:116

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

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

node fd = Fopen(path, mode)
FDlist* fdhead = NULL
static

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

Referenced by closeCallback().

fdtail = NULL
static

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

char* kwlist[] = {"path", "mode", NULL}

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

PyObject* char* mode = "r.fdio"
node next = NULL
node = xmalloc (sizeof(FDlist))

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

Referenced by closeCallback(), and if().

node note = xstrdup (path)

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

return NULL

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