[PyQt] SIP: how to add a new annotation

Phil Thompson phil at riverbankcomputing.co.uk
Thu Oct 4 17:11:36 BST 2007


On Thursday 04 October 2007, Giovanni Bajo wrote:
> Hello,
>
> I need to implement a new annotation in SIP: /Deprecated/. It would be a
> function/method annotation. When the marked function/method is called, a
> deprecate warning is issued on the console (with or without a full
> Python traceback).
>
> Is that hard to implement, and/or require much work? Any general
> checklist of what need to be coded to implement it?
>
> Thanks!

You'd need to define a new over flag in sip.h, set it in parser.y and test it 
(and generate the necessary code) in gencode.c.

Or you could use the existing PreHook annotation.

Phil


More information about the PyQt mailing list