[pybank] Set __gtype__ in wrapper classes



commit 199710d20348a68618ceccc784e9fe2b79c27727
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date:   Wed May 13 12:57:34 2009 +0200

    Set __gtype__ in wrapper classes
---
 bank/module.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bank/module.py b/bank/module.py
index 65deea1..10cad0c 100644
--- a/bank/module.py
+++ b/bank/module.py
@@ -142,6 +142,7 @@ class DynamicModule(object):
         parent = self._get_parent_for_object(object_info)
         klass = buildType(object_info, (parent,))
         if gtype is not None:
+            klass.__gtype__ = gtype
             gtype.pytype = klass
         self.__dict__[name] = klass
 
@@ -214,6 +215,7 @@ class DynamicModule(object):
 
         klass = buildType(boxed_info, bases)
         if gtype is not None:
+            klass.__gtype__ = gtype
             gtype.pytype = klass
         self.__dict__[name] = klass
 



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