On Thu, 17 Feb 2011 12:36:25 -0800, Nate Reid <[email protected]> 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    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to