Begin lint fixes for spec-py
CVS patchset: 7165 CVS date: 2004/03/11 07:03:40
This commit is contained in:
parent
fcfdff02e8
commit
da9a1be04c
|
@ -75,7 +75,7 @@ poptmodule.so$(EXEEXT): poptmodule.o
|
||||||
# rpmmodule.c header-py.c
|
# rpmmodule.c header-py.c
|
||||||
splint_srcs = \
|
splint_srcs = \
|
||||||
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
||||||
rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c
|
rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c spec-py.c
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
|
|
|
@ -35,9 +35,10 @@
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spec_dealloc(specObject * s)
|
spec_dealloc(specObject * s)
|
||||||
|
/*@modifies s @*/
|
||||||
{
|
{
|
||||||
if (s->spec) {
|
if (s->spec) {
|
||||||
freeSpec(s->spec);
|
s->spec=freeSpec(s->spec);
|
||||||
}
|
}
|
||||||
PyObject_Del(s);
|
PyObject_Del(s);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +51,7 @@ spec_print(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_buildroot(specObject * s)
|
spec_get_buildroot(specObject * s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
Spec spec = specFromSpec(s);
|
Spec spec = specFromSpec(s);
|
||||||
if (spec->buildRootURL) {
|
if (spec->buildRootURL) {
|
||||||
|
@ -62,6 +64,7 @@ spec_get_buildroot(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_prep(specObject * s)
|
spec_get_prep(specObject * s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
Spec spec = specFromSpec(s);
|
Spec spec = specFromSpec(s);
|
||||||
if (spec->prep) {
|
if (spec->prep) {
|
||||||
|
@ -76,6 +79,7 @@ spec_get_prep(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_build(specObject * s)
|
spec_get_build(specObject * s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
Spec spec = specFromSpec(s);
|
Spec spec = specFromSpec(s);
|
||||||
if (spec->build) {
|
if (spec->build) {
|
||||||
|
@ -90,6 +94,7 @@ spec_get_build(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_install(specObject * s)
|
spec_get_install(specObject * s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
Spec spec = specFromSpec(s);
|
Spec spec = specFromSpec(s);
|
||||||
if (spec->install) {
|
if (spec->install) {
|
||||||
|
@ -104,6 +109,7 @@ spec_get_install(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_clean(specObject * s)
|
spec_get_clean(specObject * s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
Spec spec = specFromSpec(s);
|
Spec spec = specFromSpec(s);
|
||||||
if (spec->clean) {
|
if (spec->clean) {
|
||||||
|
@ -118,12 +124,14 @@ spec_get_clean(specObject * s)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
spec_get_sources(specObject *s)
|
spec_get_sources(specObject *s)
|
||||||
|
/*@*/
|
||||||
{
|
{
|
||||||
struct Source * source;
|
struct Source * source;
|
||||||
PyObject *sourceList, *srcUrl;
|
PyObject *sourceList, *srcUrl;
|
||||||
|
Spec spec;
|
||||||
|
|
||||||
sourceList = PyList_New(0);
|
sourceList = PyList_New(0);
|
||||||
Spec spec = specFromSpec(s);
|
spec = specFromSpec(s);
|
||||||
source = spec->sources;
|
source = spec->sources;
|
||||||
|
|
||||||
while (source != NULL) {
|
while (source != NULL) {
|
||||||
|
@ -136,8 +144,13 @@ spec_get_sources(specObject *s)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
/*@unchecked@*/ /*@observer@*/
|
||||||
static char spec_doc[] = "RPM Spec file object";
|
static char spec_doc[] = "RPM Spec file object";
|
||||||
|
|
||||||
|
/*@-fullinitblock@*/
|
||||||
|
/*@unchecked@*/ /*@observer@*/
|
||||||
static PyMethodDef spec_Spec_methods[] = {
|
static PyMethodDef spec_Spec_methods[] = {
|
||||||
{"sources", (PyCFunction) spec_get_sources, METH_VARARGS, NULL },
|
{"sources", (PyCFunction) spec_get_sources, METH_VARARGS, NULL },
|
||||||
{"prep", (PyCFunction) spec_get_prep, METH_VARARGS, NULL },
|
{"prep", (PyCFunction) spec_get_prep, METH_VARARGS, NULL },
|
||||||
|
@ -147,7 +160,9 @@ static PyMethodDef spec_Spec_methods[] = {
|
||||||
{"buildRoot", (PyCFunction) spec_get_buildroot, METH_VARARGS, NULL },
|
{"buildRoot", (PyCFunction) spec_get_buildroot, METH_VARARGS, NULL },
|
||||||
{NULL} /* Sentinel */
|
{NULL} /* Sentinel */
|
||||||
};
|
};
|
||||||
|
/*@=fullinitblock@*/
|
||||||
|
|
||||||
|
/*@-fullinitblock@*/
|
||||||
PyTypeObject spec_Type = {
|
PyTypeObject spec_Type = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyObject_HEAD_INIT(&PyType_Type)
|
||||||
0, /*ob_size*/
|
0, /*ob_size*/
|
||||||
|
@ -191,6 +206,7 @@ PyTypeObject spec_Type = {
|
||||||
0, /* tp_free */
|
0, /* tp_free */
|
||||||
0, /* tp_is_gc */
|
0, /* tp_is_gc */
|
||||||
};
|
};
|
||||||
|
/*@=fullinitblock@*/
|
||||||
|
|
||||||
Spec specFromSpec(specObject *s)
|
Spec specFromSpec(specObject *s)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,13 +10,22 @@
|
||||||
typedef struct specObject_s {
|
typedef struct specObject_s {
|
||||||
PyObject_HEAD
|
PyObject_HEAD
|
||||||
/*type specific fields */
|
/*type specific fields */
|
||||||
|
/*@null@*/
|
||||||
Spec spec;
|
Spec spec;
|
||||||
} specObject;
|
} specObject;
|
||||||
|
|
||||||
extern PyTypeObject spec_Type;
|
extern PyTypeObject spec_Type;
|
||||||
|
|
||||||
Spec specFromSpec(specObject * spec);
|
/**
|
||||||
|
*/
|
||||||
|
/*@null@*/
|
||||||
|
Spec specFromSpec(specObject * spec)
|
||||||
|
/*@*/;
|
||||||
|
|
||||||
specObject * spec_Wrap(Spec spec);
|
/**
|
||||||
|
*/
|
||||||
|
/*@null@*/
|
||||||
|
specObject * spec_Wrap(Spec spec)
|
||||||
|
/*@*/;
|
||||||
|
|
||||||
#endif /* RPMPYTHON_SPEC */
|
#endif /* RPMPYTHON_SPEC */
|
||||||
|
|
Loading…
Reference in New Issue