]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove unused global variable, and remove unneeded COMError.__str__
authorThomas Heller <theller@ctypes.org>
Tue, 27 Nov 2007 12:22:11 +0000 (12:22 +0000)
committerThomas Heller <theller@ctypes.org>
Tue, 27 Nov 2007 12:22:11 +0000 (12:22 +0000)
implementation in C.

Modules/_ctypes/_ctypes.c

index 3b2c72a4ed4d4d2a07d318eaf44116d837e161ff..d564fb93aa8435e203b6c7ae724ed31e1ab9a881 100644 (file)
@@ -4751,18 +4751,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)
 {
@@ -4795,13 +4783,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)
 {