RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 01-Sep-2007 00:01:22
Branch: HEAD Handle: 2007083123012200
Modified files:
rpm/python header-py.c
Log:
rearrange code to remove the need for a forward reference prototype.
Summary:
Revision Changes Path
1.55 +16 -20 rpm/python/header-py.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/python/header-py.c
============================================================================
$ cvs diff -u -r1.54 -r1.55 header-py.c
--- rpm/python/header-py.c 31 Aug 2007 21:01:36 -0000 1.54
+++ rpm/python/header-py.c 31 Aug 2007 22:01:22 -0000 1.55
@@ -616,26 +616,6 @@
return (long) h;
}
-/* forward declaration */
-static PyObject * hdr_subscript(hdrObject * s, PyObject * item);
-
-static PyObject * hdr_getattro(PyObject * o, PyObject * n)
- /*@*/
-{
- PyObject * res;
- res = PyObject_GenericGetAttr(o, n);
- if (res == NULL)
- res = hdr_subscript(o, n);
- return res;
-}
-
-static int hdr_setattro(PyObject * o, PyObject * n, PyObject * v)
- /*@*/
-{
- return PyObject_GenericSetAttr(o, n, v);
-}
-
-
/** \ingroup py_c
*/
static void hdr_dealloc(hdrObject * s)
@@ -939,6 +919,22 @@
(objobjargproc)0, /* mp_ass_subscript */
};
+static PyObject * hdr_getattro(hdrObject * o, PyObject * n)
+ /*@*/
+{
+ PyObject * res;
+ res = PyObject_GenericGetAttr((PyObject *)o, n);
+ if (res == NULL)
+ res = hdr_subscript(o, n);
+ return res;
+}
+
+static int hdr_setattro(hdrObject * o, PyObject * n, PyObject * v)
+ /*@*/
+{
+ return PyObject_GenericSetAttr((PyObject *)o, n, v);
+}
+
/**
*/
static char hdr_doc[] =
@@ .
Received on Sat Sep 1 00:01:22 2007