[pcre-dev] Please explain your pcre code

Góra strony
Delete this message
Autor: blueboar_2
Data:  
Dla: pcre-dev
Temat: [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?

--