[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Making typedef available in python module with SIP
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2021-04-12 10:01:36
Message-ID: a9bd1bf4b1cf399d3faf4a91fa7c6dd0 () riverbankcomputing ! com
[Download RAW message or body]
On 12/04/2021 10:35, Marian Thomsen wrote:
> Hello,
>
> how can I make a typedef available in python module with SIP?
>
> I imagine it is simple but I cannot find a way to access test2 from my
> python module. Renaming it using /PyName=test2/ in test1 would be
> possible but is not what I want because I couldn't access test1
> anymore.
>
> The following code is in my c++ header file:
>
> struct test1 : public other_struct {
> ...
> };
>
> typedef test1 test2;
>
> I can access test1, but how to wrap test2 that I can use test1 and
> test2 in Python I do not know.
>
> (I get: AttributeError: module 'test' has noc attribute 'test2')
Handle it in Python code by putting...
test2 = test1
...somewhere convenient.
Phil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic