diff options
-rw-r--r-- | gi/module.py | 8 | ||||
-rw-r--r-- | gi/types.py | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gi/module.py b/gi/module.py index 0032774a..8c25fd70 100644 --- a/gi/module.py +++ b/gi/module.py @@ -57,7 +57,7 @@ from ._gi import \ flags_register_new_gtype_and_add, \ _gobject from .types import \ - GIObjectMeta, \ + GObjectMeta, \ StructMeta GInterface = _gobject.GInterface @@ -183,13 +183,13 @@ class IntrospectionModule(object): interfaces = tuple(interface for interface in get_interfaces_for_object(info) if not issubclass(parent, interface)) bases = (parent,) + interfaces - metaclass = GIObjectMeta + metaclass = GObjectMeta elif isinstance(info, CallbackInfo): bases = (CCallback,) - metaclass = GIObjectMeta + metaclass = GObjectMeta elif isinstance(info, InterfaceInfo): bases = (GInterface,) - metaclass = GIObjectMeta + metaclass = GObjectMeta elif isinstance(info, (StructInfo, UnionInfo)): if g_type.is_a(TYPE_BOXED): bases = (Boxed,) diff --git a/gi/types.py b/gi/types.py index 0ccfe27e..4f0d76ed 100644 --- a/gi/types.py +++ b/gi/types.py @@ -173,7 +173,7 @@ def find_vfunc_conflict_in_bases(vfunc, bases): return None -class GObjectMeta(type): +class _GObjectMetaBase(type): "Metaclass for automatically registering GObject classes" def __init__(cls, name, bases, dict_): type.__init__(cls, name, bases, dict_) @@ -193,19 +193,19 @@ class GObjectMeta(type): _gobject.type_register(cls, namespace.get('__gtype_name__')) -_gobject._install_metaclass(GObjectMeta) +_gobject._install_metaclass(_GObjectMetaBase) -class GIObjectMeta(GObjectMeta, MetaClassHelper): +class GObjectMeta(_GObjectMetaBase, MetaClassHelper): def __init__(cls, name, bases, dict_): - super(GIObjectMeta, cls).__init__(name, bases, dict_) + super(GObjectMeta, cls).__init__(name, bases, dict_) is_gi_defined = False if cls.__module__ == 'gi.repository.' + cls.__info__.get_namespace(): is_gi_defined = True is_python_defined = False - if not is_gi_defined and cls.__module__ != GIObjectMeta.__module__: + if not is_gi_defined and cls.__module__ != GObjectMeta.__module__: is_python_defined = True if is_python_defined: |