[pygobject/py3k] Need to mark class as modified if modify tp_dict directly in 2.6+



commit 896e3a7de626c080e829d73c7b78626d2635a0fd
Author: John Ehresman <jpe wingware com>
Date:   Fri Apr 16 11:52:21 2010 -0400

    Need to mark class as modified if modify tp_dict directly in 2.6+

 gobject/gobjectmodule.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 8fdcd64..790f4e1 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1307,6 +1307,10 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
     if (gsignals)
         PyDict_DelItemString(class->tp_dict, "__gsignals__");
 
+#if PY_VERSION_HEX >= 0x02060000
+    PyType_Modified(class);
+#endif
+
     return 0;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]