[PATCH] lexer fix for nulls in input stream, second attempt!

Matthias Andree matthias.andree at gmx.de
Sun Oct 20 12:18:20 CEST 2002


On Sun, 20 Oct 2002, Allyn Fratkin wrote:

> the macro part sounded good but i wasn't sure of all of the ramifications
> of "evaluating the stream more than once".  if someone with more experience
> in this area knows exactly what issues this could have and that they are not
> sigificant, feel free to switch from fgetc to getc.

Don't fear the macro in this context. The stream is passed to us as a
pointer, so we have it in a local variable (which is constant in our
function, by the way). This "evaluating the stream more than once" trait
is relevant if the argument you pass may either be expensive to
calculate or have side effects. Neither applies, so getc is fine.



More information about the bogofilter-dev mailing list