def get_class_func(pointer):
     instance = ctypes.cast(pointer, GTypeInstancePtr)
     gtype = PGType(G_TYPE_FROM_INSTANCE(instance.contents))
     pytype = gtype.pytype
     if not pytype:
         raise RuntimeError("Couldn't find python type for %r" % gtype)
     return pytype
Exemplo n.º 2
0
 def test_gtype(self):
     self.assertEqual(PGType(0), PGType(GType(0)))