[Zodb-checkins] CVS: Zope/lib/Components/ExtensionClass/src - Acquisition.c:1.53.38.2

Matthew T. Kromer matt@zope.com
Tue, 11 Dec 2001 16:06:38 -0500


Update of /cvs-repository/Zope/lib/Components/ExtensionClass/src
In directory cvs.zope.org:/tmp/cvs-serv2428

Modified Files:
      Tag: Zope-2_5-branch
	Acquisition.c 
Log Message:
Typo correction and warning suppresion for diagnostic assertions


=== Zope/lib/Components/ExtensionClass/src/Acquisition.c 1.53.38.1 => 1.53.38.2 ===
   UNLESS(PyArg_Parse(args,"(OO)",&obj,&container)) return NULL;
 
-  if (obj == self) {
-  	PyErr_SetObject(PyExc_ValueError,
+  if (self == WRAPPER(obj)) {
+  	PyErr_SetString(PyExc_ValueError,
 		"Cannot wrap acquisition wrapper in itself (Wrapper__init__)");
   	return NULL;
   }
@@ -225,8 +225,8 @@
       UNLESS(self = PyObject_NEW(Wrapper, Wrappertype)) return NULL;
     }
 
-  if (obj == self) {
-  	PyErr_SetObject(PyExc_ValueError,
+  if (self == WRAPPER(obj)) {
+  	PyErr_SetString(PyExc_ValueError,
 		"Cannot wrap acquisition wrapper in itself (newWrapper)");
 	Py_DECREF(self);
 	return NULL;
@@ -444,8 +444,8 @@
     {
       if (isWrapper(self->obj))
 	{
-	  if (WRAPPER(self->obj) == self) {
-	  	PyErr_SetObject(PyExc_RuntimeError,
+	  if (self == WRAPPER(self->obj)) {
+	  	PyErr_SetString(PyExc_RuntimeError,
 			"Recursion detected in acquisition wrapper");
 		return NULL;
 	  }