[PyQt] Arrays in SIP

Shaheed Haque srhaque at theiet.org
Sat Sep 2 03:29:29 BST 2017


Hi,

Can I just check my understanding of simple arrays in SIP? Given the
following C++

===========
enum E
{
    A,
    B
};

static const E e[] = { A, A, B, B };
===========

I think that the best SIP I can come up with is:

===========
%Module(name=foo)

enum E
{
    A,
    B
};

const E *e /NoSetter/;
===========

(I also tried SIP_PYBUFFER etc.) But of course, that needs %GetCode,
and %GetCode is not allowed outside class scope. Are *any* arrays
possible outside class scope?

Thanks, Shaheed


More information about the PyQt mailing list