]> granicus.if.org Git - python/commitdiff
Merged revisions 59187-59192 via svnmerge from
authorChristian Heimes <christian@cheimes.de>
Tue, 27 Nov 2007 13:09:25 +0000 (13:09 +0000)
committerChristian Heimes <christian@cheimes.de>
Tue, 27 Nov 2007 13:09:25 +0000 (13:09 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59190 | thomas.heller | 2007-11-27 13:22:11 +0100 (Tue, 27 Nov 2007) | 3 lines

  Remove unused global variable, and remove unneeded COMError.__str__
  implementation in C.
........

Modules/_ctypes/_ctypes.c

index cf0cb9a62e4d2738759351703f8318857ea0f780..85687c426b3ce95885b7a036b87d5e1398f5bcbe 100644 (file)
@@ -4559,18 +4559,6 @@ static char *module_docs =
 
 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)
 {
@@ -4603,13 +4591,10 @@ comerror_init(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef comerror_methods[] = {
-       { "__str__", comerror_str, METH_O },
        { "__init__", comerror_init, METH_VARARGS },
        { NULL, NULL },
 };
 
-PyObject *COMError;
-
 static int
 create_comerror(void)
 {