[PyQt] SIP sytax error

Vivek Narvekar Vivek.Narvekar at mscsoftware.com
Tue Jul 19 08:05:44 BST 2011


Hello,

 

I am badly stuck up with some SIP syntax. Please help.

I am trying to upgrade SIP files, which were originally written for SIP
version 3.3, to a newer version SIP 4.7.9

 

1)       I have a class member function, written in one of the SIP file,
which looks as below.

double* GetIcValues(); 

%MemberCode

           int i;

         int num;

           double *XIC=0;

           PyObject *XList=PyList_New(0);

           ------

            //Some code

           ------

           

         return XList;  

%End

 

 

Here, first thing that I did was, replace %MemberCode With %MethodCode.
Hope that this is correct.

Then, it gives me an error for return type as follows.

unsupported function return type - provide %MethodCode and a C++
signature.

It seems like, returning pointer is not allowed in newer version of SIP.
What should be done to get rid of this error ?

 

 

2)  If a function takes a argument as void (eg double* AFunc(void); ) it
gives following error. 

unsupported function argument type - provide %Method code and a valid
C++ signature

 

 

 

 

3)      Also, constructors are not working properly eg. If I have a
constructor as follows, then,

     class AcGSE 

    {

      public:

            AcGSE(const int, const double* );

       %MethodCode

         int nRows;

         PyObject *dList;

       ----------

      //some more code

      ----------

      %End

 

     }

It gives following error.

unsupported ctor argument type - provide %MethodCode and a C++ signature

 

 

 

 

I'll be really thankful, If I get any help on this.

 

Thak You

Regards

Vivek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110719/2148e755/attachment-0001.html>


More information about the PyQt mailing list