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

2006-03-29 Thread Dmitry Stogov
dmitry  Thu Mar 30 07:54:53 2006 UTC

  Modified files:  
/php-srcREADME.UPDATING_TO_PHP6 
  Log:
  Describe registr_long_arrays, ze1_compatibility_mode, dl(), E_ALL/E_STRICT
  
  
http://cvs.php.net/viewcvs.cgi/php-src/README.UPDATING_TO_PHP6?r1=1.2&r2=1.3&diff_format=u
Index: php-src/README.UPDATING_TO_PHP6
diff -u php-src/README.UPDATING_TO_PHP6:1.2 php-src/README.UPDATING_TO_PHP6:1.3
--- php-src/README.UPDATING_TO_PHP6:1.2 Wed Mar 22 08:21:01 2006
+++ php-src/README.UPDATING_TO_PHP6 Thu Mar 30 07:54:53 2006
@@ -9,7 +9,11 @@
1.1 Functions and function aliases
1.2 Register globals
1.3 Magic quotes
-   1.4 References
+   1.4 Register long arrays ($HTTP_*_VARS)
+   1.5 ZE1 compatibility mode
+   1.6 dl() function
+   1.7 E_ALL and E_STRICT constants
+   1.8 References
 2. Unicode (see README.UNICODE-UPGRADES)
 2. Extensions
 2.1 GD
@@ -108,7 +112,57 @@
 1.3 Magic quotes
 
 
-1.4 References
+1.4 Register long Arrays ($HTTP_*_VARS)
+---
+
+register_long_arrays and the long versions of super globals had been removed.
+PHP will emit E_CORE_ERROR during PHP startup if it would detect
+register_long_arrays setting.
+
+You can emulate long arrays by including the following file:
+
+
+
+1.5 ZE1 compatibility mode
+--
+
+ZE1 compatibility mode (PHP4 object model) was introduced to migrate from PHP4
+to PHP5 in an easier way, but it never keeped 100% compatibility.
+It is completly removed in PHP6, and there is no way to emulate it.
+Applications should assume PHP5/PHP6 object model.
+
+1.6 dl() function
+-
+
+Now dl() function is supported only in CLI, CGI and EMBED SAPI.
+There is no way to emulte it. You can just check if dl() is supported by SAPI:
+
+
+
+1.7 E_ALL and E_STRICT constants
+
+
+Now E_ALL error reporting mask includes E_STRICT.
+You can filter E_STRICT error messages using the following code:
+
+
+
+1.8 References
 --
 
 

-- 
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 /main php_streams.h /main/streams streams.c

2006-03-29 Thread Sara Golemon
pollita Thu Mar 30 00:22:51 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/main   php_streams.h 
/php-src/main/streams   streams.c 
  Log:
  Make php_stream_copy_to_mem() unicode aware and
  update userspace function file_get_contents().
  
  Note: fgc()'s second parameter (use_include_path) has been changed
  to be a bitmask "flags" parameter instead.

  For the most commonly used values (TRUE, 1) this will continue functioning
  as expected since the value of FILE_USE_INCLUDE_PATH is (coincidentally) 1.
  The impact to other values should be noted in the migration6 guide.

  This change makes it possible to allow fgc() to return binary file
  contents (default) or unicode transcoded contents (using FILE_TEXT flag).
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.432&r2=1.433&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.432 php-src/ext/standard/file.c:1.433
--- php-src/ext/standard/file.c:1.432   Wed Mar 29 22:52:24 2006
+++ php-src/ext/standard/file.c Thu Mar 30 00:22:51 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.432 2006/03/29 22:52:24 pollita Exp $ */
+/* $Id: file.c,v 1.433 2006/03/30 00:22:51 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -497,32 +497,32 @@
 
 /* }}} */
 
-/* {{{ proto string file_get_contents(string filename [, bool use_include_path 
[, resource context [, long offset [, long maxlen)
+/* {{{ proto string file_get_contents(string filename [, long flags [, 
resource context [, long offset [, long maxlen) U
Read the entire file into a string */
-/* UTODO: Accept unicode contents -- Maybe? Perhaps a binary fetch leaving the 
script to icu_ucnv_toUnicode() on its own is best? */
 PHP_FUNCTION(file_get_contents)
 {
char *filename;
int filename_len;
char *contents;
+   long flags = 0;
zend_bool use_include_path = 0;
php_stream *stream;
int len;
long offset = -1;
-   long maxlen = PHP_STREAM_COPY_ALL;
+   long maxlen = PHP_STREAM_COPY_ALL, real_maxlen;
zval *zcontext = NULL;
php_stream_context *context = NULL;
 
/* Parse arguments */
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|br!ll",
- &filename, &filename_len, &use_include_path, 
&zcontext, &offset, &maxlen) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lr!ll",
+ &filename, &filename_len, &flags, &zcontext, 
&offset, &maxlen) == FAILURE) {
return;
}
 
context = php_stream_context_from_zval(zcontext, 0);
 
-   stream = php_stream_open_wrapper_ex(filename, "rb", 
-   (use_include_path ? USE_PATH : 0) | 
REPORT_ERRORS,
+   stream = php_stream_open_wrapper_ex(filename, (flags & PHP_FILE_TEXT) ? 
"rt" : "rb", 
+   ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH 
: 0) | REPORT_ERRORS,
NULL, context);
if (!stream) {
RETURN_FALSE;
@@ -533,9 +533,20 @@
RETURN_FALSE;
}
 
+   if (maxlen <= 0 || stream->readbuf_type == IS_STRING) {
+   real_maxlen = maxlen;
+   } else {
+   /* Allows worst case scenario of each input char being turned 
into two UChars */
+   real_maxlen = (maxlen * 2);
+   }
+
/* uses mmap if possible */
-   if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
+   len = php_stream_copy_to_mem_ex(stream, stream->readbuf_type, 
&contents, real_maxlen, maxlen, 0);
+
+   if (stream->readbuf_type == IS_STRING && len > 0) {
RETVAL_STRINGL(contents, len, 0);
+   } else if (stream->readbuf_type == IS_UNICODE && len > 0) {
+   RETVAL_UNICODEL(contents, len, 0);
} else if (len == 0) {
RETVAL_EMPTY_STRING();
} else {
http://cvs.php.net/viewcvs.cgi/php-src/main/php_streams.h?r1=1.109&r2=1.110&diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.109 php-src/main/php_streams.h:1.110
--- php-src/main/php_streams.h:1.109Wed Mar 29 01:20:43 2006
+++ php-src/main/php_streams.h  Thu Mar 30 00:22:51 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.109 2006/03/29 01:20:43 pollita Exp $ */
+/* $Id: php_streams.h,v 1.110 2006/03/30 00:22:51 pollita Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -284,6 +284,7 @@
 /* Convert using runtime_encoding if necessary -- return unicode */
 PHPAPI size_t _php_stream_read_unicode(php_stream *stream, UChar *buf, int 
maxlen, int maxchars TSRMLS_DC);
 #define php_stream_read_unicode(stream, buf, ma

[PHP-CVS] cvs: php-src /ext/standard file.c /main/streams streams.c

2006-03-29 Thread Sara Golemon
pollita Wed Mar 29 22:52:24 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/main/streams   streams.c 
  Log:
  Update php_stream_passthru() to handle unicode data.
  This updates userspace functions fpassthru() and readfile()
  
  UG(output_encoding) is used by php_stream_passthru() to translate
  unicode stream contents back to an outputable character set.
  
  Note: readfile()'s second parameter (use_include_path) has been changed
  to be a bitmask "flags" parameter instead.
  
  For the most commonly used values (TRUE, 1) this will continue functioning
  as expected since the value of FILE_USE_INCLUDE_PATH is (coincidentally) 1.
  The impact to other values should be noted in the migration6 guide.
  
  This change makes it possible to allow readfile() to output binary file
  contents (default) or unicode transcoded contents (using FILE_TEXT flag).
  
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.431&r2=1.432&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.431 php-src/ext/standard/file.c:1.432
--- php-src/ext/standard/file.c:1.431   Wed Mar 29 01:20:42 2006
+++ php-src/ext/standard/file.c Wed Mar 29 22:52:24 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.431 2006/03/29 01:20:42 pollita Exp $ */
+/* $Id: file.c,v 1.432 2006/03/29 22:52:24 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -547,7 +547,7 @@
 }
 /* }}} */
 
-/* {{{ proto int file_put_contents(string file, mixed data [, int flags [, 
resource context]])
+/* {{{ proto int file_put_contents(string file, mixed data [, int flags [, 
resource context]]) U
Write/Create a file with contents data and return the number of bytes 
written */
 PHP_FUNCTION(file_put_contents)
 {
@@ -991,7 +991,7 @@
 }
 /* }}} */
 
-/* {{{ proto string fgets(resource fp[, int length])
+/* {{{ proto string fgets(resource fp[, int length]) U
Get a line from file pointer */
 PHPAPI PHP_FUNCTION(fgets)
 {
@@ -1021,7 +1021,7 @@
 }
 /* }}} */
 
-/* {{{ proto string fgetc(resource fp)
+/* {{{ proto string fgetc(resource fp) U
Get a character from file pointer */
 PHPAPI PHP_FUNCTION(fgetc)
 {
@@ -1052,7 +1052,7 @@
 }
 /* }}} */
 
-/* {{{ proto string fgetss(resource fp [, int length, string allowable_tags])
+/* {{{ proto string fgetss(resource fp [, int length, string allowable_tags]) U
Get a line from file pointer and strip HTML tags */
 PHPAPI PHP_FUNCTION(fgetss)
 {
@@ -1168,7 +1168,7 @@
 }
 /* }}} */
 
-/* {{{ proto int fwrite(resource fp, string str [, int length])
+/* {{{ proto int fwrite(resource fp, string str [, int length]) U
Binary-safe file write */
 PHPAPI PHP_FUNCTION(fwrite)
 {
@@ -1371,26 +1371,30 @@
 }
 /* }}} */
 
-/* {{{ proto int readfile(string filename [, bool use_include_path[, resource 
context]])
+/* {{{ proto int readfile(string filename [, int flags[, resource context]]) U
Output a file or a URL */
-/* UTODO: Accept unicode contents */
 PHP_FUNCTION(readfile)
 {
char *filename;
int size = 0;
int filename_len;
-   zend_bool use_include_path = 0;
+   long flags = 0;
zval *zcontext = NULL;
php_stream *stream;
php_stream_context *context = NULL;
+   char *mode = "rb";
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|br!", 
&filename, &filename_len, &use_include_path, &zcontext) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lr!", 
&filename, &filename_len, &flags, &zcontext) == FAILURE) {
RETURN_FALSE;
}
 
context = php_stream_context_from_zval(zcontext, 0);
 
-   stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? 
USE_PATH : 0) | REPORT_ERRORS, NULL, context);
+   if (flags & PHP_FILE_TEXT) {
+   mode = "rt";
+   }
+
+   stream = php_stream_open_wrapper_ex(filename, mode, ((flags & 
PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (stream) {
size = php_stream_passthru(stream);
php_stream_close(stream);
@@ -1429,9 +1433,8 @@
 
 /* }}} */
 
-/* {{{ proto int fpassthru(resource fp)
+/* {{{ proto int fpassthru(resource fp) U
Output all remaining data from a file pointer */
-/* UTODO: Accept unicode contents */
 PHPAPI PHP_FUNCTION(fpassthru)
 {
zval **arg1;
@@ -1733,7 +1736,7 @@
 }
 /* }}} */
 
-/* {{{ proto string fread(resource fp, int length)
+/* {{{ proto string fread(resource fp, int length) U
Binary-safe file read */
 PHPAPI PHP_FUNCTION(fread)
 {
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.115&r2=1.116&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.115 
php-src/main/streams/streams.c:1.116
--- php-src/main/streams/streams.c:1.115Wed Mar 29 01:20:43 2006
+

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

2006-03-29 Thread Antony Dovgal
tony2001Wed Mar 29 16:30:54 2006 UTC

  Modified files:  
/php-src/ext/mysqli mysqli.c 
  Log:
  fix typo
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.84&r2=1.85&diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.84 php-src/ext/mysqli/mysqli.c:1.85
--- php-src/ext/mysqli/mysqli.c:1.84Wed Mar 29 15:08:52 2006
+++ php-src/ext/mysqli/mysqli.c Wed Mar 29 16:30:54 2006
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli.c,v 1.84 2006/03/29 15:08:52 tony2001 Exp $ 
+  $Id: mysqli.c,v 1.85 2006/03/29 16:30:54 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -358,7 +358,7 @@
zend_hash_find(&classes, mysqli_base_class->name.s, 
mysqli_base_class->name_length + 1, 
(void **) &intern->prop_handler);
 
-   zend_object_std_init(&intern->std, class_type TSRMLS_CC);
+   zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
zend_hash_copy(intern->zo.properties, &class_type->default_properties, 
(copy_ctor_func_t) zval_add_ref,
(void *) &tmp, sizeof(zval *));
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c

2006-03-29 Thread Antony Dovgal
tony2001Wed Mar 29 16:29:53 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/mysqli mysqli.c 
  Log:
  fix typo
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.13&r2=1.72.2.14&diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.72.2.13 
php-src/ext/mysqli/mysqli.c:1.72.2.14
--- php-src/ext/mysqli/mysqli.c:1.72.2.13   Wed Mar 29 14:28:42 2006
+++ php-src/ext/mysqli/mysqli.c Wed Mar 29 16:29:53 2006
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli.c,v 1.72.2.13 2006/03/29 14:28:42 tony2001 Exp $ 
+  $Id: mysqli.c,v 1.72.2.14 2006/03/29 16:29:53 tony2001 Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -344,7 +344,7 @@
zend_hash_find(&classes, mysqli_base_class->name, 
mysqli_base_class->name_length + 1, 
(void **) &intern->prop_handler);
 
-   zend_object_std_init(&intern->std, class_type TSRMLS_CC);
+   zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
zend_hash_copy(intern->zo.properties, &class_type->default_properties, 
(copy_ctor_func_t) zval_add_ref,
(void *) &tmp, sizeof(zval *));
 

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



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

2006-03-29 Thread Seiji Masugata
masugataWed Mar 29 15:47:07 2006 UTC

  Modified files:  
/php-src/ext/mbstring   mbstring.c mbstring.h 
  Log:
  added mb_strrchr( ).
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.251&r2=1.252&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.251 
php-src/ext/mbstring/mbstring.c:1.252
--- php-src/ext/mbstring/mbstring.c:1.251   Tue Mar 28 16:05:16 2006
+++ php-src/ext/mbstring/mbstring.c Wed Mar 29 15:47:07 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.251 2006/03/28 16:05:16 masugata Exp $ */
+/* $Id: mbstring.c,v 1.252 2006/03/29 15:47:07 masugata Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -174,6 +174,7 @@
{MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strpos"},
{MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"},
{MB_OVERLOAD_STRING, "strstr", "mb_strstr", "mb_orig_strstr"},
+   {MB_OVERLOAD_STRING, "strrchr", "mb_strrchr", "mb_orig_strrchr"},
{MB_OVERLOAD_STRING, "substr", "mb_substr", "mb_orig_substr"},
{MB_OVERLOAD_STRING, "strtolower", "mb_strtolower", 
"mb_orig_strtolower"},
{MB_OVERLOAD_STRING, "strtoupper", "mb_strtoupper", 
"mb_orig_strtoupper"},
@@ -207,6 +208,7 @@
PHP_FE(mb_strpos,   NULL)
PHP_FE(mb_strrpos,  NULL)
PHP_FE(mb_strstr,   NULL)
+   PHP_FE(mb_strrchr,  NULL)
PHP_FE(mb_substr_count, NULL)
PHP_FE(mb_substr,   NULL)
PHP_FE(mb_strcut,   NULL)
@@ -1738,6 +1740,69 @@
 }
 /* }}} */
 
+/* {{{ proto string mb_strrchr(string haystack, string needle[, bool part[, 
string encoding]])
+   Finds the last occurrence of a character in a string within another */
+PHP_FUNCTION(mb_strrchr)
+{
+   int n, len, mblen;
+   mbfl_string haystack, needle, result, *ret = NULL;;
+   char *enc_name = NULL;
+   int enc_name_len;
+   zend_bool part = 0;
+
+   mbfl_string_init(&haystack);
+   mbfl_string_init(&needle);
+   haystack.no_language = MBSTRG(current_language);
+   haystack.no_encoding = MBSTRG(current_internal_encoding);
+   needle.no_language = MBSTRG(current_language);
+   needle.no_encoding = MBSTRG(current_internal_encoding);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char 
**)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, 
&enc_name, &enc_name_len) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   if (enc_name != NULL) {
+   haystack.no_encoding = needle.no_encoding = 
mbfl_name2no_encoding(enc_name);
+   if (haystack.no_encoding == mbfl_no_encoding_invalid) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown 
encoding \"%s\"", enc_name);
+   RETURN_FALSE;
+   }
+   }
+
+   if (haystack.len <= 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty haystack");
+   RETURN_FALSE;
+   }
+   if (needle.len <= 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty needle");
+   RETURN_FALSE;
+   }
+   n = mbfl_strpos(&haystack, &needle, 0, 1);
+   if (n >= 0) {
+   if (part) {
+   mblen = mbfl_strlen(&haystack);
+   ret = mbfl_substr(&haystack, &result, 0, n);
+   if (ret != NULL) {
+   RETVAL_STRINGL((char *)ret->val, ret->len, 0);
+   } else {
+   RETVAL_FALSE;
+   }
+   } else {
+   mblen = mbfl_strlen(&haystack);
+   len = (mblen - n);
+   ret = mbfl_substr(&haystack, &result, n, len);
+   if (ret != NULL) {
+   RETVAL_STRINGL((char *)ret->val, ret->len, 0);
+   } else {
+   RETVAL_FALSE;
+   }
+   }
+   } else {
+   RETVAL_FALSE;
+   }
+}
+/* }}} */
+
 /* {{{ proto int mb_substr_count(string haystack, string needle [, string 
encoding])
Count the number of substring occurrences */
 PHP_FUNCTION(mb_substr_count)
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.h?r1=1.73&r2=1.74&diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.73 
php-src/ext/mbstring/mbstring.h:1.74
--- php-src/ext/mbstring/mbstring.h:1.73Tue Mar 28 16:05:16 2006
+++ php-src/ext/mbstring/mbstring.h Wed Mar 29 15:47:07 2006
@@ -16,7 +16,7 @@
+--

[PHP-CVS] cvs: php-src /ext/com_dotnet com_persist.c /ext/date php_date.c /ext/dom php_dom.c /ext/mysqli mysqli.c /ext/reflection php_reflection.c /ext/simplexml simplexml.c /ext/spl spl_array.c

2006-03-29 Thread Antony Dovgal
tony2001Wed Mar 29 15:08:52 2006 UTC

  Modified files:  
/ZendEngine2zend_objects.c zend_objects.h 
/php-src/ext/com_dotnet com_persist.c 
/php-src/ext/date   php_date.c 
/php-src/ext/domphp_dom.c 
/php-src/ext/mysqli mysqli.c 
/php-src/ext/reflection php_reflection.c 
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/splspl_array.c spl_directory.c spl_iterators.c 
spl_observer.c 
/php-src/ext/sqlite sqlite.c 
/php-src/ext/tidy   tidy.c 
/php-src/ext/xmlreader  php_xmlreader.c 
/php-src/ext/xmlwriter  php_xmlwriter.c 
/php-src/ext/xslphp_xsl.c 
  Log:
  MF51: fix bug #36898 (__set() leaks in classes extending internal ones)
  
  Added:
  ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC)
  ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
  
  
  http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_objects.c?r1=1.65&r2=1.66&diff_format=u
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.65 ZendEngine2/zend_objects.c:1.66
--- ZendEngine2/zend_objects.c:1.65 Thu Mar 16 10:33:23 2006
+++ ZendEngine2/zend_objects.c  Wed Mar 29 15:08:51 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_objects.c,v 1.65 2006/03/16 10:33:23 dmitry Exp $ */
+/* $Id: zend_objects.c,v 1.66 2006/03/29 15:08:51 tony2001 Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -25,6 +25,26 @@
 #include "zend_API.h"
 #include "zend_interfaces.h"
 
+ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC)
+{
+   ALLOC_HASHTABLE(object->properties);
+   zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+
+   object->ce = ce;
+   object->guards = NULL;
+}
+
+ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
+{
+   if (object->guards) {
+   zend_hash_destroy(object->guards);
+   FREE_HASHTABLE(object->guards); 
+   }
+   if (object->properties) {
+   zend_hash_destroy(object->properties);
+   FREE_HASHTABLE(object->properties);
+   }
+}
 
 ZEND_API void zend_objects_destroy_object(zend_object *object, 
zend_object_handle handle TSRMLS_DC)
 {
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_objects.h?r1=1.27&r2=1.28&diff_format=u
Index: ZendEngine2/zend_objects.h
diff -u ZendEngine2/zend_objects.h:1.27 ZendEngine2/zend_objects.h:1.28
--- ZendEngine2/zend_objects.h:1.27 Tue Feb 21 08:00:39 2006
+++ ZendEngine2/zend_objects.h  Wed Mar 29 15:08:51 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_objects.h,v 1.27 2006/02/21 08:00:39 dmitry Exp $ */
+/* $Id: zend_objects.h,v 1.28 2006/03/29 15:08:51 tony2001 Exp $ */
 
 #ifndef ZEND_OBJECTS_H
 #define ZEND_OBJECTS_H
@@ -25,6 +25,8 @@
 #include "zend.h"
 
 BEGIN_EXTERN_C()
+ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC);
+ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC);
 ZEND_API zend_object_value zend_objects_new(zend_object **object, 
zend_class_entry *class_type TSRMLS_DC);
 ZEND_API void zend_objects_destroy_object(zend_object *object, 
zend_object_handle handle TSRMLS_DC);
 ZEND_API zend_object *zend_objects_get_address(zval *object TSRMLS_DC);
http://cvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_persist.c?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/com_dotnet/com_persist.c
diff -u php-src/ext/com_dotnet/com_persist.c:1.8 
php-src/ext/com_dotnet/com_persist.c:1.9
--- php-src/ext/com_dotnet/com_persist.c:1.8Sun Feb 19 00:55:19 2006
+++ php-src/ext/com_dotnet/com_persist.cWed Mar 29 15:08:51 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_persist.c,v 1.8 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: com_persist.c,v 1.9 2006/03/29 15:08:51 tony2001 Exp $ */
 
 /* Infrastructure for working with persistent COM objects.
  * Implements: IStream* wrapper for PHP streams.
@@ -701,8 +701,7 @@
if (object->unk) {
IUnknown_Release(object->unk);
}
-   zend_hash_destroy(object->std.properties);
-   FREE_HASHTABLE(object->std.properties);
+   zend_object_std_dtor(&object->std TSRMLS_CC);
efree(object);
 }
 
@@ -715,9 +714,8 @@
memcpy(clone, object, sizeof(*object));
*clone_ptr = clone;
 
-   ALLOC_HASHTABLE(clone->std.properties);
-   zend_hash_init(clone->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
-   
+   zend_object_std_init(&clone->std, object->std.ce TSRMLS_CC);
+
if (clone->ipf) {
IPersistFile_AddRef(clone->ipf);
}
@@ -740,9 +738,7 @@
helper = emalloc(sizeof(*helper));
memset(helper, 0, sizeof(*helper));
 
-

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

2006-03-29 Thread Derick Rethans
On Mon, 27 Mar 2006, Andrey Hristov wrote:

>  Hi Dmitry,
> could you put some russian words for example to test not only
> latin1.

Please make a different test file for that, for examples strtr3.phpt

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
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 php_array.h /ext/unicode collator.c config.m4 config.w32 php_unicode.h unicode.c

2006-03-29 Thread Derick Rethans
On Sun, 26 Mar 2006, Andrei Zmievski wrote:

> Shouldn't it be called unicode_collator.c?

I was wondering why the rest of the filenames where prepended with 
unicode_... what's the point of that? :) 

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/com_dotnet com_persist.c /ext/date php_date.c /ext/dom php_dom.c /ext/mysqli mysqli.c /ext/reflection php_reflection.c /ext/simplexml simplexml.c /ex

2006-03-29 Thread Antony Dovgal
tony2001Wed Mar 29 14:28:43 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
/ZendEngine2zend_objects.c zend_objects.h 
/php-src/ext/com_dotnet com_persist.c 
/php-src/ext/date   php_date.c 
/php-src/ext/domphp_dom.c 
/php-src/ext/mysqli mysqli.c 
/php-src/ext/reflection php_reflection.c 
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/splspl_array.c spl_directory.c spl_iterators.c 
spl_observer.c 
/php-src/ext/sqlite sqlite.c 
/php-src/ext/tidy   tidy.c 
/php-src/ext/xmlreader  php_xmlreader.c 
/php-src/ext/xmlwriter  php_xmlwriter.c 
/php-src/ext/xslphp_xsl.c 
  Log:
  fix bug #36898 (__set() leaks in classes extending internal ones)
  
  Added:
  ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC)
  ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
  
  to initialize and destroy zend_object structs
  
  http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.487&r2=1.2027.2.488&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.487 php-src/NEWS:1.2027.2.488
--- php-src/NEWS:1.2027.2.487   Tue Mar 28 16:01:04 2006
+++ php-src/NEWSWed Mar 29 14:28:40 2006
@@ -12,6 +12,8 @@
 - Removed the E_STRICT deprecation notice from "var". (Ilia)
 - Fixed debug_zval_dump() to support private and protected members. (Dmitry)
 - Fixed SoapFault::getMessage(). (Dmitry)
+- Fixed bug #36898 (__set() leaks in classes extending internal ones). 
+  (Tony, Dmitry)
 - Fixed bug #36886 (User filters can leak buckets in some situations). (Ilia)
 - Fixed bug #36878 (error messages are printed even though an exception has 
   been thrown). (Tony)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_objects.c?r1=1.56.2.2&r2=1.56.2.3&diff_format=u
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.56.2.2 ZendEngine2/zend_objects.c:1.56.2.3
--- ZendEngine2/zend_objects.c:1.56.2.2 Wed Jan  4 23:53:04 2006
+++ ZendEngine2/zend_objects.c  Wed Mar 29 14:28:40 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_objects.c,v 1.56.2.2 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_objects.c,v 1.56.2.3 2006/03/29 14:28:40 tony2001 Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -25,6 +25,26 @@
 #include "zend_API.h"
 #include "zend_interfaces.h"
 
+ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC)
+{
+   ALLOC_HASHTABLE(object->properties);
+   zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+
+   object->ce = ce;
+   object->guards = NULL;
+}
+
+ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
+{
+   if (object->guards) {
+   zend_hash_destroy(object->guards);
+   FREE_HASHTABLE(object->guards); 
+   }
+   if (object->properties) {
+   zend_hash_destroy(object->properties);
+   FREE_HASHTABLE(object->properties);
+   }
+}
 
 ZEND_API void zend_objects_destroy_object(zend_object *object, 
zend_object_handle handle TSRMLS_DC)
 {
@@ -88,12 +108,7 @@
 
 ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC)
 {
-   if (object->guards) {
-   zend_hash_destroy(object->guards);
-   FREE_HASHTABLE(object->guards); 
-   }
-   zend_hash_destroy(object->properties);
-   FREE_HASHTABLE(object->properties);
+   zend_object_std_dtor(object TSRMLS_CC);
efree(object);
 }
 
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_objects.h?r1=1.25.2.1&r2=1.25.2.2&diff_format=u
Index: ZendEngine2/zend_objects.h
diff -u ZendEngine2/zend_objects.h:1.25.2.1 ZendEngine2/zend_objects.h:1.25.2.2
--- ZendEngine2/zend_objects.h:1.25.2.1 Wed Jan  4 23:53:04 2006
+++ ZendEngine2/zend_objects.h  Wed Mar 29 14:28:40 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_objects.h,v 1.25.2.1 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_objects.h,v 1.25.2.2 2006/03/29 14:28:40 tony2001 Exp $ */
 
 #ifndef ZEND_OBJECTS_H
 #define ZEND_OBJECTS_H
@@ -25,6 +25,8 @@
 #include "zend.h"
 
 BEGIN_EXTERN_C()
+ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce 
TSRMLS_DC);
+ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC);
 ZEND_API zend_object_value zend_objects_new(zend_object **object, 
zend_class_entry *class_type TSRMLS_DC);
 ZEND_API void zend_objects_destroy_object(zend_object *object, 
zend_object_handle handle TSRMLS_DC);
 ZEND_API zend_object *zend_objects_get_address(zval *object TSRMLS_DC);
http://cvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_persist.c?r1=1.5.2.2&r2=1.5.2.3&diff_format=u
Index: php-src/ext/com_dotnet/com_persist.c
diff -u php-src/ext/com_dotnet/com_persist.c:1.5.2.2 
php-src/ex

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/soap/tests/interop/Round4/GroupI r4_groupI_xsd_006w.phpt

2006-03-29 Thread Dmitry Stogov
dmitry  Wed Mar 29 10:39:20 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/soap/tests/interop/Round4/GroupI   
r4_groupI_xsd_006w.phpt 
  Log:
  Support for zend-myltibyte
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt?r1=1.2&r2=1.2.2.1&diff_format=u
Index: php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt

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