]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #15721: apply PEP 384 Refactoring to tkinter module.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 30 Oct 2012 20:49:16 +0000 (22:49 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 30 Oct 2012 20:49:16 +0000 (22:49 +0200)
Modules/_tkinter.c

index 84724392d3e0e303e7fb4d2d37de3283f376f443..bb689fc3541ebba83f19b3b1ee3d2f4eb0c02572 100644 (file)
@@ -794,7 +794,7 @@ static PyType_Slot PyTclObject_Type_slots[] = {
     {Py_tp_dealloc, (destructor)PyTclObject_dealloc},
     {Py_tp_repr, (reprfunc)PyTclObject_repr},
     {Py_tp_str, (reprfunc)PyTclObject_str},
-    {Py_tp_getattro, NULL},
+    {Py_tp_getattro, PyObject_GenericGetAttr},
     {Py_tp_richcompare, PyTclObject_richcompare},
     {Py_tp_getset, PyTclObject_getsetlist},
     {0, 0}
@@ -2831,11 +2831,6 @@ PyInit__tkinter(void)
 {
   PyObject *m, *uexe, *cexe, *o;
 
-    /* Due to cross platform compiler issues the slots must be filled
-     * here. It's required for portability to Windows without requiring
-     * C++. See xxxlimited.c*/
-    PyTclObject_Type_slots[3].pfunc = PyObject_GenericGetAttr;
-
 #ifdef WITH_THREAD
     tcl_lock = PyThread_allocate_lock();
     if (tcl_lock == NULL)