diff options
author | pauln <devnull@localhost> | 2004-03-11 07:03:40 +0000 |
---|---|---|
committer | pauln <devnull@localhost> | 2004-03-11 07:03:40 +0000 |
commit | da9a1be04c4225fd6855c900ff3c011ac2347b50 (patch) | |
tree | 7d56ec4b69987b3f803aed5c0adda4107fe8740e /python | |
parent | fcfdff02e8304b6ba36a0e8667c0172dec898444 (diff) | |
download | librpm-tizen-da9a1be04c4225fd6855c900ff3c011ac2347b50.tar.gz librpm-tizen-da9a1be04c4225fd6855c900ff3c011ac2347b50.tar.bz2 librpm-tizen-da9a1be04c4225fd6855c900ff3c011ac2347b50.zip |
Begin lint fixes for spec-py
CVS patchset: 7165
CVS date: 2004/03/11 07:03:40
Diffstat (limited to 'python')
-rw-r--r-- | python/Makefile.am | 2 | ||||
-rw-r--r-- | python/spec-py.c | 20 | ||||
-rw-r--r-- | python/spec-py.h | 13 |
3 files changed, 30 insertions, 5 deletions
diff --git a/python/Makefile.am b/python/Makefile.am index 73f246451..9569ee3b8 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -75,7 +75,7 @@ poptmodule.so$(EXEEXT): poptmodule.o # rpmmodule.c header-py.c splint_srcs = \ 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 lint: diff --git a/python/spec-py.c b/python/spec-py.c index 9005c804f..e7d9639e1 100644 --- a/python/spec-py.c +++ b/python/spec-py.c @@ -35,9 +35,10 @@ static void spec_dealloc(specObject * s) + /*@modifies s @*/ { if (s->spec) { - freeSpec(s->spec); + s->spec=freeSpec(s->spec); } PyObject_Del(s); } @@ -50,6 +51,7 @@ spec_print(specObject * s) static PyObject * spec_get_buildroot(specObject * s) + /*@*/ { Spec spec = specFromSpec(s); if (spec->buildRootURL) { @@ -62,6 +64,7 @@ spec_get_buildroot(specObject * s) static PyObject * spec_get_prep(specObject * s) + /*@*/ { Spec spec = specFromSpec(s); if (spec->prep) { @@ -76,6 +79,7 @@ spec_get_prep(specObject * s) static PyObject * spec_get_build(specObject * s) + /*@*/ { Spec spec = specFromSpec(s); if (spec->build) { @@ -90,6 +94,7 @@ spec_get_build(specObject * s) static PyObject * spec_get_install(specObject * s) + /*@*/ { Spec spec = specFromSpec(s); if (spec->install) { @@ -104,6 +109,7 @@ spec_get_install(specObject * s) static PyObject * spec_get_clean(specObject * s) + /*@*/ { Spec spec = specFromSpec(s); if (spec->clean) { @@ -118,12 +124,14 @@ spec_get_clean(specObject * s) static PyObject * spec_get_sources(specObject *s) + /*@*/ { struct Source * source; PyObject *sourceList, *srcUrl; + Spec spec; sourceList = PyList_New(0); - Spec spec = specFromSpec(s); + spec = specFromSpec(s); source = spec->sources; while (source != NULL) { @@ -136,8 +144,13 @@ spec_get_sources(specObject *s) } +/** + */ + /*@unchecked@*/ /*@observer@*/ static char spec_doc[] = "RPM Spec file object"; +/*@-fullinitblock@*/ +/*@unchecked@*/ /*@observer@*/ static PyMethodDef spec_Spec_methods[] = { {"sources", (PyCFunction) spec_get_sources, 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 }, {NULL} /* Sentinel */ }; +/*@=fullinitblock@*/ +/*@-fullinitblock@*/ PyTypeObject spec_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /*ob_size*/ @@ -191,6 +206,7 @@ PyTypeObject spec_Type = { 0, /* tp_free */ 0, /* tp_is_gc */ }; +/*@=fullinitblock@*/ Spec specFromSpec(specObject *s) { diff --git a/python/spec-py.h b/python/spec-py.h index f6fa81446..897b833bc 100644 --- a/python/spec-py.h +++ b/python/spec-py.h @@ -10,13 +10,22 @@ typedef struct specObject_s { PyObject_HEAD /*type specific fields */ +/*@null@*/ Spec spec; } specObject; 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 */ |