Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3869 invoked from network); 9 Jun 2008 17:54:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2008 17:54:12 -0000 Authentication-Results: pb1.pair.com header.from=steph@phparch.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=steph@phparch.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain phparch.com from 64.99.136.172 cause and error) X-PHP-List-Original-Sender: steph@phparch.com X-Host-Fingerprint: 64.99.136.172 smtprelay-virgin0172.hostedemail.com Linux 2.5 (sometimes 2.4) (4) Received: from [64.99.136.172] ([64.99.136.172:35259] helo=smtprelay-virgin.hostedemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/B6-21959-14E6D484 for ; Mon, 09 Jun 2008 13:54:11 -0400 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay07.hostedemail.com (Postfix) with SMTP id AC1CA10D58B; Mon, 9 Jun 2008 17:54:06 +0000 (UTC) X-SpamScore: 1 Received: from foxbox (host86-143-244-1.range86-143.btcentralplus.com [86.143.244.1]) (Authenticated sender: steph.fox) by omf09.hostedemail.com (Postfix) with ESMTP; Mon, 9 Jun 2008 17:54:03 +0000 (UTC) Message-ID: <014f01c8ca59$ff770770$4401a8c0@foxbox> Reply-To: "Steph Fox" To: "Andrei Zmievski" Cc: "internals" References: <028f01c8c973$32e0bb70$4401a8c0@foxbox> <484BFF5B.8010008@gravitonic.com> <030401c8c97f$a8ec09d0$4401a8c0@foxbox> <484C5533.4000004@gravitonic.com> Date: Mon, 9 Jun 2008 18:55:24 +0100 Organization: php|architect MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_014C_01C8CA62.601788E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-session-marker: 73746570682E666F78 X-Spam-Summary: 2,0,0,44a4746274c4b701,116a4c8c7549ff2f,steph@phparch.com,,RULES_HIT:152:355:379:539:540:541:542:543:567:599:601:973:988:989:1000:1155:1156:1260:1308:1309:1313:1314:1345:1437:1515:1516:1518:1538:1568:1575:1587:1594:1676:1711:1714:1730:1747:1764:1766:1792:2073:2075:2078:2393:2559:2562:2693:2911:3027:3622:3867:3869:3871:3872:3873:3874:4362:4425:4699:5007:6261:7281:7875,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none Subject: Re: [PHP-DEV] Re: Focus on HEAD From: steph@phparch.com ("Steph Fox") ------=_NextPart_000_014C_01C8CA62.601788E0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit Hi all, Andrei doesn't have time to review this lot (covers ext/standard). Could someone please check it for clangers? Thanks, - Steph > > Sure. > > Steph Fox wrote: >> >>> Is there a patch that does that? I'm fine with removing these checks. >> >> If there isn't already, there soon will be :) >> >> Did you want to review it prior to commit? >> >> - Steph >> >> > > ------=_NextPart_000_014C_01C8CA62.601788E0 Content-Type: text/plain; format=flowed; name="unicode_check.standard.txt"; reply-type=response Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="unicode_check.standard.txt" Index: ext/standard/array.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/array.c,v=0A= retrieving revision 1.454=0A= diff -u -r1.454 array.c=0A= --- ext/standard/array.c 2 Jun 2008 11:20:17 -0000 1.454=0A= +++ ext/standard/array.c 9 Jun 2008 10:56:45 -0000=0A= @@ -1314,67 +1314,35 @@=0A= {=0A= Z_UNILEN_P(result) =3D Z_UNILEN_P(prefix) + (add_underscore ? 1 : 0) + = var_name_len;=0A= =0A= - if (UG(unicode)) {=0A= - Z_TYPE_P(result) =3D IS_UNICODE;=0A= - Z_USTRVAL_P(result) =3D eumalloc(Z_USTRLEN_P(result) + 1);=0A= - u_memcpy(Z_USTRVAL_P(result), Z_USTRVAL_P(prefix), = Z_USTRLEN_P(prefix));=0A= -=0A= - if (add_underscore) {=0A= - Z_USTRVAL_P(result)[Z_USTRLEN_P(prefix)] =3D (UChar) 0x5f /*'_'*/;=0A= - }=0A= -=0A= - if (var_name_type =3D=3D IS_UNICODE) {=0A= - u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix) + (add_underscore ? = 1 : 0), var_name.u, var_name_len + 1);=0A= - } else {=0A= - UChar *buf;=0A= - int buf_len;=0A= - UErrorCode status =3D U_ZERO_ERROR;=0A= -=0A= - = zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),=0A= - &buf, &buf_len, var_name.s, var_name_len, &status);=0A= - if (U_FAILURE(status)) {=0A= - zval_dtor(result);=0A= - ZVAL_NULL(result);=0A= - php_error_docref(NULL TSRMLS_CC, E_WARNING, "could not convert = variable name to Unicode string");=0A= - return FAILURE;=0A= - }=0A= - if (buf_len > var_name_len) {=0A= - Z_USTRLEN_P(result) =3D Z_USTRLEN_P(prefix) + (add_underscore ? 1 : = 0) + buf_len;=0A= - Z_USTRVAL_P(result) =3D eurealloc(Z_USTRVAL_P(result), = Z_USTRLEN_P(result) + 1);=0A= - }=0A= - u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix) + (add_underscore ? = 1 : 0), buf, buf_len + 1);=0A= - efree(buf);=0A= - }=0A= + Z_TYPE_P(result) =3D IS_UNICODE;=0A= + Z_USTRVAL_P(result) =3D eumalloc(Z_USTRLEN_P(result) + 1);=0A= + u_memcpy(Z_USTRVAL_P(result), Z_USTRVAL_P(prefix), = Z_USTRLEN_P(prefix));=0A= +=0A= + if (add_underscore) {=0A= + Z_USTRVAL_P(result)[Z_USTRLEN_P(prefix)] =3D (UChar) 0x5f /*'_'*/;=0A= + }=0A= +=0A= + if (var_name_type =3D=3D IS_UNICODE) {=0A= + u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix) + (add_underscore ? = 1 : 0), var_name.u, var_name_len + 1);=0A= } else {=0A= - Z_TYPE_P(result) =3D IS_STRING;=0A= - Z_STRVAL_P(result) =3D emalloc(Z_STRLEN_P(result) + 1);=0A= - memcpy(Z_STRVAL_P(result), Z_STRVAL_P(prefix), Z_STRLEN_P(prefix));=0A= -=0A= - if (add_underscore) {=0A= - Z_STRVAL_P(result)[Z_STRLEN_P(prefix)] =3D '_';=0A= - }=0A= -=0A= - if (var_name_type =3D=3D IS_STRING) {=0A= - memcpy(Z_STRVAL_P(result) + Z_STRLEN_P(prefix) + (add_underscore ? 1 = : 0), var_name.s, var_name_len + 1);=0A= - } else {=0A= - char *buf;=0A= - int buf_len;=0A= - UErrorCode status =3D U_ZERO_ERROR;=0A= -=0A= - = zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), = &buf, &buf_len, var_name.u, var_name_len, &status);=0A= - if (U_FAILURE(status)) {=0A= - zval_dtor(result);=0A= - ZVAL_NULL(result);=0A= - php_error_docref(NULL TSRMLS_CC, E_WARNING, "could not convert = variable name to string");=0A= - return FAILURE;=0A= - }=0A= - if (buf_len > var_name_len) {=0A= - Z_STRLEN_P(result) =3D Z_STRLEN_P(prefix) + (add_underscore ? 1 : = 0) + buf_len;=0A= - Z_STRVAL_P(result) =3D erealloc(Z_STRVAL_P(result), = Z_STRLEN_P(result) + 1);=0A= - }=0A= - memcpy(Z_STRVAL_P(result) + Z_STRLEN_P(prefix) + (add_underscore ? 1 = : 0), buf, buf_len + 1);=0A= - efree(buf);=0A= + UChar *buf;=0A= + int buf_len;=0A= + UErrorCode status =3D U_ZERO_ERROR;=0A= +=0A= + zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),=0A= + &buf, &buf_len, var_name.s, var_name_len, &status);=0A= + if (U_FAILURE(status)) {=0A= + zval_dtor(result);=0A= + ZVAL_NULL(result);=0A= + php_error_docref(NULL TSRMLS_CC, E_WARNING, "could not convert = variable name to Unicode string");=0A= + return FAILURE;=0A= + }=0A= + if (buf_len > var_name_len) {=0A= + Z_USTRLEN_P(result) =3D Z_USTRLEN_P(prefix) + (add_underscore ? 1 : = 0) + buf_len;=0A= + Z_USTRVAL_P(result) =3D eurealloc(Z_USTRVAL_P(result), = Z_USTRLEN_P(result) + 1);=0A= }=0A= + u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix) + (add_underscore ? = 1 : 0), buf, buf_len + 1);=0A= + efree(buf);=0A= }=0A= =0A= return SUCCESS;=0A= @@ -1413,7 +1381,7 @@=0A= }=0A= =0A= if (prefix) {=0A= - convert_to_text(prefix);=0A= + convert_to_unicode(prefix);=0A= if (Z_UNILEN_P(prefix) && !php_valid_var_name(Z_UNIVAL_P(prefix), = Z_UNILEN_P(prefix), Z_TYPE_P(prefix))) {=0A= php_error_docref(NULL TSRMLS_CC, E_WARNING, "prefix is not a valid = identifier");=0A= return;=0A= @@ -1447,7 +1415,7 @@=0A= zval num;=0A= =0A= ZVAL_LONG(&num, num_key);=0A= - convert_to_text(&num);=0A= + convert_to_unicode(&num);=0A= php_prefix_varname(&final_name, prefix, Z_UNIVAL(num), = Z_UNILEN(num), Z_TYPE(num), 1 TSRMLS_CC);=0A= zval_dtor(&num);=0A= } else {=0A= @@ -1503,10 +1471,8 @@=0A= break;=0A= }=0A= =0A= - if (UG(unicode) && Z_TYPE(final_name) =3D=3D IS_STRING) {=0A= + if (Z_TYPE(final_name) =3D=3D IS_STRING) {=0A= convert_to_unicode(&final_name);=0A= - } else if (!UG(unicode) && Z_TYPE(final_name) =3D=3D IS_UNICODE) {=0A= - convert_to_string(&final_name);=0A= }=0A= =0A= if (Z_TYPE(final_name) !=3D IS_NULL && = php_valid_var_name(Z_UNIVAL(final_name), Z_UNILEN(final_name), = Z_TYPE(final_name))) {=0A= @@ -1698,7 +1664,7 @@=0A= if (Z_TYPE_PP(entry) !=3D IS_STRING && Z_TYPE_PP(entry) !=3D = IS_UNICODE) {=0A= key =3D **entry;=0A= zval_copy_ctor(&key);=0A= - convert_to_text(&key);=0A= + convert_to_unicode(&key);=0A= key_ptr =3D &key;=0A= }=0A= =0A= @@ -4563,7 +4529,7 @@=0A= }=0A= RETURN_FALSE;=0A= case IS_NULL:=0A= - if (zend_u_hash_exists(HASH_OF(array), (UG(unicode) ? IS_UNICODE : = IS_STRING), EMPTY_ZSTR, 1)) {=0A= + if (zend_u_hash_exists(HASH_OF(array), IS_UNICODE, EMPTY_ZSTR, 1)) {=0A= RETURN_TRUE;=0A= }=0A= RETURN_FALSE;=0A= @@ -4698,7 +4664,7 @@=0A= if (Z_TYPE_PP(entry_keys) !=3D IS_STRING && Z_TYPE_PP(entry_keys) = !=3D IS_UNICODE) {=0A= key =3D **entry_keys;=0A= zval_copy_ctor(&key);=0A= - convert_to_text(&key);=0A= + convert_to_unicode(&key);=0A= key_ptr =3D &key;=0A= }=0A= =0A= Index: ext/standard/basic_functions.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/basic_functions.c,v=0A= retrieving revision 1.900=0A= diff -u -r1.900 basic_functions.c=0A= --- ext/standard/basic_functions.c 24 May 2008 14:36:16 -0000 1.900=0A= +++ ext/standard/basic_functions.c 9 Jun 2008 11:02:49 -0000=0A= @@ -5162,7 +5162,7 @@=0A= RETURN_FALSE;=0A= }=0A= =0A= - convert_to_text(callback);=0A= + convert_to_unicode(callback);=0A= =0A= if (call_user_function_ex(EG(function_table), &object, callback, = &retval_ptr, n_params, params, 0, NULL TSRMLS_CC) =3D=3D SUCCESS) {=0A= if (retval_ptr) {=0A= @@ -5196,7 +5196,7 @@=0A= RETURN_FALSE;=0A= }=0A= =0A= - convert_to_text(callback);=0A= + convert_to_unicode(callback);=0A= =0A= params_ar =3D HASH_OF(params);=0A= num_elems =3D zend_hash_num_elements(params_ar);=0A= @@ -5603,7 +5603,7 @@=0A= if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|b", &expr, &i) = =3D=3D FAILURE) {=0A= RETURN_FALSE;=0A= }=0A= - convert_to_text_ex(expr);=0A= + convert_to_unicode_ex(expr);=0A= =0A= if (i) {=0A= php_output_start_default(TSRMLS_C);=0A= @@ -5862,15 +5862,14 @@=0A= }=0A= =0A= /* We always want to convert IS_UNICODE to UTF-8 and pass to INI = subsystem.=0A= - * For binary strings, however, we want to convert only if UG(unicode) = is=0A= - * on, in which case we check whether filesystem encoding is already = UTF-8,=0A= - * and if it's not, we convert from that to UTF-8. */=0A= + * For binary strings, however, we need to check whether filesystem = encoding=0A= + * is already UTF-8, and if it's not, we convert from that to UTF-8. */=0A= if (type =3D=3D IS_UNICODE) {=0A= zend_unicode_to_string(UG(utf8_conv), &temp, &temp_len, new_value.u, = new_value_len TSRMLS_CC);=0A= new_value.s =3D temp;=0A= new_value_len =3D temp_len;=0A= free_new_value =3D 1;=0A= - } else if (UG(unicode)) {=0A= + } else {=0A= UErrorCode status =3D U_ZERO_ERROR;=0A= =0A= if (ucnv_getType(ZEND_U_CONVERTER(UG(filesystem_encoding_conv))) !=3D = UCNV_UTF8) {=0A= @@ -6110,7 +6109,7 @@=0A= }=0A= =0A= if (Z_TYPE_P(tick_fe.arguments[0]) !=3D IS_ARRAY) {=0A= - convert_to_text_ex(&tick_fe.arguments[0]);=0A= + convert_to_unicode_ex(&tick_fe.arguments[0]);=0A= }=0A= =0A= if (!BG(user_tick_functions)) {=0A= @@ -6147,7 +6146,7 @@=0A= }=0A= =0A= if (Z_TYPE_P(function) !=3D IS_ARRAY) {=0A= - convert_to_text(function);=0A= + convert_to_unicode(function);=0A= }=0A= =0A= tick_fe.arguments =3D (zval **) emalloc(sizeof(zval *));=0A= @@ -6278,11 +6277,9 @@=0A= zval_copy_ctor(&name);=0A= INIT_PZVAL(&name);=0A= =0A= - if (UG(unicode)) {=0A= - convert_to_unicode_with_converter(element, UG(utf8_conv));=0A= - convert_to_unicode_with_converter(&name, UG(utf8_conv));=0A= - }=0A= - zend_u_symtable_update(Z_ARRVAL_P(arr), ZEND_STR_TYPE, = Z_UNIVAL(name), Z_UNILEN(name) + 1, &element, sizeof(zval *), NULL);=0A= + convert_to_unicode_with_converter(element, UG(utf8_conv));=0A= + convert_to_unicode_with_converter(&name, UG(utf8_conv));=0A= + zend_u_symtable_update(Z_ARRVAL_P(arr), IS_UNICODE, Z_UNIVAL(name), = Z_UNILEN(name) + 1, &element, sizeof(zval *), NULL);=0A= zval_dtor(&name);=0A= break;=0A= =0A= @@ -6310,28 +6307,21 @@=0A= zstr key;=0A= int key_len;=0A= =0A= - if (UG(unicode)) {=0A= - if (zend_string_to_unicode(UG(utf8_conv), &key.u, &key_len, = Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) TSRMLS_CC) =3D=3D FAILURE) {=0A= - return;=0A= - }=0A= - } else {=0A= - key.s =3D Z_STRVAL_P(arg1);=0A= - key_len =3D Z_STRLEN_P(arg1);=0A= + if (zend_string_to_unicode(UG(utf8_conv), &key.u, &key_len, = Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) TSRMLS_CC) =3D=3D FAILURE) {=0A= + return;=0A= }=0A= =0A= - if (zend_u_hash_find(Z_ARRVAL_P(arr), ZEND_STR_TYPE, key, = key_len+1, (void **) &find_hash) =3D=3D FAILURE) {=0A= + if (zend_u_hash_find(Z_ARRVAL_P(arr), IS_UNICODE, key, key_len+1, = (void **) &find_hash) =3D=3D FAILURE) {=0A= ALLOC_ZVAL(hash);=0A= INIT_PZVAL(hash);=0A= array_init(hash);=0A= =0A= - zend_u_hash_update(Z_ARRVAL_P(arr), ZEND_STR_TYPE, key, key_len+1, = &hash, sizeof(zval *), NULL);=0A= + zend_u_hash_update(Z_ARRVAL_P(arr), IS_UNICODE, key, key_len+1, = &hash, sizeof(zval *), NULL);=0A= } else {=0A= hash =3D *find_hash;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - efree(key.u);=0A= - }=0A= + efree(key.u);=0A= }=0A= =0A= if (Z_TYPE_P(hash) !=3D IS_ARRAY) {=0A= @@ -6345,9 +6335,7 @@=0A= zval_copy_ctor(element);=0A= INIT_PZVAL(element);=0A= =0A= - if (UG(unicode)) {=0A= - convert_to_unicode_with_converter(element, UG(utf8_conv));=0A= - }=0A= + convert_to_unicode_with_converter(element, UG(utf8_conv));=0A= =0A= if (arg3 && Z_STRLEN_P(arg3) > 0) {=0A= add_assoc_zval_ex(hash, Z_STRVAL_P(arg3), Z_STRLEN_P(arg3) + 1, = element);=0A= @@ -6376,10 +6364,8 @@=0A= zval_copy_ctor(&name);=0A= INIT_PZVAL(&name);=0A= =0A= - if (UG(unicode)) {=0A= - convert_to_unicode_with_converter(&name, UG(utf8_conv));=0A= - }=0A= - zend_u_symtable_update(Z_ARRVAL_P(arr), ZEND_STR_TYPE, = Z_UNIVAL(name), Z_UNILEN(name) + 1, &BG(active_ini_file_section), = sizeof(zval *), NULL);=0A= + convert_to_unicode_with_converter(&name, UG(utf8_conv));=0A= + zend_u_symtable_update(Z_ARRVAL_P(arr), IS_UNICODE, Z_UNIVAL(name), = Z_UNILEN(name) + 1, &BG(active_ini_file_section), sizeof(zval *), NULL);=0A= zval_dtor(&name);=0A= } else if (arg2) {=0A= zval *active_arr;=0A= @@ -6472,7 +6458,7 @@=0A= } else {=0A= zval num;=0A= ZVAL_LONG(&num, hash_key->h);=0A= - convert_to_text(&num);=0A= + convert_to_unicode(&num);=0A= php_prefix_varname(&new_key, prefix, Z_UNIVAL(num), Z_UNILEN(num), = Z_TYPE(num), 0 TSRMLS_CC);=0A= zval_dtor(&num);=0A= }=0A= @@ -6504,7 +6490,7 @@=0A= }=0A= =0A= if (ZEND_NUM_ARGS() > 1) {=0A= - convert_to_text(prefix);=0A= + convert_to_unicode(prefix);=0A= =0A= if (Z_UNILEN_P(prefix) =3D=3D 0) {=0A= php_error_docref(NULL TSRMLS_CC, E_NOTICE, "No prefix specified - = possible security hazard");=0A= Index: ext/standard/dir.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/dir.c,v=0A= retrieving revision 1.175=0A= diff -u -r1.175 dir.c=0A= --- ext/standard/dir.c 5 Mar 2008 12:09:33 -0000 1.175=0A= +++ ext/standard/dir.c 8 Jun 2008 18:17:21 -0000=0A= @@ -422,8 +422,9 @@=0A= long flags =3D 0;=0A= glob_t globbuf;=0A= unsigned int n;=0A= - int ret;=0A= + int ret, path_len;=0A= zend_bool basedir_limit =3D 0;=0A= + UChar *path;=0A= =0A= if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|l", = &pppattern, &flags) =3D=3D FAILURE ||=0A= php_stream_path_param_encode(pppattern, &pattern, &pattern_len, = REPORT_ERRORS, FG(default_context)) =3D=3D FAILURE) {=0A= @@ -518,18 +519,12 @@=0A= continue;=0A= }=0A= }=0A= - if (UG(unicode)) {=0A= - UChar *path;=0A= - int path_len;=0A= -=0A= - if (SUCCESS =3D=3D php_stream_path_decode(&php_plain_files_wrapper, = &path, &path_len, globbuf.gl_pathv[n]+cwd_skip, =0A= - strlen(globbuf.gl_pathv[n]+cwd_skip), REPORT_ERRORS, = FG(default_context))) {=0A= - add_next_index_unicodel(return_value, path, path_len, 0);=0A= - } else {=0A= - /* Fallback on string version, path_decode will emit warning */=0A= - add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip, = 1);=0A= - }=0A= +=0A= + if (SUCCESS =3D=3D php_stream_path_decode(&php_plain_files_wrapper, = &path, &path_len, globbuf.gl_pathv[n]+cwd_skip, =0A= + strlen(globbuf.gl_pathv[n]+cwd_skip), REPORT_ERRORS, = FG(default_context))) {=0A= + add_next_index_unicodel(return_value, path, path_len, 0);=0A= } else {=0A= + /* Fallback on string version, path_decode will emit warning */=0A= add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip, 1);=0A= }=0A= }=0A= @@ -553,9 +548,10 @@=0A= int dirn_len;=0A= long flags =3D 0;=0A= char **namelist;=0A= - int n, i;=0A= + int n, i, path_len;=0A= zval *zcontext =3D NULL;=0A= php_stream_context *context =3D NULL;=0A= + UChar *path;=0A= =0A= if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|lr", &ppdirn, = &flags, &zcontext) =3D=3D FAILURE) {=0A= return;=0A= @@ -579,18 +575,11 @@=0A= array_init(return_value);=0A= =0A= for (i =3D 0; i < n; i++) {=0A= - if (UG(unicode)) {=0A= - UChar *path;=0A= - int path_len;=0A= -=0A= - if (SUCCESS =3D=3D php_stream_path_decode(NULL, &path, &path_len, = namelist[i], strlen(namelist[i]), REPORT_ERRORS, context)) {=0A= - add_next_index_unicodel(return_value, path, path_len, 0);=0A= - efree(namelist[i]);=0A= - } else {=0A= - /* Fallback on using the non-unicode version, path_decode will emit = the warning for us */=0A= - add_next_index_string(return_value, namelist[i], 0);=0A= - }=0A= + if (SUCCESS =3D=3D php_stream_path_decode(NULL, &path, &path_len, = namelist[i], strlen(namelist[i]), REPORT_ERRORS, context)) {=0A= + add_next_index_unicodel(return_value, path, path_len, 0);=0A= + efree(namelist[i]);=0A= } else {=0A= + /* Fallback on using the non-unicode version, path_decode will emit = the warning for us */=0A= add_next_index_string(return_value, namelist[i], 0);=0A= }=0A= }=0A= Index: ext/standard/file.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/file.c,v=0A= retrieving revision 1.519=0A= diff -u -r1.519 file.c=0A= --- ext/standard/file.c 28 May 2008 17:24:47 -0000 1.519=0A= +++ ext/standard/file.c 9 Jun 2008 15:51:45 -0000=0A= @@ -619,7 +619,7 @@=0A= int filename_len;=0A= zval *data;=0A= int numchars =3D 0;=0A= - long flags =3D ((argc < 3) && UG(unicode)) ? PHP_FILE_TEXT : 0;=0A= + long flags =3D (argc < 3) ? PHP_FILE_TEXT : 0;=0A= zval *zcontext =3D NULL;=0A= php_stream_context *context =3D NULL;=0A= char mode[3] =3D { 'w', 0, 0 };=0A= @@ -935,18 +935,16 @@=0A= }=0A= =0A= if ((fd =3D php_open_temporary_fd(dir, p, &opened_path TSRMLS_CC)) = >=3D 0) {=0A= + UChar *utmpnam;=0A= + int utmpnam_len;=0A= +=0A= close(fd);=0A= - if (UG(unicode)) {=0A= - UChar *utmpnam;=0A= - int utmpnam_len;=0A= =0A= - if (SUCCESS =3D=3D php_stream_path_decode(NULL, &utmpnam, = &utmpnam_len, opened_path, strlen(opened_path), REPORT_ERRORS, = FG(default_context))) {=0A= - RETVAL_UNICODEL(utmpnam, utmpnam_len, 0);=0A= - }=0A= - efree(opened_path);=0A= - } else {=0A= - RETVAL_STRING(opened_path, 0);=0A= + if (SUCCESS =3D=3D php_stream_path_decode(NULL, &utmpnam, = &utmpnam_len, opened_path, strlen(opened_path), REPORT_ERRORS, = FG(default_context))) {=0A= + RETVAL_UNICODEL(utmpnam, utmpnam_len, 0);=0A= }=0A= + =0A= + efree(opened_path);=0A= }=0A= efree(p);=0A= }=0A= @@ -2255,7 +2253,7 @@=0A= =0A= PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char = enclosure, char escape, size_t buf_len, char *buf, zval *return_value = TSRMLS_DC) /* {{{ */=0A= {=0A= - char *delim =3D &delimiter, *enc =3D &enclosure, *buffer =3D buf, *esc;=0A= + char *delim =3D &delimiter, *enc =3D &enclosure, *buffer =3D buf, *esc = =3D NULL;=0A= int delim_len =3D 1, enc_len =3D 1, esc_len =3D 1, buffer_len =3D = buf_len;=0A= zend_uchar type =3D IS_STRING;=0A= =0A= @@ -2746,10 +2744,8 @@=0A= #ifdef ZTS=0A= if (VCWD_ACCESS(resolved_path_buff, F_OK)) {=0A= RETVAL_FALSE;=0A= - } else=0A= + } else {=0A= #endif=0A= -=0A= - if (UG(unicode)) {=0A= UChar *path;=0A= int path_len;=0A= =0A= @@ -2759,8 +2755,6 @@=0A= /* Fallback */=0A= RETVAL_STRING(resolved_path_buff, 1);=0A= }=0A= - } else {=0A= - RETVAL_STRING(resolved_path_buff, 1);=0A= }=0A= } else {=0A= RETVAL_FALSE;=0A= @@ -2923,11 +2917,6 @@=0A= char *temp_dir =3D (char *)php_get_temporary_directory();=0A= int temp_dir_len =3D strlen(temp_dir), utemp_dir_len;=0A= =0A= - if (!UG(unicode)) {=0A= - RETURN_STRINGL(temp_dir, temp_dir_len, 1);=0A= - }=0A= -=0A= - /* else UG(unicode) */=0A= if (FAILURE =3D=3D php_stream_path_decode(NULL, &utemp_dir, = &utemp_dir_len, temp_dir, temp_dir_len, REPORT_ERRORS, = FG(default_context))) {=0A= RETURN_FALSE;=0A= }=0A= Index: ext/standard/formatted_print.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/formatted_print.c,v=0A= retrieving revision 1.105=0A= diff -u -r1.105 formatted_print.c=0A= --- ext/standard/formatted_print.c 17 Mar 2008 23:07:55 -0000 1.105=0A= +++ ext/standard/formatted_print.c 9 Jun 2008 10:58:38 -0000=0A= @@ -1277,18 +1277,13 @@=0A= int len;=0A= zstr result;=0A= =0A= - if (!UG(unicode)) {=0A= - if ((result.s =3D php_formatted_print(ht, &len, 0, 0, PHP_RUNTIME = TSRMLS_CC))=3D=3DNULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - RETVAL_STRINGL(result.s, len, 0);=0A= - } else {=0A= - result =3D php_u_formatted_print(ht, &len, 0, 0, PHP_RUNTIME = TSRMLS_CC);=0A= - if (result.v =3D=3D NULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - RETVAL_UNICODEL(result.u, len, 0);=0A= + result =3D php_u_formatted_print(ht, &len, 0, 0, PHP_RUNTIME = TSRMLS_CC);=0A= +=0A= + if (result.v =3D=3D NULL) {=0A= + RETURN_FALSE;=0A= }=0A= +=0A= + RETVAL_UNICODEL(result.u, len, 0);=0A= }=0A= /* }}} */=0A= =0A= @@ -1299,18 +1294,13 @@=0A= int len;=0A= zstr result;=0A= =0A= - if (!UG(unicode)) {=0A= - if ((result.s =3D php_formatted_print(ht, &len, 1, 0, PHP_RUNTIME = TSRMLS_CC))=3D=3DNULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - RETVAL_STRINGL(result.s, len, 0);=0A= - } else {=0A= - result =3D php_u_formatted_print(ht, &len, 1, 0, PHP_RUNTIME = TSRMLS_CC);=0A= - if (result.v =3D=3D NULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - RETVAL_UNICODEL(result.u, len, 0);=0A= + result =3D php_u_formatted_print(ht, &len, 1, 0, PHP_RUNTIME = TSRMLS_CC);=0A= +=0A= + if (result.v =3D=3D NULL) {=0A= + RETURN_FALSE;=0A= }=0A= +=0A= + RETVAL_UNICODEL(result.u, len, 0);=0A= }=0A= /* }}} */=0A= =0A= @@ -1321,15 +1311,10 @@=0A= int len;=0A= zstr result;=0A= =0A= - if (!UG(unicode)) {=0A= - if ((result.s =3D php_formatted_print(ht, &len, 0, 0, PHP_OUTPUT = TSRMLS_CC))=3D=3DNULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - } else {=0A= - result =3D php_u_formatted_print(ht, &len, 0, 0, PHP_OUTPUT = TSRMLS_CC);=0A= - if (result.v =3D=3D NULL) {=0A= - RETURN_FALSE;=0A= - }=0A= + result =3D php_u_formatted_print(ht, &len, 0, 0, PHP_OUTPUT TSRMLS_CC);=0A= +=0A= + if (result.v =3D=3D NULL) {=0A= + RETURN_FALSE;=0A= }=0A= =0A= PHPWRITE(result.s, len);=0A= @@ -1344,16 +1329,11 @@=0A= {=0A= int len;=0A= zstr result;=0A= - =0A= - if (!UG(unicode)) {=0A= - if ((result.s =3D php_formatted_print(ht, &len, 1, 0, PHP_OUTPUT = TSRMLS_CC))=3D=3DNULL) {=0A= - RETURN_FALSE;=0A= - }=0A= - } else {=0A= - result =3D php_u_formatted_print(ht, &len, 1, 0, PHP_OUTPUT = TSRMLS_CC);=0A= - if (result.v =3D=3D NULL) {=0A= - RETURN_FALSE;=0A= - }=0A= +=0A= + result =3D php_u_formatted_print(ht, &len, 1, 0, PHP_OUTPUT TSRMLS_CC);=0A= +=0A= + if (result.v =3D=3D NULL) {=0A= + RETURN_FALSE;=0A= }=0A= =0A= PHPWRITE(result.s, len);=0A= @@ -1382,7 +1362,7 @@=0A= php_stream_from_zval(stream, arg1);=0A= =0A= if (Z_TYPE_PP(arg2) !=3D IS_STRING && Z_TYPE_PP(arg2) !=3D IS_UNICODE) = {=0A= - convert_to_text_ex(arg2);=0A= + convert_to_unicode_ex(arg2);=0A= }=0A= =0A= if (Z_TYPE_PP(arg2) =3D=3D IS_STRING) {=0A= @@ -1424,7 +1404,7 @@=0A= php_stream_from_zval(stream, arg1);=0A= =0A= if (Z_TYPE_PP(arg2) !=3D IS_STRING && Z_TYPE_PP(arg2) !=3D IS_UNICODE) = {=0A= - convert_to_text_ex(arg2);=0A= + convert_to_unicode_ex(arg2);=0A= }=0A= =0A= if (Z_TYPE_PP(arg2) =3D=3D IS_STRING) {=0A= Index: ext/standard/head.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/head.c,v=0A= retrieving revision 1.99=0A= diff -u -r1.99 head.c=0A= --- ext/standard/head.c 28 Feb 2008 14:16:14 -0000 1.99=0A= +++ ext/standard/head.c 8 Jun 2008 19:20:03 -0000=0A= @@ -202,11 +202,13 @@=0A= PHP_FUNCTION(headers_sent)=0A= {=0A= zval *arg1, *arg2;=0A= - char *file=3D"";=0A= - int line=3D0;=0A= + char *file =3D "";=0A= + int line=3D0, ufile_len =3D 0;=0A= + UChar *ufile;=0A= =0A= - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|zz", &arg1, = &arg2) =3D=3D FAILURE)=0A= + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|zz", &arg1, = &arg2) =3D=3D FAILURE) {=0A= return;=0A= + }=0A= =0A= if (SG(headers_sent)) {=0A= line =3D php_output_get_start_lineno(TSRMLS_C);=0A= @@ -219,21 +221,11 @@=0A= ZVAL_LONG(arg2, line);=0A= case 1:=0A= zval_dtor(arg1);=0A= - if (UG(unicode)) {=0A= - UChar *ufile;=0A= - int ufile_len;=0A= -=0A= - if (file && SUCCESS =3D=3D php_stream_path_decode(NULL, &ufile, = &ufile_len, file, strlen(file), REPORT_ERRORS, FG(default_context))) {=0A= - ZVAL_UNICODEL(arg1, ufile, ufile_len, 0);=0A= - } else {=0A= - ZVAL_EMPTY_UNICODE(arg1);=0A= - }=0A= +=0A= + if (file && SUCCESS =3D=3D php_stream_path_decode(NULL, &ufile, = &ufile_len, file, strlen(file), REPORT_ERRORS, FG(default_context))) {=0A= + ZVAL_UNICODEL(arg1, ufile, ufile_len, 0);=0A= } else {=0A= - if (file) {=0A= - ZVAL_STRING(arg1, file, 1);=0A= - } else {=0A= - ZVAL_STRING(arg1, "", 1);=0A= - } =0A= + ZVAL_EMPTY_UNICODE(arg1);=0A= }=0A= break;=0A= }=0A= Index: ext/standard/html.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/html.c,v=0A= retrieving revision 1.133=0A= diff -u -r1.133 html.c=0A= --- ext/standard/html.c 11 Apr 2008 19:08:04 -0000 1.133=0A= +++ ext/standard/html.c 8 Jun 2008 18:25:11 -0000=0A= @@ -1465,10 +1465,7 @@=0A= return;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - charset =3D cs_utf_8;=0A= - }=0A= -=0A= + charset =3D cs_utf_8;=0A= array_init(return_value);=0A= =0A= ind[1] =3D 0;=0A= @@ -1481,21 +1478,15 @@=0A= for (i =3D 0; i <=3D entity_map[j].endchar - = entity_map[j].basechar; i++) {=0A= char buffer[16];=0A= =0A= - if (entity_map[j].table[i] =3D=3D NULL)=0A= + if (entity_map[j].table[i] =3D=3D NULL) {=0A= continue;=0A= -=0A= - if (UG(unicode)) {=0A= - cp =3D (UChar)(i + entity_map[j].basechar);=0A= - key_len =3D zend_codepoint_to_uchar(cp, key);=0A= - key[key_len] =3D 0;=0A= - snprintf(buffer, sizeof(buffer), "&%s;", entity_map[j].table[i]);=0A= - add_u_assoc_ascii_string_ex(return_value, IS_UNICODE, ZSTR(key), = key_len+1, buffer, 1);=0A= - } else {=0A= - /* no wide chars here, because charset is always cs_8859_1 */=0A= - ind[0] =3D i + entity_map[j].basechar;=0A= - snprintf(buffer, sizeof(buffer), "&%s;", entity_map[j].table[i]);=0A= - add_assoc_string(return_value, ind, buffer, 1);=0A= }=0A= +=0A= + cp =3D (UChar)(i + entity_map[j].basechar);=0A= + key_len =3D zend_codepoint_to_uchar(cp, key);=0A= + key[key_len] =3D 0;=0A= + snprintf(buffer, sizeof(buffer), "&%s;", entity_map[j].table[i]);=0A= + add_u_assoc_ascii_string_ex(return_value, IS_UNICODE, ZSTR(key), = key_len+1, buffer, 1);=0A= }=0A= }=0A= /* break thru */=0A= Index: ext/standard/http_fopen_wrapper.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/http_fopen_wrapper.c,v=0A= retrieving revision 1.133=0A= diff -u -r1.133 http_fopen_wrapper.c=0A= --- ext/standard/http_fopen_wrapper.c 29 Apr 2008 08:15:49 -0000 1.133=0A= +++ ext/standard/http_fopen_wrapper.c 8 Jun 2008 18:25:47 -0000=0A= @@ -625,7 +625,7 @@=0A= strlcpy(location, http_header_line + 10, sizeof(location));=0A= } else if (!strncasecmp(http_header_line, "Content-Type: ", 14)) {=0A= =0A= - if (UG(unicode) && strchr(mode, 't')) {=0A= + if (strchr(mode, 't')) {=0A= charset =3D php_http_detect_charset(http_header_line + = sizeof("Content-type: "));=0A= }=0A= =0A= @@ -781,7 +781,7 @@=0A= }=0A= =0A= if (charset) {=0A= - if (stream && UG(unicode) && strchr(mode, 't')) {=0A= + if (stream && strchr(mode, 't')) {=0A= php_stream_encoding_apply(stream, 0, charset, UG(to_error_mode), = NULL);=0A= }=0A= efree(charset);=0A= Index: ext/standard/incomplete_class.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/incomplete_class.c,v=0A= retrieving revision 1.38=0A= diff -u -r1.38 incomplete_class.c=0A= --- ext/standard/incomplete_class.c 31 Dec 2007 07:12:16 -0000 1.38=0A= +++ ext/standard/incomplete_class.c 8 Jun 2008 18:26:39 -0000=0A= @@ -111,7 +111,7 @@=0A= value.handlers =3D &php_incomplete_object_handlers;=0A= =0A= ALLOC_HASHTABLE(object->properties);=0A= - zend_u_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0, = UG(unicode));=0A= + zend_u_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0, 1);=0A= return value;=0A= }=0A= =0A= @@ -146,11 +146,7 @@=0A= object_properties =3D Z_OBJPROP_P(object);=0A= =0A= if (zend_hash_find(object_properties, MAGIC_MEMBER, = sizeof(MAGIC_MEMBER), (void **) &val) =3D=3D SUCCESS) {=0A= - if (UG(unicode)) {=0A= - retval.u =3D eustrndup(Z_USTRVAL_PP(val), Z_USTRLEN_PP(val));=0A= - } else {=0A= - retval.s =3D estrndup(Z_STRVAL_PP(val), Z_STRLEN_PP(val));=0A= - }=0A= + retval.u =3D eustrndup(Z_USTRVAL_PP(val), Z_USTRLEN_PP(val));=0A= =0A= if (nlen) {=0A= *nlen =3D Z_UNILEN_PP(val);=0A= Index: ext/standard/link.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/link.c,v=0A= retrieving revision 1.61=0A= diff -u -r1.61 link.c=0A= --- ext/standard/link.c 31 Dec 2007 07:12:16 -0000 1.61=0A= +++ ext/standard/link.c 8 Jun 2008 18:27:11 -0000=0A= @@ -79,14 +79,10 @@=0A= /* Append NULL to the end of the string */=0A= buff[ret] =3D '\0';=0A= =0A= - if (UG(unicode)) {=0A= - if (SUCCESS =3D=3D php_stream_path_decode(NULL, &target, &target_len, = buff, strlen(buff), REPORT_ERRORS, FG(default_context))) {=0A= - RETURN_UNICODEL(target, target_len, 0);=0A= - } else {=0A= - RETURN_FALSE;=0A= - }=0A= + if (SUCCESS =3D=3D php_stream_path_decode(NULL, &target, &target_len, = buff, strlen(buff), REPORT_ERRORS, FG(default_context))) {=0A= + RETURN_UNICODEL(target, target_len, 0);=0A= } else {=0A= - RETURN_STRING(buff, 1);=0A= + RETURN_FALSE;=0A= }=0A= }=0A= /* }}} */=0A= Index: ext/standard/proc_open.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/proc_open.c,v=0A= retrieving revision 1.61=0A= diff -u -r1.61 proc_open.c=0A= --- ext/standard/proc_open.c 8 Apr 2008 08:42:05 -0000 1.61=0A= +++ ext/standard/proc_open.c 8 Jun 2008 18:29:09 -0000=0A= @@ -319,7 +319,9 @@=0A= #endif=0A= int running =3D 1, signaled =3D 0, stopped =3D 0;=0A= int exitcode =3D -1, termsig =3D 0, stopsig =3D 0;=0A= - =0A= + UChar *ucmd;=0A= + int ucmd_len;=0A= +=0A= if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zproc) = =3D=3D FAILURE) {=0A= RETURN_FALSE;=0A= }=0A= @@ -328,33 +330,24 @@=0A= =0A= array_init(return_value);=0A= =0A= - if (UG(unicode)) {=0A= - UChar *ucmd;=0A= - int ucmd_len;=0A= -=0A= - if (SUCCESS =3D=3D php_stream_path_decode(&php_plain_files_wrapper, = &ucmd, &ucmd_len, proc->command, strlen(proc->command), REPORT_ERRORS, = FG(default_context))) {=0A= - add_ascii_assoc_unicodel(return_value, "command", ucmd, ucmd_len, 0);=0A= - } else {=0A= - /* Fallback on original binary string */=0A= - add_ascii_assoc_string(return_value, "command", proc->command, 1);=0A= - }=0A= + if (SUCCESS =3D=3D php_stream_path_decode(&php_plain_files_wrapper, = &ucmd, &ucmd_len, proc->command, strlen(proc->command), REPORT_ERRORS, = FG(default_context))) {=0A= + add_ascii_assoc_unicodel(return_value, "command", ucmd, ucmd_len, 0);=0A= } else {=0A= + /* Fallback on original binary string */=0A= add_ascii_assoc_string(return_value, "command", proc->command, 1);=0A= }=0A= +=0A= add_ascii_assoc_long(return_value, "pid", (long) proc->child);=0A= - =0A= +=0A= #ifdef PHP_WIN32=0A= - =0A= GetExitCodeProcess(proc->childHandle, &wstatus);=0A= =0A= running =3D wstatus =3D=3D STILL_ACTIVE;=0A= exitcode =3D=3D STILL_ACTIVE ? -1 : wstatus;=0A= - =0A= #elif HAVE_SYS_WAIT_H=0A= - =0A= errno =3D 0;=0A= wait_pid =3D waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED);=0A= - =0A= +=0A= if (wait_pid =3D=3D proc->child) {=0A= if (WIFEXITED(wstatus)) {=0A= running =3D 0;=0A= @@ -973,7 +966,7 @@=0A= /* nasty hack; don't copy it */=0A= stream->flags |=3D PHP_STREAM_FLAG_NO_SEEK;=0A= =0A= - if (UG(unicode) && !binary_pipes) {=0A= + if (!binary_pipes) {=0A= if (write_stream) {=0A= char *encoding =3D (context && context->output_encoding) ? = context->output_encoding : UG(stream_encoding);=0A= =0A= @@ -985,7 +978,7 @@=0A= php_stream_encoding_apply(stream, 0, encoding, = UG(to_error_mode), NULL);=0A= }=0A= }=0A= - =0A= +=0A= MAKE_STD_ZVAL(retfp);=0A= php_stream_to_zval(stream, retfp);=0A= add_index_zval(pipes, descriptors[i].index, retfp);=0A= Index: ext/standard/streamsfuncs.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/streamsfuncs.c,v=0A= retrieving revision 1.116=0A= diff -u -r1.116 streamsfuncs.c=0A= --- ext/standard/streamsfuncs.c 28 May 2008 18:02:52 -0000 1.116=0A= +++ ext/standard/streamsfuncs.c 8 Jun 2008 18:31:18 -0000=0A= @@ -141,8 +141,7 @@=0A= ZVAL_LONG(zerrno, err);=0A= }=0A= if (zerrstr && errstr) {=0A= - /* errstr is emalloc'd, either assign it to STRVAL if !UG(unicode)=0A= - * Or free it post-conversion if UG(unicode) */=0A= + /* errstr is emalloc'd, free it post-conversion */=0A= zval_dtor(zerrstr);=0A= ZVAL_RT_STRING(zerrstr, errstr, ZSTR_AUTOFREE);=0A= } else if (errstr) {=0A= @@ -207,8 +206,7 @@=0A= ZVAL_LONG(zerrno, err);=0A= }=0A= if (zerrstr && errstr) {=0A= - /* errstr is emalloc'd, either assign it to STRVAL if !UG(unicode)=0A= - * Or free it post-conversion if UG(unicode) */=0A= + /* errstr is emalloc'd, free it post-conversion */=0A= zval_dtor(zerrstr);=0A= ZVAL_RT_STRING(zerrstr, errstr, ZSTR_AUTOFREE);=0A= } else if (errstr) {=0A= @@ -534,17 +532,13 @@=0A= =0A= add_ascii_assoc_bool(return_value, "seekable", (stream->ops->seek) && = (stream->flags & PHP_STREAM_FLAG_NO_SEEK) =3D=3D 0);=0A= if (stream->orig_path) {=0A= - if (UG(unicode)) {=0A= - UChar *decoded_path =3D NULL;=0A= - int decoded_path_len =3D 0;=0A= -=0A= - if (SUCCESS =3D=3D php_stream_path_decode(stream->wrapper, = &decoded_path, &decoded_path_len, stream->orig_path, = strlen(stream->orig_path), REPORT_ERRORS, stream->context)) {=0A= - add_ascii_assoc_unicodel(return_value, "uri", decoded_path, = decoded_path_len, 0);=0A= - } else {=0A= - add_ascii_assoc_null(return_value, "uri");=0A= - }=0A= + UChar *decoded_path =3D NULL;=0A= + int decoded_path_len =3D 0;=0A= +=0A= + if (SUCCESS =3D=3D php_stream_path_decode(stream->wrapper, = &decoded_path, &decoded_path_len, stream->orig_path, = strlen(stream->orig_path), REPORT_ERRORS, stream->context)) {=0A= + add_ascii_assoc_unicodel(return_value, "uri", decoded_path, = decoded_path_len, 0);=0A= } else {=0A= - add_ascii_assoc_string(return_value, "uri", stream->orig_path, 1);=0A= + add_ascii_assoc_null(return_value, "uri");=0A= }=0A= }=0A= =0A= @@ -1612,6 +1606,8 @@=0A= =0A= while (ptr < end) {=0A= char *s =3D strchr(ptr, DEFAULT_DIR_SEPARATOR);=0A= + UChar *upath;=0A= + int upath_len;=0A= =0A= if (!s) {=0A= s =3D end;=0A= @@ -1642,17 +1638,10 @@=0A= continue;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - UChar *upath;=0A= - int upath_len;=0A= -=0A= - if (SUCCESS =3D=3D php_stream_path_decode(NULL, &upath, &upath_len, = buffer, (s - ptr) + 1 + filename_len, REPORT_ERRORS, context)) {=0A= - RETURN_UNICODEL(upath, upath_len, 0);=0A= - } else {=0A= - /* Fallback */=0A= - RETURN_STRINGL(buffer, (s - ptr) + 1 + filename_len, 1);=0A= - }=0A= + if (SUCCESS =3D=3D php_stream_path_decode(NULL, &upath, &upath_len, = buffer, (s - ptr) + 1 + filename_len, REPORT_ERRORS, context)) {=0A= + RETURN_UNICODEL(upath, upath_len, 0);=0A= } else {=0A= + /* Fallback */=0A= RETURN_STRINGL(buffer, (s - ptr) + 1 + filename_len, 1);=0A= }=0A= }=0A= Index: ext/standard/string.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/string.c,v=0A= retrieving revision 1.674=0A= diff -u -r1.674 string.c=0A= --- ext/standard/string.c 27 May 2008 10:28:25 -0000 1.674=0A= +++ ext/standard/string.c 9 Jun 2008 11:03:07 -0000=0A= @@ -488,9 +488,7 @@=0A= return;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= - }=0A= + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= =0A= switch(item) { /* {{{ */=0A= #ifdef ABDAY_1=0A= @@ -1434,25 +1432,21 @@=0A= SEPARATE_ZVAL(arg1);=0A= arr =3D *arg1;=0A= MAKE_STD_ZVAL(delim);=0A= - if (UG(unicode)) {=0A= - ZVAL_UNICODEL(delim, EMPTY_STR, sizeof("")-1, 0);=0A= - } else {=0A= - ZVAL_STRINGL(delim, "", sizeof("")-1, 0);=0A= - }=0A= + ZVAL_UNICODEL(delim, EMPTY_STR, sizeof("")-1, 0);=0A= }=0A= } else {=0A= if (Z_TYPE_PP(arg1) =3D=3D IS_ARRAY) {=0A= SEPARATE_ZVAL(arg1);=0A= arr =3D *arg1;=0A= if (Z_TYPE_PP(arg2) !=3D IS_UNICODE && Z_TYPE_PP(arg2) !=3D = IS_STRING) {=0A= - convert_to_text_ex(arg2);=0A= + convert_to_unicode_ex(arg2);=0A= }=0A= delim =3D *arg2;=0A= } else if (Z_TYPE_PP(arg2) =3D=3D IS_ARRAY) {=0A= SEPARATE_ZVAL(arg2);=0A= arr =3D *arg2;=0A= if (Z_TYPE_PP(arg1) !=3D IS_UNICODE && Z_TYPE_PP(arg1) !=3D = IS_STRING) {=0A= - convert_to_text_ex(arg1);=0A= + convert_to_unicode_ex(arg1);=0A= }=0A= delim =3D *arg1;=0A= } else {=0A= @@ -2352,7 +2346,7 @@=0A= SEPARATE_ZVAL(needle);=0A= =0A= if (Z_TYPE_PP(haystack) !=3D IS_UNICODE && Z_TYPE_PP(haystack) !=3D = IS_STRING) {=0A= - convert_to_text_ex(haystack);=0A= + convert_to_unicode_ex(haystack);=0A= }=0A= =0A= if (Z_TYPE_PP(needle) =3D=3D IS_UNICODE || Z_TYPE_PP(needle) =3D=3D = IS_STRING) {=0A= @@ -2638,7 +2632,7 @@=0A= }=0A= =0A= if (Z_TYPE_PP(haystack) !=3D IS_UNICODE && Z_TYPE_PP(haystack) !=3D = IS_STRING) {=0A= - convert_to_text_ex(haystack);=0A= + convert_to_unicode_ex(haystack);=0A= }=0A= =0A= /*=0A= @@ -2750,7 +2744,7 @@=0A= }=0A= =0A= if (Z_TYPE_PP(zhaystack) !=3D IS_UNICODE && Z_TYPE_PP(zhaystack) !=3D = IS_STRING) {=0A= - convert_to_text_ex(zhaystack);=0A= + convert_to_unicode_ex(zhaystack);=0A= }=0A= if (Z_TYPE_PP(zneedle) =3D=3D IS_UNICODE || Z_TYPE_PP(zneedle) =3D=3D = IS_STRING) {=0A= if (Z_TYPE_PP(zneedle) !=3D Z_TYPE_PP(zhaystack)) {=0A= @@ -3044,7 +3038,7 @@=0A= return;=0A= }=0A= if (Z_TYPE_P(haystack) !=3D IS_UNICODE || Z_TYPE_P(haystack) !=3D = IS_STRING) {=0A= - convert_to_text(haystack);=0A= + convert_to_unicode(haystack);=0A= }=0A= =0A= if (Z_TYPE_P(needle) =3D=3D IS_UNICODE || Z_TYPE_P(needle) =3D=3D = IS_STRING) {=0A= @@ -3399,11 +3393,11 @@=0A= =0A= if (Z_TYPE_PP(str) !=3D IS_ARRAY && Z_TYPE_PP(str) !=3D IS_UNICODE &&=0A= Z_TYPE_PP(str) !=3D IS_STRING) {=0A= - convert_to_text_ex(str);=0A= + convert_to_unicode_ex(str);=0A= }=0A= if (Z_TYPE_PP(repl) !=3D IS_ARRAY && Z_TYPE_PP(repl) !=3D IS_UNICODE &&=0A= Z_TYPE_PP(repl) !=3D IS_STRING) {=0A= - convert_to_text_ex(repl);=0A= + convert_to_unicode_ex(repl);=0A= }=0A= if (Z_TYPE_PP(from) !=3D IS_ARRAY) {=0A= convert_to_long_ex(from);=0A= @@ -3443,7 +3437,7 @@=0A= zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(repl), &pos_repl);=0A= if (SUCCESS =3D=3D zend_hash_get_current_data_ex(Z_ARRVAL_PP(repl), = (void **) &tmp_repl, &pos_repl)) {=0A= if (Z_TYPE_PP(repl) !=3D IS_UNICODE && Z_TYPE_PP(repl) !=3D = IS_STRING) {=0A= - convert_to_text_ex(tmp_repl);=0A= + convert_to_unicode_ex(tmp_repl);=0A= }=0A= } else {=0A= tmp_repl =3D NULL;=0A= @@ -3487,7 +3481,7 @@=0A= zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(str), &pos_str);=0A= while (zend_hash_get_current_data_ex(Z_ARRVAL_PP(str), (void **) = &tmp_str, &pos_str) =3D=3D SUCCESS) {=0A= if (Z_TYPE_PP(tmp_str) !=3D IS_UNICODE && Z_TYPE_PP(tmp_str) !=3D = IS_STRING) {=0A= - convert_to_text_ex(tmp_str);=0A= + convert_to_unicode_ex(tmp_str);=0A= }=0A= =0A= if (Z_TYPE_PP(from) =3D=3D IS_ARRAY) {=0A= @@ -3518,7 +3512,7 @@=0A= if (Z_TYPE_PP(repl) =3D=3D IS_ARRAY) {=0A= if (SUCCESS =3D=3D zend_hash_get_current_data_ex(Z_ARRVAL_PP(repl), = (void **) &tmp_repl, &pos_repl)) {=0A= if (Z_TYPE_PP(tmp_repl) !=3D IS_UNICODE && Z_TYPE_PP(tmp_repl) = !=3D IS_STRING) {=0A= - convert_to_text_ex(tmp_repl);=0A= + convert_to_unicode_ex(tmp_repl);=0A= }=0A= zend_hash_move_forward_ex(Z_ARRVAL_PP(repl), &pos_repl);=0A= } else {=0A= @@ -3637,7 +3631,7 @@=0A= }=0A= =0A= if (Z_TYPE_PP(str) !=3D IS_UNICODE && Z_TYPE_PP(str) !=3D IS_STRING) {=0A= - convert_to_text_ex(str);=0A= + convert_to_unicode_ex(str);=0A= }=0A= if (Z_TYPE_PP(str) =3D=3D IS_UNICODE) {=0A= RETURN_LONG(zend_get_codepoint_at(Z_USTRVAL_PP(str), = Z_USTRLEN_PP(str), 0));=0A= @@ -3653,28 +3647,22 @@=0A= {=0A= zval **num;=0A= char temp[2];=0A= + UChar buf[2];=0A= + int buf_len;=0A= =0A= if (ZEND_NUM_ARGS() !=3D 1 || zend_get_parameters_ex(1, &num) =3D=3D = FAILURE) {=0A= WRONG_PARAM_COUNT;=0A= }=0A= - convert_to_long_ex(num);=0A= =0A= - if (UG(unicode)) {=0A= - UChar buf[2];=0A= - int buf_len;=0A= -=0A= - if (Z_LVAL_PP(num) > UCHAR_MAX_VALUE) {=0A= - php_error(E_WARNING, "Codepoint value cannot be greater than %X", = UCHAR_MAX_VALUE);=0A= - return;=0A= - }=0A= - buf_len =3D zend_codepoint_to_uchar((uint32_t)Z_LVAL_PP(num), buf);=0A= - RETURN_UNICODEL(buf, buf_len, 1);=0A= - } else {=0A= - temp[0] =3D (char) Z_LVAL_PP(num);=0A= - temp[1] =3D 0;=0A= + convert_to_long_ex(num);=0A= =0A= - RETVAL_STRINGL(temp, 1, 1);=0A= + if (Z_LVAL_PP(num) > UCHAR_MAX_VALUE) {=0A= + php_error(E_WARNING, "Codepoint value cannot be greater than %X", = UCHAR_MAX_VALUE);=0A= + return;=0A= }=0A= +=0A= + buf_len =3D zend_codepoint_to_uchar((uint32_t)Z_LVAL_PP(num), buf);=0A= + RETURN_UNICODEL(buf, buf_len, 1);=0A= }=0A= /* }}} */=0A= =0A= @@ -4319,7 +4307,7 @@=0A= }=0A= =0A= if (Z_TYPE_PP(str) !=3D IS_UNICODE && Z_TYPE_PP(str) !=3D IS_STRING) {=0A= - convert_to_text_ex(str);=0A= + convert_to_unicode_ex(str);=0A= }=0A= =0A= /* shortcut for empty string */=0A= @@ -4707,7 +4695,7 @@=0A= if (ZEND_NUM_ARGS() !=3D 1 || zend_get_parameters_ex(1, &str) =3D=3D = FAILURE) {=0A= WRONG_PARAM_COUNT;=0A= }=0A= - convert_to_text_ex(str);=0A= + convert_to_unicode_ex(str);=0A= =0A= if (Z_TYPE_PP(str) =3D=3D IS_UNICODE && Z_USTRLEN_PP(str) =3D=3D 0) {=0A= RETURN_EMPTY_UNICODE();=0A= @@ -4752,7 +4740,7 @@=0A= if (ZEND_NUM_ARGS() !=3D 1 || zend_get_parameters_ex(1, &str) =3D=3D = FAILURE) {=0A= WRONG_PARAM_COUNT;=0A= }=0A= - convert_to_text_ex(str);=0A= + convert_to_unicode_ex(str);=0A= =0A= if (Z_TYPE_PP(str) =3D=3D IS_UNICODE) {=0A= ZVAL_UNICODEL(return_value, Z_USTRVAL_PP(str), Z_USTRLEN_PP(str), 1);=0A= @@ -5547,8 +5535,8 @@=0A= int replace_len =3D 0;=0A= =0A= /* Make sure we're dealing with strings. */=0A= - convert_to_text_ex(subject);=0A= - Z_TYPE_P(result) =3D ZEND_STR_TYPE;=0A= + convert_to_unicode_ex(subject);=0A= + Z_TYPE_P(result) =3D IS_UNICODE;=0A= if (Z_UNILEN_PP(subject) =3D=3D 0) {=0A= ZVAL_EMPTY_TEXT(result);=0A= return;=0A= @@ -5575,7 +5563,7 @@=0A= while (zend_hash_get_current_data(Z_ARRVAL_P(search), (void **) = &search_entry) =3D=3D SUCCESS) {=0A= /* Make sure we're dealing with strings. */=0A= SEPARATE_ZVAL(search_entry);=0A= - convert_to_text(*search_entry);=0A= + convert_to_unicode(*search_entry);=0A= if (Z_UNILEN_PP(search_entry) =3D=3D 0) {=0A= zend_hash_move_forward(Z_ARRVAL_P(search));=0A= if (Z_TYPE_P(replace) =3D=3D IS_ARRAY) {=0A= @@ -5590,7 +5578,7 @@=0A= if (zend_hash_get_current_data(Z_ARRVAL_P(replace), (void = **)&replace_entry) =3D=3D SUCCESS) {=0A= /* Make sure we're dealing with strings. */=0A= SEPARATE_ZVAL(replace_entry);=0A= - convert_to_text(*replace_entry);=0A= + convert_to_unicode(*replace_entry);=0A= =0A= /* Set replacement value to the one we got from array */=0A= replace_value =3D Z_UNIVAL_PP(replace_entry);=0A= @@ -5605,42 +5593,28 @@=0A= }=0A= =0A= if (Z_UNILEN_PP(search_entry) =3D=3D 1) {=0A= - if (UG(unicode)) {=0A= - if (case_sensitivity) {=0A= - php_u_char_to_str_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= - Z_USTRVAL_PP(search_entry)[0],=0A= - replace_value.u, replace_len,=0A= - &temp_result, replace_count);=0A= - } else {=0A= - Z_USTRVAL(temp_result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= - Z_USTRVAL_PP(search_entry), = Z_USTRLEN_PP(search_entry),=0A= - replace_value.u, replace_len,=0A= - &Z_USTRLEN(temp_result), replace_count TSRMLS_CC);=0A= - }=0A= + if (case_sensitivity) {=0A= + php_u_char_to_str_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= + Z_USTRVAL_PP(search_entry)[0],=0A= + replace_value.u, replace_len,=0A= + &temp_result, replace_count);=0A= } else {=0A= - php_char_to_str_ex(Z_STRVAL_P(result), Z_STRLEN_P(result),=0A= - Z_STRVAL_PP(search_entry)[0],=0A= - replace_value.s, replace_len,=0A= - &temp_result, case_sensitivity, replace_count);=0A= + Z_USTRVAL(temp_result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= + Z_USTRVAL_PP(search_entry), = Z_USTRLEN_PP(search_entry),=0A= + replace_value.u, replace_len,=0A= + &Z_USTRLEN(temp_result), replace_count TSRMLS_CC);=0A= }=0A= } else if (Z_UNILEN_PP(search_entry) > 1) {=0A= - if (UG(unicode)) {=0A= - if (case_sensitivity) {=0A= - Z_USTRVAL(temp_result) =3D = php_u_str_to_str_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= - Z_USTRVAL_PP(search_entry), = Z_USTRLEN_PP(search_entry),=0A= - replace_value.u, replace_len,=0A= - &Z_USTRLEN(temp_result), replace_count);=0A= - } else {=0A= - Z_USTRVAL(temp_result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= - Z_USTRVAL_PP(search_entry), = Z_USTRLEN_PP(search_entry),=0A= - replace_value.u, replace_len,=0A= - &Z_USTRLEN(temp_result), replace_count TSRMLS_CC);=0A= - }=0A= + if (case_sensitivity) {=0A= + Z_USTRVAL(temp_result) =3D = php_u_str_to_str_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= + Z_USTRVAL_PP(search_entry), Z_USTRLEN_PP(search_entry),=0A= + replace_value.u, replace_len,=0A= + &Z_USTRLEN(temp_result), replace_count);=0A= } else {=0A= - Z_STRVAL(temp_result) =3D php_str_to_str_ex(Z_STRVAL_P(result), = Z_STRLEN_P(result),=0A= - Z_STRVAL_PP(search_entry), Z_STRLEN_PP(search_entry),=0A= - replace_value.s, replace_len,=0A= - &Z_STRLEN(temp_result), case_sensitivity, = replace_count);=0A= + Z_USTRVAL(temp_result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_P(result), Z_USTRLEN_P(result),=0A= + Z_USTRVAL_PP(search_entry), = Z_USTRLEN_PP(search_entry),=0A= + replace_value.u, replace_len,=0A= + &Z_USTRLEN(temp_result), replace_count TSRMLS_CC);=0A= }=0A= }=0A= =0A= @@ -5656,42 +5630,28 @@=0A= }=0A= } else {=0A= if (Z_UNILEN_P(search) =3D=3D 1) {=0A= - if (UG(unicode)) {=0A= - if (case_sensitivity) {=0A= - php_u_char_to_str_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= - Z_USTRVAL_P(search)[0],=0A= - Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= - result, replace_count);=0A= - } else {=0A= - Z_USTRVAL_P(result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= - Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= - Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= - &Z_USTRLEN_P(result), replace_count TSRMLS_CC);=0A= - }=0A= + if (case_sensitivity) {=0A= + php_u_char_to_str_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= + Z_USTRVAL_P(search)[0],=0A= + Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= + result, replace_count);=0A= } else {=0A= - php_char_to_str_ex(Z_STRVAL_PP(subject), Z_STRLEN_PP(subject),=0A= - Z_STRVAL_P(search)[0],=0A= - Z_STRVAL_P(replace), Z_STRLEN_P(replace),=0A= - result, case_sensitivity, replace_count);=0A= + Z_USTRVAL_P(result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= + Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= + Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= + &Z_USTRLEN_P(result), replace_count TSRMLS_CC);=0A= }=0A= } else if (Z_STRLEN_P(search) > 1) {=0A= - if (UG(unicode)) {=0A= - if (case_sensitivity) {=0A= - Z_USTRVAL_P(result) =3D php_u_str_to_str_ex(Z_USTRVAL_PP(subject), = Z_USTRLEN_PP(subject),=0A= - Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= - Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= - &Z_USTRLEN_P(result), replace_count);=0A= - } else {=0A= - Z_USTRVAL_P(result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= - Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= - Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= - &Z_USTRLEN_P(result), replace_count TSRMLS_CC);=0A= - }=0A= + if (case_sensitivity) {=0A= + Z_USTRVAL_P(result) =3D php_u_str_to_str_ex(Z_USTRVAL_PP(subject), = Z_USTRLEN_PP(subject),=0A= + Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= + Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= + &Z_USTRLEN_P(result), replace_count);=0A= } else {=0A= - Z_STRVAL_P(result) =3D php_str_to_str_ex(Z_STRVAL_PP(subject), = Z_STRLEN_PP(subject),=0A= - Z_STRVAL_P(search), Z_STRLEN_P(search),=0A= - Z_STRVAL_P(replace), Z_STRLEN_P(replace),=0A= - &Z_STRLEN_P(result), case_sensitivity, replace_count);=0A= + Z_USTRVAL_P(result) =3D = php_u_str_to_str_case_ex(Z_USTRVAL_PP(subject), Z_USTRLEN_PP(subject),=0A= + Z_USTRVAL_P(search), Z_USTRLEN_P(search),=0A= + Z_USTRVAL_P(replace), Z_USTRLEN_P(replace),=0A= + &Z_USTRLEN_P(result), replace_count TSRMLS_CC);=0A= }=0A= } else {=0A= *result =3D **subject;=0A= @@ -5721,10 +5681,10 @@=0A= =0A= /* Make sure we're dealing with strings and do the replacement. */=0A= if (Z_TYPE_P(search) !=3D IS_ARRAY) {=0A= - convert_to_text(search);=0A= - convert_to_text(replace);=0A= + convert_to_unicode(search);=0A= + convert_to_unicode(replace);=0A= } else if (Z_TYPE_P(replace) !=3D IS_ARRAY) {=0A= - convert_to_text(replace);=0A= + convert_to_unicode(replace);=0A= }=0A= =0A= /* if subject is an array */=0A= @@ -6143,9 +6103,7 @@=0A= WRONG_PARAM_COUNT;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= - }=0A= + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= =0A= #ifdef HAVE_SETLOCALE=0A= pcategory =3D args[0];=0A= @@ -7047,7 +7005,7 @@=0A= php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown mode");=0A= RETURN_FALSE;=0A= }=0A= - if (UG(unicode) && mode !=3D 1) {=0A= + if (mode !=3D 1) {=0A= php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only mode=3D1 is = supported with Unicode strings");=0A= RETURN_FALSE;=0A= }=0A= @@ -7175,9 +7133,7 @@=0A= return;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= - }=0A= + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "deprecated in Unicode = mode, please use ICU locale functions");=0A= =0A= MAKE_STD_ZVAL(grouping);=0A= MAKE_STD_ZVAL(mon_grouping);=0A= @@ -7515,7 +7471,7 @@=0A= }=0A= =0A= if (Z_TYPE_PP(args[0]) !=3D IS_STRING && Z_TYPE_PP(args[0]) !=3D = IS_UNICODE) {=0A= - convert_to_text_ex(args[0]);=0A= + convert_to_unicode_ex(args[0]);=0A= }=0A= =0A= if (Z_TYPE_PP(args[0]) =3D=3D IS_UNICODE) {=0A= Index: ext/standard/type.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/type.c,v=0A= retrieving revision 1.55=0A= diff -u -r1.55 type.c=0A= --- ext/standard/type.c 29 Mar 2008 22:02:20 -0000 1.55=0A= +++ ext/standard/type.c 8 Jun 2008 18:38:14 -0000=0A= @@ -115,11 +115,7 @@=0A= } else if (!strcasecmp(new_type, "binary")) { /* explicit binary cast = */=0A= convert_to_string(*var);=0A= } else if (!strcasecmp(new_type, "string")) { /* runtime string type */=0A= - if (UG(unicode)) {=0A= - convert_to_unicode(*var);=0A= - } else {=0A= - convert_to_string(*var);=0A= - }=0A= + convert_to_unicode(*var);=0A= } else if (!strcasecmp(new_type, "unicode")) { /* explicit unicode = cast */=0A= convert_to_unicode(*var);=0A= } else if (!strcasecmp(new_type, "array")) {=0A= @@ -202,11 +198,8 @@=0A= WRONG_PARAM_COUNT;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - zend_make_unicode_zval(*num, &expr_copy, &use_copy);=0A= - } else {=0A= - zend_make_string_zval(*num, &expr_copy, &use_copy);=0A= - }=0A= + zend_make_unicode_zval(*num, &expr_copy, &use_copy);=0A= +=0A= if (use_copy) {=0A= tmp =3D &expr_copy;=0A= RETVAL_ZVAL(tmp, 0, 0);=0A= @@ -237,7 +230,7 @@=0A= if (ce->name_length !=3D sizeof(INCOMPLETE_CLASS) - 1) {=0A= /* We can get away with this because INCOMPLETE_CLASS is ascii and = has a 1:1 relationship with unicode */=0A= RETURN_TRUE;=0A= - } else if (UG(unicode)) {=0A= + } else {=0A= #ifndef PHP_WIN32=0A= U_STRING_DECL(uIncompleteClass, (INCOMPLETE_CLASS), = sizeof(INCOMPLETE_CLASS) - 1);=0A= U_STRING_INIT(uIncompleteClass, (INCOMPLETE_CLASS), = sizeof(INCOMPLETE_CLASS) - 1);=0A= @@ -257,12 +250,9 @@=0A= }=0A= /* Non-ascii class name means it can't be INCOMPLETE_CLASS and is = therefore okay */=0A= #endif=0A= - } else {=0A= - if (!memcmp(ce->name.s, INCOMPLETE_CLASS, = sizeof(INCOMPLETE_CLASS))) {=0A= - RETURN_FALSE;=0A= - }=0A= }=0A= }=0A= +=0A= if (type =3D=3D IS_RESOURCE) {=0A= char *type_name;=0A= type_name =3D zend_rsrc_list_get_rsrc_type(Z_LVAL_P(arg) TSRMLS_CC);=0A= @@ -270,6 +260,7 @@=0A= RETURN_FALSE;=0A= }=0A= }=0A= +=0A= RETURN_TRUE;=0A= } else {=0A= RETURN_FALSE;=0A= Index: ext/standard/uniqid.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/uniqid.c,v=0A= retrieving revision 1.51=0A= diff -u -r1.51 uniqid.c=0A= --- ext/standard/uniqid.c 4 May 2008 21:16:22 -0000 1.51=0A= +++ ext/standard/uniqid.c 9 Jun 2008 11:03:25 -0000=0A= @@ -45,7 +45,7 @@=0A= {=0A= zstr prefix =3D EMPTY_ZSTR;=0A= int prefix_len =3D 0;=0A= - zend_uchar str_type =3D ZEND_STR_TYPE;=0A= + zend_uchar str_type =3D IS_UNICODE;=0A= #if defined(__CYGWIN__)=0A= zend_bool more_entropy =3D 1;=0A= #else=0A= Index: ext/standard/url.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/url.c,v=0A= retrieving revision 1.108=0A= diff -u -r1.108 url.c=0A= --- ext/standard/url.c 4 Jun 2008 19:34:45 -0000 1.108=0A= +++ ext/standard/url.c 8 Jun 2008 18:39:38 -0000=0A= @@ -40,11 +40,10 @@=0A= =0A= /*=0A= * These macros are similar to ZVAL_U_STRING*() but they select between=0A= - * Unicode/binary based on explicitly specified type, rather than the=0A= - * UG(unicode) global. They may be useful for other functions, but = implementing=0A= - * them would probably require updating all of the corresponding = add_*_assoc_*()=0A= - * macros, so let's keep them here for now and revisit the issue if = someone else=0A= - * needs them in the future.=0A= + * Unicode/binary based on explicitly specified type. They may be = useful for=0A= + * other functions, but implementing them would probably require = updating all=0A= + * of the corresponding add_*_assoc_*() macros, so let's keep them here = for=0A= + * now and revisit the issue if someone else needs them in the future.=0A= */=0A= #define ZVAL_UT_STRING(conv, type, z, s, flags) { \=0A= if (type =3D=3D IS_UNICODE) { \=0A= Index: ext/standard/var.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/var.c,v=0A= retrieving revision 1.274=0A= diff -u -r1.274 var.c=0A= --- ext/standard/var.c 31 Dec 2007 07:12:16 -0000 1.274=0A= +++ ext/standard/var.c 8 Jun 2008 18:41:08 -0000=0A= @@ -793,11 +793,7 @@=0A= smart_str_appendl(buf, "O:", 2);=0A= smart_str_append_long(buf, name_len);=0A= smart_str_appendl(buf, ":\"", 2);=0A= - if (UG(unicode)) {=0A= - php_var_serialize_ustr(buf, class_name.u, name_len);=0A= - } else {=0A= - smart_str_appendl(buf, class_name.s, name_len);=0A= - }=0A= + php_var_serialize_ustr(buf, class_name.u, name_len);=0A= smart_str_appendl(buf, "\":", 2);=0A= PHP_CLEANUP_CLASS_ATTRIBUTES();=0A= return incomplete_class;=0A= @@ -851,7 +847,7 @@=0A= }=0A= zend_hash_get_current_data_ex(HASH_OF(retval_ptr), (void **) &name, = &pos);=0A= =0A= - if (Z_TYPE_PP(name) !=3D (UG(unicode) ? IS_UNICODE : IS_STRING)) {=0A= + if (Z_TYPE_PP(name) !=3D IS_UNICODE) {=0A= php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return = an array only containing the names of instance-variables to serialize");=0A= /* we should still add element even if it's not OK,=0A= * since we already wrote the length of the array before */=0A= @@ -997,11 +993,7 @@=0A= smart_str_append_long(buf, Z_OBJCE_P(struc)->name_length);=0A= smart_str_appendl(buf, ":\"", 2);=0A= =0A= - if (UG(unicode)) {=0A= - php_var_serialize_ustr(buf, Z_OBJCE_P(struc)->name.u, = Z_OBJCE_P(struc)->name_length);=0A= - } else {=0A= - smart_str_appendl(buf, Z_OBJCE_P(struc)->name.s, = Z_OBJCE_P(struc)->name_length);=0A= - }=0A= + php_var_serialize_ustr(buf, Z_OBJCE_P(struc)->name.u, = Z_OBJCE_P(struc)->name_length);=0A= =0A= smart_str_appendl(buf, "\":", 2);=0A= =0A= @@ -1159,9 +1151,7 @@=0A= =0A= if (buf.c) {=0A= RETVAL_ASCII_STRINGL(buf.c, buf.len, 0);=0A= - if (UG(unicode)) {=0A= - smart_str_free(&buf);=0A= - }=0A= + smart_str_free(&buf);=0A= } else {=0A= RETURN_NULL();=0A= }=0A= Index: ext/standard/var_unserializer.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/var_unserializer.c,v=0A= retrieving revision 1.95=0A= diff -u -r1.95 var_unserializer.c=0A= --- ext/standard/var_unserializer.c 27 May 2008 11:27:58 -0000 1.95=0A= +++ ext/standard/var_unserializer.c 9 Jun 2008 13:47:46 -0000=0A= @@ -1,4 +1,4 @@=0A= -/* Generated by re2c 0.13.5 on Tue May 27 06:15:01 2008 */=0A= +/* Generated by re2c 0.13.5 on Mon Jun 09 14:47:24 2008 */=0A= #line 1 "ext/standard/var_unserializer.re"=0A= /*=0A= = +----------------------------------------------------------------------+=0A= @@ -18,7 +18,7 @@=0A= = +----------------------------------------------------------------------+=0A= */=0A= =0A= -/* $Id: var_unserializer.c,v 1.95 2008/05/27 11:27:58 mattwil Exp $ */=0A= +/* $Id: var_unserializer.re,v 1.74 2008/05/27 10:28:25 mattwil Exp $ */=0A= =0A= #include "php.h"=0A= #include "ext/standard/php_var.h"=0A= @@ -524,7 +524,7 @@=0A= yych =3D *(YYMARKER =3D ++YYCURSOR);=0A= if (yych =3D=3D ':') goto yy103;=0A= yy3:=0A= -#line 791 "ext/standard/var_unserializer.re"=0A= +#line 782 "ext/standard/var_unserializer.re"=0A= { return 0; }=0A= #line 530 "ext/standard/var_unserializer.c"=0A= yy4:=0A= @@ -573,7 +573,7 @@=0A= goto yy3;=0A= yy15:=0A= ++YYCURSOR;=0A= -#line 785 "ext/standard/var_unserializer.re"=0A= +#line 776 "ext/standard/var_unserializer.re"=0A= {=0A= /* this is the case where we have less data than planned */=0A= php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of = serialized data");=0A= @@ -611,7 +611,7 @@=0A= ++YYCURSOR;=0A= #line 672 "ext/standard/var_unserializer.re"=0A= {=0A= - size_t len, len2, len3, maxlen;=0A= + size_t len, len2, maxlen;=0A= long elements;=0A= zstr class_name;=0A= zend_class_entry *ce;=0A= @@ -632,22 +632,13 @@=0A= INIT_PZVAL(*rval);=0A= len2 =3D len =3D parse_uiv(start + 2);=0A= maxlen =3D max - YYCURSOR;=0A= +=0A= if (maxlen < len || len =3D=3D 0) {=0A= *p =3D start + 2;=0A= return 0;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - class_name.u =3D unserialize_ustr(&YYCURSOR, len);=0A= - } else {=0A= - len3 =3D strspn((char*)YYCURSOR, = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\= 201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\2= 23\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\24= 5\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267= \270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\= 312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\3= 34\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\35= 6\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377:");=0A= - if (len3 !=3D len) {=0A= - *p =3D YYCURSOR + len3 - len;=0A= - return 0;=0A= - }=0A= - class_name.s =3D estrndup((char*)YYCURSOR, len);=0A= - YYCURSOR +=3D len;=0A= - }=0A= + class_name.u =3D unserialize_ustr(&YYCURSOR, len);=0A= =0A= if (*(YYCURSOR) !=3D '"') {=0A= efree(class_name.v);=0A= @@ -662,7 +653,7 @@=0A= =0A= do {=0A= /* Try to find class directly */=0A= - if (zend_u_lookup_class(UG(unicode)?IS_UNICODE:IS_STRING, class_name, = len2, &pce TSRMLS_CC) =3D=3D SUCCESS) {=0A= + if (zend_u_lookup_class(IS_UNICODE, class_name, len2, &pce TSRMLS_CC) = =3D=3D SUCCESS) {=0A= ce =3D *pce;=0A= break;=0A= }=0A= @@ -693,7 +684,7 @@=0A= }=0A= =0A= /* The callback function may have defined the class */=0A= - if (zend_u_lookup_class(UG(unicode)?IS_UNICODE:IS_STRING, class_name, = len2, &pce TSRMLS_CC) =3D=3D SUCCESS) {=0A= + if (zend_u_lookup_class(IS_UNICODE, class_name, len2, &pce TSRMLS_CC) = =3D=3D SUCCESS) {=0A= ce =3D *pce;=0A= } else {=0A= php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function %s() hasn't = defined the class it was called for", user_func->value.str.val);=0A= @@ -722,7 +713,7 @@=0A= =0A= return object_common2(UNSERIALIZE_PASSTHRU, elements);=0A= }=0A= -#line 726 "ext/standard/var_unserializer.c"=0A= +#line 717 "ext/standard/var_unserializer.c"=0A= yy26:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D ',') {=0A= @@ -755,7 +746,7 @@=0A= return object_common2(UNSERIALIZE_PASSTHRU,=0A= object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));=0A= }=0A= -#line 759 "ext/standard/var_unserializer.c"=0A= +#line 750 "ext/standard/var_unserializer.c"=0A= yy33:=0A= yych =3D *++YYCURSOR;=0A= if (yych =3D=3D '+') goto yy34;=0A= @@ -796,7 +787,7 @@=0A= =0A= return finish_nested_data(UNSERIALIZE_PASSTHRU);=0A= }=0A= -#line 800 "ext/standard/var_unserializer.c"=0A= +#line 791 "ext/standard/var_unserializer.c"=0A= yy40:=0A= yych =3D *++YYCURSOR;=0A= if (yych =3D=3D '+') goto yy41;=0A= @@ -846,7 +837,7 @@=0A= ZVAL_UNICODEL(*rval, ustr, len, 0);=0A= return 1;=0A= }=0A= -#line 850 "ext/standard/var_unserializer.c"=0A= +#line 841 "ext/standard/var_unserializer.c"=0A= yy47:=0A= yych =3D *++YYCURSOR;=0A= if (yych =3D=3D '+') goto yy48;=0A= @@ -896,7 +887,7 @@=0A= ZVAL_STRINGL(*rval, str, len, 0);=0A= return 1;=0A= }=0A= -#line 900 "ext/standard/var_unserializer.c"=0A= +#line 891 "ext/standard/var_unserializer.c"=0A= yy54:=0A= yych =3D *++YYCURSOR;=0A= if (yych =3D=3D '+') goto yy55;=0A= @@ -945,7 +936,7 @@=0A= ZVAL_STRINGL(*rval, str, len, 1);=0A= return 1;=0A= }=0A= -#line 949 "ext/standard/var_unserializer.c"=0A= +#line 940 "ext/standard/var_unserializer.c"=0A= yy61:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D '/') {=0A= @@ -1040,7 +1031,7 @@=0A= ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL));=0A= return 1;=0A= }=0A= -#line 1044 "ext/standard/var_unserializer.c"=0A= +#line 1035 "ext/standard/var_unserializer.c"=0A= yy73:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D ',') {=0A= @@ -1114,7 +1105,7 @@=0A= =0A= return 1;=0A= }=0A= -#line 1118 "ext/standard/var_unserializer.c"=0A= +#line 1109 "ext/standard/var_unserializer.c"=0A= yy84:=0A= yych =3D *++YYCURSOR;=0A= if (yych =3D=3D 'N') goto yy81;=0A= @@ -1148,7 +1139,7 @@=0A= ZVAL_LONG(*rval, parse_iv(start + 2));=0A= return 1;=0A= }=0A= -#line 1152 "ext/standard/var_unserializer.c"=0A= +#line 1143 "ext/standard/var_unserializer.c"=0A= yy91:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D '/') goto yy19;=0A= @@ -1163,7 +1154,7 @@=0A= ZVAL_BOOL(*rval, parse_iv(start + 2));=0A= return 1;=0A= }=0A= -#line 1167 "ext/standard/var_unserializer.c"=0A= +#line 1158 "ext/standard/var_unserializer.c"=0A= yy95:=0A= ++YYCURSOR;=0A= #line 515 "ext/standard/var_unserializer.re"=0A= @@ -1173,7 +1164,7 @@=0A= ZVAL_NULL(*rval);=0A= return 1;=0A= }=0A= -#line 1177 "ext/standard/var_unserializer.c"=0A= +#line 1168 "ext/standard/var_unserializer.c"=0A= yy97:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D ',') {=0A= @@ -1219,7 +1210,7 @@=0A= =0A= return 1;=0A= }=0A= -#line 1223 "ext/standard/var_unserializer.c"=0A= +#line 1214 "ext/standard/var_unserializer.c"=0A= yy103:=0A= yych =3D *++YYCURSOR;=0A= if (yych <=3D ',') {=0A= @@ -1263,9 +1254,9 @@=0A= =0A= return 1;=0A= }=0A= -#line 1267 "ext/standard/var_unserializer.c"=0A= +#line 1258 "ext/standard/var_unserializer.c"=0A= }=0A= -#line 793 "ext/standard/var_unserializer.re"=0A= +#line 784 "ext/standard/var_unserializer.re"=0A= =0A= =0A= return 0;=0A= Index: ext/standard/var_unserializer.re=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/var_unserializer.re,v=0A= retrieving revision 1.74=0A= diff -u -r1.74 var_unserializer.re=0A= --- ext/standard/var_unserializer.re 27 May 2008 10:28:25 -0000 1.74=0A= +++ ext/standard/var_unserializer.re 9 Jun 2008 13:47:03 -0000=0A= @@ -670,7 +670,7 @@=0A= }=0A= =0A= object ":" uiv ":" ["] {=0A= - size_t len, len2, len3, maxlen;=0A= + size_t len, len2, maxlen;=0A= long elements;=0A= zstr class_name;=0A= zend_class_entry *ce;=0A= @@ -691,22 +691,13 @@=0A= INIT_PZVAL(*rval);=0A= len2 =3D len =3D parse_uiv(start + 2);=0A= maxlen =3D max - YYCURSOR;=0A= +=0A= if (maxlen < len || len =3D=3D 0) {=0A= *p =3D start + 2;=0A= return 0;=0A= }=0A= =0A= - if (UG(unicode)) {=0A= - class_name.u =3D unserialize_ustr(&YYCURSOR, len);=0A= - } else {=0A= - len3 =3D strspn((char*)YYCURSOR, = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\= 201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\2= 23\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\24= 5\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267= \270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\= 312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\3= 34\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\35= 6\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377:");=0A= - if (len3 !=3D len) {=0A= - *p =3D YYCURSOR + len3 - len;=0A= - return 0;=0A= - }=0A= - class_name.s =3D estrndup((char*)YYCURSOR, len);=0A= - YYCURSOR +=3D len;=0A= - }=0A= + class_name.u =3D unserialize_ustr(&YYCURSOR, len);=0A= =0A= if (*(YYCURSOR) !=3D '"') {=0A= efree(class_name.v);=0A= @@ -721,7 +712,7 @@=0A= =0A= do {=0A= /* Try to find class directly */=0A= - if (zend_u_lookup_class(UG(unicode)?IS_UNICODE:IS_STRING, class_name, = len2, &pce TSRMLS_CC) =3D=3D SUCCESS) {=0A= + if (zend_u_lookup_class(IS_UNICODE, class_name, len2, &pce TSRMLS_CC) = =3D=3D SUCCESS) {=0A= ce =3D *pce;=0A= break;=0A= }=0A= @@ -752,7 +743,7 @@=0A= }=0A= =0A= /* The callback function may have defined the class */=0A= - if (zend_u_lookup_class(UG(unicode)?IS_UNICODE:IS_STRING, class_name, = len2, &pce TSRMLS_CC) =3D=3D SUCCESS) {=0A= + if (zend_u_lookup_class(IS_UNICODE, class_name, len2, &pce TSRMLS_CC) = =3D=3D SUCCESS) {=0A= ce =3D *pce;=0A= } else {=0A= php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function %s() hasn't = defined the class it was called for", user_func->value.str.val);=0A= ------=_NextPart_000_014C_01C8CA62.601788E0--