python/rpmfts-py.c File Reference

#include "system.h"
#include "structmember.h"
#include <fts.h>
#include "rpmfts-py.h"
#include <rpmlib.h>
#include "debug.h"

Go to the source code of this file.

Class: Rpmfts

static struct PyMethodDef rpmfts_methods []
static PyMemberDef rpmfts_members []
static char rpmfts_doc []
PyTypeObject rpmfts_Type
static PyObject * rpmfts_Debug (rpmftsObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmfts_Open (rpmftsObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmfts_Read (rpmftsObject *s)
static PyObject * rpmfts_Children (rpmftsObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmfts_Close (rpmftsObject *s)
static PyObject * rpmfts_Set (rpmftsObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmfts_getattro (PyObject *o, PyObject *n)
static int rpmfts_setattro (PyObject *o, PyObject *n, PyObject *v)
static PyObject * rpmfts_iter (rpmftsObject *s)
static PyObject * rpmfts_iternext (rpmftsObject *s)
static void rpmfts_free (PyObject *s)
static PyObject * rpmfts_alloc (PyTypeObject *type, int nitems)
static void rpmfts_dealloc (rpmftsObject *s)
static int rpmfts_init (rpmftsObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmfts_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
static int rpmfts_traverse (rpmftsObject *s, visitproc visit, void *arg)
static int rpmfts_print (rpmftsObject *s, FILE *fp, int flags)

Defines

#define infoBit(_ix)   (1 << (((unsigned)(_ix)) & 0x1f))
#define RPMFTS_CLOSE   0
#define RPMFTS_OPEN   1
#define RPMFTS_OPEN_LAZY   2
#define CONSTANT(_v)   PyDict_SetItemString(s->md_dict, #_v, o=PyInt_FromLong(_v)); Py_DECREF(o)

Functions

static const char * ftsInfoStr (int fts_info)
static void rpmfts_debug (const char *msg, rpmftsObject *s)
static int rpmfts_initialize (rpmftsObject *s, const char *root, int options, int ignore)
static int rpmfts_state (rpmftsObject *s, int nactive)
static PyObject * rpmfts_step (rpmftsObject *s)

Variables

static int _rpmfts_debug = 1
static const char * ftsInfoStrings []


Detailed Description

Definition in file rpmfts-py.c.


Define Documentation

#define CONSTANT ( _v   )     PyDict_SetItemString(s->md_dict, #_v, o=PyInt_FromLong(_v)); Py_DECREF(o)

Referenced by rpmfts_new().

#define infoBit ( _ix   )     (1 << (((unsigned)(_ix)) & 0x1f))

Definition at line 25 of file rpmfts-py.c.

Referenced by rpmfts_initialize(), and rpmfts_step().

#define RPMFTS_CLOSE   0

Definition at line 54 of file rpmfts-py.c.

Referenced by rpmfts_Close(), rpmfts_dealloc(), rpmfts_initialize(), rpmfts_iternext(), rpmfts_state(), and rpmfts_step().

#define RPMFTS_OPEN   1

Definition at line 55 of file rpmfts-py.c.

Referenced by rpmfts_Open(), and rpmfts_state().

#define RPMFTS_OPEN_LAZY   2

Definition at line 56 of file rpmfts-py.c.

Referenced by rpmfts_iternext(), rpmfts_state(), and rpmfts_step().


Function Documentation

static const char* ftsInfoStr ( int  fts_info  )  [static]

Definition at line 46 of file rpmfts-py.c.

References ftsInfoStrings.

static void rpmfts_debug ( const char *  msg,
rpmftsObject s 
) [static]

Definition at line 59 of file rpmfts-py.c.

References _rpmfts_debug, rpmftsObject_s::active, rpmftsObject_s::fts, and rpmftsObject_s::ftsp.

Referenced by rpmfts_Children(), rpmfts_Close(), rpmfts_dealloc(), rpmfts_getattro(), rpmfts_init(), rpmfts_new(), rpmfts_Open(), rpmfts_Read(), rpmfts_Set(), rpmfts_setattro(), rpmfts_state(), and rpmfts_step().

static int rpmfts_initialize ( rpmftsObject s,
const char *  root,
int  options,
int  ignore 
) [static]

Definition at line 70 of file rpmfts-py.c.

References _free(), rpmftsObject_s::active, rpmftsObject_s::compare, rpmftsObject_s::fts, FTS_COMFOLLOW, FTS_DP, FTS_LOGICAL, FTS_NOSTAT, rpmftsObject_s::ftsp, rpmftsObject_s::ignore, infoBit, rpmftsObject_s::options, rpmftsObject_s::roots, RPMFTS_CLOSE, and stpcpy().

Referenced by rpmfts_init(), and rpmfts_Open().

static int rpmfts_state ( rpmftsObject s,
int  nactive 
) [static]

Definition at line 107 of file rpmfts-py.c.

References rpmftsObject_s::active, rpmftsObject_s::compare, rpmftsObject_s::fts, Fts_close(), Fts_open(), rpmftsObject_s::ftsp, rpmftsObject_s::options, rpmftsObject_s::roots, RPMFTS_CLOSE, rpmfts_debug(), RPMFTS_OPEN, and RPMFTS_OPEN_LAZY.

Referenced by rpmfts_Close(), rpmfts_dealloc(), rpmfts_iternext(), rpmfts_Open(), and rpmfts_step().

static PyObject* rpmfts_step ( rpmftsObject s  )  [static]

Definition at line 138 of file rpmfts-py.c.

References rpmftsObject_s::active, rpmftsObject_s::fts, _ftsent::fts_info, Fts_read(), rpmftsObject_s::ftsp, rpmftsObject_s::ignore, infoBit, RPMFTS_CLOSE, rpmfts_debug(), RPMFTS_OPEN_LAZY, and rpmfts_state().

Referenced by rpmfts_iternext(), and rpmfts_Read().


Variable Documentation

int _rpmfts_debug = 1 [static]

Definition at line 23 of file rpmfts-py.c.

Referenced by rpmfts_Debug(), and rpmfts_debug().

const char* ftsInfoStrings[] [static]

Initial value:

 {
    "UNKNOWN",
    "D",
    "DC",
    "DEFAULT",
    "DNR",
    "DOT",
    "DP",
    "ERR",
    "F",
    "INIT",
    "NS",
    "NSOK",
    "SL",
    "SLNONE",
    "W",
}

Definition at line 27 of file rpmfts-py.c.


Generated on Fri Oct 12 08:44:56 2007 for rpm by  doxygen 1.5.2