~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to ext/pcre/php_pcre.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
   +----------------------------------------------------------------------+
17
17
 */
18
18
 
19
 
/* $Id: php_pcre.c 293036 2010-01-03 09:23:27Z sebastian $ */
 
19
/* $Id: php_pcre.c 305133 2010-11-06 18:35:38Z felipe $ */
20
20
 
21
21
#include "php.h"
22
22
#include "php_ini.h"
350
350
                        case 'S':       do_study  = 1;                                  break;
351
351
                        case 'U':       coptions |= PCRE_UNGREEDY;              break;
352
352
                        case 'X':       coptions |= PCRE_EXTRA;                 break;
353
 
                        case 'u':       coptions |= PCRE_UTF8;                  break;
 
353
                        case 'u':       coptions |= PCRE_UTF8;
 
354
        /* In  PCRE,  by  default, \d, \D, \s, \S, \w, and \W recognize only ASCII
 
355
       characters, even in UTF-8 mode. However, this can be changed by setting
 
356
       the PCRE_UCP option. */
 
357
#ifdef PCRE_UCP
 
358
                                                coptions |= PCRE_UCP;
 
359
#endif                  
 
360
                                break;
354
361
 
355
362
                        /* Custom preg options */
356
363
                        case 'e':       poptions |= PREG_REPLACE_EVAL;  break;
747
754
        efree(offsets);
748
755
        efree(subpat_names);
749
756
 
750
 
        RETVAL_LONG(matched);
 
757
        /* Did we encounter an error? */
 
758
        if (PCRE_G(error_code) == PHP_PCRE_NO_ERROR) {
 
759
                RETVAL_LONG(matched);
 
760
        } else {
 
761
                RETVAL_FALSE;
 
762
        }
751
763
}
752
764
/* }}} */
753
765