[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/configure.in PHP_5_2/ext/standard/file.c PHP_5_2/main/SAPI.c PHP_5_2/main/SAPI.h PHP_5_2/main/rfc1867.c PHP_5_3/configure.in PHP_5_3/ext/standard/file.c P

2010-03-18 Thread Andrei Zmievski
andrei   Thu, 18 Mar 2010 21:07:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296358

Log:
Fix a few problems with large (2G-4G) file uploads. Added
--enable-large-uploads-fix switch because one change was in SAPI.h structure.

Changed paths:
U   php/php-src/branches/PHP_5_2/configure.in
U   php/php-src/branches/PHP_5_2/ext/standard/file.c
U   php/php-src/branches/PHP_5_2/main/SAPI.c
U   php/php-src/branches/PHP_5_2/main/SAPI.h
U   php/php-src/branches/PHP_5_2/main/rfc1867.c
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/branches/PHP_5_3/ext/standard/file.c
U   php/php-src/branches/PHP_5_3/main/SAPI.c
U   php/php-src/branches/PHP_5_3/main/SAPI.h
U   php/php-src/branches/PHP_5_3/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_2/configure.in
===
--- php/php-src/branches/PHP_5_2/configure.in	2010-03-18 19:42:55 UTC (rev 296357)
+++ php/php-src/branches/PHP_5_2/configure.in	2010-03-18 21:07:38 UTC (rev 296358)
@@ -896,6 +896,12 @@
   AC_MSG_RESULT([using system default])
 fi

+PHP_ARG_ENABLE(large-uploads-fix, whether to enable large files (2G-4G) uploads fix,
+[  --enable-large-uploads-fix Enable large files (2G-4G) uploads fix], no, no)
+if test $PHP_LARGE_UPLOADS_FIX = yes; then
+	AC_DEFINE(HAVE_LARGE_UPLOADS_FIX, 1, [Whether to enable large files (2G-4G) uploads fix])
+fi
+
 divert(5)

 dnl ## In diversion 5 we check which extensions should be compiled.

Modified: php/php-src/branches/PHP_5_2/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/file.c	2010-03-18 19:42:55 UTC (rev 296357)
+++ php/php-src/branches/PHP_5_2/ext/standard/file.c	2010-03-18 21:07:38 UTC (rev 296358)
@@ -579,7 +579,8 @@
 	char *filename;
 	int filename_len;
 	zval *data;
-	int numbytes = 0;
+	size_t numbytes = 0;
+	int result = SUCCESS;
 	long flags = 0;
 	zval *zcontext = NULL;
 	php_stream_context *context = NULL;
@@ -622,7 +623,7 @@
 		case IS_RESOURCE: {
 			size_t len;
 			if (php_stream_copy_to_stream_ex(srcstream, stream, PHP_STREAM_COPY_ALL, len) != SUCCESS) {
-numbytes = -1;
+result = FAILURE;
 			} else {
 numbytes = len;
 			}
@@ -640,7 +641,7 @@
 numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data));
 if (numbytes != Z_STRLEN_P(data)) {
 	php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space, numbytes, Z_STRLEN_P(data));
-	numbytes = -1;
+	result = FAILURE;
 }
 			}
 			break;
@@ -666,7 +667,7 @@
 			} else {
 php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space,  bytes_written, Z_STRLEN_PP(tmp));
 			}
-			numbytes = -1;
+			result = FAILURE;
 			break;
 		}
 	}
@@ -683,19 +684,19 @@
 	numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out));
 	if (numbytes != Z_STRLEN(out)) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space, numbytes, Z_STRLEN(out));
-		numbytes = -1;
+		result = FAILURE;
 	}
 	zval_dtor(out);
 	break;
 }
 			}
 		default:
-			numbytes = -1;
+			result = FAILURE;
 			break;
 	}
 	php_stream_close(stream);

-	if (numbytes  0) {
+	if (result == FAILURE) {
 		RETURN_FALSE;
 	}


Modified: php/php-src/branches/PHP_5_2/main/SAPI.c
===
--- php/php-src/branches/PHP_5_2/main/SAPI.c	2010-03-18 19:42:55 UTC (rev 296357)
+++ php/php-src/branches/PHP_5_2/main/SAPI.c	2010-03-18 21:07:38 UTC (rev 296358)
@@ -191,8 +191,8 @@

 SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
 {
-	int read_bytes;
-	int allocated_bytes=SAPI_POST_BLOCK_SIZE+1;
+	size_t read_bytes;
+	size_t allocated_bytes=SAPI_POST_BLOCK_SIZE+1;

 	if (SG(request_info).content_length  SG(post_max_size)) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, POST Content-Length of %ld bytes exceeds the limit of %ld bytes,

Modified: php/php-src/branches/PHP_5_2/main/SAPI.h
===
--- php/php-src/branches/PHP_5_2/main/SAPI.h	2010-03-18 19:42:55 UTC (rev 296357)
+++ php/php-src/branches/PHP_5_2/main/SAPI.h	2010-03-18 21:07:38 UTC (rev 296358)
@@ -118,7 +118,11 @@
 	void *server_context;
 	sapi_request_info request_info;
 	sapi_headers_struct sapi_headers;
+#ifdef HAVE_LARGE_UPLOADS_FIX
+	size_t read_post_bytes;
+#else
 	int read_post_bytes;
+#endif
 	unsigned char headers_sent;
 	struct stat global_stat;
 	char *default_mimetype;

Modified: php/php-src/branches/PHP_5_2/main/rfc1867.c
===
--- php/php-src/branches/PHP_5_2/main/rfc1867.c	2010-03-18 19:42:55 UTC (rev 296357)
+++ 

[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/configure.in PHP_5_2/ext/standard/file.c PHP_5_2/main/SAPI.c PHP_5_2/main/SAPI.h PHP_5_2/main/rfc1867.c PHP_5_3/configure.in PHP_5_3/ext/standard/file.c P

2010-03-18 Thread Andrei Zmievski
andrei   Thu, 18 Mar 2010 22:37:25 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296362

Log:
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.

Hope all the relevant parties are satisfied.

Changed paths:
U   php/php-src/branches/PHP_5_2/configure.in
U   php/php-src/branches/PHP_5_2/ext/standard/file.c
U   php/php-src/branches/PHP_5_2/main/SAPI.c
U   php/php-src/branches/PHP_5_2/main/SAPI.h
U   php/php-src/branches/PHP_5_2/main/rfc1867.c
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/branches/PHP_5_3/ext/standard/file.c
U   php/php-src/branches/PHP_5_3/main/SAPI.c
U   php/php-src/branches/PHP_5_3/main/SAPI.h
U   php/php-src/branches/PHP_5_3/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_2/configure.in
===
--- php/php-src/branches/PHP_5_2/configure.in	2010-03-18 22:07:51 UTC (rev 296361)
+++ php/php-src/branches/PHP_5_2/configure.in	2010-03-18 22:37:25 UTC (rev 296362)
@@ -896,12 +896,6 @@
   AC_MSG_RESULT([using system default])
 fi

-PHP_ARG_ENABLE(large-uploads-fix, whether to enable large files (2G-4G) uploads fix,
-[  --enable-large-uploads-fix Enable large files (2G-4G) uploads fix], no, no)
-if test $PHP_LARGE_UPLOADS_FIX = yes; then
-	AC_DEFINE(HAVE_LARGE_UPLOADS_FIX, 1, [Whether to enable large files (2G-4G) uploads fix])
-fi
-
 divert(5)

 dnl ## In diversion 5 we check which extensions should be compiled.

Modified: php/php-src/branches/PHP_5_2/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/file.c	2010-03-18 22:07:51 UTC (rev 296361)
+++ php/php-src/branches/PHP_5_2/ext/standard/file.c	2010-03-18 22:37:25 UTC (rev 296362)
@@ -579,8 +579,7 @@
 	char *filename;
 	int filename_len;
 	zval *data;
-	size_t numbytes = 0;
-	int result = SUCCESS;
+	int numbytes = 0;
 	long flags = 0;
 	zval *zcontext = NULL;
 	php_stream_context *context = NULL;
@@ -623,7 +622,7 @@
 		case IS_RESOURCE: {
 			size_t len;
 			if (php_stream_copy_to_stream_ex(srcstream, stream, PHP_STREAM_COPY_ALL, len) != SUCCESS) {
-result = FAILURE;
+numbytes = -1;
 			} else {
 numbytes = len;
 			}
@@ -641,7 +640,7 @@
 numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data));
 if (numbytes != Z_STRLEN_P(data)) {
 	php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space, numbytes, Z_STRLEN_P(data));
-	result = FAILURE;
+	numbytes = -1;
 }
 			}
 			break;
@@ -667,7 +666,7 @@
 			} else {
 php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space,  bytes_written, Z_STRLEN_PP(tmp));
 			}
-			result = FAILURE;
+			numbytes = -1;
 			break;
 		}
 	}
@@ -684,19 +683,19 @@
 	numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out));
 	if (numbytes != Z_STRLEN(out)) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d bytes written, possibly out of free disk space, numbytes, Z_STRLEN(out));
-		result = FAILURE;
+		numbytes = -1;
 	}
 	zval_dtor(out);
 	break;
 }
 			}
 		default:
-			result = FAILURE;
+			numbytes = -1;
 			break;
 	}
 	php_stream_close(stream);

-	if (result == FAILURE) {
+	if (numbytes  0) {
 		RETURN_FALSE;
 	}


Modified: php/php-src/branches/PHP_5_2/main/SAPI.c
===
--- php/php-src/branches/PHP_5_2/main/SAPI.c	2010-03-18 22:07:51 UTC (rev 296361)
+++ php/php-src/branches/PHP_5_2/main/SAPI.c	2010-03-18 22:37:25 UTC (rev 296362)
@@ -191,8 +191,8 @@

 SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
 {
-	size_t read_bytes;
-	size_t allocated_bytes=SAPI_POST_BLOCK_SIZE+1;
+	int read_bytes;
+	int allocated_bytes=SAPI_POST_BLOCK_SIZE+1;

 	if (SG(request_info).content_length  SG(post_max_size)) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, POST Content-Length of %ld bytes exceeds the limit of %ld bytes,

Modified: php/php-src/branches/PHP_5_2/main/SAPI.h
===
--- php/php-src/branches/PHP_5_2/main/SAPI.h	2010-03-18 22:07:51 UTC (rev 296361)
+++ php/php-src/branches/PHP_5_2/main/SAPI.h	2010-03-18 22:37:25 UTC (rev 296362)
@@ -118,11 +118,7 @@
 	void *server_context;
 	sapi_request_info request_info;
 	sapi_headers_struct sapi_headers;
-#ifdef HAVE_LARGE_UPLOADS_FIX
-	size_t read_post_bytes;
-#else
 	int read_post_bytes;
-#endif
 	unsigned char headers_sent;
 	struct stat global_stat;
 	char *default_mimetype;

Modified: php/php-src/branches/PHP_5_2/main/rfc1867.c

[PHP-CVS] svn: php/php-src/trunk/ext/standard/ url.c

2009-07-16 Thread Andrei Zmievski
andrei  Thu, 16 Jul 2009 21:48:10 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284203

Changed paths:
U   php/php-src/trunk/ext/standard/url.c

Log:
Adjust urlencode() according to PDM notes.

Modified: php/php-src/trunk/ext/standard/url.c
===
--- php/php-src/trunk/ext/standard/url.c2009-07-16 21:47:49 UTC (rev 
284202)
+++ php/php-src/trunk/ext/standard/url.c2009-07-16 21:48:10 UTC (rev 
284203)
@@ -573,15 +573,36 @@
URL-encodes string */
 PHP_FUNCTION(urlencode)
 {
-   char *in_str, *out_str;
+   zstr in_str;
+   char *out_str;
int in_str_len, out_str_len;
+   zend_uchar in_str_type;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, S, in_str,
- in_str_len) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, in_str,
+ in_str_len, 
in_str_type) == FAILURE) {
return;
}

-   out_str = php_url_encode(in_str, in_str_len, out_str_len);
+   if (in_str_type == IS_UNICODE) {
+   char *utf8_str = NULL;
+   int utf8_str_len;
+   UErrorCode status = U_ZERO_ERROR;
+
+   zend_unicode_to_string_ex(UG(utf8_conv), utf8_str, 
utf8_str_len, in_str.u, in_str_len, status);
+   if (U_FAILURE(status)) {
+   if (utf8_str) {
+   efree(utf8_str);
+   }
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
convert argument to UTF-8);
+   RETURN_FALSE;
+   }
+
+   out_str = php_url_encode(utf8_str, utf8_str_len, out_str_len);
+   efree(utf8_str);
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, expecting binary 
parameter, received Unicode parameter was converted to UTF-8);
+   } else {
+   out_str = php_url_encode(in_str.s, in_str_len, out_str_len);
+   }
RETURN_STRINGL(out_str, out_str_len, 0);
 }
 /* }}} */

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

[PHP-CVS] svn: php/php-src/trunk/ext/standard/ url.c

2009-07-16 Thread Andrei Zmievski
andrei  Thu, 16 Jul 2009 22:08:02 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284205

Changed paths:
U   php/php-src/trunk/ext/standard/url.c

Log:
Adjust rawurlencode() according to PDM notes.

Modified: php/php-src/trunk/ext/standard/url.c
===
--- php/php-src/trunk/ext/standard/url.c2009-07-16 21:50:19 UTC (rev 
284204)
+++ php/php-src/trunk/ext/standard/url.c2009-07-16 22:08:02 UTC (rev 
284205)
@@ -695,15 +695,36 @@
URL-encodes string */
 PHP_FUNCTION(rawurlencode)
 {
-   char *in_str, *out_str;
+   zstr in_str;
+   char *out_str;
int in_str_len, out_str_len;
+   zend_uchar in_str_type;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, S, in_str,
- in_str_len) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, in_str,
+ in_str_len, 
in_str_type) == FAILURE) {
return;
}

-   out_str = php_raw_url_encode(in_str, in_str_len, out_str_len);
+   if (in_str_type == IS_UNICODE) {
+   char *utf8_str = NULL;
+   int utf8_str_len;
+   UErrorCode status = U_ZERO_ERROR;
+
+   zend_unicode_to_string_ex(UG(utf8_conv), utf8_str, 
utf8_str_len, in_str.u, in_str_len, status);
+   if (U_FAILURE(status)) {
+   if (utf8_str) {
+   efree(utf8_str);
+   }
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
convert argument to UTF-8);
+   RETURN_FALSE;
+   }
+
+   out_str = php_raw_url_encode(utf8_str, utf8_str_len, 
out_str_len);
+   efree(utf8_str);
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, expecting binary 
parameter, received Unicode parameter was converted to UTF-8);
+   } else {
+   out_str = php_raw_url_encode(in_str.s, in_str_len, 
out_str_len);
+   }
RETURN_STRINGL(out_str, out_str_len, 0);
 }
 /* }}} */

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

[PHP-CVS] svn: php/php-src/trunk/ext/standard/ base64.c url.c

2009-07-16 Thread Andrei Zmievski
andrei  Thu, 16 Jul 2009 22:19:09 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284206

Changed paths:
U   php/php-src/trunk/ext/standard/base64.c
U   php/php-src/trunk/ext/standard/url.c

Log:
Adjust base64_encode() according to PDM notes.

Modified: php/php-src/trunk/ext/standard/base64.c
===
--- php/php-src/trunk/ext/standard/base64.c 2009-07-16 22:08:02 UTC (rev 
284205)
+++ php/php-src/trunk/ext/standard/base64.c 2009-07-16 22:19:09 UTC (rev 
284206)
@@ -211,14 +211,36 @@
Encodes string using MIME base64 algorithm */
 PHP_FUNCTION(base64_encode)
 {
-   char *str;
+   zstr str;
unsigned char *result;
int str_len, ret_length;
+   zend_uchar str_type;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, S, str, 
str_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, str, 
str_len, str_type) == FAILURE) {
return;
}
-   result = php_base64_encode((unsigned char*)str, str_len, ret_length);
+
+   if (str_type == IS_UNICODE) {
+   char *utf8_str = NULL;
+   int utf8_str_len;
+   UErrorCode status = U_ZERO_ERROR;
+
+   zend_unicode_to_string_ex(UG(utf8_conv), utf8_str, 
utf8_str_len, str.u, str_len, status);
+   if (U_FAILURE(status)) {
+   if (utf8_str) {
+   efree(utf8_str);
+   }
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, could not 
convert argument to UTF-8);
+   RETURN_FALSE;
+   }
+
+   result = php_base64_encode((unsigned char*)utf8_str, 
utf8_str_len, ret_length);
+   efree(utf8_str);
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, expecting binary 
parameter, received Unicode parameter was converted to UTF-8);
+   } else {
+   result = php_base64_encode((unsigned char*)str.s, str_len, 
ret_length);
+   }
+
if (result != NULL) {
RETVAL_STRINGL((char*)result, ret_length, 0);
} else {

Modified: php/php-src/trunk/ext/standard/url.c
===
--- php/php-src/trunk/ext/standard/url.c2009-07-16 22:08:02 UTC (rev 
284205)
+++ php/php-src/trunk/ext/standard/url.c2009-07-16 22:19:09 UTC (rev 
284206)
@@ -593,7 +593,7 @@
if (utf8_str) {
efree(utf8_str);
}
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
convert argument to UTF-8);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, could not 
convert argument to UTF-8);
RETURN_FALSE;
}

@@ -715,7 +715,7 @@
if (utf8_str) {
efree(utf8_str);
}
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
convert argument to UTF-8);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, could not 
convert argument to UTF-8);
RETURN_FALSE;
}


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

[PHP-CVS] cvs: php-src / TODO

2009-06-28 Thread Andrei Zmievski
andrei  Sun Jun 28 18:00:38 2009 UTC

  Modified files:  
/php-srcTODO 
  Log:
  Update
  
  
http://cvs.php.net/viewvc.cgi/php-src/TODO?r1=1.158r2=1.159diff_format=u
Index: php-src/TODO
diff -u php-src/TODO:1.158 php-src/TODO:1.159
--- php-src/TODO:1.158  Sun Nov 20 02:27:49 2005
+++ php-src/TODOSun Jun 28 18:00:38 2009
@@ -13,6 +13,7 @@
   interfaces difficult which pass const parameters to us.
 * Clean up object-string conversion behavior wherever possible (switch(),
   comparison, etc)
+* Port safe-allocation functions from 5.3 (zend_alloc.[ch])
 
 
 global



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/sockets sockets.c

2009-06-04 Thread Andrei Zmievski
andrei  Thu Jun  4 18:17:28 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/socketssockets.c 
  Log:
  Fix invalid test against addr6 result.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.25r2=1.171.2.9.2.26diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.25 
php-src/ext/sockets/sockets.c:1.171.2.9.2.26
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.25Wed May 20 09:06:31 2009
+++ php-src/ext/sockets/sockets.c   Thu Jun  4 18:17:28 2009
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.25 2009/05/20 09:06:31 lbarnaud Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.26 2009/06/04 18:17:28 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1466,10 +1466,11 @@
zval_dtor(arg5);
zval_dtor(arg6);
 
+   memset(addr6, 0, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, sin6.sin6_addr, addr6, 
INET6_ADDRSTRLEN);
 
ZVAL_STRINGL(arg2, recv_buf, retval, 0);
-   ZVAL_STRING(arg5, addr6 ? addr6 : ::, 1);
+   ZVAL_STRING(arg5, addr6[0] ? addr6 : ::, 1);
ZVAL_LONG(arg6, ntohs(sin6.sin6_port));
break;
 #endif



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sockets sockets.c

2009-06-04 Thread Andrei Zmievski
andrei  Thu Jun  4 18:17:43 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/socketssockets.c 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.14.2.19r2=1.171.2.9.2.14.2.20diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.19 
php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.20
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.19   Wed May 20 09:05:46 2009
+++ php-src/ext/sockets/sockets.c   Thu Jun  4 18:17:43 2009
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.14.2.19 2009/05/20 09:05:46 lbarnaud Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.14.2.20 2009/06/04 18:17:43 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1611,10 +1611,11 @@
zval_dtor(arg5);
zval_dtor(arg6);
 
+   memset(addr6, 0, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, sin6.sin6_addr, addr6, 
INET6_ADDRSTRLEN);
 
ZVAL_STRINGL(arg2, recv_buf, retval, 0);
-   ZVAL_STRING(arg5, addr6 ? addr6 : ::, 1);
+   ZVAL_STRING(arg5, addr6[0] ? addr6 : ::, 1);
ZVAL_LONG(arg6, ntohs(sin6.sin6_port));
break;
 #endif



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



[PHP-CVS] cvs: php-src /ext/sockets sockets.c

2009-06-04 Thread Andrei Zmievski
andrei  Thu Jun  4 18:18:24 2009 UTC

  Modified files:  
/php-src/ext/socketssockets.c 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.214r2=1.215diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.214 php-src/ext/sockets/sockets.c:1.215
--- php-src/ext/sockets/sockets.c:1.214 Tue May 19 11:57:52 2009
+++ php-src/ext/sockets/sockets.c   Thu Jun  4 18:18:24 2009
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.214 2009/05/19 11:57:52 lbarnaud Exp $ */
+/* $Id: sockets.c,v 1.215 2009/06/04 18:18:24 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1601,10 +1601,11 @@
zval_dtor(arg5);
zval_dtor(arg6);
 
+   memset(addr6, 0, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, sin6.sin6_addr, addr6, 
INET6_ADDRSTRLEN);
 
ZVAL_STRINGL(arg2, recv_buf, retval, 0);
-   ZVAL_STRING(arg5, addr6 ? addr6 : ::, 1);
+   ZVAL_STRING(arg5, addr6[0] ? addr6 : ::, 1);
ZVAL_LONG(arg6, ntohs(sin6.sin6_port));
break;
 #endif



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



Re: [PHP-CVS] cvs: php-src / README.PARAMETER_PARSING_API /win32/build config.w32 ZendEngine2 Zend.m4 zend_API.c zend_compile.c zend_execute.c zend_execute_API.c zend_operators.c zend_operators.h ze

2009-06-04 Thread Andrei Zmievski
Hmm, can we use something other than L? We were hoping to reserve L for use in PHP 6 for 
bigint numbers.


-Andrei

Matt Wilmas wrote:

mattwil Thu Jun  4 18:18:47 2009 UTC

  Modified files:  
/php-src	README.PARAMETER_PARSING_API 
/ZendEngine2	Zend.m4 zend_API.c zend_compile.c zend_execute.c 
	zend_execute_API.c zend_operators.c zend_operators.h 
	zend_vm_def.h zend_vm_execute.h 
/php-src/win32/build	config.w32 
  Log:

  Restored double-long conversion behavior to that of PHP 5.2 (on most 
platforms) and prior:
   * Out-of-range numbers overflow/preserve least significant bits (no 
LONG_MAX/MIN limit)
   * See bug #42868 (presumably-rare platform with different results in 5.2)
   * On 32-bit platforms with 64-bit long type, a zend_long64 cast has been 
added,
  otherwise it's the same as 5.2
   * Use this conversion method everywhere instead of some plain (long) casts
  
  Added 'L' parameter parsing specifier to ensure a LONG_MAX/MIN limit:

   * Essentially what 5.3's new conversion was doing in most cases
   * Functions with limit or length type params could be updated to use 
this,
  and prevent confusing overflow behavior with huge numbers (*also* in 5.2)
- See bug #47854, for example; or even #42868 again
  
  # Test updates coming
  



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



Re: [PHP-CVS] cvs: php-src / README.PARAMETER_PARSING_API /win32/build config.w32 ZendEngine2 Zend.m4 zend_API.c zend_compile.c zend_execute.c zend_execute_API.c zend_operators.c zend_operators.h ze

2009-06-04 Thread Andrei Zmievski

Matt Wilmas wrote:
Sure!  It makes no difference to me at all.  Should I just remove that 
part completely?  I didn't know if it would even be used -- just 
thinking more of it's there if someone wants the option...


Do you have examples of functions that might have a use for that?

-Andrei

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json php_json.h

2009-05-31 Thread Andrei Zmievski
andrei  Sun May 31 18:55:10 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json   php_json.h 
  Log:
  Fix the build.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/php_json.h?r1=1.8.2.2.2.6r2=1.8.2.2.2.7diff_format=u
Index: php-src/ext/json/php_json.h
diff -u php-src/ext/json/php_json.h:1.8.2.2.2.6 
php-src/ext/json/php_json.h:1.8.2.2.2.7
--- php-src/ext/json/php_json.h:1.8.2.2.2.6 Sun May 31 01:44:07 2009
+++ php-src/ext/json/php_json.h Sun May 31 18:55:10 2009
@@ -16,12 +16,13 @@
   +--+
 */
 
-/* $Id: php_json.h,v 1.8.2.2.2.6 2009/05/31 01:44:07 andrei Exp $ */
+/* $Id: php_json.h,v 1.8.2.2.2.7 2009/05/31 18:55:10 andrei Exp $ */
 
 #ifndef PHP_JSON_H
 #define PHP_JSON_H
 
 #define PHP_JSON_VERSION 1.2.1
+#include ext/standard/php_smart_str.h
 
 extern zend_module_entry json_module_entry;
 #define phpext_json_ptr json_module_entry



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/json php_json.h

2009-05-31 Thread Andrei Zmievski
andrei  Sun May 31 18:55:36 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/json   php_json.h 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/php_json.h?r1=1.8.2.5r2=1.8.2.6diff_format=u
Index: php-src/ext/json/php_json.h
diff -u php-src/ext/json/php_json.h:1.8.2.5 php-src/ext/json/php_json.h:1.8.2.6
--- php-src/ext/json/php_json.h:1.8.2.5 Sun May 31 01:43:45 2009
+++ php-src/ext/json/php_json.h Sun May 31 18:55:36 2009
@@ -16,13 +16,15 @@
   +--+
 */
 
-/* $Id: php_json.h,v 1.8.2.5 2009/05/31 01:43:45 andrei Exp $ */
+/* $Id: php_json.h,v 1.8.2.6 2009/05/31 18:55:36 andrei Exp $ */
 
 #ifndef PHP_JSON_H
 #define PHP_JSON_H
 
 #define PHP_JSON_VERSION 1.2.1
 
+#include ext/standard/php_smart_str.h
+
 extern zend_module_entry json_module_entry;
 #define phpext_json_ptr json_module_entry
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/json json.c php_json.h

2009-05-30 Thread Andrei Zmievski
andrei  Sun May 31 01:43:45 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/json   json.c php_json.h 
  Log:
  Expose encode/decode API.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.26r2=1.9.2.27diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.26 php-src/ext/json/json.c:1.9.2.27
--- php-src/ext/json/json.c:1.9.2.26Thu Feb 12 00:36:23 2009
+++ php-src/ext/json/json.c Sun May 31 01:43:45 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.26 2009/02/12 00:36:23 scottmac Exp $ */
+/* $Id: json.c,v 1.9.2.27 2009/05/31 01:43:45 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,7 +83,6 @@
 }
 /* }}} */
 
-static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC);
 static void json_escape_string(smart_str *buf, char *s, int len TSRMLS_DC);
 
 static int json_determine_array_type(zval **val TSRMLS_DC)  /* {{{ */
@@ -176,7 +175,7 @@
 need_comma = 1;
 }
  
-json_encode_r(buf, *data TSRMLS_CC);
+php_json_encode(buf, *data TSRMLS_CC);
 } else if (r == 1) {
 if (i == HASH_KEY_IS_STRING) {
 if (key[0] == '\0'  Z_TYPE_PP(val) == IS_OBJECT) {
@@ -196,7 +195,7 @@
 json_escape_string(buf, key, key_len - 1 TSRMLS_CC);
 smart_str_appendc(buf, ':');
 
-json_encode_r(buf, *data TSRMLS_CC);
+php_json_encode(buf, *data TSRMLS_CC);
 } else {
 if (need_comma) {
 smart_str_appendc(buf, ',');
@@ -209,7 +208,7 @@
 smart_str_appendc(buf, '');
 smart_str_appendc(buf, ':');
 
-json_encode_r(buf, *data TSRMLS_CC);
+php_json_encode(buf, *data TSRMLS_CC);
 }
 }
 
@@ -342,7 +341,7 @@
 }
 /* }}} */
 
-static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC) /* {{{ */
+PHPAPI void php_json_encode(smart_str *buf, zval *val TSRMLS_DC) /* {{{ */
 {
 switch (Z_TYPE_P(val)) {
 case IS_NULL:
@@ -372,7 +371,7 @@
smart_str_appendl(buf, d, len);
efree(d);
 } else {
-zend_error(E_WARNING, [json] (json_encode_r) double %.9g 
does not conform to the JSON spec, encoded as 0., dbl);
+zend_error(E_WARNING, [json] (php_json_encode) double 
%.9g does not conform to the JSON spec, encoded as 0., dbl);
 smart_str_appendc(buf, '0');
 }
 }
@@ -385,7 +384,7 @@
 json_encode_array(buf, val TSRMLS_CC);
 break;
 default:
-zend_error(E_WARNING, [json] (json_encode_r) type is unsupported, 
encoded as null.);
+zend_error(E_WARNING, [json] (php_json_encode) type is 
unsupported, encoded as null.);
 smart_str_appendl(buf, null, 4);
 break;
 }
@@ -394,6 +393,64 @@
 }
 /* }}} */
 
+PHPAPI void php_json_decode(zval *return_value, char *buf, int buf_len, 
zend_bool assoc) /* {{{ */
+{
+   unsigned short *utf16;
+   int utf16_len;
+   zval *z;
+
+   utf16 = (unsigned short *) safe_emalloc((buf_len+1), sizeof(unsigned 
short), 1);
+
+   utf16_len = utf8_to_utf16(utf16, buf, buf_len);
+   if (utf16_len = 0)
+   {
+   if (utf16)
+   {
+   efree(utf16);
+   }
+
+   RETURN_NULL();
+   }
+
+   ALLOC_INIT_ZVAL(z);
+   if (JSON_parser(z, utf16, utf16_len, assoc TSRMLS_CC))
+   {
+   *return_value = *z;
+
+   FREE_ZVAL(z);
+   efree(utf16);
+   }
+   else
+   {
+   double d;
+   int type;
+   long p;
+
+   zval_dtor(z);
+   FREE_ZVAL(z);
+   efree(utf16);
+
+   if (buf_len == 4) {
+   if (!strcasecmp(buf, null)) {
+   RETURN_NULL();
+   } else if (!strcasecmp(buf, true)) {
+   RETURN_BOOL(1);
+   }
+   } else if (buf_len == 5  !strcasecmp(buf, false)) {
+   RETURN_BOOL(0);
+   }
+   if ((type = is_numeric_string(buf, buf_len, p, d, 0)) != 0) {
+   if (type == IS_LONG) {
+   RETURN_LONG(p);
+   } else if (type == IS_DOUBLE) {
+   RETURN_DOUBLE(d);
+   }
+   }
+   RETURN_NULL();
+   }
+}
+/* }}} */
+
 /* {{{ proto string json_encode(mixed data)
Returns 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json json.c php_json.h

2009-05-30 Thread Andrei Zmievski
andrei  Sun May 31 01:44:07 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json   json.c php_json.h 
  Log:
  Expose encode/decode API.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.19.2.21r2=1.9.2.19.2.22diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.19.2.21 
php-src/ext/json/json.c:1.9.2.19.2.22
--- php-src/ext/json/json.c:1.9.2.19.2.21   Fri May 15 09:10:55 2009
+++ php-src/ext/json/json.c Sun May 31 01:44:07 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.19.2.21 2009/05/15 09:10:55 kalle Exp $ */
+/* $Id: json.c,v 1.9.2.19.2.22 2009/05/31 01:44:07 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -136,7 +136,6 @@
 }
 /* }}} */
 
-static void json_encode_r(smart_str *buf, zval *val, int options TSRMLS_DC);
 static void json_escape_string(smart_str *buf, char *s, int len, int options 
TSRMLS_DC);
 
 static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */
@@ -229,7 +228,7 @@
need_comma = 1;
}
  
-   json_encode_r(buf, *data, options 
TSRMLS_CC);
+   php_json_encode(buf, *data, options 
TSRMLS_CC);
} else if (r == PHP_JSON_OUTPUT_OBJECT) {
if (i == HASH_KEY_IS_STRING) {
if (key[0] == '\0'  
Z_TYPE_PP(val) == IS_OBJECT) {
@@ -249,7 +248,7 @@
json_escape_string(buf, key, 
key_len - 1, options TSRMLS_CC);
smart_str_appendc(buf, ':');
 
-   json_encode_r(buf, *data, 
options TSRMLS_CC);
+   php_json_encode(buf, *data, 
options TSRMLS_CC);
} else {
if (need_comma) {
smart_str_appendc(buf, 
',');
@@ -262,7 +261,7 @@
smart_str_appendc(buf, '');
smart_str_appendc(buf, ':');
 
-   json_encode_r(buf, *data, 
options TSRMLS_CC);
+   php_json_encode(buf, *data, 
options TSRMLS_CC);
}
}
 
@@ -412,7 +411,7 @@
 }
 /* }}} */
 
-static void json_encode_r(smart_str *buf, zval *val, int options TSRMLS_DC) /* 
{{{ */
+PHPAPI void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC) 
/* {{{ */
 {
switch (Z_TYPE_P(val))
{
@@ -443,7 +442,7 @@
smart_str_appendl(buf, d, len);
efree(d);
} else {
-   zend_error(E_WARNING, [json] 
(json_encode_r) double %.9g does not conform to the JSON spec, encoded as 0., 
dbl);
+   zend_error(E_WARNING, [json] 
(php_json_encode) double %.9g does not conform to the JSON spec, encoded as 
0., dbl);
smart_str_appendc(buf, '0');
}
}
@@ -459,7 +458,7 @@
break;
 
default:
-   zend_error(E_WARNING, [json] (json_encode_r) type is 
unsupported, encoded as null.);
+   zend_error(E_WARNING, [json] (php_json_encode) type is 
unsupported, encoded as null.);
smart_str_appendl(buf, null, 4);
break;
}
@@ -468,46 +467,13 @@
 }
 /* }}} */
 
-/* {{{ proto string json_encode(mixed data [, int options])
-   Returns the JSON representation of a value */
-static PHP_FUNCTION(json_encode)
-{
-   zval *parameter;
-   smart_str buf = {0};
-   long options = 0;
-
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z|l, parameter, 
options) == FAILURE) {
-   return;
-   }
-
-   json_encode_r(buf, parameter, options TSRMLS_CC);
-
-   ZVAL_STRINGL(return_value, buf.c, buf.len, 1);
-
-   smart_str_free(buf);
-}
-/* }}} */
-
-/* {{{ proto mixed json_decode(string json [, bool assoc [, long depth]])
-   Decodes the JSON representation into a PHP value */
-static PHP_FUNCTION(json_decode)
+PHPAPI void php_json_decode(zval *return_value, char *str, int str_len, 
zend_bool assoc, long depth TSRMLS_DC) /* {{{ */
 {
-   char *str;
-   int str_len, utf16_len;
-   zend_bool assoc = 0; /* return JS objects as PHP objects by default */
-   long depth = JSON_PARSER_DEFAULT_DEPTH;
+

[PHP-CVS] cvs: php-src /ext/json json.c

2009-05-30 Thread Andrei Zmievski
andrei  Sun May 31 01:45:05 2009 UTC

  Modified files:  
/php-src/ext/json   json.c 
  Log:
  Make a note.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.53r2=1.54diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.53 php-src/ext/json/json.c:1.54
--- php-src/ext/json/json.c:1.53Fri May 15 09:10:01 2009
+++ php-src/ext/json/json.c Sun May 31 01:45:05 2009
@@ -16,7 +16,13 @@
   +--+
 */
 
-/* $Id: json.c,v 1.53 2009/05/15 09:10:01 kalle Exp $ */
+/* $Id: json.c,v 1.54 2009/05/31 01:45:05 andrei Exp $ */
+
+/*
+ * UTODO
+ * - take a look at json_decode, some weird IS_STRING checks there
+ * - expose encode/decode API once that's done
+ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h



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



Re: [PHP-CVS] cvs: php-src / unicode-todo.txt /ext/filter filter.c /ext/mbstring mb_gpc.c /ext/pcre php_pcre.c /ext/standard basic_functions.c basic_functions.h php_string.h string.c /main SAPI.c

2009-05-23 Thread Andrei Zmievski

Jani Taskinen wrote:

Is this really correct (rfc1867.c):

- register_http_post_files_variable(lbuf, s+1, http_post_files, 0 
TSRMLS_CC);

+ register_raw_var(lbuf, s+1, strlen(s+1), files_vars TSRMLS_CC);

That 'strlen(s+1)' looks kinda wrong..?

And to not cause more compile failures, configure option 
--enable-maintainer-zts helps. :)


It's correct. We're registering a string starting from s+1 position, so we need to get the 
length starting from that position too.


-Andrei

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



[PHP-CVS] cvs: php-src /ext/standard strnatcmp.c

2009-04-08 Thread Andrei Zmievski
andrei  Wed Apr  8 20:12:28 2009 UTC

  Modified files:  
/php-src/ext/standard   strnatcmp.c 
  Log:
  Fix Rasmus's patch for bug #44929.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/strnatcmp.c?r1=1.13r2=1.14diff_format=u
Index: php-src/ext/standard/strnatcmp.c
diff -u php-src/ext/standard/strnatcmp.c:1.13 
php-src/ext/standard/strnatcmp.c:1.14
--- php-src/ext/standard/strnatcmp.c:1.13   Wed Apr  8 18:18:49 2009
+++ php-src/ext/standard/strnatcmp.cWed Apr  8 20:12:27 2009
@@ -38,7 +38,7 @@
 
 #if 0
 static char const *version UNUSED =
-$Id: strnatcmp.c,v 1.13 2009/04/08 18:18:49 rasmus Exp $;
+$Id: strnatcmp.c,v 1.14 2009/04/08 20:12:27 andrei Exp $;
 #endif
 /* {{{ compare_right
  */
@@ -112,10 +112,10 @@
ca = a[ai]; cb = b[bi];
 
/* skip over leading spaces or zeros */
-   while (isspace((int)(unsigned char)ca) || (ca == '0'  ap+1  
aend))
+   while (isspace((int)(unsigned char)ca) || (ca == '0'  ai+1  
a_len))
ca = a[++ai];
 
-   while (isspace((int)(unsigned char)cb) || (cb == '0'  bp+1  
bend))
+   while (isspace((int)(unsigned char)cb) || (cb == '0'  bi+1  
b_len))
cb = b[++bi];
 
/* process run of digits */



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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-02-18 Thread Andrei Zmievski

Moriyoshi Koizumi wrote:

I got a bug report, then I fixed it. That's just an normal procedure for
bugfixing. Isn't it? Am I supposed to have a written permission from you
whenever I fix a part you did ever touch?

And the old behavior is strange, but not *broken*. It just doesn't work
for your case.


I wasn't looking for you to ask permission, but simply to discuss this before fixing 
something that was already fixed for the release. I mean, did you wonder at all why I 
set the default to be SORT_REGULAR? Would have been nice to talk about it, that's all.


-Andrei

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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-02-17 Thread Andrei Zmievski

Moriyoshi Koizumi wrote:

Whatever reasoning, I don't think it's a good idea to revert someone
else's patch before discussing anything.

Aside from this, I agree with you the old behavior is that stupid, but
BC should always be honored.


Moriyoshi,

You committed your fix and updated my NEWS entry without ever discussing what it is you 
were going to do. As for BC, it should be respected, but it is not paramount. If things 
are broken, then they should be fixed.


-Andrei

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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-02-13 Thread Andrei Zmievski
Don't do this please. Why did you feel the need to go back and change my patch including 
the NEWS entry? I knew what I was doing when I set the default behavior to SORT_REGULAR 
and this was discussed with both 5.3 and 5.2 RMs. With your change it'l back to the stupid 
 old behavior of:


$array = array(new stdClass(), new stdClass(), new Foo());
$array = array_unique($array);

And now $array has only 1 element. I really hate having tell PHP not to be stupid, rather 
than having it default to being smart.


I'm going to revert this.

-Andrei

Moriyoshi Koizumi wrote:

moriyoshi   Thu Feb 12 18:29:15 2009 UTC

  Modified files:  
/php-src/ext/standard	array.c 
  Log:

  * Fix bug #47370 (BC breakage of array_unique())
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.471r2=1.472diff_format=u

Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.471 php-src/ext/standard/array.c:1.472
--- php-src/ext/standard/array.c:1.471  Mon Feb  9 10:47:19 2009
+++ php-src/ext/standard/array.cThu Feb 12 18:29:15 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.471 2009/02/09 10:47:19 dmitry Exp $ */

+/* $Id: array.c,v 1.472 2009/02/12 18:29:15 moriyoshi Exp $ */
 
 #include php.h

 #include php_ini.h
@@ -2924,7 +2924,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_REGULAR;
+   long sort_type = PHP_SORT_STRING;
 
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, sort_type) == FAILURE) {

return;





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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c

2009-02-13 Thread Andrei Zmievski
andrei  Fri Feb 13 22:26:47 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   array.c 
/php-srcNEWS 
  Log:
  Revert bogus fix for #47370.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.64r2=1.308.2.21.2.65diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.64 
php-src/ext/standard/array.c:1.308.2.21.2.65
--- php-src/ext/standard/array.c:1.308.2.21.2.64Thu Feb 12 18:30:31 2009
+++ php-src/ext/standard/array.cFri Feb 13 22:26:46 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.64 2009/02/12 18:30:31 moriyoshi Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.65 2009/02/13 22:26:46 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2839,7 +2839,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = SORT_STRING;
+   long sort_type = SORT_REGULAR;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z|l, array, 
sort_type) == FAILURE) {
return;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1416r2=1.2027.2.547.2.1417diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1416 php-src/NEWS:1.2027.2.547.2.1417
--- php-src/NEWS:1.2027.2.547.2.1416Thu Feb 12 20:32:17 2009
+++ php-src/NEWSFri Feb 13 22:26:46 2009
@@ -14,7 +14,7 @@
   properties and __get(). (Andrei)
 
 - Added optional sorting type flag parameter to array_unique(). Default is
-  SORT_STRING. (Andrei)
+  SORT_REGULAR. (Andrei)
 
 - Fixed a crash on extract in zip when files or directories entry names 
contain 
   a relative path. (Pierre)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c

2009-02-13 Thread Andrei Zmievski
andrei  Fri Feb 13 22:34:15 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   array.c 
  Log:
  Revert bogus fix for #47370.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.52r2=1.308.2.21.2.37.2.53diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.52 
php-src/ext/standard/array.c:1.308.2.21.2.37.2.53
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.52   Thu Feb 12 18:57:55 2009
+++ php-src/ext/standard/array.cFri Feb 13 22:34:15 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.37.2.52 2009/02/12 18:57:55 moriyoshi Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.53 2009/02/13 22:34:15 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2697,7 +2697,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_STRING;
+   long sort_type = PHP_SORT_REGULAR;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, 
sort_type) == FAILURE) {
return;



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



[PHP-CVS] cvs: php-src /ext/standard array.c

2009-02-13 Thread Andrei Zmievski
andrei  Fri Feb 13 22:35:18 2009 UTC

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  Revert bogus fix for #47370.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.472r2=1.473diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.472 php-src/ext/standard/array.c:1.473
--- php-src/ext/standard/array.c:1.472  Thu Feb 12 18:29:15 2009
+++ php-src/ext/standard/array.cFri Feb 13 22:35:18 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.472 2009/02/12 18:29:15 moriyoshi Exp $ */
+/* $Id: array.c,v 1.473 2009/02/13 22:35:18 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2924,7 +2924,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_STRING;
+   long sort_type = PHP_SORT_REGULAR;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, 
sort_type) == FAILURE) {
return;



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



[PHP-CVS] cvs: CVSROOT / avail

2009-01-17 Thread Andrei Zmievski
andrei  Sat Jan 17 21:53:44 2009 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give rafa karma for phpdoc-pt_BR
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1490r2=1.1491diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1490 CVSROOT/avail:1.1491
--- CVSROOT/avail:1.1490Fri Jan 16 09:52:53 2009
+++ CVSROOT/avail   Sat Jan 17 21:53:43 2009
@@ -75,7 +75,7 @@
 avail|erkje,oebe,janwb|phpdoc-nl
 avail|cyb0org,lach,adi|phpdoc-pl
 avail|aferreira,thiago|phpdoc-pt
-avail|machado,scar,davis,dnfeitosa,thiago,amandavale|phpdoc-pt_BR
+avail|machado,scar,davis,dnfeitosa,thiago,amandavale,rafa|phpdoc-pt_BR
 avail|radical,shoty|phpdoc-ro
 avail|freespace,shafff,sveta,wanderer,kozloffsky,santiago|phpdoc-ru
 
avail|cumhuronat,gulenzek,xhandros,neoprobe,faruk,infralite,flarecaster,antimon,yelekin|phpdoc-tr



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



[PHP-CVS] cvs: CVSROOT / avail

2009-01-15 Thread Andrei Zmievski
andrei  Thu Jan 15 20:00:30 2009 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give amandavale phpdoc-pt_BR karma.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1488r2=1.1489diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1488 CVSROOT/avail:1.1489
--- CVSROOT/avail:1.1488Sun Jan 11 02:53:52 2009
+++ CVSROOT/avail   Thu Jan 15 20:00:29 2009
@@ -75,7 +75,7 @@
 avail|erkje,oebe,janwb|phpdoc-nl
 avail|cyb0org,lach,adi|phpdoc-pl
 avail|aferreira,thiago|phpdoc-pt
-avail|machado,scar,davis,dnfeitosa,thiago|phpdoc-pt_BR
+avail|machado,scar,davis,dnfeitosa,thiago,amandavale|phpdoc-pt_BR
 avail|radical,shoty|phpdoc-ro
 avail|freespace,shaff,sveta,wanderer,kozloffsky,santiago|phpdoc-ru
 
avail|cumhuronat,gulenzek,xhandros,neoprobe,faruk,infralite,flarecaster,antimon,yelekin|phpdoc-tr



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c

2009-01-13 Thread Andrei Zmievski
andrei  Tue Jan 13 19:23:31 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pcre   php_pcre.c 
  Log:
  Fix bug #44336 in PHP 5.2 as well.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.29r2=1.168.2.9.2.30diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.29 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.30
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.29  Wed Dec 31 11:17:41 2008
+++ php-src/ext/pcre/php_pcre.c Tue Jan 13 19:23:31 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.29 2008/12/31 11:17:41 sebastian Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.30 2009/01/13 19:23:31 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -48,7 +48,8 @@
PHP_PCRE_INTERNAL_ERROR,
PHP_PCRE_BACKTRACK_LIMIT_ERROR,
PHP_PCRE_RECURSION_LIMIT_ERROR,
-   PHP_PCRE_BAD_UTF8_ERROR
+   PHP_PCRE_BAD_UTF8_ERROR,
+   PHP_PCRE_BAD_UTF8_OFFSET_ERROR
 };
 
 
@@ -72,6 +73,10 @@
preg_code = PHP_PCRE_BAD_UTF8_ERROR;
break;
 
+   case PCRE_ERROR_BADUTF8_OFFSET:
+   preg_code = PHP_PCRE_BAD_UTF8_OFFSET_ERROR;
+   break;
+
default:
preg_code = PHP_PCRE_INTERNAL_ERROR;
break;
@@ -145,6 +150,7 @@
REGISTER_LONG_CONSTANT(PREG_BACKTRACK_LIMIT_ERROR, 
PHP_PCRE_BACKTRACK_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(PREG_RECURSION_LIMIT_ERROR, 
PHP_PCRE_RECURSION_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(PREG_BAD_UTF8_ERROR, PHP_PCRE_BAD_UTF8_ERROR, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PREG_BAD_UTF8_OFFSET_ERROR, 
PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT(PCRE_VERSION, (char *)pcre_version(), 
CONST_CS | CONST_PERSISTENT);
 
return SUCCESS;
@@ -615,6 +621,9 @@
count = pcre_exec(pce-re, extra, subject, subject_len, 
start_offset,
  exoptions|g_notempty, 
offsets, size_offsets);
 
+   /* the string was already proved to be valid UTF-8 */
+   exoptions |= PCRE_NO_UTF8_CHECK;
+
/* Check for too many substrings condition. */  
if (count == 0) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, Matched, 
but too many substrings);
@@ -1036,6 +1045,9 @@
count = pcre_exec(pce-re, extra, subject, subject_len, 
start_offset,
  exoptions|g_notempty, 
offsets, size_offsets);

+   /* the string was already proved to be valid UTF-8 */
+   exoptions |= PCRE_NO_UTF8_CHECK;
+
/* Check for too many substrings condition. */
if (count == 0) {
php_error_docref(NULL TSRMLS_CC,E_NOTICE, Matched, but 
too many substrings);
@@ -1473,6 +1485,9 @@
  subject_len, start_offset,
  exoptions|g_notempty, 
offsets, size_offsets);
 
+   /* the string was already proved to be valid UTF-8 */
+   exoptions |= PCRE_NO_UTF8_CHECK;
+
/* Check for too many substrings condition. */
if (count == 0) {
php_error_docref(NULL TSRMLS_CC,E_NOTICE, Matched, but 
too many substrings);



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-01-13 Thread Andrei Zmievski
andrei  Tue Jan 13 19:25:20 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1390r2=1.2027.2.547.2.1391diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1390 php-src/NEWS:1.2027.2.547.2.1391
--- php-src/NEWS:1.2027.2.547.2.1390Mon Jan 12 13:42:15 2009
+++ php-src/NEWSTue Jan 13 19:25:20 2009
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.2.9
+- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
+  (frode at coretrek dot com, Nuno)
 - Changed __call() to be invoked on private/protected method access, similar to
   properties and __get(). (Andrei)
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/fileinfo/libmagic magic.c

2009-01-12 Thread Andrei Zmievski
andrei  Mon Jan 12 19:09:34 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/fileinfo/libmagic  magic.c 
  Log:
  memset() requires a pointer.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fileinfo/libmagic/magic.c?r1=1.1.2.6r2=1.1.2.7diff_format=u
Index: php-src/ext/fileinfo/libmagic/magic.c
diff -u php-src/ext/fileinfo/libmagic/magic.c:1.1.2.6 
php-src/ext/fileinfo/libmagic/magic.c:1.1.2.7
--- php-src/ext/fileinfo/libmagic/magic.c:1.1.2.6   Sun Nov  2 16:13:49 2008
+++ php-src/ext/fileinfo/libmagic/magic.c   Mon Jan 12 19:09:34 2009
@@ -227,7 +227,7 @@
 #elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H)
struct utimbuf  utbuf;
 
-   (void)memset(utbuf, 0, sizeof(utbuf));
+   (void)memset(utbuf, 0, sizeof(utbuf));
utbuf.actime = sb-st_atime;
utbuf.modtime = sb-st_mtime;
(void) utime(name, utbuf); /* don't care if loses */



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



[PHP-CVS] cvs: php-src /ext/fileinfo/libmagic magic.c

2009-01-12 Thread Andrei Zmievski
andrei  Mon Jan 12 19:15:07 2009 UTC

  Modified files:  
/php-src/ext/fileinfo/libmagic  magic.c 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fileinfo/libmagic/magic.c?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/fileinfo/libmagic/magic.c
diff -u php-src/ext/fileinfo/libmagic/magic.c:1.6 
php-src/ext/fileinfo/libmagic/magic.c:1.7
--- php-src/ext/fileinfo/libmagic/magic.c:1.6   Sun Nov  2 16:09:27 2008
+++ php-src/ext/fileinfo/libmagic/magic.c   Mon Jan 12 19:15:07 2009
@@ -230,7 +230,7 @@
 #elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H)
struct utimbuf  utbuf;
 
-   (void)memset(utbuf, 0, sizeof(utbuf));
+   (void)memset(utbuf, 0, sizeof(utbuf));
utbuf.actime = sb-st_atime;
utbuf.modtime = sb-st_mtime;
(void) utime(name, utbuf); /* don't care if loses */



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



[PHP-CVS] cvs: php-src /ext/session mod_files.bat

2008-12-30 Thread Andrei Zmievski
andrei  Tue Dec 30 19:37:08 2008 UTC

  Added files: 
/php-src/ext/sessionmod_files.bat 
  Log:
  Add mod_files.bat (equivalent to mod_files.sh).
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.bat?view=markuprev=1.1
Index: php-src/ext/session/mod_files.bat
+++ php-src/ext/session/mod_files.bat
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

IF _%1_==_AUTO_ (
GOTO MakeDirs
)

IF _%2_==__ (
ECHO Usage %0 ^basedir^ ^depth^ ^[^hash_bits^]
ECHO.
ECHO Where ^basedir^   is the session directory 
ECHO   ^depth^ is the number of levels defined in 
session.save_path
ECHO   ^[hash_bits^] is the number of bits defined in 
session.hash_bits_per_character
EXIT /B 1
)

SET /A Depth=%2 + 0 2NUL
IF /I %ERRORLEVEL% EQU 9167 GOTO DepthError
IF _%Depth%_==__ GOTO DepthError
IF /I %Depth% LEQ 0 GOTO DepthError

IF _%3_==__ GOTO DefaultBits

SET /A Bits=%3 + 0 2NUL
IF /I %ERRORLEVEL% EQU 9167 GOTO BitsError
IF _%Bits%_==__ GOTO BitsError
IF /I %Bits% LSS 4 GOTO BitsError
IF /I %Bits% GTR 6 GOTO BitsError
GOTO BitsSet

:DefaultBits
SET Bits=4
:BitsSet

SET HashChars=0 1 2 3 4 5 6 7 8 9 A B C D E F
IF /I %Bits% GEQ 5 SET HashChars=!HashChars! G H I J K L M N O P Q R S T U V
IF /I %Bits% GEQ 6 SET HashChars=!HashChars! W X Y Z  - ,

FOR %%A IN (%HashChars%) DO (
ECHO Making %%A
CALL %~0 AUTO %~1\%%~A %Depth%
)
GOTO :EOF

:MakeDirs
MKDIR %~2
SET /A ThisDepth=%3 - 1
IF /I %ThisDepth% GTR 0 FOR %%A IN (%HashChars%) DO CALL %~0 AUTO %~2\%%~A 
%ThisDepth%
GOTO :EOF

:DepthError
ECHO ERROR: Invalid depth : %2
EXIT /B 0

:BitsError
ECHO ERROR: Invalid hash_bits : %3
EXIT /B 0



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session mod_files.bat

2008-12-30 Thread Andrei Zmievski
andrei  Tue Dec 30 19:37:35 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/sessionmod_files.bat 
  Log:
  MFH
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.bat?view=markuprev=1.1
Index: php-src/ext/session/mod_files.bat
+++ php-src/ext/session/mod_files.bat
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

IF _%1_==_AUTO_ (
GOTO MakeDirs
)

IF _%2_==__ (
ECHO Usage %0 ^basedir^ ^depth^ ^[^hash_bits^]
ECHO.
ECHO Where ^basedir^   is the session directory 
ECHO   ^depth^ is the number of levels defined in 
session.save_path
ECHO   ^[hash_bits^] is the number of bits defined in 
session.hash_bits_per_character
EXIT /B 1
)

SET /A Depth=%2 + 0 2NUL
IF /I %ERRORLEVEL% EQU 9167 GOTO DepthError
IF _%Depth%_==__ GOTO DepthError
IF /I %Depth% LEQ 0 GOTO DepthError

IF _%3_==__ GOTO DefaultBits

SET /A Bits=%3 + 0 2NUL
IF /I %ERRORLEVEL% EQU 9167 GOTO BitsError
IF _%Bits%_==__ GOTO BitsError
IF /I %Bits% LSS 4 GOTO BitsError
IF /I %Bits% GTR 6 GOTO BitsError
GOTO BitsSet

:DefaultBits
SET Bits=4
:BitsSet

SET HashChars=0 1 2 3 4 5 6 7 8 9 A B C D E F
IF /I %Bits% GEQ 5 SET HashChars=!HashChars! G H I J K L M N O P Q R S T U V
IF /I %Bits% GEQ 6 SET HashChars=!HashChars! W X Y Z  - ,

FOR %%A IN (%HashChars%) DO (
ECHO Making %%A
CALL %~0 AUTO %~1\%%~A %Depth%
)
GOTO :EOF

:MakeDirs
MKDIR %~2
SET /A ThisDepth=%3 - 1
IF /I %ThisDepth% GTR 0 FOR %%A IN (%HashChars%) DO CALL %~0 AUTO %~2\%%~A 
%ThisDepth%
GOTO :EOF

:DepthError
ECHO ERROR: Invalid depth : %2
EXIT /B 0

:BitsError
ECHO ERROR: Invalid hash_bits : %3
EXIT /B 0



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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2008-12-15 Thread Andrei Zmievski

Where do I edit the doc stuff again?

Kalle Sommer Nielsen wrote:

2008/12/12 Andrei Zmievski and...@php.net:

andrei  Fri Dec 12 19:19:04 2008 UTC

 Modified files:
   /php-src/ext/standard   array.c
 Log:
 Add sort flags parameter to array_unique().


http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.467r2=1.468diff_format=u


Guess it should have [DOC], cc'ed to phpdoc@ =)





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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c

2008-12-12 Thread Andrei Zmievski
andrei  Fri Dec 12 19:20:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   array.c 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.47r2=1.308.2.21.2.37.2.48diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 
php-src/ext/standard/array.c:1.308.2.21.2.37.2.48
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.47   Wed Nov 26 00:59:41 2008
+++ php-src/ext/standard/array.cFri Dec 12 19:20:49 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.37.2.47 2008/11/26 00:59:41 lbarnaud Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.48 2008/12/12 19:20:49 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2668,7 +2668,7 @@
 }
 /* }}} */
 
-/* {{{ proto array array_unique(array input)
+/* {{{ proto array array_unique(array input [, int sort_flags])
Removes duplicate values from array */
 PHP_FUNCTION(array_unique)
 {
@@ -2680,11 +2680,14 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
+   long sort_type = PHP_SORT_REGULAR;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a, array) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, 
sort_type) == FAILURE) {
return;
}
 
+   php_set_compare_func(sort_type TSRMLS_CC);
+
array_init_size(return_value, 
zend_hash_num_elements(Z_ARRVAL_P(array)));
zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(array), 
(copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*));
 
@@ -2703,7 +2706,6 @@
arTmp[i].i = i;
}
arTmp[i].b = NULL;
-   php_set_compare_func(PHP_SORT_STRING TSRMLS_CC);
zend_qsort((void *) arTmp, i, sizeof(struct bucketindex), 
php_array_data_compare TSRMLS_CC);
 
/* go through the sorted array and delete duplicates from the copy */



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c

2008-12-12 Thread Andrei Zmievski
Easy, there. I realized that there were 4 tests that broke after committing it. The issue 
is that I made SORT_REGULAR to be the default, which is not what the tests were expecting. 
 The easiest way to fix the tests is to make them pass SORT_STRING to array_unique(), I 
guess.


The rest is coming.

-Andrei

Hannes Magnusson wrote:

Could you maybe fix the at-least-four-tests that broke, and maybe add
a new test for this feature? :)
And NEWS entry, [DOC], update the wiki...



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard/tests/array array_unique_error.phpt array_unique_variation2.phpt array_unique_variation6.phpt array_unique_variation8.phpt

2008-12-12 Thread Andrei Zmievski
andrei  Fri Dec 12 23:59:48 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/standard/tests/array   array_unique_error.phpt 
array_unique_variation2.phpt 
array_unique_variation6.phpt 
array_unique_variation8.phpt 
  Log:
  Fix tests, add NEWS entry.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.413r2=1.2027.2.547.2.965.2.414diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.413 
php-src/NEWS:1.2027.2.547.2.965.2.414
--- php-src/NEWS:1.2027.2.547.2.965.2.413   Fri Dec 12 23:21:22 2008
+++ php-src/NEWSFri Dec 12 23:59:47 2008
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 200?, PHP 5.3.0 Alpha 4
+- Added optional sorting type flag parameter to array_unique(), default is
+  SORT_REGULAR. (Andrei)
 - Changed opendir(), dir() and scandir() to use default context when no context
   argument is passed. (Sara)
 - Changed open_basedir to allow tightening in runtime contexts. (Sara)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/array/array_unique_error.phpt
diff -u php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.2Sun Dec 
 9 14:41:10 2007
+++ php-src/ext/standard/tests/array/array_unique_error.phptFri Dec 12 
23:59:48 2008
@@ -17,7 +17,7 @@
 echo \n-- Testing array_unique() function with more than expected no. of 
arguments --\n;
 $input = array(1, 2);
 $extra_arg = 10;
-var_dump( array_unique($input, $extra_arg) );
+var_dump( array_unique($input, SORT_NUMERIC, $extra_arg) );
 
 echo Done;
 ?
@@ -26,11 +26,11 @@
 
 -- Testing array_unique() function with zero arguments --
 
-Warning: array_unique() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: array_unique() expects at least 1 parameter, 0 given in %s on line %d
 NULL
 
 -- Testing array_unique() function with more than expected no. of arguments --
 
-Warning: array_unique() expects exactly 1 parameter, 2 given in %s on line %d
+Warning: array_unique() expects at most 2 parameters, 3 given in %s on line %d
 NULL
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/array/array_unique_variation2.phpt
diff -u php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.2   
Sun Dec  9 14:41:10 2007
+++ php-src/ext/standard/tests/array/array_unique_variation2.phpt   Fri Dec 
12 23:59:48 2008
@@ -74,7 +74,7 @@
 $iterator = 1;
 foreach($inputs as $input) {
   echo -- Iteration $iterator --\n;
-  var_dump( array_unique($input) );
+  var_dump( array_unique($input, SORT_STRING) );
   $iterator++;
 }
   
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation6.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/array/array_unique_variation6.phpt
diff -u php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.2   
Sun Dec  9 14:41:10 2007
+++ php-src/ext/standard/tests/array/array_unique_variation6.phpt   Fri Dec 
12 23:59:48 2008
@@ -29,7 +29,7 @@
   5 = $value4
 );
 
-var_dump( array_unique($input) );
+var_dump( array_unique($input, SORT_STRING) );
 
 echo Done;
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation8.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/array/array_unique_variation8.phpt
diff -u php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.2   
Sun Dec  9 14:41:10 2007
+++ php-src/ext/standard/tests/array/array_unique_variation8.phpt   Fri Dec 
12 23:59:48 2008
@@ -22,7 +22,7 @@
   array(1, 2, 3, 1)
 );
 
-var_dump( array_unique($input) );
+var_dump( array_unique($input, SORT_STRING) );
 
 echo Done;
 ?



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c /ext/standard/tests/array array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation6.phpt

2008-12-12 Thread Andrei Zmievski
andrei  Sat Dec 13 00:38:31 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   array.c 
/php-src/ext/standard/tests/array   array_unique_error.phpt 
array_unique_variation1.phpt 
array_unique_variation2.phpt 
array_unique_variation6.phpt 
array_unique_variation8.phpt 
  Log:
  MFH
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1359r2=1.2027.2.547.2.1360diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1359 php-src/NEWS:1.2027.2.547.2.1360
--- php-src/NEWS:1.2027.2.547.2.1359Fri Dec 12 04:21:01 2008
+++ php-src/NEWSSat Dec 13 00:38:28 2008
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.2.9
+- Added optional sorting type flag parameter to array_unique(), default is
+  SORT_REGULAR. (Andrei)
 - Fixed security issue in imagerotate(), background colour isn't validated
   correctly with a non truecolour image. (Scott)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.59r2=1.308.2.21.2.60diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.59 
php-src/ext/standard/array.c:1.308.2.21.2.60
--- php-src/ext/standard/array.c:1.308.2.21.2.59Wed Nov 26 01:00:36 2008
+++ php-src/ext/standard/array.cSat Dec 13 00:38:29 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.59 2008/11/26 01:00:36 lbarnaud Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.60 2008/12/13 00:38:29 andrei Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2813,12 +2813,11 @@
 }
 /* }}} */
 
-/* {{{ proto array array_unique(array input)
+/* {{{ proto array array_unique(array input [, int sort_flags])
Removes duplicate values from array */
 PHP_FUNCTION(array_unique)
 {
-   zval **array, *tmp;
-   HashTable *target_hash;
+   zval *array, *tmp;
Bucket *p;
struct bucketindex {
Bucket *b;
@@ -2826,34 +2825,31 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
+   long sort_type = SORT_REGULAR;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, array) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-   target_hash = HASH_OF(*array);
-   if (!target_hash) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, The argument 
should be an array);
-   RETURN_FALSE;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, 
sort_type) == FAILURE) {
+   return;
}
 
+   set_compare_func(sort_type TSRMLS_CC);
+
array_init(return_value);
-   zend_hash_copy(Z_ARRVAL_P(return_value), target_hash, 
(copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*));
+   zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(array), 
(copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*));
 
-   if (target_hash-nNumOfElements = 1) { /* nothing to do */
+   if (Z_ARRVAL_P(array)-nNumOfElements = 1) {   /* nothing to do */
return;
}
 
/* create and sort array with pointers to the target_hash buckets */
-   arTmp = (struct bucketindex *) pemalloc((target_hash-nNumOfElements + 
1) * sizeof(struct bucketindex), target_hash-persistent);
+   arTmp = (struct bucketindex *) 
pemalloc((Z_ARRVAL_P(array)-nNumOfElements + 1) * sizeof(struct bucketindex), 
Z_ARRVAL_P(array)-persistent);
if (!arTmp) {
RETURN_FALSE;
}
-   for (i = 0, p = target_hash-pListHead; p; i++, p = p-pListNext) {
+   for (i = 0, p = Z_ARRVAL_P(array)-pListHead; p; i++, p = p-pListNext) 
{
arTmp[i].b = p;
arTmp[i].i = i;
}
arTmp[i].b = NULL;
-   set_compare_func(SORT_STRING TSRMLS_CC);
zend_qsort((void *) arTmp, i, sizeof(struct bucketindex), 
array_data_compare TSRMLS_CC);
 
/* go through the sorted array and delete duplicates from the copy */
@@ -2879,7 +2875,7 @@
}
}
}
-   pefree(arTmp, target_hash-persistent);
+   pefree(arTmp, Z_ARRVAL_P(array)-persistent);
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/array/array_unique_error.phpt
diff -u php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.2 
php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.3
--- php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.2Sun Dec 
 9 14:44:18 2007
+++ 

[PHP-CVS] cvs: CVSROOT / avail

2008-08-05 Thread Andrei Zmievski
andrei  Tue Aug  5 21:25:30 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give karma to akshat.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1430r2=1.1431diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1430 CVSROOT/avail:1.1431
--- CVSROOT/avail:1.1430Fri Aug  1 14:31:16 2008
+++ CVSROOT/avail   Tue Aug  5 21:25:29 2008
@@ -137,6 +137,7 @@
 avail|wez,sterling,edink,derick,tal,bs,magnus|embed,embed-web
 avail|hholzgra,stas,derick|functable
 avail|alan_k|php-gtk/ext/gtkhtml,php-gtk/ext/scintilla
+avail|akshat|php-gtk/ext/cairo
 avail|jmoore,alan_k|php-gtk/generator
 avail|sterling|php-src/ext/bz2
 avail|grantc|php-src/ext/ingres_ii,pecl/ingres



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



Re: [PHP-CVS] cvs: php-src /ext/date/tests 008.phpt 011.phpt 013.phpt 014.phpt bug41523-64bit.phpt bug41523.phpt bug43808.phpt date_parse_001.phpt

2008-06-11 Thread Andrei Zmievski
ASCII character set can still be in Unicode strings, and those are the 
default type in HEAD now.


-Andrei

Steph Fox wrote:


Hi Henrique,

I just want to check this, because it smells wrong to me.

Those functions return ascii strings - why are unicode strings now 
expected?


Thanks,

- Steph

- Original Message - From: Henrique do Nascimento Angelo 
[EMAIL PROTECTED]

To: php-cvs@lists.php.net
Sent: Saturday, June 07, 2008 9:33 PM
Subject: [PHP-CVS] cvs: php-src /ext/date/tests 008.phpt 011.phpt 
013.phpt 014.phpt bug41523-64bit.phpt bug41523.phpt bug43808.phpt 
date_parse_001.phpt





hnangelo Sat Jun  7 20:33:35 2008 UTC

 Modified files:
   /php-src/ext/date/tests 008.phpt 011.phpt 013.phpt 014.phpt
  bug41523-64bit.phpt bug41523.phpt
  bug43808.phpt date_parse_001.phpt
 Log:
 Update tests to conform with the unicode functions

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/008.phpt?r1=1.2r2=1.3diff_format=u 


Index: php-src/ext/date/tests/008.phpt
diff -u php-src/ext/date/tests/008.phpt:1.2 
php-src/ext/date/tests/008.phpt:1.3

--- php-src/ext/date/tests/008.phpt:1.2 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/008.phpt Sat Jun  7 20:33:35 2008
@@ -34,9 +34,9 @@
  [uyday]=
  int(177)
  [uweekday]=
-  string(7) Tuesday
+  unicode(7) Tuesday
  [umonth]=
-  string(4) June
+  unicode(4) June
  [0]=
  int(1151366400)
}
@@ -58,9 +58,9 @@
  [uyday]=
  int(%d)
  [uweekday]=
-  string(%d) %s
+  unicode(%d) %s
  [umonth]=
-  string(%d) %s
+  unicode(%d) %s
  [0]=
  int(%d)
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/011.phpt?r1=1.1r2=1.2diff_format=u 


Index: php-src/ext/date/tests/011.phpt
diff -u php-src/ext/date/tests/011.phpt:1.1 
php-src/ext/date/tests/011.phpt:1.2

--- php-src/ext/date/tests/011.phpt:1.1 Fri Dec 22 13:07:26 2006
+++ php-src/ext/date/tests/011.phpt Sat Jun  7 20:33:35 2008
@@ -16,8 +16,8 @@
--EXPECTF--
Warning: timezone_name_from_abbr() expects at least 1 parameter, 0 
given in %s on line 3

bool(false)
-string(13) Europe/Berlin
+unicode(13) Europe/Berlin
bool(false)
bool(false)
-string(12) Europe/Paris
+unicode(12) Europe/Paris
Done
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/013.phpt?r1=1.3r2=1.4diff_format=u 


Index: php-src/ext/date/tests/013.phpt
diff -u php-src/ext/date/tests/013.phpt:1.3 
php-src/ext/date/tests/013.phpt:1.4

--- php-src/ext/date/tests/013.phpt:1.3 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/013.phpt Sat Jun  7 20:33:35 2008
@@ -26,7 +26,7 @@
  [utimezone_type]=
  int(3)
  [utimezone]=
-  string(3) UTC
+  unicode(3) UTC
}
unicode(19) 2006.12.12 00:00:00

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/014.phpt?r1=1.3r2=1.4diff_format=u 


Index: php-src/ext/date/tests/014.phpt
diff -u php-src/ext/date/tests/014.phpt:1.3 
php-src/ext/date/tests/014.phpt:1.4

--- php-src/ext/date/tests/014.phpt:1.3 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/014.phpt Sat Jun  7 20:33:35 2008
@@ -25,7 +25,7 @@
  [utimezone_type]=
  int(3)
  [utimezone]=
-  string(3) UTC
+  unicode(3) UTC
}
object(DateTimeZone)#%d (0) {
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523-64bit.phpt?r1=1.3r2=1.4diff_format=u 


Index: php-src/ext/date/tests/bug41523-64bit.phpt
diff -u php-src/ext/date/tests/bug41523-64bit.phpt:1.3 
php-src/ext/date/tests/bug41523-64bit.phpt:1.4
--- php-src/ext/date/tests/bug41523-64bit.phpt:1.3 Tue May 27 18:16:00 
2008

+++ php-src/ext/date/tests/bug41523-64bit.phpt Sat Jun  7 20:33:35 2008
@@ -48,6 +48,6 @@
  [utimezone_type]=
  int(3)
  [utimezone]=
-  string(3) UTC
+  unicode(3) UTC
}
-0001-11-30T00:00:00+
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523.phpt?r1=1.5r2=1.6diff_format=u 


Index: php-src/ext/date/tests/bug41523.phpt
diff -u php-src/ext/date/tests/bug41523.phpt:1.5 
php-src/ext/date/tests/bug41523.phpt:1.6

--- php-src/ext/date/tests/bug41523.phpt:1.5 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/bug41523.phpt Sat Jun  7 20:33:35 2008
@@ -48,6 +48,6 @@
  [utimezone_type]=
  int(3)
  [utimezone]=
-  string(3) UTC
+  unicode(3) UTC
}
-0001-11-30T00:00:00+
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43808.phpt?r1=1.2r2=1.3diff_format=u 


Index: php-src/ext/date/tests/bug43808.phpt
diff -u php-src/ext/date/tests/bug43808.phpt:1.2 
php-src/ext/date/tests/bug43808.phpt:1.3

--- php-src/ext/date/tests/bug43808.phpt:1.2 Tue May 27 18:16:00 2008
+++ php-src/ext/date/tests/bug43808.phpt Sat Jun  7 20:33:35 2008
@@ -20,14 +20,14 @@
  [uwarnings]=
  array(1) {
[6]=
-string(29) Double timezone specification
+unicode(29) Double timezone specification
  }
  [uerror_count]=
  int(1)
  [uerrors]=
  array(1) {
[0]=
-string(47) The timezone could not be found in the database
+unicode(47) The timezone could not be found in the database
  }
}
array(4) {
@@ -36,13 +36,13 @@
  [uwarnings]=
  array(1) {
[6]=
-string(29) Double timezone specification
+unicode(29) Double 

Re: [PHP-CVS] cvs: php-src /ext/date php_date.c

2008-06-10 Thread Andrei Zmievski
In date(), strtotime(), etc, do we want to restrict the format argument 
to be an ASCII string? Because right now if you pass Unicode string in, 
it will be converted to binary using runtime encoding..


-Andrei

Henrique do Nascimento Angelo wrote:

hnangeloSat Jun  7 20:30:30 2008 UTC

  Modified files:  
/php-src/ext/date	php_date.c 
  Log:

  Add Unicode support and set as unicode compatible
  



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



[PHP-CVS] cvs: CVSROOT / avail

2008-05-12 Thread Andrei Zmievski
andrei  Mon May 12 18:55:26 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give mmdrake access to php-gtk-web.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1395r2=1.1396diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1395 CVSROOT/avail:1.1396
--- CVSROOT/avail:1.1395Fri May  9 13:14:59 2008
+++ CVSROOT/avail   Mon May 12 18:55:26 2008
@@ -108,7 +108,7 @@
 
 # The PHP-GTK Web Group has access to the PHP-GTK website.
 
-avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks,anant,auroraeosrose|php-gtk-web
+avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks,anant,auroraeosrose,mmdrake|php-gtk-web
 
 # The Smarty Group has access to the Smarty code
 



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



[PHP-CVS] cvs: CVSROOT / avail

2007-11-05 Thread Andrei Zmievski
andrei  Tue Nov  6 02:03:39 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give Bob Majdak (bmajdak) access to PHP-GTK.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1321r2=1.1322diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1321 CVSROOT/avail:1.1322
--- CVSROOT/avail:1.1321Mon Nov  5 03:44:47 2007
+++ CVSROOT/avail   Tue Nov  6 02:03:38 2007
@@ -101,7 +101,7 @@
 
 # The PHP-GTK Group has access to the PHP-GTK code and documentation.
 
-avail|fmk,mfischer,alan_k,amaza,descript,cweiske,jani,pablo,sfox,jsjohnst,jp,anant,scottmattocks,auroraeosrose|php-gtk,php-gtk-doc
+avail|fmk,mfischer,alan_k,amaza,descript,cweiske,jani,pablo,sfox,jsjohnst,jp,anant,scottmattocks,auroraeosrose,bmajdak|php-gtk,php-gtk-doc
 
 # The PHP-GTK Documentation Group has access to the PHP-GTK
 # documentation.

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



[PHP-CVS] cvs: php-src(PHP_5_3) / .gdbinit

2007-10-13 Thread Andrei Zmievski
andrei  Sun Oct 14 02:48:30 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src.gdbinit 
  Log:
  Fix macros after GC patch.
  
  
http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.10.4.3.2.1r2=1.10.4.3.2.1.2.1diff_format=u
Index: php-src/.gdbinit
diff -u php-src/.gdbinit:1.10.4.3.2.1 php-src/.gdbinit:1.10.4.3.2.1.2.1
--- php-src/.gdbinit:1.10.4.3.2.1   Sun May 20 21:46:17 2007
+++ php-src/.gdbinitSun Oct 14 02:48:30 2007
@@ -46,8 +46,8 @@
set $zvalue = $arg0
set $type = $zvalue-type
 
-   printf (refcount=%d, $zvalue-refcount
-   if $zvalue-is_ref
+   printf (refcount=%d, $zvalue-refcount__gc
+   if $zvalue-is_ref__gc
printf ,is_ref
end
printf ) 

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



[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dir.c file.c

2007-09-05 Thread Andrei Zmievski

Calm down, Jani. I'm sure it was just an oversight.

-Andrei
http://10fathoms.org/vu - daily photoblog

On Sep 5, 2007, at 2:06 AM, Jani Taskinen wrote:

This is against the proper procedure. You're supposed to commit  
first to

HEAD then MFH to the appropriate branch. We don't have the luxury of
having some divas around here who think they can do whatever they  
like..


Can someone please revoke Ilia's CVS account? Only committing to a
branch and leaving the trunk unpatched is sabotage IMO..

--Jani



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



[PHP-CVS] cvs: CVSROOT / avail

2007-06-15 Thread Andrei Zmievski
andrei  Sat Jun 16 02:10:11 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give Anant and Elizabeth access to website.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1279r2=1.1280diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1279 CVSROOT/avail:1.1280
--- CVSROOT/avail:1.1279Mon Jun 11 05:35:57 2007
+++ CVSROOT/avail   Sat Jun 16 02:10:11 2007
@@ -107,7 +107,7 @@
 
 # The PHP-GTK Web Group has access to the PHP-GTK website.
 
-avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks|php-gtk-web
+avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks,anant,auroraeosrose|php-gtk-web
 
 # The Smarty Group has access to the Smarty code
 

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



[PHP-CVS] cvs: CVSROOT / avail

2007-05-01 Thread Andrei Zmievski
andrei  Tue May  1 15:59:02 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give ljbuesch phpdoc karma.
  
  http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1265r2=1.1266diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1265 CVSROOT/avail:1.1266
--- CVSROOT/avail:1.1265Sat Apr 21 11:52:25 2007
+++ CVSROOT/avail   Tue May  1 15:59:02 2007
@@ -40,7 +40,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97!
 
7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv!
 e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti
x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit!
 
ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo,shadda,joeaccord,ezyang|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdo!
 c-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdo
c-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca

Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/json JSON_parser.c /ext/json/tests bug41067.phpt

2007-04-19 Thread Andrei Zmievski

Ilia, could you update HEAD please?

-Andrei

On Apr 18, 2007, at 10:06 AM, Andrei Zmievski wrote:


What about HEAD?

-Andrei

On Apr 16, 2007, at 3:31 PM, Ilia Alshanetsky wrote:


iliaa   Mon Apr 16 22:31:05 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/json/tests bug41067.phpt

  Modified files:
/php-srcNEWS
/php-src/ext/json   JSON_parser.c
  Log:

  Fixed bug #41067 (json_encode() problem with UTF-16 input).

http://cvs.php.net/viewvc.cgi/php-src/NEWS? 
r1=1.2027.2.547.2.650r2=1.2027.2.547.2.651diff_format=u

Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.650 php-src/NEWS: 
1.2027.2.547.2.651

--- php-src/NEWS:1.2027.2.547.2.650 Sun Apr 15 16:50:41 2007
+++ php-src/NEWSMon Apr 16 22:31:05 2007
@@ -1,10 +1,13 @@
  
PHP   
  NEWS
  
| 
||

 ?? Apr 2007, PHP 5.2.2RC2
+- Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys).  
(Arpad, Ilia)
 - Fixed bug #41083 (mysql_ping() requires MYSQL_OPT_RECONNECT to  
be set since

   MySQL 5.0.13). (xiaojb at gmail dot com, Tony)
 - Fixed bug #41075 (memleak when creating default object caused  
exception).

   (Dmitry)
+- Fixed bug #41067 (json_encode() problem with UTF-16 input). (jp  
at df5ea

+  dot net. Ilia)
 - Fixed bug #41063 (chdir doesn't like root paths). (Dmitry)
 - Fixed bug #41061 (visibility error in  
ReflectionFunction::export()).

   (Johannes)
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c? 
r1=1.1.2.5r2=1.1.2.6diff_format=u

Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.5 php-src/ext/json/ 
JSON_parser.c:1.1.2.6

--- php-src/ext/json/JSON_parser.c:1.1.2.5  Fri Apr 13 21:34:12 2007
+++ php-src/ext/json/JSON_parser.c  Mon Apr 16 22:31:05 2007
@@ -316,6 +316,25 @@
 smart_str_appendc(buf, 0xc0 | (utf16  6));
 smart_str_appendc(buf, 0x80 | (utf16  0x3f));
 }
+else if ((utf16  0xfc00) == 0xdc00
+ buf-len = 3
+ ((unsigned char) buf-c[buf-len - 3]) == 0xed
+ ((unsigned char) buf-c[buf-len - 2]  0xf0)  
== 0xa0
+ ((unsigned char) buf-c[buf-len - 1]  0xc0)  
== 0x80)

+{
+/* found surrogate pair */
+unsigned long utf32;
+
+utf32 = (((buf-c[buf-len - 2]  0xf)  16)
+| ((buf-c[buf-len - 1]  0x3f)  10)
+| (utf16  0x3ff)) + 0x1;
+buf-len -= 3;
+
+smart_str_appendc(buf, 0xf0 | (utf32  18));
+smart_str_appendc(buf, 0x80 | ((utf32  12)  0x3f));
+smart_str_appendc(buf, 0x80 | ((utf32  6)  0x3f));
+smart_str_appendc(buf, 0x80 | (utf32  0x3f));
+}
 else
 {
 smart_str_appendc(buf, 0xe0 | (utf16  12));

http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug41067.phpt? 
view=markuprev=1.1

Index: php-src/ext/json/tests/bug41067.phpt
+++ php-src/ext/json/tests/bug41067.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


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



[PHP-CVS] cvs: php-src /ext/json JSON_parser.c json.c

2007-04-16 Thread Andrei Zmievski
andrei  Mon Apr 16 16:52:21 2007 UTC

  Modified files:  
/php-src/ext/json   JSON_parser.c json.c 
  Log:
  MFB (handling of control characters)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.7 php-src/ext/json/JSON_parser.c:1.8
--- php-src/ext/json/JSON_parser.c:1.7  Wed Oct 18 07:41:33 2006
+++ php-src/ext/json/JSON_parser.c  Mon Apr 16 16:52:20 2007
@@ -169,7 +169,7 @@
 accepted if the end of the text is in state 9 and mode is MODE_DONE.
 */
 static const int state_transition_table[30][31] = {
-/* 0*/ { 0, 
0,-8,-1,-6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
+/* 0*/ { 0, 0,-8,-1,-6,-1,-1,-1, 
3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
 /* 1*/ { 1, 1,-1,-9,-1,-1,-1,-1, 
3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
 /* 2*/ { 2, 2,-8,-1,-6,-5,-1,-1, 
3,-1,-1,-1,20,-1,21,22,-1,-1,-1,-1,-1,13,-1,17,-1,-1,10,-1,-1,-1,-1},
 /* 3*/ { 3,-1, 3, 3, 3, 3, 3, 3,-4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
3, 3, 3, 3, 3, 3, 3, 3},
@@ -577,6 +577,14 @@
 case MODE_OBJECT:
 the_state = 9;
 break;
+   case MODE_DONE:
+   if (type == IS_STRING) {
+   smart_str_0(buf);
+   ZVAL_UTF8_STRINGL(z, buf.c, 
buf.len, ZSTR_DUPLICATE);
+   the_state = 9;
+   break;
+   }
+   /* fall through if not IS_STRING */
 default:
 FREE_BUFFERS();
 return false;
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.23r2=1.24diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.23 php-src/ext/json/json.c:1.24
--- php-src/ext/json/json.c:1.23Mon Feb 19 19:44:44 2007
+++ php-src/ext/json/json.c Mon Apr 16 16:52:20 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.23 2007/02/19 19:44:44 tony2001 Exp $ */
+/* $Id: json.c,v 1.24 2007/04/16 16:52:20 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -307,7 +307,7 @@
 break;
 default:
 {
-if (us  ' ' || (us  127) == us)
+if (us = ' '  (us  127) == us)
 {
 smart_str_appendc(buf, (unsigned char) us);
 }

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/json JSON_parser.c json.c

2007-04-13 Thread Andrei Zmievski
andrei  Fri Apr 13 21:34:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/json   JSON_parser.c json.c 
  Log:
  Fix processing of control characters; they should be escaped as \u
  sequences.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.4 
php-src/ext/json/JSON_parser.c:1.1.2.5
--- php-src/ext/json/JSON_parser.c:1.1.2.4  Tue Jul 25 09:06:55 2006
+++ php-src/ext/json/JSON_parser.c  Fri Apr 13 21:34:12 2007
@@ -169,7 +169,7 @@
 accepted if the end of the text is in state 9 and mode is MODE_DONE.
 */
 static const int state_transition_table[30][31] = {
-/* 0*/ { 0, 
0,-8,-1,-6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
+/* 0*/ { 0, 0,-8,-1,-6,-1,-1,-1, 
3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
 /* 1*/ { 1, 1,-1,-9,-1,-1,-1,-1, 
3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
 /* 2*/ { 2, 2,-8,-1,-6,-5,-1,-1, 
3,-1,-1,-1,20,-1,21,22,-1,-1,-1,-1,-1,13,-1,17,-1,-1,10,-1,-1,-1,-1},
 /* 3*/ { 3,-1, 3, 3, 3, 3, 3, 3,-4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
3, 3, 3, 3, 3, 3, 3, 3},
@@ -577,6 +577,14 @@
 case MODE_OBJECT:
 the_state = 9;
 break;
+   case MODE_DONE:
+   if (type == IS_STRING) {
+   smart_str_0(buf);
+   ZVAL_STRINGL(z, buf.c, buf.len, 
1);
+   the_state = 9;
+   break;
+   }
+   /* fall through if not IS_STRING */
 default:
 FREE_BUFFERS();
 return false;
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.13r2=1.9.2.14diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.13 php-src/ext/json/json.c:1.9.2.14
--- php-src/ext/json/json.c:1.9.2.13Thu Apr 12 19:40:38 2007
+++ php-src/ext/json/json.c Fri Apr 13 21:34:12 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.13 2007/04/12 19:40:38 iliaa Exp $ */
+/* $Id: json.c,v 1.9.2.14 2007/04/13 21:34:12 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -303,7 +303,7 @@
 break;
 default:
 {
-if (us  ' ' || (us  127) == us)
+if (us = ' '  (us  127) == us)
 {
 smart_str_appendc(buf, (unsigned char) us);
 }

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



[PHP-CVS] cvs: php-src /ext/unicode collator.c

2007-04-10 Thread Andrei Zmievski
andrei  Tue Apr 10 22:44:57 2007 UTC

  Modified files:  
/php-src/ext/unicodecollator.c 
  Log:
  Wrong locale name.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/collator.c?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/unicode/collator.c
diff -u php-src/ext/unicode/collator.c:1.12 php-src/ext/unicode/collator.c:1.13
--- php-src/ext/unicode/collator.c:1.12 Mon Jan  1 09:29:33 2007
+++ php-src/ext/unicode/collator.c  Tue Apr 10 22:44:57 2007
@@ -14,7 +14,7 @@
+--+
 */
 
-/* $Id: collator.c,v 1.12 2007/01/01 09:29:33 sebastian Exp $ */
+/* $Id: collator.c,v 1.13 2007/04/10 22:44:57 andrei Exp $ */
 
 #include php.h
 #include ext/standard/php_array.h
@@ -191,7 +191,7 @@
ucoll = ucol_open(collator_name, status);
if (U_FAILURE(status)) {
/* UTODO handle error case properly */
-   zend_error(E_ERROR, Could not open collator for locale %s, 
UG(default_locale));
+   zend_error(E_ERROR, Could not open collator for locale %s, 
collator_name);
return;
}
collator_set_wrapper(object, zend_collator_create(ucoll) TSRMLS_CC);
@@ -199,7 +199,7 @@
 /* }}} */
 
 /* {{{ proto int Collator::compare(string str1, string str2) U
-   Compare two strings using collation */
+   Compare two strings using collation }}} */
 /* {{{ proto int collator_compare(Collator coll, string str1, string str2) U
Compare two strings using collation */
 PHP_FUNCTION(collator_compare)
@@ -218,7 +218,7 @@
 /* }}} */
 
 /* {{{ proto array Collator::sort(array input) U
-   Sort an array using collation */
+   Sort an array using collation }}} */
 /* {{{ proto array collator_sort(Collator coll, array input) U
Sort an array using collation */
 PHP_FUNCTION(collator_sort)
@@ -248,7 +248,7 @@
 /* }}} */
 
 /* {{{ proto void Collator::setStrength(int strength) U
-   Set the collation strength */
+   Set the collation strength }}} */
 /* {{{ proto void collator_set_strength(Collator coll, int strength) U
Set the collation strength */
 PHP_FUNCTION(collator_set_strength)
@@ -266,7 +266,7 @@
 /* }}} */
 
 /* {{{ proto int Collator::getStrength() U
-   Returns the current collation strength */
+   Returns the current collation strength }}} */
 /* {{{ proto int collator_get_strength(Collator coll) U
Returns the current collation strength */
 PHP_FUNCTION(collator_get_strength)
@@ -283,7 +283,7 @@
 /* }}} */
 
 /* {{{ proto bool Collator::setAttribute(int attribute, int value) U
-   Set a collation attribute */
+   Set a collation attribute }}} */
 /* {{{ proto bool collator_set_attribute(Collator coll, int attribute, int 
value) U
Set a collation attribute */
 PHP_FUNCTION(collator_set_attribute)
@@ -305,7 +305,7 @@
 
 
 /* {{{ proto int Collator::getAttribute(int attribute) U
-   Returns a collation attribute */
+   Returns a collation attribute }}} */
 /* {{{ proto int collator_get_attribute(Collator coll, int attribute) U
Returns a collation attribute */
 PHP_FUNCTION(collator_get_attribute)

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/soap php_encoding.c

2007-04-06 Thread Andrei Zmievski
andrei  Fri Apr  6 18:25:49 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_encoding.c 
  Log:
  Typo?
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.27r2=1.103.2.21.2.28diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.27 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.28
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.27 Mon Apr  2 13:43:08 2007
+++ php-src/ext/soap/php_encoding.c Fri Apr  6 18:25:49 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.27 2007/04/02 13:43:08 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.28 2007/04/06 18:25:49 andrei Exp $ */
 
 #include time.h
 
@@ -1016,7 +1016,7 @@
if (Z_TYPE_P(data) == IS_DOUBLE) {
char s[256];
 
-   snprintf(s, sizeof(s), %0.0F,floor(Z_DVAL_P(data)));
+   snprintf(s, sizeof(s), %0.0f,floor(Z_DVAL_P(data)));
xmlNodeSetContent(ret, BAD_CAST(s));
} else {
zval tmp = *data;

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/soap php_encoding.c

2007-04-06 Thread Andrei Zmievski
andrei  Fri Apr  6 18:27:58 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_encoding.c 
  Log:
  Apologies. Didn't realize we were using custom snprintf().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.28r2=1.103.2.21.2.29diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.28 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.29
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.28 Fri Apr  6 18:25:49 2007
+++ php-src/ext/soap/php_encoding.c Fri Apr  6 18:27:58 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.28 2007/04/06 18:25:49 andrei Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.29 2007/04/06 18:27:58 andrei Exp $ */
 
 #include time.h
 
@@ -1016,7 +1016,7 @@
if (Z_TYPE_P(data) == IS_DOUBLE) {
char s[256];
 
-   snprintf(s, sizeof(s), %0.0f,floor(Z_DVAL_P(data)));
+   snprintf(s, sizeof(s), %0.0F,floor(Z_DVAL_P(data)));
xmlNodeSetContent(ret, BAD_CAST(s));
} else {
zval tmp = *data;

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main snprintf.h

2007-04-06 Thread Andrei Zmievski
andrei  Fri Apr  6 19:25:53 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   snprintf.h 
  Log:
  We can't use the printf attribute here since we are supporting
  non-standard formats (like 'F').
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/snprintf.h?r1=1.32.2.3.2.4r2=1.32.2.3.2.5diff_format=u
Index: php-src/main/snprintf.h
diff -u php-src/main/snprintf.h:1.32.2.3.2.4 
php-src/main/snprintf.h:1.32.2.3.2.5
--- php-src/main/snprintf.h:1.32.2.3.2.4Sat Feb 24 18:20:46 2007
+++ php-src/main/snprintf.h Fri Apr  6 19:25:52 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: snprintf.h,v 1.32.2.3.2.4 2007/02/24 18:20:46 helly Exp $ */
+/* $Id: snprintf.h,v 1.32.2.3.2.5 2007/04/06 19:25:52 andrei Exp $ */
 
 /*
 
@@ -78,10 +78,10 @@
 
 
 BEGIN_EXTERN_C()
-PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) 
PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list 
ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
-PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...) 
PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap) 
PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
+PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...);
+PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list 
ap);
+PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...);
+PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap);
 PHPAPI int php_sprintf (char* s, const char* format, ...) 
PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
 PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char 
exponent, char *buf);
 PHPAPI char * php_conv_fp(register char format, register double num,

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



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/strings ltrim.phpt rtrim.phpt str_pad.phpt

2007-04-04 Thread Andrei Zmievski

What about unicode versions of these?

-Andrei

On Mar 28, 2007, at 3:31 AM, Zoe Slattery wrote:


zoe Wed Mar 28 10:31:13 2007 UTC

  Added files:
/php-src/ext/standard/tests/strings ltrim.phpt rtrim.phpt
str_pad.phpt
  Log:
  New tests for ltrim, rtrim, str_pad
zoe-20070328103113.txt
--
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



[PHP-CVS] cvs: CVSROOT / avail

2007-02-08 Thread Andrei Zmievski
andrei  Thu Feb  8 18:04:00 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1239r2=1.1240diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1239 CVSROOT/avail:1.1240
--- CVSROOT/avail:1.1239Fri Feb  2 11:51:04 2007
+++ CVSROOT/avail   Thu Feb  8 18:04:00 2007
@@ -124,7 +124,7 @@
 # The PHP-GTK Documentation Group has access to the PHP-GTK
 # documentation.
 
-avail|jmoore,sfox,pgod,henning,manu,cortesi,rambik,hirokawa,thomasgm,jstarkey,fernandoc,richy,simon,josx,didou,derick,nicos,bens,andreas,cweiske,horst,ramsey,scottmattocks,jsjohnst,mmdrake,dnfeitosa|php-gtk-doc
+avail|jmoore,sfox,pgod,henning,manu,cortesi,rambik,hirokawa,thomasgm,jstarkey,fernandoc,richy,simon,josx,didou,derick,nicos,bens,andreas,cweiske,horst,ramsey,scottmattocks,jsjohnst,mmdrake,dnfeitosa,mikespook|php-gtk-doc
 
 # The PHP-GTK Web Group has access to the PHP-GTK website.
 

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



Re: [PHP-CVS] cvs: php-src /sapi/apache2handler .cvsignore config.m4 config.w32 mod_php.c mod_php5.c php.sym php5apache2.dsp php_apache.h sapi_apache2.c

2007-02-07 Thread Andrei Zmievski
Don't we need to explicitly specify the module name, like sapi/apache  
does it? Otherwise the name's going to be mod_php.c.


AP_MODULE_DECLARE_DATA module php6_module = {
STANDARD20_MODULE_STUFF,
create_php_config,  /* create per-directory config 
structure */
merge_php_config,   /* merge per-directory config 
structures */
NULL,   /* create per-server config 
structure */
NULL,   /* merge per-server config 
structures */
php_dir_cmds,   /* command apr_table_t */
php_ap2_register_hook   /* register hooks */
};


-Andrei


On Feb 7, 2007, at 1:35 AM, Antony Dovgal wrote:


tony2001Wed Feb  7 09:35:09 2007 UTC

  Added files:
/php-src/sapi/apache2handlermod_php.c

  Removed files:
/php-src/sapi/apache2handlermod_php5.c

  Modified files:
/php-src/sapi/apache2handler.cvsignore config.m4 config.w32
php.sym php5apache2.dsp php_apache.h
sapi_apache2.c
  Log:
  change php5 to php6 everywhere
  rename mod_php5.c to mod_php.c

tony2001-20070207093509.txt
--
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



[PHP-CVS] cvs: php-src(PHP_5_2) / README.PARAMETER_PARSING_API

2007-02-05 Thread Andrei Zmievski
andrei  Mon Feb  5 17:57:51 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcREADME.PARAMETER_PARSING_API 
  Log:
  Update ! docs.
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.PARAMETER_PARSING_API?r1=1.7.6.1r2=1.7.6.2diff_format=u
Index: php-src/README.PARAMETER_PARSING_API
diff -u php-src/README.PARAMETER_PARSING_API:1.7.6.1 
php-src/README.PARAMETER_PARSING_API:1.7.6.2
--- php-src/README.PARAMETER_PARSING_API:1.7.6.1Wed Jul 12 07:34:28 2006
+++ php-src/README.PARAMETER_PARSING_APIMon Feb  5 17:57:51 2007
@@ -51,8 +51,8 @@
passed to it.
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
! - the parameter it follows can be of specified type or NULL (only 
applies
-   to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
-   pointer is set to NULL as well.
+   to 's', 'a', 'o', 'O', 'r', 'h', 'C', 'z', and 'Z'). If NULL is 
passed,
+   the results pointer is set to NULL as well.
 
 Examples
 

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



[PHP-CVS] cvs: php-src / README.PARAMETER_PARSING_API

2007-02-05 Thread Andrei Zmievski
andrei  Mon Feb  5 17:59:11 2007 UTC

  Modified files:  
/php-srcREADME.PARAMETER_PARSING_API 
  Log:
  Update
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.PARAMETER_PARSING_API?r1=1.19r2=1.20diff_format=u
Index: php-src/README.PARAMETER_PARSING_API
diff -u php-src/README.PARAMETER_PARSING_API:1.19 
php-src/README.PARAMETER_PARSING_API:1.20
--- php-src/README.PARAMETER_PARSING_API:1.19   Fri Feb  2 21:49:37 2007
+++ php-src/README.PARAMETER_PARSING_APIMon Feb  5 17:59:11 2007
@@ -69,9 +69,9 @@
 will not be touched by the parsing function if they are not
 passed to it.
 / - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
-! - the parameter it follows can be of specified type or NULL (only applies
-to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
-pointer is set to NULL as well.
+! - the parameter it follows can be of specified type or NULL (applies
+   to all specifiers except for 'b', 'l', and 'd'). If NULL is 
passed, the
+   results pointer is set to NULL as well.
  - alternate format (currently used for 's' only to specify a converter to
 use when converting from Unicode strings)
^ - returns original string type before conversion (only for 's' and 'u'

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



[PHP-CVS] cvs: CVSROOT / avail

2007-01-27 Thread Andrei Zmievski
andrei  Sat Jan 27 18:50:03 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1236r2=1.1237diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1236 CVSROOT/avail:1.1237
--- CVSROOT/avail:1.1236Sat Jan 27 16:55:07 2007
+++ CVSROOT/avail   Sat Jan 27 18:50:03 2007
@@ -119,12 +119,12 @@
 
 # The PHP-GTK Group has access to the PHP-GTK code and documentation.
 
-avail|fmk,mfischer,alan_k,amaza,descript,cweiske,sniper,pablo,sfox,jsjohnst,jp,anant,scottmattocks|php-gtk,php-gtk-doc
+avail|fmk,mfischer,alan_k,amaza,descript,cweiske,sniper,pablo,sfox,jsjohnst,jp,anant,scottmattocks,auroraeosrose|php-gtk,php-gtk-doc
 
 # The PHP-GTK Documentation Group has access to the PHP-GTK
 # documentation.
 
-avail|jmoore,sfox,pgod,henning,manu,cortesi,rambik,hirokawa,thomasgm,jstarkey,fernandoc,richy,simon,josx,didou,derick,nicos,bens,andreas,cweiske,horst,ramsey,scottmattocks,jsjohnst,mmdrake,auroraeosrose,dnfeitosa|php-gtk-doc
+avail|jmoore,sfox,pgod,henning,manu,cortesi,rambik,hirokawa,thomasgm,jstarkey,fernandoc,richy,simon,josx,didou,derick,nicos,bens,andreas,cweiske,horst,ramsey,scottmattocks,jsjohnst,mmdrake,dnfeitosa|php-gtk-doc
 
 # The PHP-GTK Web Group has access to the PHP-GTK website.
 

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



[PHP-CVS] cvs: php-src / unicode-todo.txt

2007-01-18 Thread Andrei Zmievski
andrei  Thu Jan 18 16:45:43 2007 UTC

  Modified files:  
/php-srcunicode-todo.txt 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-todo.txt?r1=1.23r2=1.24diff_format=u
Index: php-src/unicode-todo.txt
diff -u php-src/unicode-todo.txt:1.23 php-src/unicode-todo.txt:1.24
--- php-src/unicode-todo.txt:1.23   Tue Oct  3 19:35:37 2006
+++ php-src/unicode-todo.txtThu Jan 18 16:45:43 2007
@@ -35,7 +35,8 @@
   performance difference when doing quickCheck + normalize versus simple
   normalize.
 
-* UG(unicode) is turned off during MINIT() currently. We need to figure out
-  a way to avoid turning it off.
+* USTR_MAKE() should be estrndup(EMPTY_STR)
 
-* USTR_MAKE() should be EMPTY_STR
+* See if ext/pcre can ba adjusted to allow operations on pure binary
+  strings. Ideal mode would be: convert all IS_UNICODE to UTF-8, assume that
+  binary strings with /u modifier are UTF-8, otherwise it's pure binary.

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



Re: [PHP-CVS] cvs: php-src /main spprintf.c spprintf.h

2007-01-18 Thread Andrei Zmievski

*pbuf = (UChar*)xbuf.c;

-   return xbuf.len;
+   return xbuf.len  1;
 }


Could you please use xbuf.len/sizeof(UChar) instead of  ?

-Andrei

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



[PHP-CVS] cvs: CVSROOT / avail

2007-01-17 Thread Andrei Zmievski
andrei  Wed Jan 17 17:15:32 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Access for Diego Feitosa to pt_BR docs.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1234r2=1.1235diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1234 CVSROOT/avail:1.1235
--- CVSROOT/avail:1.1234Mon Jan 15 23:02:00 2007
+++ CVSROOT/avail   Wed Jan 17 17:15:32 2007
@@ -79,7 +79,7 @@
 
 # Some people get only access to specific languages for phpdoc
 avail|elf,shimooka,masugata|phpdoc-ja
-avail|machado,scar,davis|phpdoc-pt_BR
+avail|machado,scar,davis,dnfeitosa|phpdoc-pt_BR
 avail|stanprog|phpdoc-bg
 avail|radical,shoty|phpdoc-ro
 avail|penguin,tkxs|phpdoc-da

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



Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c spl_directory.h

2007-01-17 Thread Andrei Zmievski

+   if (intern-file_name.v) {
+   efree(intern-file_name.s);


Why not be consistent here and free intern-file_name.v?


-   if (!intern-file_name) {
+   if (!intern-file_name.s) {


I think it's clearer to check for intern-file_name.v, because  
otherwise it looks like you care only about .s part of the union.



+#if defined(PHP_WIN32) || defined(NETWARE)
+# define is_slash(c) (c == '/' || c == '\\')
+#else
+# define is_slash(c) (c == '/')
+#endif
+
+#define is_slash_at(type, zs, pos) (type == IS_UNICODE ? is_slash 
(zs.u[pos]) : is_slash(zs.s[pos]))


We already have these macros in tsrm_virtual_cwd.c (IS_SLASH,  
IS_U_SLASH, etc).


-Andrei


On Jan 16, 2007, at 3:52 PM, Marcus Boerger wrote:


helly   Tue Jan 16 23:52:14 2007 UTC

  Modified files:
/php-src/ext/splspl_directory.c spl_directory.h
  Log:
  - Steps towards unicode
helly-20070116235214.txt
--
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



[PHP-CVS] cvs: php-src /main php.h

2007-01-16 Thread Andrei Zmievski
andrei  Tue Jan 16 22:18:39 2007 UTC

  Modified files:  
/php-src/main   php.h 
  Log:
  Update PHP API version.
  
  # Wonder why it hasn't been done already.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.237r2=1.238diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.237 php-src/main/php.h:1.238
--- php-src/main/php.h:1.237Mon Jan  1 09:29:35 2007
+++ php-src/main/php.h  Tue Jan 16 22:18:39 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.237 2007/01/01 09:29:35 sebastian Exp $ */
+/* $Id: php.h,v 1.238 2007/01/16 22:18:39 andrei Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -26,7 +26,7 @@
 #include dmalloc.h
 #endif
 
-#define PHP_API_VERSION 20050809
+#define PHP_API_VERSION 20070116
 #define PHP_HAVE_STREAMS
 #define YYDEBUG 0
 

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



[PHP-CVS] cvs: php-src / acinclude.m4 configure.in

2007-01-12 Thread Andrei Zmievski
andrei  Fri Jan 12 18:57:11 2007 UTC

  Modified files:  
/php-srcacinclude.m4 configure.in 
  Log:
  Create PHP_SETUP_ICU macro that can be used in self-contained
  extensions.
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.356r2=1.357diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.356 php-src/acinclude.m4:1.357
--- php-src/acinclude.m4:1.356  Wed Jan 10 23:46:08 2007
+++ php-src/acinclude.m4Fri Jan 12 18:57:11 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.356 2007/01/10 23:46:08 andrei Exp $
+dnl $Id: acinclude.m4,v 1.357 2007/01/12 18:57:11 andrei Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2086,6 +2086,69 @@
 dnl -
 
 dnl
+dnl PHP_SETUP_ICU([shared-add])
+dnl
+dnl Common setup macro for kerberos
+dnl
+AC_DEFUN([PHP_SETUP_ICU],[
+  unset PHP_ICU_DIR
+
+  AC_MSG_CHECKING([for location of ICU headers and libraries])
+
+  AC_ARG_WITH(icu-dir,
+  [  --with-icu-dir=DIR  Specify where ICU libraries and headers can be 
found], 
+  [
+   if test x$withval != xyes; then
+ PHP_ICU_DIR=$withval
+   else
+ PHP_ICU_DIR=DEFAULT
+   fi
+  ], [
+   PHP_ICU_DIR=DEFAULT
+  ])
+
+  if test $PHP_ICU_DIR = DEFAULT; then
+   ICU_CONFIG=icu-config
+   for i in /usr/local/bin /usr/bin; do
+ if test -x $i/icu-config; then
+   ICU_CONFIG=$i/icu-config
+   break;
+ fi
+   done
+  else
+   ICU_CONFIG=$PHP_ICU_DIR/bin/icu-config
+  fi
+
+  dnl Trust icu-config to know better what the install prefix is..
+  icu_install_prefix=`$ICU_CONFIG --prefix 2 /dev/null`
+  if test -z $icu_install_prefix; then
+AC_MSG_RESULT([not found])
+AC_MSG_ERROR([Please specify the correct ICU install prefix.])
+  else
+AC_MSG_RESULT([found in $icu_install_prefix])
+
+   dnl Check ICU version
+   AC_MSG_CHECKING([for ICU 3.4 or greater])
+   icu_version_full=`$ICU_CONFIG --version`
+   ac_IFS=$IFS
+   IFS=.
+   set $icu_version_full
+   IFS=$ac_IFS
+   icu_version=`expr [$]1 \* 1000 + [$]2`
+   AC_MSG_RESULT([found $icu_version_full])
+   if test $icu_version -lt 3004; then
+ AC_MSG_ERROR([ICU version 3.4 or later is required])
+   fi
+
+   ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
+   ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
+   PHP_EVAL_INCLINE($ICU_INCS)
+   PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+  fi
+])
+
+
+dnl
 dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
 dnl
 dnl Common setup macro for kerberos
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.620r2=1.621diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.620 php-src/configure.in:1.621
--- php-src/configure.in:1.620  Wed Jan 10 23:46:08 2007
+++ php-src/configure.inFri Jan 12 18:57:11 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.620 2007/01/10 23:46:08 andrei Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.621 2007/01/12 18:57:11 andrei Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -815,58 +815,8 @@
 ])
 AC_MSG_RESULT([$PHP_VERSIONING])
 
-dnl ## check for ICU library location
-AC_MSG_CHECKING([for location of ICU headers and libraries])
-AC_ARG_WITH(icu-dir,
-[  --with-icu-dir=DIR  Specify where ICU libraries and headers can be 
found], 
-[
-  if test x$withval != xyes; then
-PHP_ICU_DIR=$withval
-  else
-PHP_ICU_DIR=DEFAULT
-  fi
-], [
-  PHP_ICU_DIR=DEFAULT
-])
-
-if test $PHP_ICU_DIR = DEFAULT; then
-  ICU_CONFIG=icu-config
-  for i in /usr/local/bin /usr/bin; do
-if test -x $i/icu-config; then
-  ICU_CONFIG=$i/icu-config
-  break;
-fi
-  done
-else
-  ICU_CONFIG=$PHP_ICU_DIR/bin/icu-config
-fi
-
-dnl Trust icu-config to know better what the install prefix is..
-icu_install_prefix=`$ICU_CONFIG --prefix 2 /dev/null`
-if test -z $icu_install_prefix; then
-  AC_MSG_RESULT([not found])
-  AC_MSG_ERROR([Please specify the correct ICU install prefix.])
-else
-  AC_MSG_RESULT([found in $icu_install_prefix])
-
-  dnl Check ICU version
-  AC_MSG_CHECKING([for ICU 3.4 or greater])
-  icu_version_full=`$ICU_CONFIG --version`
-  ac_IFS=$IFS
-  IFS=.
-  set $icu_version_full
-  IFS=$ac_IFS
-  icu_version=`expr [$]1 \* 1000 + [$]2`
-  AC_MSG_RESULT([found $icu_version_full])
-  if test $icu_version -lt 3004; then
-AC_MSG_ERROR([ICU version 3.4 or later is required])
-  fi
-
-  ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
-  ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
-  PHP_EVAL_INCLINE($ICU_INCS)
-  PHP_EVAL_LIBLINE($ICU_LIBS)
-fi
+dnl ## check for ICU library location and version
+PHP_SETUP_ICU
 
 divert(5)
 

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



[PHP-CVS] cvs: php-src /scripts phpize.m4

2007-01-12 Thread Andrei Zmievski
andrei  Fri Jan 12 19:02:14 2007 UTC

  Modified files:  
/php-src/scriptsphpize.m4 
  Log:
  Use PHP_SETUP_ICU in self-contained extensions
  
  
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.m4?r1=1.20r2=1.21diff_format=u
Index: php-src/scripts/phpize.m4
diff -u php-src/scripts/phpize.m4:1.20 php-src/scripts/phpize.m4:1.21
--- php-src/scripts/phpize.m4:1.20  Mon Apr 10 12:16:08 2006
+++ php-src/scripts/phpize.m4   Fri Jan 12 19:02:14 2007
@@ -68,6 +68,8 @@
 
 PHP_PROG_RE2C
 PHP_PROG_AWK
+
+PHP_SETUP_ICU
 
 sinclude(config.m4)
 

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



[PHP-CVS] cvs: php-src / acinclude.m4

2007-01-12 Thread Andrei Zmievski
andrei  Fri Jan 12 19:13:07 2007 UTC

  Modified files:  
/php-srcacinclude.m4 
  Log:
  Fix copy/paste typo.
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.357r2=1.358diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.357 php-src/acinclude.m4:1.358
--- php-src/acinclude.m4:1.357  Fri Jan 12 18:57:11 2007
+++ php-src/acinclude.m4Fri Jan 12 19:13:07 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.357 2007/01/12 18:57:11 andrei Exp $
+dnl $Id: acinclude.m4,v 1.358 2007/01/12 19:13:07 andrei Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2088,7 +2088,7 @@
 dnl
 dnl PHP_SETUP_ICU([shared-add])
 dnl
-dnl Common setup macro for kerberos
+dnl Common setup macro for ICU
 dnl
 AC_DEFUN([PHP_SETUP_ICU],[
   unset PHP_ICU_DIR

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



[PHP-CVS] cvs: php-src /sapi/apache mod_php.c

2007-01-11 Thread Andrei Zmievski
andrei  Thu Jan 11 23:18:11 2007 UTC

  Modified files:  
/php-src/sapi/apachemod_php.c 
  Log:
  Fake out the module name, since the filename is different now.
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php.c?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/apache/mod_php.c
diff -u php-src/sapi/apache/mod_php.c:1.1 php-src/sapi/apache/mod_php.c:1.2
--- php-src/sapi/apache/mod_php.c:1.1   Wed Jan 10 23:46:09 2007
+++ php-src/sapi/apache/mod_php.c   Thu Jan 11 23:18:11 2007
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php.c,v 1.1 2007/01/10 23:46:09 andrei Exp $ */
+/* $Id: mod_php.c,v 1.2 2007/01/11 23:18:11 andrei Exp $ */
 
 #include php_apache_http.h
 #include http_conf_globals.h
@@ -963,7 +963,13 @@
  */
 module MODULE_VAR_EXPORT php6_module =
 {
-   STANDARD_MODULE_STUFF,
+   MODULE_MAGIC_NUMBER_MAJOR,
+   MODULE_MAGIC_NUMBER_MINOR,
+   -1,
+   mod_php6.c,
+   NULL,
+   NULL,
+   MODULE_MAGIC_COOKIE,
php_init_handler,   /* initializer */
php_create_dir, /* per-directory config creator 
*/
php_merge_dir,  /* dir merger */

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



[PHP-CVS] cvs: php-src / README.UNICODE-UPGRADES

2007-01-10 Thread Andrei Zmievski
andrei  Wed Jan 10 23:09:29 2007 UTC

  Modified files:  
/php-srcREADME.UNICODE-UPGRADES 
  Log:
  Update with info from README.UNICODE.
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.UNICODE-UPGRADES?r1=1.14r2=1.15diff_format=u
Index: php-src/README.UNICODE-UPGRADES
diff -u php-src/README.UNICODE-UPGRADES:1.14 
php-src/README.UNICODE-UPGRADES:1.15
--- php-src/README.UNICODE-UPGRADES:1.14Wed Dec 20 20:17:45 2006
+++ php-src/README.UNICODE-UPGRADES Wed Jan 10 23:09:28 2007
@@ -6,6 +6,151 @@
 functionality and concepts without going into technical implementation
 details.
 
+Internal Encoding
+=
+
+UTF-16 is the internal encoding used for Unicode strings. UTF-16 consumes
+two bytes for any Unicode character in the Basic Multilingual Plane, which
+is where most of the current world's languages are represented. While being
+less memory efficient for basic ASCII text it simplifies the processing and
+makes interfacing with ICU easier, since ICU uses UTF-16 for its internal
+processing as well.
+
+
+Zval Structure Changes
+==
+
+For IS_UNICODE type, we add another structure to the union:
+
+union {
+
+struct {
+UChar *val;/* Unicode string value */
+int len;   /* number of UChar's */
+} ustr;
+
+} value;
+
+This cleanly separates the two types of strings and helps preserve backwards
+compatibility.
+
+To optimize access to IS_STRING and IS_UNICODE storage at runtime, we need yet
+another structure:
+
+union {
+
+struct {/* Universal string type */
+zstr val;
+int len;
+} uni;
+
+} value;
+
+Where zstr ia union of char*, UChar*, and void*.
+
+
+Parameter Parsing API Modifications
+===
+
+There are now five new specifiers: 'u', 't', 'T', 'U', 'S', 'x' and a new ''
+modifier.
+
+  't' specifier
+  -
+  This specifier indicates that the caller requires the incoming parameter to 
be
+  string data (IS_STRING, IS_UNICODE). The caller has to provide the storage 
for
+  string value, length, and type.
+
+void *str;
+int len;
+zend_uchar type;
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, str, len, 
type) == FAILURE) {
+return;
+}
+if (type == IS_UNICODE) {
+   /* process Unicode string */
+} else {
+   /* process binary string */
+}
+
+  For IS_STRING type, the length represents the number of bytes, and for
+  IS_UNICODE the number of UChar's. When converting other types (numbers,
+  booleans, etc) to strings, the exact behavior depends on the Unicode 
semantics
+  switch: if on, they are converted to IS_UNICODE, otherwise to IS_STRING.
+
+
+  'u' specifier
+  -
+  This specifier indicates that the caller requires the incoming parameter
+  to be a Unicode encoded string. If a non-Unicode string is passed, the engine
+  creates a copy of the string and automatically convert it to Unicode type 
before
+  passing it to the internal function. No such conversion is necessary for 
Unicode
+  strings, obviously.
+
+UChar *str;
+int len;
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, u, str, len) == 
FAILURE) {
+return;
+}
+/* process Unicode string */
+
+
+  'T' specifier
+  -
+  This specifier is useful when the function takes two or more strings and
+  operates on them. Using 't' specifier for each one would be somewhat
+  problematic if the passed-in strings are of mixed types, and multiple
+  checks need to be performed in order to do anything. All parameters
+  marked by the 'T' specifier are promoted to the same type.
+  
+  If at least one of the 'T' parameters is of Unicode type, then the rest of
+  them are converted to IS_UNICODE. Otherwise all 'T' parameters are conveted 
to
+  IS_STRING type.
+
+
+void *str1, *str2;
+int len1, len2;
+zend_uchar type1, type2;
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, TT, str1, len1,
+ type1, str2, len2, type2) == FAILURE) {
+   return;
+}
+if (type1 == IS_UNICODE) {
+   /* process as Unicode, str2 is guaranteed to be Unicode as well */
+} else {
+   /* process as binary string, str2 is guaranteed to be the same */
+}
+
+
+   'x' specifier
+   -
+   This specifier acts as either 'u' or 's', depending on the value of the
+   unicode semantics switch. If UG(unicode) is on, it behaves as 'u', and as
+   's' otherwise.
+
+The existing 's' specifier has been modified as well. If a Unicode string is
+passed in, it automatically copies and converts the string to the runtime
+encoding, and issues a warning. If a binary type is passed-in, no conversion
+is necessary. The '' modifier can be used after 's' specifier to force
+a different converter instead.
+
+char *str;
+int 

[PHP-CVS] cvs: php-src / README.UNICODE

2007-01-10 Thread Andrei Zmievski
.
-   Amended Build System section.
-
-  0.1: Phase I design proposal
+Document TODO
+==
+- Final review.
+- Fix the HTTP Input Encoding section, that's obsolete now.
 
 
 References
@@ -665,5 +643,6 @@
 Authors
 ===
   Andrei Zmievski [EMAIL PROTECTED]
+  Evan Goer [EMAIL PROTECTED]
 
-vim: set et :
+vim: set et tw=80 :

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

[PHP-CVS] cvs: php-src / INSTALL Makefile.global acinclude.m4 configure.in makerpm /sapi/apache .cvsignore apMakefile.tmpl config.m4 libphp5.module.in libphp6.module.in mod_php.c mod_php.exp mod_php.

2007-01-10 Thread Andrei Zmievski
andrei  Wed Jan 10 23:46:09 2007 UTC

  Added files: 
/php-src/sapi/apachelibphp6.module.in mod_php.c mod_php.exp 
mod_php.h 

  Removed files:   
/php-src/sapi/apachelibphp5.module.in mod_php5.c mod_php5.exp 
mod_php5.h 

  Modified files:  
/php-srcINSTALL Makefile.global acinclude.m4 configure.in makerpm 
/php-src/sapi/apache.cvsignore apMakefile.tmpl config.m4 php.sym 
php_apache_http.h 
/php-src/sapi/cli   config.m4 
  Log:
  Rename php5 module to php6. Remove version number from
  sapi/apache/mod_php.* filenames (for future's sake). No other SAPI
  moduels modified (up to invididual maintainers).
  
  http://cvs.php.net/viewvc.cgi/php-src/INSTALL?r1=1.38r2=1.39diff_format=u
Index: php-src/INSTALL
diff -u php-src/INSTALL:1.38 php-src/INSTALL:1.39
--- php-src/INSTALL:1.38Mon Apr 10 15:09:14 2006
+++ php-src/INSTALL Wed Jan 10 23:46:08 2007
@@ -218,6 +218,10 @@
 
   LoadModule php5_module libexec/libphp5.so
 
+For PHP 6:
+
+  LoadModule php6_module libexec/libphp6.so
+
 15. And in the AddModule section of httpd.conf, somewhere under the
 ClearModuleList, add this:
 
@@ -467,6 +471,10 @@
 
   LoadModule php5_module libexec/libphp5.so
 
+For PHP 6:
+
+  LoadModule php6_module libexec/libphp6.so
+
 15. Tell Apache to parse certain extensions as PHP.  For example,
 let's have Apache parse the .php extension as PHP.  You could
 have any extension(s) parse as PHP by simply adding more, with
http://cvs.php.net/viewvc.cgi/php-src/Makefile.global?r1=1.69r2=1.70diff_format=u
Index: php-src/Makefile.global
diff -u php-src/Makefile.global:1.69 php-src/Makefile.global:1.70
--- php-src/Makefile.global:1.69Sat Apr  8 17:34:57 2006
+++ php-src/Makefile.global Wed Jan 10 23:46:08 2007
@@ -13,22 +13,22 @@

 build-modules: $(PHP_MODULES)
 
-libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+libphp6.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath 
$(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) 
$(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-   [EMAIL PROTECTED](LIBTOOL) --silent --mode=install cp libphp5.la 
$(phptempdir)/libphp5.la /dev/null 21
+   [EMAIL PROTECTED](LIBTOOL) --silent --mode=install cp libphp6.la 
$(phptempdir)/libphp6.la /dev/null 21
 
-libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
-   $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) 
$(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) 
$(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@  cp $@ 
libs/libphp5.so
+libs/libphp6.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+   $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) 
$(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) 
$(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@  cp $@ 
libs/libphp6.so
 
 install: $(all_targets) $(install_targets)
 
 install-sapi: $(OVERALL_TARGET)
@echo Installing PHP SAPI module:   $(PHP_SAPI)
[EMAIL PROTECTED](mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-   [EMAIL PROTECTED] test ! -r 
$(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
+   [EMAIL PROTECTED] test ! -r 
$(phptempdir)/libphp6.$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
-   if test -r 
$(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
-   $(LN_S) 
$(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i 
$(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
+   if test -r 
$(phptempdir)/libphp6.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
+   $(LN_S) 
$(phptempdir)/libphp6.$(SHLIB_DL_SUFFIX_NAME).$$i 
$(phptempdir)/libphp6.$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
@@ -108,10 +108,10 @@
find . -name \*.la -o -name \*.a | xargs rm -f 
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
-   rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
+   rm -f libphp6.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
 
 distclean: clean
-   rm -f config.cache config.log config.status Makefile.objects 
Makefile.fragments libtool main/php_config.h stamp-h php5.spec 
sapi/apache/libphp5.module buildmk.stamp
+   rm -f config.cache config.log config.status Makefile.objects 
Makefile.fragments libtool main/php_config.h stamp-h php5.spec 
sapi/apache/libphp6.module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 
's/.*//'|xargs rm -f
find . -name Makefile | xargs rm -f
 

[PHP-CVS] cvs: php-src /ext/imap config.m4

2007-01-08 Thread Andrei Zmievski
andrei  Mon Jan  8 18:23:23 2007 UTC

  Modified files:  
/php-src/ext/imap   config.m4 
  Log:
  Fix IMAP check.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/imap/config.m4
diff -u php-src/ext/imap/config.m4:1.70 php-src/ext/imap/config.m4:1.71
--- php-src/ext/imap/config.m4:1.70 Sun Sep 24 18:06:53 2006
+++ php-src/ext/imap/config.m4  Mon Jan  8 18:23:23 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.70 2006/09/24 18:06:53 iliaa Exp $
+dnl $Id: config.m4,v 1.71 2007/01/08 18:23:23 andrei Exp $
 dnl
 
 AC_DEFUN([IMAP_INC_CHK],[if test -r $i$1/c-client.h; then
@@ -65,6 +65,9 @@
 
 AC_DEFUN([PHP_IMAP_SSL_CHK], [
   if test $PHP_IMAP_SSL != no; then
+if test $PHP_OPENSSL == ; then
+  PHP_OPENSSL='no'
+fi
 PHP_SETUP_OPENSSL(IMAP_SHARED_LIBADD,
 [
   AC_DEFINE(HAVE_IMAP_SSL,1,[ ])

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap config.m4

2007-01-08 Thread Andrei Zmievski
andrei  Mon Jan  8 22:24:11 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   config.m4 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.69.4.1r2=1.69.4.2diff_format=u
Index: php-src/ext/imap/config.m4
diff -u php-src/ext/imap/config.m4:1.69.4.1 php-src/ext/imap/config.m4:1.69.4.2
--- php-src/ext/imap/config.m4:1.69.4.1 Sun Sep 24 18:06:37 2006
+++ php-src/ext/imap/config.m4  Mon Jan  8 22:24:11 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.69.4.1 2006/09/24 18:06:37 iliaa Exp $
+dnl $Id: config.m4,v 1.69.4.2 2007/01/08 22:24:11 andrei Exp $
 dnl
 
 AC_DEFUN([IMAP_INC_CHK],[if test -r $i$1/c-client.h; then
@@ -65,6 +65,9 @@
 
 AC_DEFUN([PHP_IMAP_SSL_CHK], [
   if test $PHP_IMAP_SSL != no; then
+if test $PHP_OPENSSL == ; then
+  PHP_OPENSSL='no'
+fi
 PHP_SETUP_OPENSSL(IMAP_SHARED_LIBADD,
 [
   AC_DEFINE(HAVE_IMAP_SSL,1,[ ])

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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2007-01-05 Thread Andrei Zmievski
andrei  Fri Jan  5 18:50:46 2007 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Clean up set_include_path().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.844r2=1.845diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.844 
php-src/ext/standard/basic_functions.c:1.845
--- php-src/ext/standard/basic_functions.c:1.844Mon Jan  1 09:29:30 2007
+++ php-src/ext/standard/basic_functions.c  Fri Jan  5 18:50:46 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.844 2007/01/01 09:29:30 sebastian Exp $ */
+/* $Id: basic_functions.c,v 1.845 2007/01/05 18:50:46 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -5783,15 +5783,16 @@
new_value_len = temp_len;
free_new_value = 1;
} else if (UG(unicode)) {
-   const char *conv_name;
UErrorCode status = U_ZERO_ERROR;
 
-   conv_name = 
ucnv_getName(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)), status);
-   conv_name = ucnv_getStandardName(conv_name, MIME, status);
-   if (strcmp(conv_name, UTF-8) != 0) {
-   status = U_ZERO_ERROR;
+   if 
(ucnv_getType(ZEND_U_CONVERTER(UG(filesystem_encoding_conv))) != UCNV_UTF8) {
zend_convert_encodings(UG(utf8_conv), 
ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
   temp, 
temp_len, new_value.s, new_value_len, status);
+   if (U_FAILURE(status)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Could not convert path parameter from filesystem encoding to UTF-8);
+   zval_dtor(return_value);
+   RETURN_FALSE;
+   }
new_value.s = temp;
new_value_len = temp_len;
free_new_value = 1;

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



Re: [PHP-CVS] cvs: php-src /ext/standard math.c

2006-12-27 Thread Andrei Zmievski


On Dec 27, 2006, at 11:07 AM, Antony Dovgal wrote:

-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, d|lss, 
num, dec,

- sep1, sep1_len, 
UG(ascii_conv),
- sep2, sep2_len, 
UG(ascii_conv)) == FAILURE) {
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, d|lzz, num, 
dec, sep1, sep2) == FAILURE) {

return;
}


Why not use '!' modifier to say that the arg can be NULL? The the code 
below is not necessary.



-   if (sep1) {
-   if (sep1_len = 1) {
-   dec_point = sep1[0];
-   } else if (sep1_len == 0) {
+   if (sep1  Z_TYPE_P(sep1) != IS_NULL) {
+   convert_to_string_with_converter(sep1, UG(ascii_conv));
+   if (Z_STRLEN_P(sep1)) {
+   dec_point  = Z_STRVAL_P(sep1)[0];
+   } else {
dec_point = 0;


If you don't want to use '!', at least check for return value of 
convert_to_string_with_converter() and fail, if needed.


-Andrei

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



[PHP-CVS] cvs: php-src /ext/standard file.c scanf.c scanf.h string.c

2006-12-26 Thread Andrei Zmievski
andrei  Tue Dec 26 22:34:05 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c scanf.c scanf.h string.c 
  Log:
  Unicode support in sscanf() and fscanf(). (Tony, Andrei)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.479r2=1.480diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.479 php-src/ext/standard/file.c:1.480
--- php-src/ext/standard/file.c:1.479   Thu Dec 21 00:00:11 2006
+++ php-src/ext/standard/file.c Tue Dec 26 22:34:05 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.479 2006/12/21 00:00:11 tony2001 Exp $ */
+/* $Id: file.c,v 1.480 2006/12/26 22:34:05 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1246,16 +1246,15 @@
 }
 /* }}} */
 
-/* {{{ proto mixed fscanf(resource stream, string format [, string ...])
+/* {{{ proto mixed fscanf(resource stream, string format [, string ...]) U
Implements a mostly ANSI compatible fscanf() */
-/* UTODO: Accept unicode contents */
 PHP_FUNCTION(fscanf)
 {
int  result;
zval **file_handle, **format_string;
-   size_t len;
int type;
char *buf;
+   UChar *u_buf;
void *what;
 
zval ***args;
@@ -1271,8 +1270,9 @@
WRONG_PARAM_COUNT;
}
 
-   file_handle= args[0];
-   format_string  = args[1];
+   file_handle   = args[0];
+   format_string = args[1];
+
 
what = zend_fetch_resource(file_handle TSRMLS_CC, -1, File-Handle, 
type, 2,
php_file_le_stream(), php_file_le_pstream());
@@ -1287,19 +1287,31 @@
RETURN_FALSE;
}
 
+   if (((php_stream *)what)-readbuf_type == IS_UNICODE) {
+   u_buf = php_stream_u_get_line((php_stream *) what, NULL_ZSTR, 
0, 0, NULL TSRMLS_CC);
+   if (u_buf == NULL) {
+   efree(args);
+   RETURN_FALSE;
+   }
 
-   buf = php_stream_get_line((php_stream *) what, NULL_ZSTR, 0, len);
-   if (buf == NULL) {
-   efree(args);
-   RETURN_FALSE;
-   }
+   convert_to_unicode_ex(format_string);
+   result = php_u_sscanf_internal(u_buf, 
Z_USTRVAL_PP(format_string),
+   argCount, args, 2, return_value TSRMLS_CC);
+   efree(u_buf);
+   } else {
+   buf = php_stream_get_line((php_stream *) what, NULL_ZSTR, 0, 
NULL);
+   if (buf == NULL) {
+   efree(args);
+   RETURN_FALSE;
+   }
 
-   convert_to_string_ex(format_string);
-   result = php_sscanf_internal(buf, Z_STRVAL_PP(format_string),
-   argCount, args, 2, return_value TSRMLS_CC);
+   convert_to_string_ex(format_string);
+   result = php_sscanf_internal(buf, Z_STRVAL_PP(format_string),
+   argCount, args, 2, return_value TSRMLS_CC);
+   efree(buf);
+   }
 
efree(args);
-   efree(buf);
 
if (SCAN_ERROR_WRONG_PARAM_COUNT == result) {
WRONG_PARAM_COUNT;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/scanf.c?r1=1.35r2=1.36diff_format=u
Index: php-src/ext/standard/scanf.c
diff -u php-src/ext/standard/scanf.c:1.35 php-src/ext/standard/scanf.c:1.36
--- php-src/ext/standard/scanf.c:1.35   Tue Sep 19 10:38:31 2006
+++ php-src/ext/standard/scanf.cTue Dec 26 22:34:05 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: scanf.c,v 1.35 2006/09/19 10:38:31 dmitry Exp $ */
+/* $Id: scanf.c,v 1.36 2006/12/26 22:34:05 andrei Exp $ */
 
 /*
scanf.c --
@@ -119,6 +119,17 @@
} *ranges;
 } CharSet;
 
+typedef struct u_CharSet {
+   int exclude;/* 1 if this is an exclusion set. */
+   int nchars;
+   UChar *chars;
+   int nranges;
+   struct u_Range {
+   UChar start;
+   UChar end;
+   } *ranges;
+} u_CharSet;
+
 /*
  * Declarations for functions used only in this file.
  */
@@ -126,6 +137,9 @@
 static char *BuildCharSet(CharSet *cset, char *format);
 static int CharInSet(CharSet *cset, int ch);
 static voidReleaseCharSet(CharSet *cset);
+static UChar *u_BuildCharSet(u_CharSet *cset, UChar *format);
+static int u_CharInSet(u_CharSet *cset, UChar ch);
+static voidu_ReleaseCharSet(u_CharSet *cset);
 static inline void scan_set_error_return(int numVars, zval **return_value);
 
 
@@ -237,6 +251,114 @@
 }
 /* }}} */
 
+/* {{{ u_BuildCharSet
+ *--
+ *
+ * BuildCharSet --
+ *
+ * This function examines a character set format specification
+ * and builds a CharSet containing the individual characters and
+ * character ranges specified.
+ *
+ * Results:
+ *  

[PHP-CVS] cvs: php-src /ext/standard math.c

2006-12-22 Thread Andrei Zmievski
andrei  Fri Dec 22 21:18:30 2006 UTC

  Modified files:  
/php-src/ext/standard   math.c 
  Log:
  Unicode support in number_format().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.139r2=1.140diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.139 php-src/ext/standard/math.c:1.140
--- php-src/ext/standard/math.c:1.139   Fri Dec 22 04:03:35 2006
+++ php-src/ext/standard/math.c Fri Dec 22 21:18:30 2006
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: math.c,v 1.139 2006/12/22 04:03:35 iliaa Exp $ */
+/* $Id: math.c,v 1.140 2006/12/22 21:18:30 andrei Exp $ */
 
 #include php.h
 #include php_math.h
@@ -1014,71 +1014,40 @@
 }
 /* }}} */
 
-/* {{{ proto string number_format(float number [, int num_decimal_places [, 
string dec_seperator, string thousands_seperator]])
+/* {{{ proto string number_format(float number [, int num_decimal_places [, 
string dec_seperator, string thousands_seperator]]) U
Formats a number with grouped thousands */
 PHP_FUNCTION(number_format)
 {
-   zval **num, **dec, **t_s, **d_p;
+   char *sep1 = NULL, *sep2 = NULL;
+   int sep1_len, sep2_len;
+   double num;
+   int dec = 0;
char thousand_sep=',', dec_point='.';
char *tmp;

-   switch(ZEND_NUM_ARGS()) {
-   case 1:
-   if (zend_get_parameters_ex(1, num)==FAILURE) {
-   RETURN_FALSE;
-   }
-   convert_to_double_ex(num);
-   tmp = _php_math_number_format(Z_DVAL_PP(num), 0, dec_point, 
thousand_sep);
-   RETVAL_RT_STRING(tmp, 0);
-   if (UG(unicode)) {
-   efree(tmp);
-   }
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, d|lss, num, 
dec,
+ sep1, sep1_len, 
UG(ascii_conv),
+ sep2, sep2_len, 
UG(ascii_conv)) == FAILURE) {
return;
-   case 2:
-   if (zend_get_parameters_ex(2, num, dec)==FAILURE) {
-   RETURN_FALSE;
-   }
-   convert_to_double_ex(num);
-   convert_to_long_ex(dec);
-   tmp = _php_math_number_format(Z_DVAL_PP(num), Z_LVAL_PP(dec), 
dec_point, thousand_sep);
-   RETVAL_RT_STRING(tmp, 0);
-   if (UG(unicode)) {
-   efree(tmp);
-   }
-   return;
-   case 4:
-   if (zend_get_parameters_ex(4, num, dec, d_p, t_s)==FAILURE) 
{
-   RETURN_FALSE;
-   }
-   convert_to_double_ex(num);
-   convert_to_long_ex(dec);
+   }
 
-   if (Z_TYPE_PP(d_p) != IS_NULL) { 
-   convert_to_string_ex(d_p);
-   if (Z_STRLEN_PP(d_p)=1) {
-   dec_point=Z_STRVAL_PP(d_p)[0];
-   } else if (Z_STRLEN_PP(d_p)==0) {
-   dec_point=0;
-   }
-   }
-   if (Z_TYPE_PP(t_s) != IS_NULL) {
-   convert_to_string_ex(t_s);
-   if (Z_STRLEN_PP(t_s)=1) {
-   thousand_sep=Z_STRVAL_PP(t_s)[0];
-   } else if(Z_STRLEN_PP(t_s)==0) {
-   thousand_sep=0; 
-   }
+   if (sep1) {
+   if (sep1_len = 1) {
+   dec_point = sep1[0];
+   } else if (sep1_len == 0) {
+   dec_point = 0;
}
-   tmp = _php_math_number_format(Z_DVAL_PP(num), Z_LVAL_PP(dec), 
dec_point, thousand_sep);
-   RETVAL_RT_STRING(tmp, 0);
-   if (UG(unicode)) {
-   efree(tmp);
+   }
+   if (sep2) {
+   if (sep2_len = 1) {
+   thousand_sep = sep2[0];
+   } else if (sep2_len == 0) {
+   thousand_sep = 0;
}
-   return;
-   default:
-   WRONG_PARAM_COUNT;
-   break;
}
+
+   tmp = _php_math_number_format(num, dec, dec_point, thousand_sep);
+   RETVAL_ASCII_STRING(tmp, ZSTR_AUTOFREE);
 }
 /* }}} */
 

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



Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c

2006-12-21 Thread Andrei Zmievski

So do an if() statement then..

-Andrei

On Dec 21, 2006, at 12:21 AM, Marcus Boerger wrote:


Hello Andrei,

  cast tells mewhat type is requested. That must not necessarily be  
what

UG(unicode) tells me. So i have toreturn whatever that type says.

best regards
marcus

Thursday, December 21, 2006, 7:43:18 AM, you wrote:


If UG(unicode) is on, ZVAL_ASCII_STRING() will convert binary string
arg to Unicode and return it as IS_UNICODE, otherwise it will return
string as-is (IS_STRING). In the former case, the string is assumed
to contain only ASCII chars.



What are you after exactly?



-Andrei




On Dec 20, 2006, at 3:30 PM, Marcus Boerger wrote:



helly Wed Dec 20 23:30:23 2006 UTC

  Modified files:
/php-src/ext/spl  spl_directory.c
  Log:
  - Quick hackto make tests pass
  # There is something missing, ZVAL_TYPED_ASCII_STRING(z, type,
char*,flags)
  # Or am i overseeinghow that works?


http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?
r1=1.105r2=1.106diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.105 php-src/ext/spl/
spl_directory.c:1.106
--- php-src/ext/spl/spl_directory.c:1.105 Sun Nov 12 17:56:14  
2006

+++ php-src/ext/spl/spl_directory.c   Wed Dec 20 23:30:23 2006
@@ -16,7 +16,7 @@

+ 
-

-+
  */

-/* $Id: spl_directory.c,v 1.105 2006/11/12 17:56:14 helly Exp $ */
+/* $Id: spl_directory.c,v 1.106 2006/12/20 23:30:23 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -1225,16 +1225,28 @@
 {
  spl_filesystem_object *intern = (spl_filesystem_object*)
zend_object_store_get_object(readobj TSRMLS_CC);

- if (type == IS_STRING) {
- switch (intern-type) {
- case SPL_FS_INFO:
- case SPL_FS_FILE:
+ switch (intern-type) {
+ case SPL_FS_INFO:
+ case SPL_FS_FILE:
+ if (type == IS_STRING) {
  ZVAL_STRINGL(writeobj, intern-file_name,  
intern-

file_name_len, 1);

  return SUCCESS;
- case SPL_FS_DIR:
+ }
+ if (type == IS_UNICODE  UG(unicode)) {
+ ZVAL_ASCII_STRINGL(writeobj,  
intern-file_name, intern-

file_name_len, 1);

+ return SUCCESS;
+ }
+ break;
+ case SPL_FS_DIR:
+ if (type == IS_STRING) {
  ZVAL_STRING(writeobj,  
intern-u.dir.entry.d_name, 1);

  return SUCCESS;
  }
+ if (type == IS_UNICODE  UG(unicode)) {
+ ZVAL_ASCII_STRING(writeobj,  
intern-u.dir.entry.d_name, 1);

+ return SUCCESS;
+ }
+ break;
  }
  ZVAL_NULL(writeobj);
  return FAILURE;

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





Best regards,
 Marcus



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



[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard array.c php_string.h string.c strnatcmp.c

2006-12-21 Thread Andrei Zmievski
/ext/standard/php_string.h?r1=1.105r2=1.106diff_format=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.105 
php-src/ext/standard/php_string.h:1.106
--- php-src/ext/standard/php_string.h:1.105 Mon Dec 18 15:04:36 2006
+++ php-src/ext/standard/php_string.h   Thu Dec 21 21:47:56 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_string.h,v 1.105 2006/12/18 15:04:36 iliaa Exp $ */
+/* $Id: php_string.h,v 1.106 2006/12/21 21:47:56 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
@@ -111,7 +111,12 @@
strnatcmp_ex(a, strlen(a), b, strlen(b), 0)
 #define strnatcasecmp(a, b) \
strnatcmp_ex(a, strlen(a), b, strlen(b), 1)
+#define u_strnatcmp(a, b) \
+   u_strnatcmp_ex(a, u_strlen(a), b, strlen(b), 0)
+#define u_strnatcasecmp(a, b) \
+   u_strnatcmp_ex(a, u_strlen(a), b, strlen(b), 1)
 PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t 
b_len, int fold_case);
+PHPAPI int u_strnatcmp_ex(UChar const *a, size_t a_len, UChar const *b, size_t 
b_len, int fold_case);
 
 #ifdef HAVE_LOCALECONV
 PHPAPI struct lconv *localeconv_r(struct lconv *out);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.626r2=1.627diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.626 php-src/ext/standard/string.c:1.627
--- php-src/ext/standard/string.c:1.626 Wed Dec 20 23:36:43 2006
+++ php-src/ext/standard/string.c   Thu Dec 21 21:47:56 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.626 2006/12/20 23:36:43 tony2001 Exp $ */
+/* $Id: string.c,v 1.627 2006/12/21 21:47:56 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6970,22 +6970,24 @@
  */
 static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
 {
-   zval **s1, **s2;
+   zstr s1, s2;
+   int s1_len, s2_len;
+   zend_uchar type;
 
-   if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, s1, s2) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, TT, s1, s1_len,
+ type, s2, s2_len, 
type) == FAILURE) {
+   return;
}
 
-   convert_to_string_ex(s1);
-   convert_to_string_ex(s2);
-
-   RETURN_LONG(strnatcmp_ex(Z_STRVAL_PP(s1), Z_STRLEN_PP(s1),
-Z_STRVAL_PP(s2), 
Z_STRLEN_PP(s2),
-fold_case));
+   if (type == IS_UNICODE) {
+   RETURN_LONG(u_strnatcmp_ex(s1.u, s1_len, s2.u, s2_len, 
fold_case));
+   } else {
+   RETURN_LONG(strnatcmp_ex(s1.s, s1_len, s2.s, s2_len, 
fold_case));
+   }
 }
 /* }}} */
 
-/* {{{ proto int strnatcmp(string s1, string s2)
+/* {{{ proto int strnatcmp(string s1, string s2) U
Returns the result of string comparison using 'natural' algorithm */
 PHP_FUNCTION(strnatcmp)
 {
@@ -7083,7 +7085,7 @@
 }
 /* }}} */
 
-/* {{{ proto int strnatcasecmp(string s1, string s2)
+/* {{{ proto int strnatcasecmp(string s1, string s2) U
Returns the result of case-insensitive string comparison using 'natural' 
algorithm */
 PHP_FUNCTION(strnatcasecmp)
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/strnatcmp.c?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/standard/strnatcmp.c
diff -u php-src/ext/standard/strnatcmp.c:1.10 
php-src/ext/standard/strnatcmp.c:1.11
--- php-src/ext/standard/strnatcmp.c:1.10   Thu Jul 15 01:26:03 2004
+++ php-src/ext/standard/strnatcmp.cThu Dec 21 21:47:56 2006
@@ -1,9 +1,9 @@
 /* -*- mode: c; c-file-style: kr -*-
 
-  Modified for PHP by Andrei Zmievski [EMAIL PROTECTED]
+  Modified for PHP by Andrei Zmievski [EMAIL PROTECTED]
 
   strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
-  Copyright (C) 2000 by Martin Pool [EMAIL PROTECTED]
+  Copyright (C) 2000, 2004 by Martin Pool mbp sourcefrog net
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -38,12 +38,12 @@
 
 #if 0
 static char const *version UNUSED =
-$Id: strnatcmp.c,v 1.10 2004/07/15 01:26:03 iliaa Exp $;
+$Id: strnatcmp.c,v 1.11 2006/12/21 21:47:56 andrei Exp $;
 #endif
 /* {{{ compare_right
  */
 static int
-compare_right(char const **a, char const *aend, char const **b, char const 
*bend)
+compare_right(char const *a, char const *b)
 {
int bias = 0;
 
@@ -51,20 +51,22 @@
   value wins, but we can't know that it will until we've scanned
   both numbers to know that they have the same magnitude, so we
   remember it in BIAS. */
-   for(;; (*a)++, (*b)++) {
-   if ((*a == aend || !isdigit((int)(unsigned char)**a)) 
-   (*b

[PHP-CVS] cvs: php-src /ext/standard browscap.c

2006-12-20 Thread Andrei Zmievski
andrei  Wed Dec 20 20:45:40 2006 UTC

  Modified files:  
/php-src/ext/standard   browscap.c 
  Log:
  Unicode support in get_browser(). To avoid additional copying/conversion
  during parsing, the browscap values in the returned array will be of
  IS_STRING type.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.88r2=1.89diff_format=u
Index: php-src/ext/standard/browscap.c
diff -u php-src/ext/standard/browscap.c:1.88 
php-src/ext/standard/browscap.c:1.89
--- php-src/ext/standard/browscap.c:1.88Sun Oct  8 13:34:23 2006
+++ php-src/ext/standard/browscap.c Wed Dec 20 20:45:40 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: browscap.c,v 1.88 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: browscap.c,v 1.89 2006/12/20 20:45:40 andrei Exp $ */
 
 #include php.h
 #include php_regex.h
@@ -277,16 +277,18 @@
 }
 /* }}} */
 
-/* {{{ proto mixed get_browser([string browser_name [, bool return_array]])
+/* {{{ proto mixed get_browser([string browser_name [, bool return_array]]) U
Get information about the capabilities of a browser. If browser_name is 
omitted
or null, HTTP_USER_AGENT is used. Returns an object by default; if 
return_array
is true, returns an array. */
 PHP_FUNCTION(get_browser)
 {
-   zval **agent_name = NULL, **agent, **retarr;
+   char *agent_name = NULL;
+   int agent_name_len;
+   zend_bool return_array = 0;
+   zval **agent;
zval *found_browser_entry, *tmp_copy;
char *lookup_browser_name;
-   zend_bool return_array = 0;
char *browscap = INI_STR(browscap);
 
if (!browscap || !browscap[0]) {
@@ -294,11 +296,12 @@
RETURN_FALSE;
}
 
-   if (ZEND_NUM_ARGS()  2 || zend_get_parameters_ex(ZEND_NUM_ARGS(), 
agent_name, retarr) == FAILURE) {
-   ZEND_WRONG_PARAM_COUNT();
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!b, 
agent_name,
+ agent_name_len, 
UG(ascii_conv), return_array) == FAILURE) {
+   return;
}
 
-   if (agent_name == NULL || Z_TYPE_PP(agent_name) == IS_NULL) {
+   if (agent_name == NULL) {
zend_is_auto_global(_SERVER, sizeof(_SERVER)-1 TSRMLS_CC);
if (!PG(http_globals)[TRACK_VARS_SERVER]
|| 
zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht, 
HTTP_USER_AGENT, sizeof(HTTP_USER_AGENT), (void **) agent_name)==FAILURE) {
@@ -307,16 +310,10 @@
}
}
 
-   convert_to_string_ex(agent_name);
-   lookup_browser_name = estrndup(Z_STRVAL_PP(agent_name), 
Z_STRLEN_PP(agent_name));
-   php_strtolower(lookup_browser_name, strlen(lookup_browser_name));
-
-   if (ZEND_NUM_ARGS() == 2) {
-   convert_to_boolean_ex(retarr);
-   return_array = Z_BVAL_PP(retarr);
-   }
+   lookup_browser_name = estrndup(agent_name, agent_name_len);
+   php_strtolower(lookup_browser_name, agent_name_len);
 
-   if (zend_hash_find(browser_hash, lookup_browser_name, 
strlen(lookup_browser_name)+1, (void **) agent)==FAILURE) {
+   if (zend_hash_find(browser_hash, lookup_browser_name, 
agent_name_len+1, (void **) agent)==FAILURE) {
found_browser_entry = NULL;
zend_hash_apply_with_arguments(browser_hash, 
(apply_func_args_t) browser_reg_compare, 2, lookup_browser_name, 
found_browser_entry);
 
@@ -338,7 +335,7 @@
}
 
while (zend_hash_find(Z_ARRVAL_PP(agent), parent, sizeof(parent), 
(void **) agent_name)==SUCCESS) {
-   if (zend_hash_find(browser_hash, Z_STRVAL_PP(agent_name), 
Z_STRLEN_PP(agent_name)+1, (void **)agent)==FAILURE) {
+   if (zend_hash_find(browser_hash, agent_name, agent_name_len+1, 
(void **)agent)==FAILURE) {
break;
}
 

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



[PHP-CVS] cvs: php-src / unicode-progress.txt

2006-12-20 Thread Andrei Zmievski
andrei  Wed Dec 20 21:02:11 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
  Log:
  Update.
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.69r2=1.70diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.69 php-src/unicode-progress.txt:1.70
--- php-src/unicode-progress.txt:1.69   Tue Dec 19 02:08:16 2006
+++ php-src/unicode-progress.txtWed Dec 20 21:02:11 2006
@@ -11,9 +11,6 @@
 Params API, what encoding to use for the message, handling email
 option
 
-set_include_path(), get_include_path(), restore_include_path()
-Params API, depends on INI mechanism
-
   array.c
   ---
 natsort(), natcasesort()

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



[PHP-CVS] cvs: php-src /ext/standard formatted_print.c

2006-12-19 Thread Andrei Zmievski
andrei  Tue Dec 19 18:41:40 2006 UTC

  Modified files:  
/php-src/ext/standard   formatted_print.c 
  Log:
  Unicode support in *printf() functions. (Antony, Andrei)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.91r2=1.92diff_format=u
Index: php-src/ext/standard/formatted_print.c
diff -u php-src/ext/standard/formatted_print.c:1.91 
php-src/ext/standard/formatted_print.c:1.92
--- php-src/ext/standard/formatted_print.c:1.91 Tue Dec 19 13:13:48 2006
+++ php-src/ext/standard/formatted_print.c  Tue Dec 19 18:41:40 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: formatted_print.c,v 1.91 2006/12/19 13:13:48 dmitry Exp $ */
+/* $Id: formatted_print.c,v 1.92 2006/12/19 18:41:40 andrei Exp $ */
 
 #include math.h  /* modf() */
 #include php.h
@@ -43,6 +43,9 @@
 #define MAX_FLOAT_DIGITS 38
 #define MAX_FLOAT_PRECISION 40
 
+#define PHP_OUTPUT 0
+#define PHP_RUNTIME 1
+
 #if 0
 /* trick to control varargs functions through cpp */
 # define PRINTF_DEBUG(arg) php_printf arg
@@ -53,7 +56,10 @@
 static char hexchars[] = 0123456789abcdef;
 static char HEXCHARS[] = 0123456789ABCDEF;
 
+static UChar u_hexchars[] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66};
+static UChar u_HEXCHARS[] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46};
 
+/* php_sprintf_appendchar() {{{ */
 inline static void
 php_sprintf_appendchar(char **buffer, int *pos, int *size, char add TSRMLS_DC)
 {
@@ -65,8 +71,21 @@
PRINTF_DEBUG((sprintf: appending '%c', pos=\n, add, *pos));
(*buffer)[(*pos)++] = add;
 }
+/* }}} */
 
+/* php_u_sprintf_appendchar() {{{ */
+inline static void
+php_u_sprintf_appendchar(UChar **buffer, int *pos, int *size, UChar add 
TSRMLS_DC)
+{
+   if ((*pos + 1) = *size) {
+   *size = 1;
+   *buffer = eurealloc(*buffer, *size);
+   }
+   (*buffer)[(*pos)++] = add;
+}
+/* }}} */
 
+/* php_sprintf_appendstring() {{{ */
 inline static void
 php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
   int min_width, int 
max_width, char padding,
@@ -115,10 +134,57 @@
}
}
 }
+/* }}} */
+
+/* php_u_sprintf_appendstring() {{{ */
+inline static void
+php_u_sprintf_appendstring(UChar **buffer, int *pos, int *size, UChar *add,
+  int min_width, int 
max_width, UChar padding,
+  int alignment, int len, int 
neg, int expprec, int always_sign)
+{
+   register int npad;
+   int req_size;
+   int copy_len;
+
+   copy_len = (expprec ? MIN(max_width, len) : len);
+   npad = min_width - copy_len;
 
+   if (npad  0) {
+   npad = 0;
+   }
+   
+   req_size = *pos + MAX(min_width, copy_len) + 1;
+
+   if (req_size  *size) {
+   while (req_size  *size) {
+   *size = 1;
+   }
+   *buffer = eurealloc(*buffer, *size);
+   }
+   if (alignment == ALIGN_RIGHT) {
+   if ((neg || always_sign)  padding == 0x30 /* '0' */) {
+   (*buffer)[(*pos)++] = (neg) ? 0x2D /* '-' */ : 0x2B /* 
'+' */;
+   add++;
+   len--;
+   copy_len--;
+   }
+   while (npad--  0) {
+   (*buffer)[(*pos)++] = padding;
+   }
+   }
+   u_memcpy((*buffer)[*pos], add, copy_len + 1);
+   *pos += copy_len;
+   if (alignment == ALIGN_LEFT) {
+   while (npad--) {
+   (*buffer)[(*pos)++] = padding;
+   }
+   }
+}
+/* }}} */
 
+/* php_sprintf_appendint() {{{ */ 
 inline static void
-php_sprintf_appendint(char **buffer, int *pos, int *size, long number,
+php_sprintf_appendint(char **buffer, int *pos, int *size, long number, 
int width, char padding, int 
alignment, 
int always_sign)
 {
@@ -158,7 +224,49 @@
 padding, alignment, 
(NUM_BUF_SIZE - 1) - i,
 neg, 0, always_sign);
 }
+/* }}} */
 
+/* php_u_sprintf_appendint() {{{ */ 
+inline static void
+php_u_sprintf_appendint(UChar **buffer, int *pos, int *size, long number, 
+   int width, UChar padding, int 
alignment, 
+   int always_sign)
+{
+   UChar numbuf[NUM_BUF_SIZE];
+   register unsigned long magn, nmagn;
+   register unsigned int i = NUM_BUF_SIZE - 1, neg = 0;
+
+   if (number  0) {
+   neg = 1;
+   

[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/standard array.c basic_functions.c string.c ZendEngine2 zend_API.h zend_execute_API.c

2006-12-19 Thread Andrei Zmievski
andrei  Tue Dec 19 21:39:00 2006 UTC

  Modified files:  
/ZendEngine2zend_API.h zend_execute_API.c 
/php-src/ext/reflection php_reflection.c 
/php-src/ext/standard   array.c basic_functions.c string.c 
  Log:
  - Marcus was too quick. Let's put type before zstr in the macros.
  - Also mark get_include_path() and restore_include_path() with U.
  
  http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.h?r1=1.274r2=1.275diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.274 ZendEngine2/zend_API.h:1.275
--- ZendEngine2/zend_API.h:1.274Tue Dec 19 21:12:16 2006
+++ ZendEngine2/zend_API.h  Tue Dec 19 21:38:59 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_API.h,v 1.274 2006/12/19 21:12:16 helly Exp $ */
+/* $Id: zend_API.h,v 1.275 2006/12/19 21:38:59 andrei Exp $ */
 
 #ifndef ZEND_API_H
 #define ZEND_API_H
@@ -389,13 +389,13 @@
 #define add_assoc_zstr_ex(arg, key, key_len, type, str, duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTR(___tmp, str, type, duplicate); \
+   ZVAL_ZSTR(___tmp, type, str, duplicate); \
add_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do 
{ \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
+   ZVAL_ZSTRL(___tmp, type, str, length, duplicate); \
add_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -532,13 +532,13 @@
 #define add_ascii_assoc_zstr_ex(arg, key, key_len, type, str, duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTR(___tmp, str, type, duplicate); \
+   ZVAL_ZSTR(___tmp, type, str, duplicate); \
add_ascii_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_ascii_assoc_zstrl_ex(arg, key, key_len, type, str, length, 
duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
+   ZVAL_ZSTRL(___tmp, type, str, length, duplicate); \
add_ascii_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_ascii_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -676,13 +676,13 @@
 #define add_rt_assoc_zstr_ex(arg, key, key_len, type, str, duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTR(___tmp, str, type, duplicate); \
+   ZVAL_ZSTR(___tmp, type, str, duplicate); \
add_rt_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_rt_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) 
do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
+   ZVAL_ZSTRL(___tmp, type, str, length, duplicate); \
add_rt_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_rt_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -820,13 +820,13 @@
 #define add_utf8_assoc_zstr_ex(arg, key, key_len, type, str, duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTR(___tmp, str, type, duplicate); \
+   ZVAL_ZSTR(___tmp, type, str, duplicate); \
add_utf8_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_utf8_assoc_zstrl_ex(arg, key, key_len, type, str, length, 
duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
+   ZVAL_ZSTRL(___tmp, type, str, length, duplicate); \
add_utf8_assoc_zval_ex(arg, key, key_len, ___tmp); \
} while (0)
 #define add_utf8_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -972,14 +972,14 @@
 #define add_utf8_property_zstr_ex(arg, key, key_len, type, str, duplicate) do 
{ \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   ZVAL_ZSTR(___tmp, str, type, duplicate); \
+   ZVAL_ZSTR(___tmp, type, str, duplicate); \
add_utf8_property_zval_ex(arg, key, key_len, ___tmp TSRMLS_CC); 
\
zval_ptr_dtor(___tmp); /* write_property will add 1 to 
refcount */ \
} while (0)
 #define add_utf8_property_zstrl_ex(arg, key, key_len, type, str, length, 
duplicate) do { \
zval *___tmp; \
MAKE_STD_ZVAL(___tmp); \
-   

[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2006-12-19 Thread Andrei Zmievski
andrei  Tue Dec 19 22:01:50 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Unicode support in set_include_path().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.840r2=1.841diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.840 
php-src/ext/standard/basic_functions.c:1.841
--- php-src/ext/standard/basic_functions.c:1.840Tue Dec 19 21:38:59 2006
+++ php-src/ext/standard/basic_functions.c  Tue Dec 19 22:01:50 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.840 2006/12/19 21:38:59 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.841 2006/12/19 22:01:50 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -5750,31 +5750,67 @@
 }
 /* }}} */
 
-/* {{{ proto string set_include_path(string new_include_path)
+/* {{{ proto string set_include_path(string new_include_path) U
Sets the include_path configuration option */
 
 PHP_FUNCTION(set_include_path)
 {
-   zval **new_value;
+   zstr new_value;
+   int new_value_len;
+   zend_uchar type;
char *old_value;
+   zend_bool free_new_value = 0;
+   char *temp;
+   int temp_len;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, new_value) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, new_value, 
new_value_len, type) == FAILURE) {
+   return;
}
-   convert_to_string_ex(new_value);
+
old_value = zend_ini_string(include_path, sizeof(include_path), 0);
/* copy to return here, because alter might free it! */
if (old_value) {
-   RETVAL_STRING(old_value, 1);
+   RETVAL_UTF8_STRING(old_value, ZSTR_DUPLICATE);
} else {
RETVAL_FALSE;
}
+
+   /*
+* We always want to convert IS_UNICODE to UTF-8 and pass to INI 
subsystem.
+* For binary strings, however, we want to convert only if UG(unicode) 
is
+* on, in which case we check whether filesystem encoding is already 
UTF-8,
+* and if it's not, we convert from that to UTF-8.
+*/
+   if (type == IS_UNICODE) {
+   zend_unicode_to_string(UG(utf8_conv), temp, temp_len, 
new_value.u, new_value_len TSRMLS_CC);
+   new_value.s = temp;
+   new_value_len = temp_len;
+   free_new_value = 1;
+   } else if (UG(unicode)) {
+   const char *conv_name;
+   UErrorCode status = U_ZERO_ERROR;
+
+   conv_name = 
ucnv_getName(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)), status);
+   conv_name = ucnv_getStandardName(conv_name, MIME, status);
+   if (strcmp(conv_name, UTF-8) != 0) {
+   status = U_ZERO_ERROR;
+   zend_convert_encodings(UG(utf8_conv), 
ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
+  temp, 
temp_len, new_value.s, new_value_len, status);
+   new_value.s = temp;
+   new_value_len = temp_len;
+   free_new_value = 1;
+   }
+   }
+
if (zend_alter_ini_entry(include_path, sizeof(include_path),
- Z_STRVAL_PP(new_value), Z_STRLEN_PP(new_value),
- PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
+new_value.s, 
new_value_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
zval_dtor(return_value);
RETURN_FALSE;
}
+
+   if (free_new_value) {
+   efree(new_value.s);
+   }
 }
 
 /* }}} */

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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2006-12-18 Thread Andrei Zmievski
andrei  Mon Dec 18 20:39:40 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Unicode support in parse_ini_file().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.834r2=1.835diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.834 
php-src/ext/standard/basic_functions.c:1.835
--- php-src/ext/standard/basic_functions.c:1.834Sat Dec 16 18:27:43 2006
+++ php-src/ext/standard/basic_functions.c  Mon Dec 18 20:39:40 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.834 2006/12/16 18:27:43 bjori Exp $ */
+/* $Id: basic_functions.c,v 1.835 2006/12/18 20:39:40 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6138,8 +6138,25 @@
*element = *arg2;
zval_copy_ctor(element);
INIT_PZVAL(element);
+   if (UG(unicode)) {
+   convert_to_unicode_with_converter(element, 
UG(utf8_conv));
+   }
if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) { 
-   zend_hash_update(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, element, sizeof(zval *), NULL);
+   zstr key;
+   int key_len;
+
+   if (UG(unicode)) {
+   if 
(zend_string_to_unicode(UG(utf8_conv), key.u, key_len, Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1)) == FAILURE) {
+   return;
+   }
+   } else {
+   key.s = Z_STRVAL_P(arg1);
+   key_len = Z_STRLEN_P(arg1);
+   }
+   zend_u_hash_update(Z_ARRVAL_P(arr), 
ZEND_STR_TYPE, key, key_len+1, element, sizeof(zval *), NULL);
+   if (UG(unicode)) {
+   efree(key.u);
+   }
} else {
ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
zend_hash_index_update(Z_ARRVAL_P(arr), key, 
element, sizeof(zval *), NULL);
@@ -6156,23 +6173,39 @@
}
 
if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) {
-   if (zend_hash_find(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, (void **) find_hash) == FAILURE) {
+   zstr key;
+   int key_len;
+
+   if (UG(unicode)) {
+   if 
(zend_string_to_unicode(UG(utf8_conv), key.u, key_len, Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1)) == FAILURE) {
+   return;
+   }
+   } else {
+   key.s = Z_STRVAL_P(arg1);
+   key_len = Z_STRLEN_P(arg1);
+   }
+
+   if (zend_u_hash_find(Z_ARRVAL_P(arr), 
ZEND_STR_TYPE, key, key_len+1, (void **) find_hash) == FAILURE) {
ALLOC_ZVAL(hash);
INIT_PZVAL(hash);
array_init(hash);
 
-   zend_hash_update(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, hash, sizeof(zval *), NULL);
+   zend_u_hash_update(Z_ARRVAL_P(arr), 
ZEND_STR_TYPE, key, key_len+1, hash, sizeof(zval *), NULL);
} else {
hash = *find_hash;
}
+
+   if (UG(unicode)) {
+   efree(key.u);
+   }
} else {
ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
if (zend_hash_index_find(Z_ARRVAL_P(arr), key, 
(void **) find_hash) == FAILURE) {
ALLOC_ZVAL(hash);
INIT_PZVAL(hash);
-   array_init(hash);
+   array_init(hash);
 
-   
zend_hash_index_update(Z_ARRVAL_P(arr), key, hash, sizeof(zval *), NULL);
+

[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2006-12-18 Thread Andrei Zmievski
andrei  Mon Dec 18 20:40:51 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Fix macro.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.835r2=1.836diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.835 
php-src/ext/standard/basic_functions.c:1.836
--- php-src/ext/standard/basic_functions.c:1.835Mon Dec 18 20:39:40 2006
+++ php-src/ext/standard/basic_functions.c  Mon Dec 18 20:40:51 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.835 2006/12/18 20:39:40 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.836 2006/12/18 20:40:51 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6215,7 +6215,9 @@
*element = *arg2;
zval_copy_ctor(element);
INIT_PZVAL(element);
-   convert_to_text_with_converter(element, UG(utf8_conv));
+   if (UG(unicode)) {
+   convert_to_unicode_with_converter(element, 
UG(utf8_conv));
+   }
add_next_index_zval(hash, element);
}
break;

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



[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard basic_functions.c

2006-12-18 Thread Andrei Zmievski
andrei  Mon Dec 18 20:47:57 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
/php-src/ext/standard   basic_functions.c 
  Log:
  Unicode support in get_cfg_var().
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.67r2=1.68diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.67 php-src/unicode-progress.txt:1.68
--- php-src/unicode-progress.txt:1.67   Fri Dec 15 23:28:09 2006
+++ php-src/unicode-progress.txtMon Dec 18 20:47:57 2006
@@ -14,12 +14,6 @@
 set_include_path(), get_include_path(), restore_include_path()
 Params API, depends on INI mechanism
 
-get_cfg_var()
-IS_UNICODE support for varname
-
-parse_ini_file()
-Params API, unicode filename support, depends on INI mechaniem
-
   array.c
   ---
 natsort(), natcasesort()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.836r2=1.837diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.836 
php-src/ext/standard/basic_functions.c:1.837
--- php-src/ext/standard/basic_functions.c:1.836Mon Dec 18 20:40:51 2006
+++ php-src/ext/standard/basic_functions.c  Mon Dec 18 20:47:57 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.836 2006/12/18 20:40:51 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.837 2006/12/18 20:47:57 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4807,7 +4807,7 @@
 }
 /* }}} */
 
-/* {{{ proto string get_cfg_var(string option_name)
+/* {{{ proto string get_cfg_var(string option_name) U
Get the value of a PHP configuration option */
 PHP_FUNCTION(get_cfg_var)
 {
@@ -4815,14 +4815,14 @@
int varname_len;
char *value;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, varname, 
varname_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, varname, 
varname_len, UG(utf8_conv)) == FAILURE) {
return;
}
 
if (cfg_get_string(varname, value) == FAILURE) {
RETURN_FALSE;
}
-   RETURN_STRING(value, 1);
+   RETURN_UTF8_STRING(value, ZSTR_DUPLICATE);
 }
 /* }}} */
 

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



Re: [PHP-CVS] cvs: php-src /ext/spl spl_observer.c /ext/spl/tests observer_003.phpt

2006-12-16 Thread Andrei Zmievski
The only thing added to serializer was the 'S' format. The 'u' format  
has been there for a while.


-Andrei


On Dec 16, 2006, at 5:55 AM, Marcus Boerger wrote:


helly   Sat Dec 16 13:55:14 2006 UTC

  Added files:
/php-src/ext/spl/tests  observer_003.phpt

  Modified files:
/php-src/ext/splspl_observer.c
  Log:
  - Implement feature request #39836i (SplObjectStorage empty after
unserialize)
  # Unicode mode currently does not work...looks like funny changes  
in the

  # unserializer.


http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c? 
r1=1.10r2=1.11diff_format=u

Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.10 php-src/ext/spl/ 
spl_observer.c:1.11

--- php-src/ext/spl/spl_observer.c:1.10 Wed Aug 23 09:31:41 2006
+++ php-src/ext/spl/spl_observer.c  Sat Dec 16 13:55:14 2006
@@ -16,7 +16,7 @@
 
+- 
-+

  */

-/* $Id: spl_observer.c,v 1.10 2006/08/23 09:31:41 bjori Exp $ */
+/* $Id: spl_observer.c,v 1.11 2006/12/16 13:55:14 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -25,6 +25,8 @@
 #include php.h
 #include php_ini.h
 #include ext/standard/info.h
+#include ext/standard/php_var.h
+#include ext/standard/php_smart_str.h
 #include zend_interfaces.h
 #include zend_exceptions.h

@@ -34,6 +36,7 @@
 #include spl_observer.h
 #include spl_iterators.h
 #include spl_array.h
+#include spl_exceptions.h

 SPL_METHOD(SplObserver, update);
 SPL_METHOD(SplSubject, attach);
@@ -121,18 +124,8 @@
 }
 /* }}} */

-/* {{{ proto void SplObjectStorage::attach($obj)
- Attaches an object to the storage if not yet contained */
-SPL_METHOD(SplObjectStorage, attach)
+void spl_object_storage_attach(spl_SplObjectStorage *intern, zval  
*obj TSRMLS_DC) /* {{{ */

 {
-   zval *obj;
-
-	spl_SplObjectStorage *intern = (spl_SplObjectStorage*) 
zend_object_store_get_object(getThis() TSRMLS_CC);

-
-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, obj)  
== FAILURE) {

-   return;
-   }
-
 #if HAVE_PACKED_OBJECT_VALUE
 	zend_hash_update(intern-storage, (char*)Z_OBJVAL_P(obj), sizeof 
(zend_object_value), obj, sizeof(zval*), NULL);	

 #else
@@ -148,6 +141,20 @@
obj-refcount++;
 } /* }}} */

+/* {{{ proto void SplObjectStorage::attach($obj)
+ Attaches an object to the storage if not yet contained */
+SPL_METHOD(SplObjectStorage, attach)
+{
+   zval *obj;
+
+	spl_SplObjectStorage *intern = (spl_SplObjectStorage*) 
zend_object_store_get_object(getThis() TSRMLS_CC);

+
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, obj)  
== FAILURE) {

+   return;
+   }
+   spl_object_storage_attach(intern, obj TSRMLS_CC);
+} /* }}} */
+
 /* {{{ proto void SplObjectStorage::detach($obj)
  Detaches an object from the storage */
 SPL_METHOD(SplObjectStorage, detach)
@@ -259,11 +266,117 @@
intern-index++;
 } /* }}} */

+/* {{{ proto string SplObjectStorage::serialize()
+ */
+SPL_METHOD(SplObjectStorage, serialize)
+{
+	spl_SplObjectStorage *intern = (spl_SplObjectStorage*) 
zend_object_store_get_object(getThis() TSRMLS_CC);

+
+   zval **entry;
+   HashPosition  pos;
+   php_serialize_data_t var_hash;
+   smart_str buf = {0};
+   long index = 0;
+
+   PHP_VAR_SERIALIZE_INIT(var_hash);
+
+   smart_str_appendl(buf, a:, 2);
+	smart_str_append_long(buf, zend_hash_num_elements(intern- 
storage));

+   smart_str_appendl(buf, :{, 2);
+
+   zend_hash_internal_pointer_reset_ex(intern-storage, pos);
+
+	while(zend_hash_has_more_elements_ex(intern-storage, pos) ==  
SUCCESS) {

+   smart_str_appendl(buf, i:, 2);
+   smart_str_append_long(buf, index++);
+   smart_str_appendc(buf, ';');
+		if (zend_hash_get_current_data_ex(intern-storage, (void**) 
entry, pos) == FAILURE) {

+   smart_str_free(buf);
+   PHP_VAR_SERIALIZE_DESTROY(var_hash);
+   RETURN_FALSE;
+   }
+   php_var_serialize(buf, entry, var_hash TSRMLS_CC);
+   zend_hash_move_forward_ex(intern-storage, pos);
+   }
+
+   smart_str_appendc(buf, '}');
+   smart_str_0(buf);
+   PHP_VAR_SERIALIZE_DESTROY(var_hash);
+
+   if (buf.c) {
+   RETURN_STRINGL(buf.c, buf.len, 0);
+   } else {
+   RETURN_NULL();
+   }
+   
+} /* }}} */
+
+/* {{{ proto void SplObjectStorage::unserialize(string unserialized)
+ */
+SPL_METHOD(SplObjectStorage, unserialize)
+{
+	spl_SplObjectStorage *intern = (spl_SplObjectStorage*) 
zend_object_store_get_object(getThis() TSRMLS_CC);

+
+   char *buf;
+   int buf_len;
+   const unsigned char *p;
+   php_unserialize_data_t var_hash;
+   zval *zentries, **entry;
+   HashPosition pos;
+   
+   ALLOC_INIT_ZVAL(zentries);
+   
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, buf,  
buf_len) == 

[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard basic_functions.c

2006-12-15 Thread Andrei Zmievski
andrei  Fri Dec 15 23:28:10 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
/php-src/ext/standard   basic_functions.c 
  Log:
  Unicode support in ini_*() functions.
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.66r2=1.67diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.66 php-src/unicode-progress.txt:1.67
--- php-src/unicode-progress.txt:1.66   Tue Dec 12 19:25:47 2006
+++ php-src/unicode-progress.txtFri Dec 15 23:28:09 2006
@@ -14,9 +14,6 @@
 set_include_path(), get_include_path(), restore_include_path()
 Params API, depends on INI mechanism
 
-ini_get(), ini_get_all(), ini_set(), ini_restore()
-Params API, Unicode support per discussion
-
 get_cfg_var()
 IS_UNICODE support for varname
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.832r2=1.833diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.832 
php-src/ext/standard/basic_functions.c:1.833
--- php-src/ext/standard/basic_functions.c:1.832Tue Dec 12 18:24:16 2006
+++ php-src/ext/standard/basic_functions.c  Fri Dec 15 23:28:10 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.832 2006/12/12 18:24:16 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.833 2006/12/15 23:28:10 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -5546,26 +5546,24 @@
 }
 /* }}} */
 
-/* {{{ proto string ini_get(string varname)
+/* {{{ proto string ini_get(string varname) U
Get a configuration option */
 PHP_FUNCTION(ini_get)
 {
-   zval **varname;
-   char *str;
+   char *varname, *str;
+   int varname_len;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, varname) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, varname, 
varname_len, UG(utf8_conv)) == FAILURE) {
+   return;
}
 
-   convert_to_string_ex(varname);
-
-   str = zend_ini_string(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, 0);
+   str = zend_ini_string(varname, varname_len+1, 0);
 
if (!str) {
RETURN_FALSE;
}
 
-   RETURN_RT_STRING(str, 1);
+   RETURN_UTF8_STRING(str, ZSTR_DUPLICATE);
 }
 /* }}} */
 
@@ -5588,15 +5586,15 @@
array_init(option);
 
if (ini_entry-orig_value) {
-   add_ascii_assoc_stringl(option, global_value, 
ini_entry-orig_value, ini_entry-orig_value_length, 1);
+   add_ascii_assoc_utf8_stringl(option, global_value, 
ini_entry-orig_value, ini_entry-orig_value_length, 1);
} else if (ini_entry-value) {
-   add_ascii_assoc_stringl(option, global_value, 
ini_entry-value, ini_entry-value_length, 1);
+   add_ascii_assoc_utf8_stringl(option, global_value, 
ini_entry-value, ini_entry-value_length, 1);
} else {
add_ascii_assoc_null(option, global_value);
}
 
if (ini_entry-value) {
-   add_ascii_assoc_stringl(option, local_value, 
ini_entry-value, ini_entry-value_length, 1);
+   add_ascii_assoc_utf8_stringl(option, local_value, 
ini_entry-value, ini_entry-value_length, 1);
} else {
add_ascii_assoc_null(option, local_value);
}
@@ -5608,7 +5606,7 @@
return 0;
 }
 
-/* {{{ proto array ini_get_all([string extension])
+/* {{{ proto array ini_get_all([string extension]) U
Get all configuration options */
 PHP_FUNCTION(ini_get_all)
 {
@@ -5616,8 +5614,8 @@
int extname_len = 0, extnumber = 0;
zend_module_entry *module;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, extname, 
extname_len) == FAILURE) {
-   RETURN_FALSE;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, extname, 
extname_len, UG(ascii_conv)) == FAILURE) {
+   return;
}
 
zend_ini_sort_entries(TSRMLS_C);
@@ -5644,67 +5642,99 @@
return !strncmp(option_name, new_option_name, option_len);
 }
 
-/* {{{ proto string ini_set(string varname, string newvalue)
+/* {{{ proto string ini_set(string varname, string newvalue) U
Set a configuration option, returns false on error and the old value of the 
configuration option on success */
 PHP_FUNCTION(ini_set)
 {
-   zval **varname, **new_value;
+   char *varname;
+   zstr new_value;
+   int varname_len, new_value_len;
+   zend_uchar type;
char *old_value;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, varname, 
new_value) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, st,
+   

[PHP-CVS] cvs: php-src / README.UNICODE

2006-12-15 Thread Andrei Zmievski
andrei  Fri Dec 15 23:33:48 2006 UTC

  Modified files:  
/php-srcREADME.UNICODE 
  Log:
  Update with INI file info.
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.UNICODE?r1=1.6r2=1.7diff_format=u
Index: php-src/README.UNICODE
diff -u php-src/README.UNICODE:1.6 php-src/README.UNICODE:1.7
--- php-src/README.UNICODE:1.6  Thu Aug 24 21:56:57 2006
+++ php-src/README.UNICODE  Fri Dec 15 23:33:48 2006
@@ -211,6 +211,15 @@
unicode.script_encoding = utf-8
 
 
+INI Files
+=
+
+INI files will be presumed to contain UTF-8 encoded keys and values when the
+Unicode semantics mode is On. When the mode is off, the data is taken as-is,
+similar to PHP 5. No validation occurs during parsing. Instead invalid UTF-8
+sequences are caught during access by ini_*() functions.
+
+
 Conversion Semantics
 
 

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



[PHP-CVS] cvs: php-src /ext/standard var.c var_unserializer.c var_unserializer.re

2006-12-14 Thread Andrei Zmievski
andrei  Thu Dec 14 23:41:57 2006 UTC

  Modified files:  
/php-src/ext/standard   var.c var_unserializer.c var_unserializer.re 
  Log:
  Use 'S' for escaped binary strings and 's' for non-escaped.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.251r2=1.252diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.251 php-src/ext/standard/var.c:1.252
--- php-src/ext/standard/var.c:1.251Fri Dec  8 21:18:16 2006
+++ php-src/ext/standard/var.c  Thu Dec 14 23:41:57 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: var.c,v 1.251 2006/12/08 21:18:16 tony2001 Exp $ */
+/* $Id: var.c,v 1.252 2006/12/14 23:41:57 andrei Exp $ */
 
 
 
@@ -718,7 +718,7 @@
unsigned char c;
int i;
 
-   smart_str_appendl(buf, s:, 2);
+   smart_str_appendl(buf, S:, 2);
smart_str_append_long(buf, len);
smart_str_appendl(buf, :\, 2);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.81r2=1.82diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.81 
php-src/ext/standard/var_unserializer.c:1.82
--- php-src/ext/standard/var_unserializer.c:1.81Fri Dec  1 19:25:11 2006
+++ php-src/ext/standard/var_unserializer.c Thu Dec 14 23:41:57 2006
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.12 on Fri Dec  1 11:18:14 2006 */
+/* Generated by re2c 0.9.12 on Thu Dec 14 15:32:34 2006 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.c,v 1.81 2006/12/01 19:25:11 andrei Exp $ */
+/* $Id: var_unserializer.c,v 1.82 2006/12/14 23:41:57 andrei Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -468,110 +468,115 @@
if((YYLIMIT - YYCURSOR)  7) YYFILL(7);
yych = *YYCURSOR;
switch(yych){
-   case 'C':   case 'O':   goto yy13;
+   case 'C':   case 'O':   goto yy14;
case 'N':   goto yy5;
case 'R':   goto yy2;
-   case 'U':   goto yy10;
-   case 'a':   goto yy11;
+   case 'S':   goto yy10;
+   case 'U':   goto yy11;
+   case 'a':   goto yy12;
case 'b':   goto yy6;
case 'd':   goto yy8;
case 'i':   goto yy7;
-   case 'o':   goto yy12;
+   case 'o':   goto yy13;
case 'r':   goto yy4;
case 's':   goto yy9;
-   case '}':   goto yy14;
-   default:goto yy16;
+   case '}':   goto yy15;
+   default:goto yy17;
}
 yy2:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy95;
+   if(yych == ':') goto yy103;
goto yy3;
 yy3:
-#line 725 ext/standard/var_unserializer.re
+#line 753 ext/standard/var_unserializer.re
 { return 0; }
-#line 493 ext/standard/var_unserializer.c
+#line 494 ext/standard/var_unserializer.c
 yy4:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy89;
+   if(yych == ':') goto yy97;
goto yy3;
 yy5:   yych = *++YYCURSOR;
-   if(yych == ';') goto yy87;
+   if(yych == ';') goto yy95;
goto yy3;
 yy6:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy83;
+   if(yych == ':') goto yy91;
goto yy3;
 yy7:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy77;
+   if(yych == ':') goto yy85;
goto yy3;
 yy8:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy53;
+   if(yych == ':') goto yy61;
goto yy3;
 yy9:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy46;
+   if(yych == ':') goto yy54;
goto yy3;
 yy10:  yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy39;
+   if(yych == ':') goto yy47;
goto yy3;
 yy11:  yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy32;
+   if(yych == ':') goto yy40;
goto yy3;
 yy12:  yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy25;
+   if(yych == ':') goto yy33;
goto yy3;
 yy13:  yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy17;
+   if(yych == ':') goto yy26;
goto yy3;
-yy14:  ++YYCURSOR;
-   goto yy15;
-yy15:
-#line 719 ext/standard/var_unserializer.re
+yy14:  yyaccept = 0;
+   yych = *(YYMARKER = ++YYCURSOR);
+   if(yych == ':') goto yy18;
+   goto yy3;
+yy15:  ++YYCURSOR;
+   goto yy16;
+yy16:
+#line 747 ext/standard/var_unserializer.re
 {
/* this is the case where we have less data than planned */

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard var_unserializer.c var_unserializer.re

2006-12-14 Thread Andrei Zmievski
andrei  Fri Dec 15 00:58:08 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   var_unserializer.c var_unserializer.re 
  Log:
  Support for 'S' format in unserialize() (forward compatibility with PHP
  6)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.70.2.4r2=1.70.2.4.2.1diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.70.2.4 
php-src/ext/standard/var_unserializer.c:1.70.2.4.2.1
--- php-src/ext/standard/var_unserializer.c:1.70.2.4Sun Jan  1 12:50:16 2006
+++ php-src/ext/standard/var_unserializer.c Fri Dec 15 00:58:08 2006
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.11 on Sun Jan  1 14:39:32 2006 */
+/* Generated by re2c 0.9.12 on Thu Dec 14 15:59:31 2006 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.c,v 1.70.2.4 2006/01/01 12:50:16 sniper Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.1 2006/12/15 00:58:08 andrei Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -140,6 +140,38 @@
 
 /* }}} */
 
+static char *unserialize_str(const unsigned char **p, int len)
+{
+   int i, j;
+   char *str = emalloc(len+1);
+
+   for (i = 0; i  len; i++) {
+   if (**p != '\\') {
+   str[i] = (char)**p;
+   } else {
+   unsigned char ch = 0;
+
+   for (j = 0; j  2; j++) {
+   (*p)++;
+   if (**p = '0'  **p = '9') {
+   ch = (ch  4) + (**p -'0');
+   } else if (**p = 'a'  **p = 'f') {
+   ch = (ch  4) + (**p -'a'+10);
+   } else if (**p = 'A'  **p = 'F') {
+   ch = (ch  4) + (**p -'A'+10);
+   } else {
+   efree(str);
+   return NULL;
+   }
+   }
+   str[i] = (char)ch;
+   }
+   (*p)++;
+   }
+   str[i] = 0;
+   return str;
+}
+
 #define YYFILL(n) do { } while (0)
 #define YYCTYPE unsigned char
 #define YYCURSOR cursor
@@ -147,7 +179,7 @@
 #define YYMARKER marker
 
 
-#line 155 ext/standard/var_unserializer.re
+#line 187 ext/standard/var_unserializer.re
 
 
 
@@ -390,7 +422,7 @@
  0,   0,   0,   0,   0,   0,   0,   0, 
};
 
-#line 394 ext/standard/var_unserializer.c
+#line 426 ext/standard/var_unserializer.c
 {
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -400,105 +432,110 @@
if((YYLIMIT - YYCURSOR)  7) YYFILL(7);
yych = *YYCURSOR;
switch(yych){
-   case 'C':   case 'O':   goto yy12;
+   case 'C':   case 'O':   goto yy13;
case 'N':   goto yy5;
case 'R':   goto yy2;
-   case 'a':   goto yy10;
+   case 'S':   goto yy10;
+   case 'a':   goto yy11;
case 'b':   goto yy6;
case 'd':   goto yy8;
case 'i':   goto yy7;
-   case 'o':   goto yy11;
+   case 'o':   goto yy12;
case 'r':   goto yy4;
case 's':   goto yy9;
-   case '}':   goto yy13;
-   default:goto yy15;
+   case '}':   goto yy14;
+   default:goto yy16;
}
 yy2:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy87;
+   if(yych == ':') goto yy95;
goto yy3;
 yy3:
-#line 626 ext/standard/var_unserializer.re
+#line 687 ext/standard/var_unserializer.re
 { return 0; }
-#line 424 ext/standard/var_unserializer.c
+#line 457 ext/standard/var_unserializer.c
 yy4:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy81;
+   if(yych == ':') goto yy89;
goto yy3;
 yy5:   yych = *++YYCURSOR;
-   if(yych == ';') goto yy79;
+   if(yych == ';') goto yy87;
goto yy3;
 yy6:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy75;
+   if(yych == ':') goto yy83;
goto yy3;
 yy7:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy69;
+   if(yych == ':') goto yy77;
goto yy3;
 yy8:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy45;
+   if(yych == ':') goto yy53;
goto yy3;
 yy9:   yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy38;
+   if(yych == ':') goto yy46;
goto yy3;
 yy10:  yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if(yych == ':') goto yy31;
+   

[PHP-CVS] cvs: CVSROOT / avail

2006-12-13 Thread Andrei Zmievski
andrei  Wed Dec 13 16:42:26 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  GregB asked for karma for davidc
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1218r2=1.1219diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1218 CVSROOT/avail:1.1219
--- CVSROOT/avail:1.1218Sun Dec 10 16:11:59 2006
+++ CVSROOT/avail   Wed Dec 13 16:42:26 2006
@@ -68,7 +68,7 @@
 
avail|cox,mj,vblavet,dickmann,tal,jmcastagnetto,alexmerz,cellog,pajoye,timj,clay|php-src/pear,pear-core
 
 # PEAR website and weekly news
-avail|wez,alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal,antonio,alexmerz,jan,toby,draber,cellog,dufuz,danielc,lsmith,arnaud|pearweb
+avail|wez,alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal,antonio,alexmerz,jan,toby,draber,cellog,dufuz,danielc,lsmith,arnaud,davidc|pearweb
 
avail|arnaud,bjoern,chregu,dams,david,jmcastagnetto,rashid,tuupola,silvano|pearweb/weeklynews
 # PEAR website QA
 avail|arnaud|pearweb/public_html/qa

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



[PHP-CVS] cvs: php-src /main php_variables.c

2006-12-12 Thread Andrei Zmievski
andrei  Tue Dec 12 18:05:08 2006 UTC

  Modified files:  
/php-src/main   php_variables.c 
  Log:
  Keep CLI args as binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.134r2=1.135diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.134 php-src/main/php_variables.c:1.135
--- php-src/main/php_variables.c:1.134  Sat Dec  9 14:17:17 2006
+++ php-src/main/php_variables.cTue Dec 12 18:05:07 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_variables.c,v 1.134 2006/12/09 14:17:17 iliaa Exp $ */
+/* $Id: php_variables.c,v 1.135 2006/12/12 18:05:07 andrei Exp $ */
 
 #include stdio.h
 #include php.h
@@ -654,7 +654,8 @@
int i;
for (i = 0; i  SG(request_info).argc; i++) {
ALLOC_ZVAL(tmp);
-   ZVAL_RT_STRING(tmp, SG(request_info).argv[i], 1);
+   /* leave args as binary, since the encoding is not 
known */
+   ZVAL_STRING(tmp, SG(request_info).argv[i], 1);
INIT_PZVAL(tmp);
if (zend_hash_next_index_insert(Z_ARRVAL_P(arr), tmp, 
sizeof(zval *), NULL) == FAILURE) {
if (Z_TYPE_P(tmp) == IS_STRING) {

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



[PHP-CVS] cvs: php-src /ext/standard string.c

2006-12-12 Thread Andrei Zmievski
andrei  Tue Dec 12 18:17:57 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Make hebrev(c) support only binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.620r2=1.621diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.620 php-src/ext/standard/string.c:1.621
--- php-src/ext/standard/string.c:1.620 Wed Dec  6 23:14:15 2006
+++ php-src/ext/standard/string.c   Tue Dec 12 18:17:56 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.620 2006/12/06 23:14:15 pollita Exp $ */
+/* $Id: string.c,v 1.621 2006/12/12 18:17:56 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -5659,42 +5659,27 @@
  */
 static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
 {
-   zval **str, **max_chars_per_line;
+   char *str;
+   int str_len;
char *heb_str, *tmp, *target, *broken_str;
int block_start, block_end, block_type, block_length, i;
long max_chars=0;
int begin, end, char_count, orig_begin;
 
 
-   switch (ZEND_NUM_ARGS()) {
-   case 1:
-   if (zend_get_parameters_ex(1, str) == FAILURE) {
-   RETURN_FALSE;
-   }
-   break;
-   case 2:
-   if (zend_get_parameters_ex(2, str, 
max_chars_per_line) == FAILURE) {
-   RETURN_FALSE;
-   }
-   convert_to_long_ex(max_chars_per_line);
-   max_chars = Z_LVAL_PP(max_chars_per_line);
-   break;
-   default:
-   WRONG_PARAM_COUNT;
-   break;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, S|l, str, 
str_len, max_chars) == FAILURE) {
+   return;
}
-
-   convert_to_string_ex(str);
-
-   if (Z_STRLEN_PP(str) == 0) {
+   
+   if (str_len == 0) {
RETURN_FALSE;
}
 
-   tmp = Z_STRVAL_PP(str);
+   tmp = str;
block_start=block_end=0;
 
-   heb_str = (char *) emalloc(Z_STRLEN_PP(str)+1);
-   target = heb_str+Z_STRLEN_PP(str);
+   heb_str = (char *) emalloc(str_len+1);
+   target = heb_str+str_len;
*target = 0;
target--;
 
@@ -5708,13 +5693,13 @@
 
do {
if (block_type == _HEB_BLOCK_TYPE_HEB) {
-   while ((isheb((int)*(tmp+1)) || _isblank((int)*(tmp+1)) 
|| ispunct((int)*(tmp+1)) || (int)*(tmp+1)=='\n' )  
block_endZ_STRLEN_PP(str)-1) {
+   while ((isheb((int)*(tmp+1)) || _isblank((int)*(tmp+1)) 
|| ispunct((int)*(tmp+1)) || (int)*(tmp+1)=='\n' )  block_endstr_len-1) {
tmp++;
block_end++;
block_length++;
}
for (i = block_start; i= block_end; i++) {
-   *target = Z_STRVAL_PP(str)[i];
+   *target = str[i];
switch (*target) {
case '(':
*target = ')';
@@ -5753,7 +5738,7 @@
}
block_type = _HEB_BLOCK_TYPE_ENG;
} else {
-   while (!isheb(*(tmp+1))  (int)*(tmp+1)!='\n'  
block_end  Z_STRLEN_PP(str)-1) {
+   while (!isheb(*(tmp+1))  (int)*(tmp+1)!='\n'  
block_end  str_len-1) {
tmp++;
block_end++;
block_length++;
@@ -5763,17 +5748,17 @@
block_end--;
}
for (i = block_end; i = block_start; i--) {
-   *target = Z_STRVAL_PP(str)[i];
+   *target = str[i];
target--;
}
block_type = _HEB_BLOCK_TYPE_HEB;
}
block_start=block_end+1;
-   } while (block_end  Z_STRLEN_PP(str)-1);
+   } while (block_end  str_len-1);
 
 
-   broken_str = (char *) emalloc(Z_STRLEN_PP(str)+1);
-   begin=end=Z_STRLEN_PP(str)-1;
+   broken_str = (char *) emalloc(str_len+1);
+   begin=end=str_len-1;
target = broken_str;
 
while (1) {
@@ -5832,17 +5817,17 @@
efree(heb_str);
 
if (convert_newlines) {
-   php_char_to_str(broken_str, Z_STRLEN_PP(str),'\n', br /\n, 
7, return_value);
+   php_char_to_str(broken_str, str_len,'\n', br /\n, 7, 
return_value);
efree(broken_str);
} else {
Z_STRVAL_P(return_value) = 

[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2006-12-12 Thread Andrei Zmievski
andrei  Tue Dec 12 18:24:16 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Do not convert args to Unicode in getopt(), they should stay binary.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.831r2=1.832diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.831 
php-src/ext/standard/basic_functions.c:1.832
--- php-src/ext/standard/basic_functions.c:1.831Sun Dec 10 01:24:13 2006
+++ php-src/ext/standard/basic_functions.c  Tue Dec 12 18:24:16 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.831 2006/12/10 01:24:13 edink Exp $ */
+/* $Id: basic_functions.c,v 1.832 2006/12/12 18:24:16 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4497,7 +4497,7 @@
 /* }}} */
 #endif
 
-/* {{{ proto array getopt(string options [, array longopts])
+/* {{{ proto array getopt(string options [, array longopts]) U
Get options from the command line argument list */
 PHP_FUNCTION(getopt)
 {
@@ -4634,7 +4634,8 @@
 
MAKE_STD_ZVAL(val);
if (optarg != NULL) {
-   ZVAL_RT_STRING(val, optarg, 1);
+   /* keep the arg as binary, since the encoding is not 
known */
+   ZVAL_STRING(val, optarg, 1);
} else {
ZVAL_FALSE(val);
}

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



[PHP-CVS] cvs: php-src / unicode-progress.txt

2006-12-12 Thread Andrei Zmievski
andrei  Tue Dec 12 18:28:31 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.64r2=1.65diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.64 php-src/unicode-progress.txt:1.65
--- php-src/unicode-progress.txt:1.64   Wed Nov 22 19:15:07 2006
+++ php-src/unicode-progress.txtTue Dec 12 18:28:31 2006
@@ -23,11 +23,6 @@
 parse_ini_file()
 Params API, unicode filename support, depends on INI mechaniem
 
-getopt()
-Will use ASCII for options. $_SERVER['argv'] should not be converted
-to Unicode and should stay binary, since we can't be sure of the
-encoding on CLI. Console_Getopt may be changed to support encodings.
-
   array.c
   ---
 natsort(), natcasesort()
@@ -39,10 +34,6 @@
 
   string.c
   
-hebrev(), hebrevc()
-Figure out if this is something we can use ICU for, internally.
-Check with Zeev.
-
 parse_str()
 Params API. How do we deal with encoding of the data?
 
@@ -52,9 +43,6 @@
 strnatcmp(), strnatcasecmp()
 Params API. The rest depends on porting of strnatcmp.c
 
-strtr()
-Check on Derick's progress.
-
 wordwrap()
 Upgrade, do wordwrapping on codepoint (or glyph ?) level, maybe use
 additional whitespace chars instead of just space.
@@ -556,6 +544,7 @@
 compact()
 count()
 extract()
+getopt()
 in_array()
 min()
 max()
@@ -591,6 +580,7 @@
 count_chars()
 dirname()
 explode()
+hebrev(), hebrevc()
 implode()
 levenshtein()
 localeconv()
@@ -628,6 +618,7 @@
 strtok()
 strtolower()
 strtoupper()
+strtr()
 substr()
 substr_compare()
 substr_count()

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



Re: [PHP-CVS] cvs: php-src /ext/standard credits.c info.c /main output.c php_output.h

2006-12-11 Thread Andrei Zmievski

So, we'll keep author names in Credits in Latin-1? Why not use UTF-8?

-Andrei

On Dec 10, 2006, at 7:02 AM, Michael Wallner wrote:


mikeSun Dec 10 15:02:51 2006 UTC

  Modified files:
/php-src/main   output.c php_output.h
/php-src/ext/standard   info.c credits.c
  Log:
  - upgrade phpinfo() and phpcredits()

mike-20061210150251.txt--
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] cvs: php-src /ext/pdo config.m4 pdo.c pdo_dbh.c pdo_sql_parser.c pdo_sqlstate.c pdo_stmt.c php_pdo.h php_pdo_driver.h php_pdo_int.h php_pdo_phpvers_compat.h

2006-12-11 Thread Andrei Zmievski
Thanks, Wez! Looking forward to next installment of PDO in Unicode 
Land.


-Andrei

On Dec 9, 2006, at 2:18 PM, Wez Furlong wrote:


wez Sat Dec  9 22:18:43 2006 UTC

  Modified files:
/php-src/ext/pdoconfig.m4 pdo.c pdo_dbh.c pdo_sql_parser.c
pdo_sqlstate.c pdo_stmt.c php_pdo.h
php_pdo_driver.h php_pdo_int.h
php_pdo_phpvers_compat.h
  Log:
  merge PHP 5 pdo into HEAD.  This source compiles on both PHP 5 and 
PHP 6.
  If you're poking around in here, please make sure that any changes 
you make

  compile on both PHP 5 and 6.  Thanks!


wez-20061209221843.txt--
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



[PHP-CVS] cvs: php-src /main main.c

2006-12-08 Thread Andrei Zmievski
andrei  Fri Dec  8 19:13:31 2006 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  Don't use zend_ascii_hash_find() here -- module names are binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.711r2=1.712diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.711 php-src/main/main.c:1.712
--- php-src/main/main.c:1.711   Tue Dec  5 02:55:27 2006
+++ php-src/main/main.c Fri Dec  8 19:13:31 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.711 2006/12/05 02:55:27 stas Exp $ */
+/* $Id: main.c,v 1.712 2006/12/08 19:13:31 andrei Exp $ */
 
 /* {{{ includes
  */
@@ -1764,7 +1764,7 @@
if (sapi_module.additional_functions) {
zend_module_entry *module;
 
-   if (zend_ascii_hash_find(module_registry, standard, 
sizeof(standard), (void**)module)==SUCCESS) {
+   if (zend_hash_find(module_registry, standard, 
sizeof(standard), (void**)module)==SUCCESS) {
EG(current_module) = module;
zend_register_functions(NULL, 
sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
EG(current_module) = NULL;

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



  1   2   3   4   5   6   7   >