summaryrefslogtreecommitdiffstats
path: root/gi/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'gi/types.py')
-rw-r--r--gi/types.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gi/types.py b/gi/types.py
index e4d7c5f..b7061bd 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -126,3 +126,9 @@ class StructMeta(type, MetaClassHelper):
cls._setup_methods()
cls._setup_constructors()
+
+def override(type_):
+ g_type = type_.__info__.get_g_type()
+ if g_type != gobject.TYPE_INVALID:
+ g_type.pytype = type_
+ return type_