[pcre-dev] Please explain your pcre code

Pàgina inicial
Delete this message
Autor: blueboar_2
Data:  
A: pcre-dev
Assumpte: [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?

--