[Zodb-checkins] CVS: ZODB3/ExtensionClass/src - Missing.c:1.13.12.2

Jeremy Hylton jeremy at zope.com
Fri May 9 17:01:41 EDT 2003


Update of /cvs-repository/ZODB3/ExtensionClass/src
In directory cvs.zope.org:/tmp/cvs-serv8444

Modified Files:
      Tag: ZODB3-3_1-branch
	Missing.c 
Log Message:
Backport coercion bug fix.


=== ZODB3/ExtensionClass/src/Missing.c 1.13.12.1 => 1.13.12.2 ===
--- ZODB3/ExtensionClass/src/Missing.c:1.13.12.1	Wed Nov 13 11:34:28 2002
+++ ZODB3/ExtensionClass/src/Missing.c	Fri May  9 16:01:40 2003
@@ -78,12 +78,15 @@
   return 0;
 }
 
+/* XXX Why does this type offer to corece at all? */
 static int
 Missing_coerce(PyObject **pv, PyObject **pw)
 {
-  Py_INCREF(*pv);
-  Py_INCREF(*pw);
-  return 0;
+    if (!(*pw)->ob_type->tp_as_number)
+	return 1;
+    Py_INCREF(*pv);
+    Py_INCREF(*pw);
+    return 0;
 }
 
 static PyObject *
@@ -302,6 +305,9 @@
 Revision Log:
 
   $Log$
+  Revision 1.13.12.2  2003/05/09 20:01:40  jeremy
+  Backport coercion bug fix.
+
   Revision 1.13.12.1  2002/11/13 16:34:28  jeremy
   Backport: Fix includes before Python.h.
 




More information about the Zodb-checkins mailing list