[Baypiggies] C++ parsing in Python for testing backward compatibility

Benjamin Sergeant bsergean at gmail.com
Fri Feb 29 18:32:53 CET 2008

On Thu, Feb 28, 2008 at 9:59 PM, Drew Perttula <drewp at bigasterisk.com> wrote:
> William Deegan wrote:
>  > Not necessarily a python solution, but..
>  > Can you use cppunit to craft the suite of tests?
>  > Also I think boost has a c++ parser, and there's a python layer for boost.
>  > (Though I'm not sure it hooks into the boost c++ parser).
>  >
>  Another one that might help is synopsis:
>    http://synopsis.fresco.org/
>  I looked into GCC-XML at one point, but I think it only does prototypes.
>  I wanted the whole parse tree, so I could look for where people called
>  functions, a la cscope. Ideally, I'd have a python interface to the
>  cscope database :)
> _______________________________________________
>  Baypiggies mailing list
>  Baypiggies at python.org
>  To change your subscription options or unsubscribe:
>  http://mail.python.org/mailman/listinfo/baypiggies

I think Qt uses a method that prevent backward compatibility breaking,
by having
two interfaces for each class. One is the public one that do not
change, and that contains a pointer to the private one, where changes
goes on. I think this is a well known technique but I cannot find any
reference on the web about it. Their code is open source so you might
have a look at it. Another technique is to use C wrapper that does
stuff with your C++ objects but you lose the power of C++...


More information about the Baypiggies mailing list