[pcre-dev] Please explain your pcre code

Etusivu
Poista viesti
Lähettäjä: blueboar_2
Päiväys:  
Vastaanottaja: pcre-dev
Aihe: [pcre-dev] Please explain your pcre code
I'll read your pcre code, and in compile.c found this:

switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
{
case 0:
case PCRE_BSR_ANYCRLF:
case PCRE_BSR_UNICODE:
break;
default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
}

Why so big?
Can't it be simply

if options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE) =
PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE then ... error

And no so much switch and cases?

--