On 31/12/2007, Nindi Singh <ni...@ya...> wrote:
>
>
> ----- Original Message ----
> > From: Roman Yakovenko <rom...@gm...>
> > To: Nindi Singh <ni...@ya...>
> > Cc: pyg...@li...
> > Sent: Monday, 31 December, 2007 7:45:09 PM
> > Subject: Re: [pygccxml-development] pygccxml: UserWarning: unableto find
> outarray size from expression
> >
> > On Dec 31, 2007 9:22 PM, Nindi Singh wrote:
> > > I have a build of gccxml from cvs which I have checked out
> > on
> >
> 29/12/2007.
> > > I am using python2.5
> > > pygccxml 0.9.0
> > >
> > > When I run my pygccxml script I continue to get the the
> > following
> >
> warninngs
> >
> > I don't recommend you to mix gccxml cvs and pygccxml 0.9. It is not a
> > good idea. I remember I fixed the code in few places.
> >
> > I suggest you to use SVN version of pygccxml. The SVN is in a good
> > shape and I mean to release it soon. I have to update the
> > documentation first.
> >
> > --
> > Roman Yakovenko
> > C++ Python language binding
> > http://www.language-binding.net/
> >
>
> It actually seems to work, but on the other hand I cannot say that I
> have really stressed it. I will however checkout the SVN tree.
> N
>
I'm actually seeing this with pygccxml svn version:
/usr/local/lib/python2.5/site-packages/pygccxml/parser/scanner.py:335:
UserWarning: unable to find out array size from expression ""
It is triggered by something as simple as:
class Something{
[...]
static void Parse (int argc, char *argv[]);
};
The relevant source code is:
def __read_array_type( self, attrs ):
type_ = attrs[ XML_AN_TYPE ]
size = self.__guess_int_value( attrs.get(XML_AN_MAX, '' ) )
if size is None:
size = array_t.SIZE_UNKNOWN
msg = 'unable to find out array size from expression "%s"' %
attrs[ XML_AN_MAX ]
warnings.warn( msg )
return array_t( type_, size + 1 )
In this case attrs is:
{'max': '', 'align': '64', 'type': '_1769', 'id': '_2010', 'min': '0'}
I don't know how to fix, but I hope this helps.
Cheers, and Happy New Year! :-)
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
|