>> First, thanks for the great py++/pygccxml packages. I'm pretty new to
>> it, so please forgive my newbieness...
>>
>> I'll soon be using Py++ for the binding of a large c++ library, and
>> I'm trying to detect and automatize as much as possible the binding.
>>
>> One thing I could not figure out is a way to detect that a function
>> has an array passed as one of its arguments. The type of the argument
>> is a pointer to some type, but there's no mention to the fact that
>> it's an array, or to the size of this array.
>> I did some tests with pygccxml and got the same result: only the fact
>> that the argument is a pointer can be extracted.
>>
>> So it's up to the user to manually add the input_static_array
>> transformation with the correct size, which I'd like to avoid.
>> Is there a simple way to do this?
>
> Yes and no. Obviously you can't extract this information from function
> definition, but may be you can use the following information:
> * coding convention
> * documentation/comments
> * naming convention
Mmm ok this is what I thought. Not easy though to use coding/naming
conventions to suggest an array type and the size.
Of course documentation/comments can help, as long as they are
followed by other developers and maintained...
>
> You can "re-parse" the source code and extract it.
Not easy to do by hand. It would mean re-implement parts of gccxml...
getting the source file and line number from gccxml would help for
sure, instead of re-parsing the entire source tree...
Anyway, if I really need this problem addressed I'll try to figure out
the best solution.
As I said, I'm currently trying to get an overview of the package,
so..wait and see...
Thanks for the quick answer!
I'm going back to my learning of the package...
Ben
|