#include "system.h"
#include "structmember.h"
#include <fts.h>
#include "rpmfts-py.h"
#include <rpmiotypes.h>
#include "debug.h"
Go to the source code of this file.
|
static const char * | ftsInfoStr (int fts_info) |
|
static void | rpmfts_debug (const char *msg, rpmftsObject *s) |
|
| if (root==NULL) |
|
| rpmfts_debug ("rpmfts_state", s) |
|
| switch (nactive) |
|
| rpmfts_debug ("rpmfts_step", s) |
|
Py_END_ALLOW_THREADS | while (s->fts &&((1<< (((unsigned)(s->fts->fts_info))&0x1f))&s->ignore)) |
|
| if (s->fts!=NULL) |
|
static PyObject * | rpmfts_getattro (PyObject *o, PyObject *n) |
|
static int | rpmfts_setattro (PyObject *o, PyObject *n, PyObject *v) |
|
static void | rpmfts_free (PyObject *s) |
|
static PyObject * | rpmfts_alloc (PyTypeObject *type, Py_ssize_t 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) |
|
|
s | options = options |
|
s | ignore = ignore |
|
s | fts = NULL |
|
return | rc = 0 |
|
static PyObject *int | xx |
|
return | NULL |
|
char * | kwlist [] = {"root", "options", "ignore", NULL} |
|
return | Py_None |
|
static PyObject * | rpmfts_Debug (rpmftsObject *s, PyObject *args, PyObject *kwds) |
|
| rpmfts_debug ("rpmfts_Open", s) |
|
| if (!PyArg_ParseTupleAndKeywords(args, kwds,"|sii:Open", kwlist,&root,&options,&ignore)) return NULL |
|
| return (PyObject *) |
|
| rpmfts_debug ("rpmfts_Children", s) |
|
Py_END_ALLOW_THREADS | Py_INCREF (Py_None) |
|
static PyObject *return | Py_BuildValue ("i", rpmfts_state(s, 0)) |
|
| rpmfts_debug ("rpmfts_Set", s) |
|
return | Py_BuildValue ("i", rc) |
|
#define CONSTANT |
( |
|
_v | ) |
PyDict_SetItemString(s->md_dict, #_v, o=PyInt_FromLong(_v)); Py_XDECREF(o) |
#define infoBit |
( |
|
_ix | ) |
(1 << (((unsigned)(_ix)) & 0x1f)) |
#define RPMFTS_OPEN_LAZY 2 |
static const char* ftsInfoStr |
( |
int |
fts_info | ) |
|
|
static |
if |
( |
! |
PyArg_ParseTupleAndKeywordsargs, kwds,"|sii:Open", kwlist,&root,&options,&ignore | ) |
|
static PyObject* return Py_BuildValue |
( |
"i" |
, |
|
|
rpmfts_state(s, 0) |
|
|
) |
| |
Py_END_ALLOW_THREADS Py_INCREF |
( |
Py_None |
| ) |
|
static PyObject* rpmfts_alloc |
( |
PyTypeObject * |
type, |
|
|
Py_ssize_t |
nitems |
|
) |
| |
|
static |
rpmfts_debug |
( |
"rpmfts_state" |
, |
|
|
s |
|
|
) |
| |
rpmfts_debug |
( |
"rpmfts_step" |
, |
|
|
s |
|
|
) |
| |
static PyObject* rpmfts_Debug |
( |
rpmftsObject * |
s, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
rpmfts_debug |
( |
"rpmfts_Open" |
, |
|
|
s |
|
|
) |
| |
rpmfts_debug |
( |
"rpmfts_Children" |
, |
|
|
s |
|
|
) |
| |
rpmfts_debug |
( |
"rpmfts_Set" |
, |
|
|
s |
|
|
) |
| |
static void rpmfts_free |
( |
PyObject * |
s | ) |
|
|
static |
static PyObject* rpmfts_getattro |
( |
PyObject * |
o, |
|
|
PyObject * |
n |
|
) |
| |
|
static |
static int rpmfts_init |
( |
rpmftsObject * |
s, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
static PyObject* rpmfts_new |
( |
PyTypeObject * |
type, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
Definition at line 418 of file rpmfts-py.c.
References rpmftsObject_s::callbacks, rpmftsObject_s::compare, CONSTANT, rpmftsObject_s::fts, FTS_AGAIN, FTS_COMFOLLOW, FTS_D, FTS_DC, FTS_DEFAULT, FTS_DNR, FTS_DONTCHDIR, FTS_DOT, FTS_DP, FTS_ERR, FTS_F, FTS_FOLLOW, FTS_LOGICAL, FTS_NAMEONLY, FTS_NOCHDIR, FTS_NOINSTR, FTS_NOSTAT, FTS_NS, FTS_NSOK, FTS_OPTIONMASK, FTS_PHYSICAL, FTS_ROOTLEVEL, FTS_ROOTPARENTLEVEL, FTS_SEEDOT, FTS_SKIP, FTS_SL, FTS_SLNONE, FTS_STOP, FTS_SYMFOLLOW, FTS_W, FTS_WHITEOUT, FTS_XDEV, rpmftsObject_s::ftsp, rpmftsObject_s::md_dict, n, name, NULL, o, Py_None, Py_XDECREF(), rpmftsObject_s::roots, rpmfts_debug(), and s.
static int rpmfts_setattro |
( |
PyObject * |
o, |
|
|
PyObject * |
n, |
|
|
PyObject * |
v |
|
) |
| |
|
static |
Definition at line 113 of file rpmfts-py.c.
References rpmftsObject_s::compare, Fts_close(), Fts_open(), rpmftsObject_s::ftsp, int, NULL, rpmftsObject_s::options, rpmftsObject_s::roots, RPMFTS_CLOSE, RPMFTS_OPEN, and RPMFTS_OPEN_LAZY.
Py_END_ALLOW_THREADS while |
( |
s->fts && |
(1<< (((unsigned)(s->fts->fts_info))&0x1f))&s->ignore | ) |
|
Initial value:{
Py_BEGIN_ALLOW_THREADS
FTSENT * Fts_read(FTS *sp)
Return next node in the file hierarchy traversal.
Definition at line 148 of file rpmfts-py.c.
Py_BEGIN_ALLOW_THREADS s fts = NULL |
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.
Referenced by ftsInfoStr().
static PyObject *int options = options |
PyMemberDef rpmfts_members[] |
|
static |
Initial value:= {
{
"__dict__",T_OBJECT,offsetof(
rpmftsObject, md_dict), READONLY,
"Callback dictionary per fts_info state: FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
"Option bit(s): FTS_{COMFOLLOW|LOGICAL|NOCHDIR|NOSTAT|PHYSICAL|SEEDOT|XDEV}"},
"Ignore bit(s): (1 << info) with info one of FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
}
Definition at line 316 of file rpmfts-py.c.