[PyQt] Arrays in SIP

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


On 2 September 2017 at 03:29, Shaheed Haque <srhaque at theiet.org> wrote:
> 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,

I meant to type SIP_PYLIST here.

> and %GetCode is not allowed outside class scope. Are *any* arrays
> possible outside class scope?
>
> Thanks, Shaheed


More information about the PyQt mailing list