]> granicus.if.org Git - python/commitdiff
Patch #588561: Cygwin _hotshot patch
authorJason Tishler <jason@tishler.net>
Thu, 8 Aug 2002 19:46:15 +0000 (19:46 +0000)
committerJason Tishler <jason@tishler.net>
Thu, 8 Aug 2002 19:46:15 +0000 (19:46 +0000)
YA Cygwin module patch very similar to other patches
that I have submitted.  I tested under Cygwin and Red
Hat Linux 7.1.

Modules/_hotshot.c

index 625d1ba1cdc383022c74ae6da885d85c9c263dd1..1e8f4f9f419a186388e84d8a03912dfd52ef8ab1 100644 (file)
@@ -1248,7 +1248,7 @@ static PyTypeObject ProfilerType = {
     0,                                 /* tp_hash              */
     0,                                 /* tp_call              */
     0,                                 /* tp_str               */
-    PyObject_GenericGetAttr,           /* tp_getattro          */
+    0,                                 /* tp_getattro          */
     0,                                 /* tp_setattro          */
     0,                                 /* tp_as_buffer         */
     Py_TPFLAGS_DEFAULT,                        /* tp_flags             */
@@ -1333,7 +1333,7 @@ static PyTypeObject LogReaderType = {
     0,                                 /* tp_hash              */
     0,                                 /* tp_call              */
     0,                                 /* tp_str               */
-    PyObject_GenericGetAttr,           /* tp_getattro          */
+    0,                                 /* tp_getattro          */
     0,                                 /* tp_setattro          */
     0,                                 /* tp_as_buffer         */
     Py_TPFLAGS_DEFAULT,                        /* tp_flags             */
@@ -1624,7 +1624,9 @@ init_hotshot(void)
     PyObject *module;
 
     LogReaderType.ob_type = &PyType_Type;
+    LogReaderType.tp_getattro = PyObject_GenericGetAttr;
     ProfilerType.ob_type = &PyType_Type;
+    ProfilerType.tp_getattro = PyObject_GenericGetAttr;
     module = Py_InitModule("_hotshot", functions);
     if (module != NULL) {
         char *s = get_version_string();