[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: How to detect C Function block using python

Gabriel Genellina

3/9/2010 8:56:00 PM

En Tue, 09 Mar 2010 04:51:57 -0300, Faheem <faheem_imt@yahoo.com> escribió:

> I'm new in this community. I am writing a static analyzer for validating
> C Code using python and for that I'm looking for a python module/API
> that will detect Function block of a given C-File. I know simple
> function can be detected using push "{" and poping it if character "}"
> is found. This solution is actually done already, I want a robust API
> that can do more then that like detecting Function name parameters its
> return types etc.

Take a look at ctypeslib [1]; it uses gccxml [2] to parse .h header files
and generate equivalent Python declarations.

[1] http://svn.python.org/view/ctypes/trunk/...
[2] http://www.g...

--
Gabriel Genellina