[pcre-dev] Please explain your pcre code

Top Page
Delete this message
Author: blueboar_2
Date:  
To: pcre-dev
Subject: [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?

--