Hi,

I seem to have noticed a bug in sip concerning function overloads that occur 
because of inheritance:

I have a C++ project in which I have classes like this (I used this actual toy 
example to reproduce the problem):

  class A
  {
      public:
          void do_sth(DummyA&);
  };

  class B : public A
  {
      public:
          void do_sth(DummyB&);
  };

The sip wrapper code is also straight forward:

  class A
  {
  %TypeHeaderCode
      #include "bla.h"
  %End
      public:
          void do_sth(DummyA&);
  };

  class B : A 
  {
  %TypeHeaderCode
      #include "bla.h"
  %End
      public:
          void do_sth(DummyB&);
  };

In C++ it is now possible to call do_sth on class B with both: DummyA and 
DummyB due to function overloading. In the generated sip wrapper however 
calling do_sth on an object of type B with an object of type DummyA causes the 
following error:
        "TypeError: B.do_sth(): argument 1 has unexpected type 'DummyA'"
Note that regular overloading, so if both do_sth() methods were defined and 
wrapped in class B, works just fine. It seems to me as if sip does not 
propagate information about function overloads down the inheritance tree.

Am I doing something wrong or is this indeed a bug/limitation in sip?

Greetings,
Daniel

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to