[Zope-Checkins] CVS: Zope2 - Acquisition.c:1.46.2.2

Brian Lloyd brian@digiciool.com
Wed, 14 Mar 2001 13:52:32 -0500 (EST)


Update of /cvs-repository/Zope2/lib/Components/ExtensionClass/src
In directory korak:/home/brian/temp/zope-23-branch/lib/Components/ExtensionClass/src

Modified Files:
      Tag: zope-2_3-branch
	Acquisition.c 
Log Message:
Merged from head



--- Updated File Acquisition.c in package Zope2 --
--- Acquisition.c	2001/03/12 16:39:49	1.46.2.1
+++ Acquisition.c	2001/03/14 18:52:31	1.46.2.2
@@ -118,11 +118,11 @@
 {
   if (! args && PyErr_Occurred()) return NULL;
   UNLESS(name=PyObject_GetAttr(self,name)) {
-    if (args) Py_DECREF(args);
+    if (args) { Py_DECREF(args); }
     return NULL;
   }
   ASSIGN(name,PyEval_CallObjectWithKeywords(name,args,kw));
-  if (args) Py_DECREF(args);
+  if (args) { Py_DECREF(args); }
   return name;
 }
 
@@ -298,7 +298,7 @@
     case 'c':
       if (strcmp(name,"chain")==0)
 	{
-	  if (r=PyList_New(0)) 
+	  if ((r = PyList_New(0)))
 	    while (1)
 	      {
 		if (PyList_Append(r,OBJECT(self)) >= 0)
@@ -398,7 +398,7 @@
 
   if (PyString_Check(oname)) name=PyString_AS_STRING(oname);
   if (*name=='a' && name[1]=='q' && name[2]=='_')
-    if (r=Wrapper_special(self, name+3, oname))
+    if ((r=Wrapper_special(self, name+3, oname)))
       {
 	if (filter)
 	  switch(apply_filter(filter,OBJECT(self),oname,r,extra,orig))
@@ -425,7 +425,7 @@
     {
       if (isWrapper(self->obj))
 	{
-	  if (r=Wrapper_findattr(WRAPPER(self->obj),
+	  if ((r=Wrapper_findattr(WRAPPER(self->obj),
 				 oname, filter, extra, orig, 1, 
 
 				 /* Search object container if explicit,
@@ -433,8 +433,7 @@
 				 explicit ||
 				 self->obj->ob_type == 
 				 (PyTypeObject*)&Wrappertype,
-
-				 explicit, containment))
+				  explicit, containment)))
 	    {
 	      if (PyECMethod_Check(r) && PyECMethod_Self(r)==self->obj)
 		ASSIGN(r,PyECMethod_New(r,OBJECT(self)));
@@ -525,12 +524,12 @@
 	}
       else
 	{
-	  if ((r=PyObject_GetAttr(self->container,oname)))
+	  if ((r=PyObject_GetAttr(self->container,oname))) {
 	    if (r == Acquired)
 	      {
 		Py_DECREF(r);
 	      }
-	    else
+	    else {
 	      if (filter)
 		switch(apply_filter(filter,self->container,oname,r,
 				    extra,orig))
@@ -546,6 +545,8 @@
 		  if (has__of__(r)) ASSIGN(r,__of__(r,OBJECT(self)));
 		  return r;
 		}
+	    }
+	  }
 	}
     }
   
@@ -566,7 +567,6 @@
 static PyObject *
 Xaq_getattro(Wrapper *self, PyObject *oname)
 {
-  PyObject *r, *v, *tb;
   char *name="";
 
   /* Special case backward-compatible acquire method. */