Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-09 Thread Dmitry Stogov

On 12/09/2010 08:51 PM, Moriyoshi Koizumi wrote:

I was thinking that this is rather a *big* change, so we'd better roll
our patches into one and commit it altogether.


Sorry, that time I didn't understand that you started to improve the patch.


 I am fine if that
works for anyone else.


The patch had few small issues, but they are already fixed.

Thanks. Dmitry.



Regards,
Moriyoshi

On Thu, Dec 9, 2010 at 6:11 PM, Dmitry Stogov  wrote:

Hi Moriyoshi,

Ops, sorry. I didn't understand your disagreement, and I didn't see any
other objections. So I committed the patch as it was planned. Could you
prepare a patch on top of this one?

I'm also going to look into your recommendation of moving
mbstring.script_encoding into zend.script_encoding instead of
zend.multibyte.

Thanks. Dmitry.

On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote:


Please revert.

On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumiwrote:


Hey, I don't think there was agreement on this yet.  I've actually
been preparing a patch that minimizes the extra hook points in SAPI.

Moriyoshi

On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogovwrote:


dmitry   Wed, 08 Dec 2010 11:27:34 +

Revision: http://svn.php.net/viewvc?view=revision&revision=306077

Log:
Removed compile time dependency from ext/mbstring

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_globals.h
U   php/php-src/trunk/Zend/zend_multibyte.c
U   php/php-src/trunk/Zend/zend_multibyte.h
U   php/php-src/trunk/ext/exif/exif.c
U   php/php-src/trunk/ext/mbstring/mbstring.c
U   php/php-src/trunk/ext/standard/html.c
U   php/php-src/trunk/main/rfc1867.c
U   php/php-src/trunk/main/rfc1867.h
A   php/php-src/trunk/tests/basic/028.phpt
A   php/php-src/trunk/tests/basic/029.phpt


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php









--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-09 Thread Moriyoshi Koizumi
I was thinking that this is rather a *big* change, so we'd better roll
our patches into one and commit it altogether.  I am fine if that
works for anyone else.

Regards,
Moriyoshi

On Thu, Dec 9, 2010 at 6:11 PM, Dmitry Stogov  wrote:
> Hi Moriyoshi,
>
> Ops, sorry. I didn't understand your disagreement, and I didn't see any
> other objections. So I committed the patch as it was planned. Could you
> prepare a patch on top of this one?
>
> I'm also going to look into your recommendation of moving
> mbstring.script_encoding into zend.script_encoding instead of
> zend.multibyte.
>
> Thanks. Dmitry.
>
> On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote:
>>
>> Please revert.
>>
>> On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumi  wrote:
>>>
>>> Hey, I don't think there was agreement on this yet.  I've actually
>>> been preparing a patch that minimizes the extra hook points in SAPI.
>>>
>>> Moriyoshi
>>>
>>> On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov  wrote:

 dmitry                                   Wed, 08 Dec 2010 11:27:34 +

 Revision: http://svn.php.net/viewvc?view=revision&revision=306077

 Log:
 Removed compile time dependency from ext/mbstring

 Changed paths:
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/Zend/zend_compile.c
    U   php/php-src/trunk/Zend/zend_globals.h
    U   php/php-src/trunk/Zend/zend_multibyte.c
    U   php/php-src/trunk/Zend/zend_multibyte.h
    U   php/php-src/trunk/ext/exif/exif.c
    U   php/php-src/trunk/ext/mbstring/mbstring.c
    U   php/php-src/trunk/ext/standard/html.c
    U   php/php-src/trunk/main/rfc1867.c
    U   php/php-src/trunk/main/rfc1867.h
    A   php/php-src/trunk/tests/basic/028.phpt
    A   php/php-src/trunk/tests/basic/029.phpt


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

>>>
>
>

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-09 Thread Dmitry Stogov

Hi Moriyoshi,

Ops, sorry. I didn't understand your disagreement, and I didn't see any 
other objections. So I committed the patch as it was planned. Could you 
prepare a patch on top of this one?


I'm also going to look into your recommendation of moving 
mbstring.script_encoding into zend.script_encoding instead of 
zend.multibyte.


Thanks. Dmitry.

On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote:

Please revert.

On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumi  wrote:

Hey, I don't think there was agreement on this yet.  I've actually
been preparing a patch that minimizes the extra hook points in SAPI.

Moriyoshi

On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov  wrote:

dmitry   Wed, 08 Dec 2010 11:27:34 +

Revision: http://svn.php.net/viewvc?view=revision&revision=306077

Log:
Removed compile time dependency from ext/mbstring

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_globals.h
U   php/php-src/trunk/Zend/zend_multibyte.c
U   php/php-src/trunk/Zend/zend_multibyte.h
U   php/php-src/trunk/ext/exif/exif.c
U   php/php-src/trunk/ext/mbstring/mbstring.c
U   php/php-src/trunk/ext/standard/html.c
U   php/php-src/trunk/main/rfc1867.c
U   php/php-src/trunk/main/rfc1867.h
A   php/php-src/trunk/tests/basic/028.phpt
A   php/php-src/trunk/tests/basic/029.phpt


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-08 Thread Moriyoshi Koizumi
Please revert.

On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumi  wrote:
> Hey, I don't think there was agreement on this yet.  I've actually
> been preparing a patch that minimizes the extra hook points in SAPI.
>
> Moriyoshi
>
> On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov  wrote:
>> dmitry                                   Wed, 08 Dec 2010 11:27:34 +
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=306077
>>
>> Log:
>> Removed compile time dependency from ext/mbstring
>>
>> Changed paths:
>>    U   php/php-src/trunk/NEWS
>>    U   php/php-src/trunk/Zend/zend_compile.c
>>    U   php/php-src/trunk/Zend/zend_globals.h
>>    U   php/php-src/trunk/Zend/zend_multibyte.c
>>    U   php/php-src/trunk/Zend/zend_multibyte.h
>>    U   php/php-src/trunk/ext/exif/exif.c
>>    U   php/php-src/trunk/ext/mbstring/mbstring.c
>>    U   php/php-src/trunk/ext/standard/html.c
>>    U   php/php-src/trunk/main/rfc1867.c
>>    U   php/php-src/trunk/main/rfc1867.h
>>    A   php/php-src/trunk/tests/basic/028.phpt
>>    A   php/php-src/trunk/tests/basic/029.phpt
>>
>>
>> --
>> PHP CVS Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-08 Thread Moriyoshi Koizumi
Hey, I don't think there was agreement on this yet.  I've actually
been preparing a patch that minimizes the extra hook points in SAPI.

Moriyoshi

On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov  wrote:
> dmitry                                   Wed, 08 Dec 2010 11:27:34 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=306077
>
> Log:
> Removed compile time dependency from ext/mbstring
>
> Changed paths:
>    U   php/php-src/trunk/NEWS
>    U   php/php-src/trunk/Zend/zend_compile.c
>    U   php/php-src/trunk/Zend/zend_globals.h
>    U   php/php-src/trunk/Zend/zend_multibyte.c
>    U   php/php-src/trunk/Zend/zend_multibyte.h
>    U   php/php-src/trunk/ext/exif/exif.c
>    U   php/php-src/trunk/ext/mbstring/mbstring.c
>    U   php/php-src/trunk/ext/standard/html.c
>    U   php/php-src/trunk/main/rfc1867.c
>    U   php/php-src/trunk/main/rfc1867.h
>    A   php/php-src/trunk/tests/basic/028.phpt
>    A   php/php-src/trunk/tests/basic/029.phpt
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867

2010-12-08 Thread Antony Dovgal
Hello Dmitry.

After this update ext/exif always produces these warnings:
# php -v
PHP Warning:  PHP Startup: Illegal encoding ignored: 'ISO-8859-15' in Unknown 
on line 0
PHP Warning:  PHP Startup: Illegal encoding ignored: 'UCS-2BE' in Unknown on 
line 0
PHP Warning:  PHP Startup: Illegal encoding ignored: 'UCS-2LE' in Unknown on 
line 0
PHP Warning:  PHP Startup: Illegal encoding ignored: 'JIS' in Unknown on line 0
PHP Warning:  PHP Startup: Illegal encoding ignored: 'JIS' in Unknown on line 0
PHP 5.3.99-dev (cli) (built: Dec  8 2010 14:37:43) (DEBUG)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2010 Zend Technologies


On 12/08/2010 02:27 PM, Dmitry Stogov wrote:
> dmitry   Wed, 08 Dec 2010 11:27:34 +
> 
> Revision: http://svn.php.net/viewvc?view=revision&revision=306077
> 
> Log:
> Removed compile time dependency from ext/mbstring
> 
> Changed paths:
> U   php/php-src/trunk/NEWS
> U   php/php-src/trunk/Zend/zend_compile.c
> U   php/php-src/trunk/Zend/zend_globals.h
> U   php/php-src/trunk/Zend/zend_multibyte.c
> U   php/php-src/trunk/Zend/zend_multibyte.h
> U   php/php-src/trunk/ext/exif/exif.c
> U   php/php-src/trunk/ext/mbstring/mbstring.c
> U   php/php-src/trunk/ext/standard/html.c
> U   php/php-src/trunk/main/rfc1867.c
> U   php/php-src/trunk/main/rfc1867.h
> A   php/php-src/trunk/tests/basic/028.phpt
> A   php/php-src/trunk/tests/basic/029.phpt
> 
> 


-- 
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867.c m

2010-12-08 Thread Dmitry Stogov
dmitry   Wed, 08 Dec 2010 11:27:34 +

Revision: http://svn.php.net/viewvc?view=revision&revision=306077

Log:
Removed compile time dependency from ext/mbstring

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_globals.h
U   php/php-src/trunk/Zend/zend_multibyte.c
U   php/php-src/trunk/Zend/zend_multibyte.h
U   php/php-src/trunk/ext/exif/exif.c
U   php/php-src/trunk/ext/mbstring/mbstring.c
U   php/php-src/trunk/ext/standard/html.c
U   php/php-src/trunk/main/rfc1867.c
U   php/php-src/trunk/main/rfc1867.h
A   php/php-src/trunk/tests/basic/028.phpt
A   php/php-src/trunk/tests/basic/029.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2010-12-08 09:38:47 UTC (rev 306076)
+++ php/php-src/trunk/NEWS	2010-12-08 11:27:34 UTC (rev 306077)
@@ -32,6 +32,7 @@
   . Added multibyte suppport by default. Previosly php had to be compiled
 with --enable-zend-multibyte. Now it can be enabled or disabled throug
 zend.multibyte directive in php.ini (Dmitry)
+  . Removed compile time dependency from ext/mbstring (Dmitry)
   . Added scalar typehints to the parser and the reflection API. (Ilia, Derick)
   . Added support for Traits. (Stefan)
   . Added closure $this support back. (Stas)

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c	2010-12-08 09:38:47 UTC (rev 306076)
+++ php/php-src/trunk/Zend/zend_compile.c	2010-12-08 11:27:34 UTC (rev 306077)
@@ -200,9 +200,6 @@
 	CG(script_encoding_list) = NULL;
 	CG(script_encoding_list_size) = 0;
 	CG(internal_encoding) = NULL;
-	CG(encoding_detector) = NULL;
-	CG(encoding_converter) = NULL;
-	CG(encoding_oddlen) = NULL;
 	CG(encoding_declared) = 0;
 }
 /* }}} */

Modified: php/php-src/trunk/Zend/zend_globals.h
===
--- php/php-src/trunk/Zend/zend_globals.h	2010-12-08 09:38:47 UTC (rev 306076)
+++ php/php-src/trunk/Zend/zend_globals.h	2010-12-08 11:27:34 UTC (rev 306077)
@@ -155,11 +155,6 @@

 	zend_encoding *internal_encoding;

-	/* multibyte utility functions */
-	zend_encoding_detector encoding_detector;
-	zend_encoding_converter encoding_converter;
-	zend_encoding_oddlen encoding_oddlen;
-
 #ifdef ZTS
 	zval ***static_members_table;
 	int last_static_member;

Modified: php/php-src/trunk/Zend/zend_multibyte.c
===
--- php/php-src/trunk/Zend/zend_multibyte.c	2010-12-08 09:38:47 UTC (rev 306076)
+++ php/php-src/trunk/Zend/zend_multibyte.c	2010-12-08 11:27:34 UTC (rev 306077)
@@ -513,8 +513,37 @@
 	NULL
 };

+static char* dummy_encoding_detector(const unsigned char *string, size_t length, char *list TSRMLS_DC)
+{
+	return NULL;
+}

+static int dummy_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const char *encoding_to, const char *encoding_from TSRMLS_DC)
+{
+	return -1;
+}

+static size_t dummy_encoding_oddlen(const unsigned char *string, size_t length, const char *encoding TSRMLS_DC)
+{
+	return 0;
+}
+
+static int dummy_encoding_list_checker(const char *encoding_list TSRMLS_DC)
+{
+	return 0;
+}
+
+static const char* dummy_get_internal_encoding(TSRMLS_D)
+{
+	return NULL;
+}
+
+ZEND_API zend_encoding_detector zend_multibyte_encoding_detector = dummy_encoding_detector;
+ZEND_API zend_encoding_converter zend_multibyte_encoding_converter = dummy_encoding_converter;
+ZEND_API zend_encoding_oddlen zend_multibyte_encoding_oddlen = dummy_encoding_oddlen;
+ZEND_API zend_encoding_list_checker zend_multibyte_check_encoding_list = dummy_encoding_list_checker;
+ZEND_API zend_encoding_name_getter zend_multibyte_get_internal_encoding = dummy_get_internal_encoding;
+
 ZEND_API int zend_multibyte_set_script_encoding(const char *encoding_list,
 size_t encoding_list_size TSRMLS_DC)
 {
@@ -540,11 +569,13 @@
 	return 0;
 }

-ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen TSRMLS_DC)
+ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen, zend_encoding_list_checker encoding_list_checker, zend_encoding_name_getter get_internal_encoding TSRMLS_DC)
 {
-	CG(encoding_detector) = encoding_detector;
-	CG(encoding_converter) = encoding_converter;
-	CG(encoding_oddlen) = encoding_oddlen;
+	zend_multibyte_encoding_detector = encoding_detector;
+	zend_multibyte_encoding_converter = encoding_converter;
+	zend_multibyte_encoding_oddlen = encoding_oddlen;
+	zend_multibyte_check_encoding_list = encoding_list_checker;
+	zend_multibyte_get_internal_encoding = get_interna