[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Problem with sip.h redefining the 'ANY' symbol
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2011-02-22 15:41:55
Message-ID: 408e138351aef13170468b7ded778504 () localhost
[Download RAW message or body]
On Thu, 17 Feb 2011 12:36:25 -0800, Nate Reid <gnatty7@hotmail.com> wrote:
> In some bindings I'm working with, one of the header files that is
> included after sip.h has an enum who one of its values is called 'ANY'.
> However, when sip is run, it includes its headers first and then
redefines
> ANY before the wrapped source defines it in the enum, causing a
compilation
> error.
> Why does SIP need to do this, and if so, is there a workaround that
> doesn't involve editing the underlying C++ headers that are being
included.
> Consider them from a non-modifyable third party library.
>
> siplib/sip.h
> 189:#if !defined(ANY)
> 190:#define ANY void
It's there to provide compatibility for handwritten code that might also
be used with sip v3 and old versions of Python.
I think you can work round it by placing...
%ModuleHeaderCode
#undef ANY
%End
...in one of your .sip files.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic