Hello

This may sound like a really stupid question, but I can't find proper documentation/examples online:

I'm using SIP for my C++ - Python bindings. My C++ class has 2 functions with the same name.

----------------------------------------------------------
The C++ class:

class MyHasher
{
public:

    enum HashAlgorithm
    {
        Md4,
        Md5,
        Sha1
    };

    MyHasher();
    QString getFileHash(QString data, HashAlgorithm hash = Md5);
QString getFileHash(QString data, HashAlgorithm hash = Md5, int numberOfBytes = 2048);
};
----------------------------------------------------------

The sip file:

class MyHasher
{

%TypeHeaderCode
#include <myhasher.h>
%End

public:

    enum HashAlgorithm
    {
        Md4,
        Md5,
        Sha1
    };

    MyHasher();
    QString getFileHash(QString data, HashAlgorithm hash = Md5);
QString getFileHash(QString data, HashAlgorithm hash = Md5, int numberOfBytes = 2048);
};
----------------------------------------------------------



When I compile it, I'm getting the error:
sip: MyHasher::getFileHash() has overloaded functions with the same Python signature

When I remove one of the getFileHash functions, everything is working fine, but the problem seems to be with 2 functions with the same name at the same time.

How can I correct this in SIP?

Thank you!!
Christoph

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

Reply via email to