[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspell-devel] Possible bug in new_filer.cpp
From: |
Peter Kümmel |
Subject: |
Re: [aspell-devel] Possible bug in new_filer.cpp |
Date: |
Mon, 12 Jun 2006 18:46:33 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Gary Setter wrote:
> ----- Original Message -----
> From: "Peter Kümmel" <address@hidden>
> To: <address@hidden>
> Sent: Sunday, June 11, 2006 6:03 AM
> Subject: [aspell-devel] Possible bug in new_filer.cpp
>
>
>> While compiling aspell I get warnings in new_filter.cpp.
>>
>> Is the assignment in the if() really by design or is it
>> a typo and copy&paste error?
>>
>> When it should really be an assignment, why not move it
>> into the code block?
>> Just an idea.
>>
>> Peter
> <snip>
> Hi Peter,
> No, it is not a typo. The code only assigns ifilter if the its
> prerequisites are met. Also, the test is not for equality, but
> for a null result. As an exercise, you could try eliminating the
> warning by moving this code
> RET_ON_ERR_SET(ifilter->setup(config), bool, keep);
> ifilter->handle = filter_handle.release();
> if (!keep) {
> ifilter.del();
> } else {
> filter.add_filter(ifilter.release());
> }
> and this code
> RET_ON_ERR_SET(ifilter->setup(config), bool, keep);
> ifilter->handle = filter_handle.release();
> if (!keep) {
> ifilter.del();
> } else {
> filter.add_filter(ifilter.release());
> }
> and this code
> RET_ON_ERR_SET(ifilter->setup(config), bool, keep);
> ifilter->handle = encoder_handle.release();
> if (!keep) {
> ifilter.del();
> } else {
> filter.add_filter(ifilter.release());
> }
> }
>
> into a function which takes as parameters f->decoder(),
> decoder_handle vs f->filter(), filter_handle vs f->encoder(),
> encoder_handle. ifilter could be local to that function, I
> suspect.
Thanks for the explanation, and sorry for have questioned
the correctness of the aspell code, but this has looked
so like C that I've wondered about...
> I'm not in the loop, but did you submit your changes to the
> sourceforge project?
No, I've only subscribed to the list.
> Kevin,
> Are we close to closing down the win-32 port ghetto and making
> aspell and Linux/windows application?
> Best regards,
> Gary
That would be fine, we use aspell in LyX and it would be much
more comfortable not to host there the make files.
Peter