[Zope-Checkins] CVS: Zope3/lib/python/Zope/ContextWrapper - proxy.c:1.1.2.3 wrapper.c:1.12.2.12.12.2

Fred L. Drake, Jr. fdrake@acm.org
Fri, 26 Apr 2002 09:51:09 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/ContextWrapper
In directory cvs.zope.org:/tmp/cvs-serv19672/lib/python/Zope/ContextWrapper

Modified Files:
      Tag: SecurityProxy-branch
	proxy.c wrapper.c 
Log Message:
Remove a redundant "optimization" from the Proxy_Check() macro -- the
PyObject_TypeCheck() macro already contains the same optimization.


=== Zope3/lib/python/Zope/ContextWrapper/proxy.c 1.1.2.2 => 1.1.2.3 ===
 staticforward PyTypeObject ProxyType;
 
-#define Proxy_Check(wrapper) \
-        (((wrapper)->ob_type == &ProxyType) \
-         || (PyObject_TypeCheck(wrapper, &ProxyType)))
+#define Proxy_Check(wrapper)   (PyObject_TypeCheck((wrapper), &ProxyType))
 
 static PyObject *
 empty_tuple = NULL;


=== Zope3/lib/python/Zope/ContextWrapper/wrapper.c 1.12.2.12.12.1 => 1.12.2.12.12.2 ===
 #include "wrapper.h"
 
-#define Wrapper_Check(wrapper) \
-        (((wrapper)->ob_type == &WrapperType) \
-         || (PyObject_TypeCheck(wrapper, &WrapperType)))
+#define Wrapper_Check(wrapper)   (PyObject_TypeCheck(wrapper, &WrapperType))
 
 #define Wrapper_GetObject(wrapper) Proxy_GET_OBJECT((wrapper))