From: Noel O'B. <bao...@gm...> - 2013-02-09 08:55:06
|
I've never heard of calling a Python library from C++, but sounds very interesting. Regarding the API change, that will need a cclib 2.0. I have no particular objection to this if necessary but you should probably check this into a branch while I get out this release. Unless there's a way to support the existing behaviour while adding the new one. - Noel On 9 February 2013 07:32, Adam Tenderholt <ate...@gm...> wrote: > Hi all, > > I've been thinking about how to make cclib a bit more friendly towards > non-Python developers/users. Specifically, those that wish to incorporate > cclib into their existing C/C++/Obj-C codebases, but don't want to deal with > getting into too much of the mess that is the Python C-API or have the > overhead of Boost (which is C++) or others. I propose creating a handful of > C functions that handle most of the nitty-gritty of this. > > For instance, I envision a simple #include "cclib.h" with functions like > getParserModule() and ccopen(), to return the cclib.parser module and a > logfileparser object. I've already begun the implementation of these > functions. There may still need to be some calls to the Python C-API, but > this bridge should be as simple as possible. Seem reasonable? Or have a > better suggestion? > > Also, related to this is a minor required change to the progress part of > logfileparser API. Since I want this to be rooted in C, it should not be > dependent on classes. So instead of passing a progress object to the > initializer, a callback function should be passed. I've already made these > changes (uncommitted to SVN though) and updated the TextProgress and > Qt4Progress classes by passing their update functions to the logfileparser. > > Cheers, > > Adam > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > cclib-devel mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-devel > |