diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2010-03-29 11:58:06 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2010-03-29 11:58:06 +0000 |
commit | e99039d69269445ea7a786cff6086a314d301da0 (patch) | |
tree | 04b7edc990884d8372aad1eb8f64955f5509fe93 /ext/pcre/pcrelib/pcre_printint.src | |
parent | 3e58dee19a68170b7dcda7590720f9f4ef55f999 (diff) | |
download | php-git-e99039d69269445ea7a786cff6086a314d301da0.tar.gz |
Upgraded bundled PCRE to version 8.02.
Diffstat (limited to 'ext/pcre/pcrelib/pcre_printint.src')
-rw-r--r-- | ext/pcre/pcrelib/pcre_printint.src | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pcre/pcrelib/pcre_printint.src b/ext/pcre/pcrelib/pcre_printint.src index 9b2def1c86..86b02b5ca4 100644 --- a/ext/pcre/pcrelib/pcre_printint.src +++ b/ext/pcre/pcrelib/pcre_printint.src @@ -190,6 +190,25 @@ for(;;) switch(*code) { +/* ========================================================================== */ + /* These cases are never obeyed. This is a fudge that causes a compile- + time error if the vectors OP_names or _pcre_OP_lengths, which are indexed + by opcode, are not the correct length. It seems to be the only way to do + such a check at compile time, as the sizeof() operator does not work in + the C preprocessor. We do this while compiling pcretest, because that + #includes pcre_tables.c, which holds _pcre_OP_lengths. We can't do this + when building pcre_compile.c with PCRE_DEBUG set, because it doesn't then + know the size of _pcre_OP_lengths. */ + +#ifdef COMPILING_PCRETEST + case OP_TABLE_LENGTH: + case OP_TABLE_LENGTH + + ((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) && + (sizeof(_pcre_OP_lengths) == OP_TABLE_LENGTH)): + break; +#endif +/* ========================================================================== */ + case OP_END: fprintf(f, " %s\n", OP_names[*code]); fprintf(f, "------------------------------------------------------------------\n"); |