SIP translation of unsigned char array of size 1 in struct

Phil Thompson phil at riverbankcomputing.com
Wed Feb 17 13:10:40 GMT 2021


On 17/02/2021 12:53, Marian Thomsen wrote:
> Hello,
> 
> I have difficulties translating this type of array inside a struct. It
> is the destination of a memcopy operation.
> 
> struct Test {
>     unsigned char data[1];
> 
>     ...
> 
>     Test();
>     Test( ... );
> };
> 
> Unfortunately I cannot touch the c++ headerfile.
> 
> What would be a good approach?
> 
> Thank you in advance!
> 
> M.T.

SIP doesn't (yet) support fixed size arrays. However in this particular 
case just use 'unsigned char data'.

Phil


More information about the PyQt mailing list