lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <va...@apache.org>
Subject Re: issue with automatic iterable detection?
Date Mon, 07 Mar 2011 19:46:41 GMT

On Mon, 7 Mar 2011, Bill Janssen wrote:

> Andi Vajda <vajda@apache.org> wrote:
>
>>
>> On Thu, 3 Mar 2011, Andi Vajda wrote:
>>
>>>
>>> On Mar 3, 2011, at 22:09, Bill Janssen <janssen@parc.com> wrote:
>>>
>>>> Here's one of the generated lines that's causing me grief.
>>>>
>>>>    DECLARE_TYPE(RankIterator, t_RankIterator, ::java::lang::Object, RankIterator,
t_RankIterator_init_, PyObject_SelfIter, ((PyObject *(*)(t_RankIterator *)) get_next<t_RankIterator,t_JArray<
jint >,JArray< jint >>),
>>>
>>> Ah yes, that's invalid c++. Nested generics need to insert a space between '>'.
Otherwise, the c++ parser gets it as the bit shifting operator, believe it or not. Should
be easy enough to fix in jcc.
>>
>> Fixed in trunk/branch_3x rev 1077828.
>
> Yeah, but not for me.  After installing the latest JCC, I get this:

So you found not one bug but two. The first one (about >>) is fixed, as you 
can see in the new error message.

> build/_PPD/__wrap03__.cpp:15149: error: ?t_JArray? was not declared in this scope
> build/_PPD/__wrap03__.cpp:15149: error: parse error in template argument list
> build/_PPD/__wrap03__.cpp:15149: error: insufficient contextual information to determine
type
> build/_PPD/__wrap03__.cpp:15149: error: expected primary-expression before ?>? token
> build/_PPD/__wrap03__.cpp:15149: error: expected primary-expression before ?)? token
> build/_PPD/__wrap03__.cpp:15149: error: too many initializers for ?PyTypeObject?
>
> And the line it's complaining about is now:
>
>                DECLARE_TYPE(RankIterator, t_RankIterator, ::java::lang::Object, RankIterator,
t_RankIterator_init_, PyObject_SelfIter, ((PyObject *(*)(t_RankIterator *)) get_next< t_RankIterator,t_JArray<
jint >,JArray< jint > >), t_RankIterator__fields_, 0, 0);
>
>>>> Where does t_JArray get defined?  I can't find it.

I'm not sure there is one. If you can provide me with a piece of Java to 
reproduce this, I can fix it faster.

Andi..

Mime
View raw message