[C++-sig] Exported class as mixin

Gennadiy Rozental rogeeff at gmail.com
Sat Apr 11 01:59:36 CEST 2009


Hi,

I've got exported class:

class_<MyInterface>( "MyInterface" )
   ...

And I've got class in Python:

class ABC(object):
  ...

I am doing some processing of the class definition in Python and want to be able
to do the following (clazz here is ABC:

clazz.__bases__ = (MyInterface,) + clazz.__bases__

I am getting following error:

TypeError: __bases__ assignment: 'MyInterface' deallocator differs from 'object'

I can add mixins defined in Python fine. Only mixins exported from C++ giving me
a problem.

Any advise?

Gennadiy



More information about the Cplusplus-sig mailing list