[Zodb-checkins] CVS: Zope2/lib/Components/ExtensionClass - Acquisition.c:1.51 ExtensionClass.c:1.46 MethodObject.c:1.6 Missing.c:1.11 MultiMapping.c:1.9 Sync.c:1.3

jeremy@digicool.com jeremy@digicool.com
Wed, 28 Mar 2001 09:06:52 -0500 (EST)


Update of /cvs-repository/Zope2/lib/Components/ExtensionClass/src
In directory korak:/tmp/cvs-serv17261

Modified Files:
	Acquisition.c ExtensionClass.c MethodObject.c Missing.c 
	MultiMapping.c Sync.c 
Log Message:
gcc -Wall cleanup
    - make function decls prototypes
    - remove unreferenced functions



--- Updated File Acquisition.c in package Zope2/lib/Components/ExtensionClass --
--- Acquisition.c	2001/03/27 03:36:30	1.50
+++ Acquisition.c	2001/03/28 14:06:50	1.51
@@ -70,7 +70,7 @@
 static PyObject *Acquired=0;
 
 static void
-init_py_names()
+init_py_names(void)
 {
 #define INIT_PY_NAME(N) py ## N = PyString_FromString(#N)
   INIT_PY_NAME(__add__);
@@ -1424,7 +1424,7 @@
 };
 
 void
-initAcquisition()
+initAcquisition(void)
 {
   PyObject *m, *d;
   char *rev="$Revision$";

--- Updated File ExtensionClass.c in package Zope2/lib/Components/ExtensionClass --
--- ExtensionClass.c	2001/03/27 21:09:40	1.45
+++ ExtensionClass.c	2001/03/28 14:06:50	1.46
@@ -622,24 +622,6 @@
   return NULL;
 }
 
-static int
-CMethod_setattro(CMethod *self, PyObject *oname, PyObject *v)
-{
-  int r;
-
-  if (self->self && ! PyEval_GetRestricted())	/* Psuedo attributes */
-    {
-      UNLESS(oname=Py_BuildValue("sO", self->name, oname)) return -1;
-      UNLESS_ASSIGN(oname,PyString_Format(concat_fmt, oname)) return -1;
-      r=PyObject_SetAttr(self->self, oname, v);
-      Py_DECREF(oname);
-      return r;
-    }
-
-  PyErr_SetObject(PyExc_AttributeError, oname);
-  return -1;
-}
-
 static PyTypeObject CMethodType = {
   PyObject_HEAD_INIT(NULL)
   0,				/*ob_size*/
@@ -660,7 +642,7 @@
   (ternaryfunc)CMethod_call,	/*tp_call*/
   (reprfunc)0,			/*tp_str*/
   (getattrofunc)CMethod_getattro, 	/* tp_getattro */
-  (setattrofunc)0 /*CMethod_setattro*/, 	/* tp_setattro */
+  (setattrofunc)0, 		/* tp_setattro */
   
   /* Space for future expansion */
   0L,0L,
@@ -940,42 +922,6 @@
   return PyObject_GetAttr(self->meth, oname);
 }
 
-static int
-PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v)
-{
-  int r;
-  PyObject *spam;
-
-  if (self->meth)
-    {
-      if ((spam=PyObject_GetAttr(self->meth, oname)))
-	{
-	  Py_DECREF(spam);
-	  PyErr_SetString(PyExc_TypeError,
-			  "Attempt to overwrite shared method attribute");
-	  return -1;
-	}
-      else PyErr_Clear();
-
-      if (self->self && ! PyEval_GetRestricted()) /* Psuedo attrs */
-	{
-	  PyObject *myname;
-
-	  UNLESS(myname=PyObject_GetAttr(self->meth, py__name__)) return -1;
-	  oname=Py_BuildValue("OO", myname, oname);
-	  Py_DECREF(myname);
-	  UNLESS(oname) return -1;
-	  UNLESS_ASSIGN(oname,PyString_Format(concat_fmt, oname)) return -1;
-	  r=PyObject_SetAttr(self->self, oname, v);
-	  Py_DECREF(oname);
-	  return r;
-	}
-    }
-
-  PyErr_SetObject(PyExc_AttributeError, oname);
-  return -1;
-}
-
 static PyTypeObject PMethodType = {
   PyObject_HEAD_INIT(NULL)
   0,					/*ob_size*/
@@ -996,7 +942,7 @@
   (ternaryfunc)PMethod_call,		/*tp_call*/
   (reprfunc)0,				/*tp_str*/
   (getattrofunc)PMethod_getattro,	/*tp_getattro*/
-  (setattrofunc)0 /*PMethod_setattro*/, 	/* tp_setattro */
+  (setattrofunc)0, 			/* tp_setattro */
   
   /* Space for future expansion */
   0L,0L,

--- Updated File MethodObject.c in package Zope2/lib/Components/ExtensionClass --
--- MethodObject.c	1998/11/17 19:50:20	1.5
+++ MethodObject.c	2001/03/28 14:06:51	1.6
@@ -64,7 +64,7 @@
 static struct PyMethodDef methods[] = {{NULL,	NULL}};
 
 void
-initMethodObject()
+initMethodObject(void)
 {
   PyObject *m, *d;
   char *rev="$Revision$";

--- Updated File Missing.c in package Zope2/lib/Components/ExtensionClass --
--- Missing.c	1999/08/25 20:15:29	1.10
+++ Missing.c	2001/03/28 14:06:51	1.11
@@ -301,7 +301,7 @@
 };
 
 void
-initMissing()
+initMissing(void)
 {
   PyObject *m, *d;
   char *rev="$Revision$";
@@ -340,6 +340,11 @@
 Revision Log:
 
   $Log$
+  Revision 1.11  2001/03/28 14:06:51  jeremy
+  gcc -Wall cleanup
+      - make function decls prototypes
+      - remove unreferenced functions
+
   Revision 1.10  1999/08/25 20:15:29  jim
   Made getattr a bit pickler to prevent getting attributes like "%f5.3".
 

--- Updated File MultiMapping.c in package Zope2/lib/Components/ExtensionClass --
--- MultiMapping.c	1999/06/10 20:10:46	1.8
+++ MultiMapping.c	2001/03/28 14:06:51	1.9
@@ -231,7 +231,7 @@
 };
 
 void
-initMultiMapping()
+initMultiMapping(void)
 {
   PyObject *m, *d;
   char *rev="$Revision$";

--- Updated File Sync.c in package Zope2/lib/Components/ExtensionClass --
--- Sync.c	1998/11/17 20:22:34	1.2
+++ Sync.c	2001/03/28 14:06:51	1.3
@@ -52,8 +52,6 @@
 
 #include "ExtensionClass.h"
 
-static PyObject *ErrorObject;
-
 /* ----------------------------------------------------- */
 
 static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;}
@@ -113,7 +111,7 @@
 };
 
 void
-initSync()
+initSync(void)
 {
   PyObject *m, *d;
   char *rev="$Revision$";