[Python-checkins] r59190 - python/trunk/Modules/_ctypes/_ctypes.c

thomas.heller python-checkins at python.org
Tue Nov 27 13:22:11 CET 2007


Author: thomas.heller
Date: Tue Nov 27 13:22:11 2007
New Revision: 59190

Modified:
   python/trunk/Modules/_ctypes/_ctypes.c
Log:
Remove unused global variable, and remove unneeded COMError.__str__
implementation in C.


Modified: python/trunk/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/trunk/Modules/_ctypes/_ctypes.c	(original)
+++ python/trunk/Modules/_ctypes/_ctypes.c	Tue Nov 27 13:22:11 2007
@@ -4752,18 +4752,6 @@
 static char comerror_doc[] = "Raised when a COM method call failed.";
 
 static PyObject *
-comerror_str(PyObject *ignored, PyObject *self)
-{
-	PyObject *args = PyObject_GetAttrString(self, "args");
-	PyObject *result;
-	if (args == NULL)
-		return NULL;
-	result = PyObject_Str(args);
-	Py_DECREF(args);
-	return result;
-}
-
-static PyObject *
 comerror_init(PyObject *self, PyObject *args)
 {
     PyObject *hresult, *text, *details;
@@ -4795,13 +4783,10 @@
 }
 
 static PyMethodDef comerror_methods[] = {
-	{ "__str__", comerror_str, METH_O },
 	{ "__init__", comerror_init, METH_VARARGS },
 	{ NULL, NULL },
 };
 
-PyObject *COMError;
-
 static int
 create_comerror(void)
 {


More information about the Python-checkins mailing list