[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2005-09-08 Thread changelog
changelog   Fri Sep  9 01:35:42 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.2097r2=1.2098ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2097 php-src/ChangeLog:1.2098
--- php-src/ChangeLog:1.2097Thu Sep  8 01:37:56 2005
+++ php-src/ChangeLog   Fri Sep  9 01:35:40 2005
@@ -1,3 +1,91 @@
+2005-09-08  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  ext/sqlite/sqlite.c:
+  MFH: Allow retrieval of query parse errors from SQLite.
+
+* ext/sqlite/sqlite.c:
+  Allow retrieval of query parse errors from SQLite.
+  
+
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ZendEngine2/zend.c:
+  Avoid unnecessary copying/freeing
+
+2005-09-08  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS
+  ext/curl/multi.c:
+  MFH: Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()).
+
+* ext/curl/multi.c:
+  Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()).
+
+2005-09-08  Derick Rethans  [EMAIL PROTECTED]
+
+* ext/standard/string.c:
+  - Make ord() work on binary strings too.
+
+2005-09-08  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/oci8/oci8.c:
+  use connections instead of links everywhere to avoid possible 
confusion
+
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ext/standard/string.c
+  ext/standard/tests/strings/substr_replace.phpt:
+  Fixed craches in substr_replace()
+
+2005-09-08  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/iconv/iconv.c:
+  fix phpinfo() output for iconv extension
+  (convert unicode values to string before outputting them)
+
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_builtin_functions.c
+  ZendEngine2/zend_constants.c
+  ZendEngine2/zend_constants.h
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_vm_def.h
+  ZendEngine2/zend_vm_execute.h
+  ext/standard/basic_functions.c:
+  Unicode support for PHP constants
+
+2005-09-08  Rob Richards  [EMAIL PROTECTED]
+
+* ext/dom/document.c:
+  add save options parameter
+
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* NEWS
+  ZendEngine2/zend_compile.c
+  ZendEngine2/tests/catch.phpt:
+  catch operator shouldn't call __autoload () too
+
+2005-09-08  Rasmus Lerdorf  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  pear/Makefile.frag:
+  That line made no sense
+
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ext/odbc/php_odbc.c
+  ext/odbc/php_odbc.c
+  ext/odbc/php_odbc.c:
+  Fixed crash on AIX
+
+2005-09-08  Rolland Santimano  [EMAIL PROTECTED]
+
+* ext/standard/string.c:
+  - Unicode impl of substr_replace()
+
 2005-09-07  Greg Beaver  [EMAIL PROTECTED]
 
 * (PHP_5_1)
@@ -11549,7 +11637,7 @@
 
 * (PHP_4_3)
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2097 2005/09/08 05:37:56 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2098 2005/09/09 05:35:40 changelog Exp $ tag
 
 * (PHP_5_0)
   ext/standard/url_scanner_ex.c:
@@ -14950,7 +15038,7 @@
   ext/session/mod_mm.h
   ext/session/mod_user.h
   ext/session/php_session.h:
-  - Missing $Id: ChangeLog,v 1.2097 2005/09/08 05:37:56 changelog Exp $ 
tags
+  - Missing $Id: ChangeLog,v 1.2098 2005/09/09 05:35:40 changelog Exp $ 
tags
 
 * (PHP_4_3)
   ext/session/session.c:
@@ -15431,7 +15519,7 @@
 
 * (PHP_4_3)
   Zend/zend_ini_scanner.l:
-  Missing $Id: ChangeLog,v 1.2097 2005/09/08 05:37:56 changelog Exp $ tag 
+ ws fix
+  Missing $Id: ChangeLog,v 1.2098 2005/09/09 05:35:40 changelog Exp $ tag 
+ ws fix
 
 * ZendEngine2/zend_ini_scanner.l
   ZendEngine2/zend_ini_scanner.l:
@@ -16905,7 +16993,7 @@
   ext/standard/url_scanner_ex.c
   ext/standard/url_scanner_ex.h
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2097 2005/09/08 05:37:56 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2098 2005/09/09 05:35:40 changelog Exp $ tag
 
 * ext/standard/credits_ext.h
   ext/standard/credits_sapi.h:


[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2005-09-08 Thread changelog
changelog   Fri Sep  9 01:36:01 2005 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.766r2=1.767ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.766 ZendEngine2/ChangeLog:1.767
--- ZendEngine2/ChangeLog:1.766 Sat Sep  3 01:39:11 2005
+++ ZendEngine2/ChangeLog   Fri Sep  9 01:35:59 2005
@@ -1,3 +1,20 @@
+2005-09-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend.c:
+  Avoid unnecessary copying/freeing
+
+* zend_builtin_functions.c
+  zend_constants.c
+  zend_constants.h
+  zend_execute_API.c
+  zend_vm_def.h
+  zend_vm_execute.h:
+  Unicode support for PHP constants
+
+* zend_compile.c
+  tests/catch.phpt:
+  catch operator shouldn't call __autoload () too
+
 2005-09-02  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_ini.c:
@@ -10098,7 +10115,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.766 2005/09/03 05:39:11 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.767 2005/09/09 05:35:59 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -11822,7 +11839,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.766 2005/09/03 05:39:11 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.767 2005/09/09 05:35:59 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


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

2005-09-08 Thread Dmitry Stogov
dmitry  Thu Sep  8 02:18:51 2005 EDT

  Modified files:  
/php-src/ext/odbc   php_odbc.c 
  Log:
  Fixed crash on AIX
  
  
http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.189r2=1.190ty=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189 php-src/ext/odbc/php_odbc.c:1.190
--- php-src/ext/odbc/php_odbc.c:1.189   Fri Aug  5 18:37:48 2005
+++ php-src/ext/odbc/php_odbc.c Thu Sep  8 02:18:47 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189 2005/08/05 22:37:48 sniper Exp $ */
+/* $Id: php_odbc.c,v 1.190 2005/09/08 06:18:47 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -508,6 +508,12 @@
REGISTER_LONG_CONSTANT(SQL_QUICK, SQL_QUICK, CONST_PERSISTENT | 
CONST_CS);
 #endif
 
+#if defined(HAVE_IBMDB2)  defined(_AIX)
+   /* atexit() handler in the DB2/AIX library segfaults in PHP CLI */
+   /* DB2NOEXITLIST env variable prevents DB2 from invoking atexit() */
+   putenv(DB2NOEXITLIST=TRUE);
+#endif
+
return SUCCESS;
 }
 /* }}} */

-- 
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/odbc php_odbc.c

2005-09-08 Thread Dmitry Stogov
dmitry  Thu Sep  8 02:19:08 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/odbc   php_odbc.c 
  Log:
  Fixed crash on AIX
  
  
http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.189r2=1.189.2.1ty=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189 php-src/ext/odbc/php_odbc.c:1.189.2.1
--- php-src/ext/odbc/php_odbc.c:1.189   Fri Aug  5 18:37:48 2005
+++ php-src/ext/odbc/php_odbc.c Thu Sep  8 02:19:07 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189 2005/08/05 22:37:48 sniper Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.1 2005/09/08 06:19:07 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -508,6 +508,12 @@
REGISTER_LONG_CONSTANT(SQL_QUICK, SQL_QUICK, CONST_PERSISTENT | 
CONST_CS);
 #endif
 
+#if defined(HAVE_IBMDB2)  defined(_AIX)
+   /* atexit() handler in the DB2/AIX library segfaults in PHP CLI */
+   /* DB2NOEXITLIST env variable prevents DB2 from invoking atexit() */
+   putenv(DB2NOEXITLIST=TRUE);
+#endif
+
return SUCCESS;
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/odbc php_odbc.c

2005-09-08 Thread Dmitry Stogov
dmitry  Thu Sep  8 02:19:22 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/odbc   php_odbc.c 
  Log:
  Fixed crash on AIX
  
  
http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.179.2.5r2=1.179.2.6ty=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.179.2.5 
php-src/ext/odbc/php_odbc.c:1.179.2.6
--- php-src/ext/odbc/php_odbc.c:1.179.2.5   Sat Jul  2 18:50:01 2005
+++ php-src/ext/odbc/php_odbc.c Thu Sep  8 02:19:21 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.179.2.5 2005/07/02 22:50:01 edink Exp $ */
+/* $Id: php_odbc.c,v 1.179.2.6 2005/09/08 06:19:21 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -504,6 +504,12 @@
REGISTER_LONG_CONSTANT(SQL_QUICK, SQL_QUICK, CONST_PERSISTENT | 
CONST_CS);
 #endif
 
+#if defined(HAVE_IBMDB2)  defined(_AIX)
+   /* atexit() handler in the DB2/AIX library segfaults in PHP CLI */
+   /* DB2NOEXITLIST env variable prevents DB2 from invoking atexit() */
+   putenv(DB2NOEXITLIST=TRUE);
+#endif
+
return SUCCESS;
 }
 /* }}} */

-- 
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) /pear Makefile.frag

2005-09-08 Thread Rasmus Lerdorf
rasmus  Thu Sep  8 05:11:13 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/pear   Makefile.frag 
  Log:
  That line made no sense
  
  
http://cvs.php.net/diff.php/php-src/pear/Makefile.frag?r1=1.35.6.1r2=1.35.6.2ty=u
Index: php-src/pear/Makefile.frag
diff -u php-src/pear/Makefile.frag:1.35.6.1 php-src/pear/Makefile.frag:1.35.6.2
--- php-src/pear/Makefile.frag:1.35.6.1 Wed Sep  7 11:59:53 2005
+++ php-src/pear/Makefile.frag  Thu Sep  8 05:11:10 2005
@@ -10,7 +10,7 @@
 
 install-pear:
@echo Installing PEAR environment:  $(INSTALL_ROOT)$(peardir)/
-   @if $(srcdir)/install-pear.phar $(mkinstalldirs) 
$(INSTALL_ROOT)$(peardir); then \
+   @if test -f $(srcdir)/install-pear.phar  $(mkinstalldirs) 
$(INSTALL_ROOT)$(peardir); then \
$(MAKE) -s install-pear-installer; \
else \
cat $(srcdir)/install-pear.txt; \

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



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

2005-09-08 Thread Rob Richards
rrichards   Thu Sep  8 06:33:58 2005 EDT

  Modified files:  
/php-src/ext/libxml libxml.c php_libxml.h 
  Log:
  add additional constants
  remove un-needed ifdefs
  
http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.35r2=1.36ty=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.35 php-src/ext/libxml/libxml.c:1.36
--- php-src/ext/libxml/libxml.c:1.35Thu Aug 25 22:29:32 2005
+++ php-src/ext/libxml/libxml.c Thu Sep  8 06:33:57 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.35 2005/08/26 02:29:32 rrichards Exp $ */
+/* $Id: libxml.c,v 1.36 2005/09/08 10:33:57 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -40,6 +40,7 @@
 #include libxml/tree.h
 #include libxml/uri.h
 #include libxml/xmlerror.h
+#include libxml/xmlsave.h
 #ifdef LIBXML_SCHEMAS_ENABLED
 #include libxml/relaxng.h
 #endif
@@ -65,9 +66,7 @@
 PHP_LIBXML_API php_libxml_globals libxml_globals;
 #endif
 
-#if LIBXML_VERSION = 20600
 zend_class_entry *libxmlerror_class_entry;
-#endif
 
 /* {{{ dynamically loadable module stuff */
 #ifdef COMPILE_DL_LIBXML
@@ -546,9 +545,7 @@
 
 PHP_MINIT_FUNCTION(libxml)
 {
-#if LIBXML_VERSION = 20600
zend_class_entry ce;
-#endif
 
php_libxml_initialize();
 
@@ -563,7 +560,6 @@
REGISTER_LONG_CONSTANT(LIBXML_VERSION,
LIBXML_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT(LIBXML_DOTTED_VERSION,   
LIBXML_DOTTED_VERSION,  CONST_CS | CONST_PERSISTENT);
 
-#if LIBXML_VERSION = 20600
/* For use with loading xml */
REGISTER_LONG_CONSTANT(LIBXML_NOENT,  XML_PARSE_NOENT,
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_DTDLOAD,XML_PARSE_DTDLOAD,  
CONST_CS | CONST_PERSISTENT);
@@ -576,6 +572,11 @@
REGISTER_LONG_CONSTANT(LIBXML_NSCLEAN,XML_PARSE_NSCLEAN,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NOCDATA,XML_PARSE_NOCDATA,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NONET,  XML_PARSE_NONET,
CONST_CS | CONST_PERSISTENT);
+#if LIBXML_VERSION = 20621
+   REGISTER_LONG_CONSTANT(LIBXML_COMPACT,XML_PARSE_COMPACT,  
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(LIBXML_NOXMLDECL,  XML_SAVE_NO_DECL,   
CONST_CS | CONST_PERSISTENT);
+#endif
+   REGISTER_LONG_CONSTANT(LIBXML_NOEMPTYTAG, LIBXML_SAVE_NOEMPTYTAG, 
CONST_CS | CONST_PERSISTENT);
 
/* Error levels */
REGISTER_LONG_CONSTANT(LIBXML_ERR_NONE,   XML_ERR_NONE,   
CONST_CS | CONST_PERSISTENT);
@@ -585,7 +586,6 @@
 
INIT_CLASS_ENTRY(ce, LibXMLError, NULL);
libxmlerror_class_entry = zend_register_internal_class(ce TSRMLS_CC);
-#endif
 
return SUCCESS;
 }
@@ -657,7 +657,6 @@
Disable libxml errors and allow user to fetch error information as needed */
 PHP_FUNCTION(libxml_use_internal_errors)
 {
-#if LIBXML_VERSION = 20600
xmlStructuredErrorFunc current_handler;
int use_errors=0, retval;
 
@@ -691,16 +690,12 @@
}
}
RETURN_BOOL(retval);
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 
 /* {{{ proto object libxml_get_last_error() 
Retrieve last error from libxml */
 PHP_FUNCTION(libxml_get_last_error)
 {
-#if LIBXML_VERSION = 20600
xmlErrorPtr error;
 
error = xmlGetLastError();
@@ -724,9 +719,6 @@
} else {
RETURN_FALSE;
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
@@ -734,7 +726,6 @@
Retrieve array of errors */
 PHP_FUNCTION(libxml_get_errors)
 {
-#if LIBXML_VERSION = 20600

xmlErrorPtr error;
 
@@ -770,9 +761,6 @@
error = zend_llist_get_next(LIBXML(error_list));
}
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
@@ -780,14 +768,10 @@
 Clear last error from libxml */
 PHP_FUNCTION(libxml_clear_errors)
 {
-#if LIBXML_VERSION = 20600
xmlResetLastError();
if (LIBXML(error_list)) {
zend_llist_clean(LIBXML(error_list));
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
http://cvs.php.net/diff.php/php-src/ext/libxml/php_libxml.h?r1=1.15r2=1.16ty=u
Index: php-src/ext/libxml/php_libxml.h
diff -u php-src/ext/libxml/php_libxml.h:1.15 
php-src/ext/libxml/php_libxml.h:1.16
--- php-src/ext/libxml/php_libxml.h:1.15Wed Aug  3 10:07:23 2005
+++ php-src/ext/libxml/php_libxml.h Thu Sep  8 06:33:57 2005
@@ -17,7 +17,7 @@

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

2005-09-08 Thread Rob Richards
rrichards   Thu Sep  8 06:34:37 2005 EDT

  Modified files:  
/php-src/ext/domdocument.c 
  Log:
  add save options parameter
  
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.70r2=1.71ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.70 php-src/ext/dom/document.c:1.71
--- php-src/ext/dom/document.c:1.70 Mon Aug 15 13:13:15 2005
+++ php-src/ext/dom/document.c  Thu Sep  8 06:34:37 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.70 2005/08/15 17:13:15 rrichards Exp $ */
+/* $Id: document.c,v 1.71 2005/09/08 10:34:37 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1624,12 +1624,13 @@
 {
zval *id;
xmlDoc *docp;
-   int file_len = 0, bytes, format;
+   int file_len = 0, bytes, format, saveempty;
dom_object *intern;
dom_doc_props *doc_props;
char *file;
+   long options = 0;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, id, U_CLASS_ENTRY(dom_document_class_entry), file, file_len) == 
FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|l, id, U_CLASS_ENTRY(dom_document_class_entry), file, file_len, 
options) == FAILURE) {
return;
}
 
@@ -1644,8 +1645,14 @@
 
doc_props = dom_get_doc_props(intern-document);
format = doc_props-formatoutput;
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
bytes = xmlSaveFormatFileEnc(file, docp, NULL, format);
-
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
if (bytes == -1) {
RETURN_FALSE;
}
@@ -1666,9 +1673,10 @@
xmlChar *mem;
dom_object *intern, *nodeobj;
dom_doc_props *doc_props;
-   int size, format;
+   int size, format, saveempty;
+   long options = 0;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O|O, id, U_CLASS_ENTRY(dom_document_class_entry), nodep, 
U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O|O!l, id, U_CLASS_ENTRY(dom_document_class_entry), nodep, 
U_CLASS_ENTRY(dom_node_class_entry), options) == FAILURE) {
return;
}
 
@@ -1689,8 +1697,14 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
fetch buffer);
RETURN_FALSE;
}
-
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
xmlNodeDump(buf, docp, node, 0, format);
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
mem = (xmlChar*) xmlBufferContent(buf);
if (!mem) {
xmlBufferFree(buf);
@@ -1699,8 +1713,15 @@
RETVAL_STRING(mem, 1);
xmlBufferFree(buf);
} else {
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
/* Encoding is handled from the encoding property set on the 
document */
xmlDocDumpFormatMemory(docp, mem, size, format);
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
if (!size) {
RETURN_FALSE;
}

-- 
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/libxml libxml.c php_libxml.h

2005-09-08 Thread Rob Richards
rrichards   Thu Sep  8 06:37:58 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/libxml libxml.c php_libxml.h 
  Log:
  MFH: add additional constants
  remove un-needed ifdefs
  
http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.32.2.1r2=1.32.2.2ty=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.32.2.1 
php-src/ext/libxml/libxml.c:1.32.2.2
--- php-src/ext/libxml/libxml.c:1.32.2.1Thu Aug 25 22:29:56 2005
+++ php-src/ext/libxml/libxml.c Thu Sep  8 06:37:57 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.32.2.1 2005/08/26 02:29:56 rrichards Exp $ */
+/* $Id: libxml.c,v 1.32.2.2 2005/09/08 10:37:57 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -40,6 +40,7 @@
 #include libxml/tree.h
 #include libxml/uri.h
 #include libxml/xmlerror.h
+#include libxml/xmlsave.h
 #ifdef LIBXML_SCHEMAS_ENABLED
 #include libxml/relaxng.h
 #endif
@@ -65,9 +66,7 @@
 PHP_LIBXML_API php_libxml_globals libxml_globals;
 #endif
 
-#if LIBXML_VERSION = 20600
 zend_class_entry *libxmlerror_class_entry;
-#endif
 
 /* {{{ dynamically loadable module stuff */
 #ifdef COMPILE_DL_LIBXML
@@ -546,9 +545,7 @@
 
 PHP_MINIT_FUNCTION(libxml)
 {
-#if LIBXML_VERSION = 20600
zend_class_entry ce;
-#endif
 
php_libxml_initialize();
 
@@ -563,7 +560,6 @@
REGISTER_LONG_CONSTANT(LIBXML_VERSION,
LIBXML_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT(LIBXML_DOTTED_VERSION,   
LIBXML_DOTTED_VERSION,  CONST_CS | CONST_PERSISTENT);
 
-#if LIBXML_VERSION = 20600
/* For use with loading xml */
REGISTER_LONG_CONSTANT(LIBXML_NOENT,  XML_PARSE_NOENT,
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_DTDLOAD,XML_PARSE_DTDLOAD,  
CONST_CS | CONST_PERSISTENT);
@@ -576,6 +572,11 @@
REGISTER_LONG_CONSTANT(LIBXML_NSCLEAN,XML_PARSE_NSCLEAN,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NOCDATA,XML_PARSE_NOCDATA,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NONET,  XML_PARSE_NONET,
CONST_CS | CONST_PERSISTENT);
+#if LIBXML_VERSION = 20621
+   REGISTER_LONG_CONSTANT(LIBXML_COMPACT,XML_PARSE_COMPACT,  
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(LIBXML_NOXMLDECL,  XML_SAVE_NO_DECL,   
CONST_CS | CONST_PERSISTENT);
+#endif
+   REGISTER_LONG_CONSTANT(LIBXML_NOEMPTYTAG, LIBXML_SAVE_NOEMPTYTAG, 
CONST_CS | CONST_PERSISTENT);
 
/* Error levels */
REGISTER_LONG_CONSTANT(LIBXML_ERR_NONE,   XML_ERR_NONE,   
CONST_CS | CONST_PERSISTENT);
@@ -585,7 +586,6 @@
 
INIT_CLASS_ENTRY(ce, LibXMLError, NULL);
libxmlerror_class_entry = zend_register_internal_class(ce TSRMLS_CC);
-#endif
 
return SUCCESS;
 }
@@ -657,7 +657,6 @@
Disable libxml errors and allow user to fetch error information as needed */
 PHP_FUNCTION(libxml_use_internal_errors)
 {
-#if LIBXML_VERSION = 20600
xmlStructuredErrorFunc current_handler;
int use_errors=0, retval;
 
@@ -691,16 +690,12 @@
}
}
RETURN_BOOL(retval);
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 
 /* {{{ proto object libxml_get_last_error() 
Retrieve last error from libxml */
 PHP_FUNCTION(libxml_get_last_error)
 {
-#if LIBXML_VERSION = 20600
xmlErrorPtr error;
 
error = xmlGetLastError();
@@ -724,9 +719,6 @@
} else {
RETURN_FALSE;
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
@@ -734,7 +726,6 @@
Retrieve array of errors */
 PHP_FUNCTION(libxml_get_errors)
 {
-#if LIBXML_VERSION = 20600

xmlErrorPtr error;
 
@@ -770,9 +761,6 @@
error = zend_llist_get_next(LIBXML(error_list));
}
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
@@ -780,14 +768,10 @@
 Clear last error from libxml */
 PHP_FUNCTION(libxml_clear_errors)
 {
-#if LIBXML_VERSION = 20600
xmlResetLastError();
if (LIBXML(error_list)) {
zend_llist_clean(LIBXML(error_list));
}
-#else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Libxml 2.6 or higher is 
required);
-#endif
 }
 /* }}} */
 
http://cvs.php.net/diff.php/php-src/ext/libxml/php_libxml.h?r1=1.15r2=1.15.2.1ty=u
Index: php-src/ext/libxml/php_libxml.h
diff -u php-src/ext/libxml/php_libxml.h:1.15 
php-src/ext/libxml/php_libxml.h:1.15.2.1
--- php-src/ext/libxml/php_libxml.h:1.15Wed Aug  3 10:07:23 2005
+++ php-src/ext/libxml/php_libxml.h Thu Sep  8 

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

2005-09-08 Thread Rob Richards
rrichards   Thu Sep  8 06:39:32 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/domdocument.c 
  Log:
  MFH: add save options parameter
  
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.68.2.1r2=1.68.2.2ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.1 php-src/ext/dom/document.c:1.68.2.2
--- php-src/ext/dom/document.c:1.68.2.1 Mon Aug 15 13:13:57 2005
+++ php-src/ext/dom/document.c  Thu Sep  8 06:39:30 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.1 2005/08/15 17:13:57 rrichards Exp $ */
+/* $Id: document.c,v 1.68.2.2 2005/09/08 10:39:30 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1624,12 +1624,13 @@
 {
zval *id;
xmlDoc *docp;
-   int file_len = 0, bytes, format;
+   int file_len = 0, bytes, format, saveempty;
dom_object *intern;
dom_doc_props *doc_props;
char *file;
+   long options = 0;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, id, dom_document_class_entry, file, file_len) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|l, id, dom_document_class_entry, file, file_len, options) == FAILURE) {
return;
}
 
@@ -1644,8 +1645,14 @@
 
doc_props = dom_get_doc_props(intern-document);
format = doc_props-formatoutput;
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
bytes = xmlSaveFormatFileEnc(file, docp, NULL, format);
-
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
if (bytes == -1) {
RETURN_FALSE;
}
@@ -1666,9 +1673,10 @@
xmlChar *mem;
dom_object *intern, *nodeobj;
dom_doc_props *doc_props;
-   int size, format;
+   int size, format, saveempty;
+   long options = 0;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O|O, id, dom_document_class_entry, nodep, dom_node_class_entry) == FAILURE) 
{
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O|O!l, id, dom_document_class_entry, nodep, dom_node_class_entry, options) 
== FAILURE) {
return;
}
 
@@ -1689,8 +1697,14 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
fetch buffer);
RETURN_FALSE;
}
-
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
xmlNodeDump(buf, docp, node, 0, format);
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
mem = (xmlChar*) xmlBufferContent(buf);
if (!mem) {
xmlBufferFree(buf);
@@ -1699,8 +1713,15 @@
RETVAL_STRING(mem, 1);
xmlBufferFree(buf);
} else {
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   saveempty = xmlSaveNoEmptyTags;
+   xmlSaveNoEmptyTags = 1;
+   }
/* Encoding is handled from the encoding property set on the 
document */
xmlDocDumpFormatMemory(docp, mem, size, format);
+   if (options  LIBXML_SAVE_NOEMPTYTAG) {
+   xmlSaveNoEmptyTags = saveempty;
+   }
if (!size) {
RETURN_FALSE;
}

-- 
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 ZendEngine2 zend_builtin_functions.c zend_constants.c zend_constants.h zend_execute_API.c zend_vm_def.h zend_vm_execute.h

2005-09-08 Thread Dmitry Stogov
dmitry  Thu Sep  8 07:10:36 2005 EDT

  Modified files:  
/ZendEngine2zend_builtin_functions.c zend_constants.c 
zend_constants.h zend_execute_API.c zend_vm_def.h 
zend_vm_execute.h 
/php-src/ext/standard   basic_functions.c 
  Log:
  Unicode support for PHP constants
  
  http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?r1=1.292r2=1.293ty=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.292 
ZendEngine2/zend_builtin_functions.c:1.293
--- ZendEngine2/zend_builtin_functions.c:1.292  Thu Sep  1 06:04:56 2005
+++ ZendEngine2/zend_builtin_functions.cThu Sep  8 07:10:27 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.292 2005/09/01 10:04:56 dmitry Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.293 2005/09/08 11:10:27 dmitry Exp $ */
 
 #include zend.h
 #include zend_API.h
@@ -558,7 +558,7 @@
}

convert_to_text_ex(var);
-   if (zend_get_constant(Z_UNIVAL_PP(var), Z_UNILEN_PP(var), c 
TSRMLS_CC)) {
+   if (zend_u_get_constant(Z_TYPE_PP(var), Z_UNIVAL_PP(var), 
Z_UNILEN_PP(var), c TSRMLS_CC)) {
zval_dtor(c);
RETURN_TRUE;
} else {
http://cvs.php.net/diff.php/ZendEngine2/zend_constants.c?r1=1.73r2=1.74ty=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.73 ZendEngine2/zend_constants.c:1.74
--- ZendEngine2/zend_constants.c:1.73   Mon Aug 15 10:39:18 2005
+++ ZendEngine2/zend_constants.cThu Sep  8 07:10:28 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_constants.c,v 1.73 2005/08/15 14:39:18 dmitry Exp $ */
+/* $Id: zend_constants.c,v 1.74 2005/09/08 11:10:28 dmitry Exp $ */
 
 #include zend.h
 #include zend_constants.h
@@ -214,19 +214,18 @@
 }
 
 
-ZEND_API int zend_get_constant(char *name, uint name_len, zval *result 
TSRMLS_DC)
+ZEND_API int zend_u_get_constant(zend_uchar type, void *name, uint name_len, 
zval *result TSRMLS_DC)
 {
zend_constant *c;
int retval = 1;
char *lookup_name;
char *colon;
-   zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING;
 
if ((UG(unicode)  (colon = (char*)u_memchr((UChar*)name, ':', 
name_len))  ((UChar*)colon)[1] == ':') ||
(!UG(unicode)  (colon = memchr(name, ':', name_len))  colon[1] 
== ':')) {
/* class constant */
zend_class_entry **ce = NULL, *scope;
-   int class_name_len = 
UG(unicode)?((colon-name)/sizeof(UChar)):colon-name;
+   int class_name_len = 
UG(unicode)?((colon-(char*)name)/sizeof(UChar)):colon-(char*)name;
int const_name_len = name_len - class_name_len - 2;
char *constant_name = colon + (UG(unicode)?UBYTES(2):2);
zval **ret_constant;
@@ -310,6 +309,10 @@
return retval;
 }
 
+ZEND_API int zend_get_constant(char *name, uint name_len, zval *result 
TSRMLS_DC)
+{
+   return zend_u_get_constant(IS_STRING, name, name_len, result TSRMLS_CC);
+}
 
 ZEND_API int zend_u_register_constant(zend_uchar type, zend_constant *c 
TSRMLS_DC)
 {
http://cvs.php.net/diff.php/ZendEngine2/zend_constants.h?r1=1.32r2=1.33ty=u
Index: ZendEngine2/zend_constants.h
diff -u ZendEngine2/zend_constants.h:1.32 ZendEngine2/zend_constants.h:1.33
--- ZendEngine2/zend_constants.h:1.32   Thu Aug 11 19:34:55 2005
+++ ZendEngine2/zend_constants.hThu Sep  8 07:10:28 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_constants.h,v 1.32 2005/08/11 23:34:55 andrei Exp $ */
+/* $Id: zend_constants.h,v 1.33 2005/09/08 11:10:28 dmitry Exp $ */
 
 #ifndef ZEND_CONSTANTS_H
 #define ZEND_CONSTANTS_H
@@ -55,6 +55,7 @@
 void zend_register_standard_constants(TSRMLS_D);
 void clean_non_persistent_constants(TSRMLS_D);
 ZEND_API int zend_get_constant(char *name, uint name_len, zval *result 
TSRMLS_DC);
+ZEND_API int zend_u_get_constant(zend_uchar type, void *name, uint name_len, 
zval *result TSRMLS_DC);
 ZEND_API void zend_register_long_constant(char *name, uint name_len, long 
lval, int flags, int module_number TSRMLS_DC);
 ZEND_API void zend_register_double_constant(char *name, uint name_len, double 
dval, int flags, int module_number TSRMLS_DC);
 ZEND_API void zend_register_string_constant(char *name, uint name_len, char 
*strval, int flags, int module_number TSRMLS_DC);
http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.340r2=1.341ty=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.340 
ZendEngine2/zend_execute_API.c:1.341
--- ZendEngine2/zend_execute_API.c:1.340Fri Sep  2 03:46:30 2005
+++ ZendEngine2/zend_execute_API.c  Thu Sep  8 07:10:28 2005
@@ -17,7 +17,7 @@

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

2005-09-08 Thread Antony Dovgal
tony2001Thu Sep  8 07:48:09 2005 EDT

  Modified files:  
/php-src/ext/iconv  iconv.c 
  Log:
  fix phpinfo() output for iconv extension
  (convert unicode values to string before outputting them)
  
  
http://cvs.php.net/diff.php/php-src/ext/iconv/iconv.c?r1=1.125r2=1.126ty=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.125 php-src/ext/iconv/iconv.c:1.126
--- php-src/ext/iconv/iconv.c:1.125 Thu Aug 11 19:35:53 2005
+++ php-src/ext/iconv/iconv.c   Thu Sep  8 07:48:07 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.125 2005/08/11 23:35:53 andrei Exp $ */
+/* $Id: iconv.c,v 1.126 2005/09/08 11:48:07 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -216,6 +216,9 @@
zend_get_constant(ICONV_IMPL, sizeof(ICONV_IMPL)-1, iconv_impl 
TSRMLS_CC);
zend_get_constant(ICONV_VERSION, sizeof(ICONV_VERSION)-1, 
iconv_ver TSRMLS_CC);
 
+   convert_to_string(iconv_impl);
+   convert_to_string(iconv_ver);
+   
php_info_print_table_start();
php_info_print_table_row(2, iconv support, enabled);
php_info_print_table_row(2, iconv implementation, 
Z_STRVAL(iconv_impl));

-- 
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 /ext/standard/tests/strings substr_replace.phpt

2005-09-08 Thread Dmitry Stogov
dmitry  Thu Sep  8 08:40:02 2005 EDT

  Modified files:  
/php-src/ext/standard   string.c 
/php-src/ext/standard/tests/strings substr_replace.phpt 
  Log:
  Fixed craches in substr_replace()
  
  http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.479r2=1.480ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.479 php-src/ext/standard/string.c:1.480
--- php-src/ext/standard/string.c:1.479 Thu Sep  8 01:05:36 2005
+++ php-src/ext/standard/string.c   Thu Sep  8 08:40:00 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.479 2005/09/08 05:05:36 rolland Exp $ */
+/* $Id: string.c,v 1.480 2005/09/08 12:40:00 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2626,9 +2626,16 @@
void *buf;
int32_t buf_len, idx;
UChar ch;
+   int repl_len;
+
+   if (repl) {
+   repl_len = Z_UNILEN_PP(repl);
+   } else {
+   repl_len = 0;
+   }
 
if (Z_TYPE_PP(str) == IS_UNICODE) {
-   buf = emalloc(UBYTES(Z_USTRLEN_PP(str) -l + Z_USTRLEN_PP(repl) 
+ 1));
+   buf = emalloc(UBYTES(Z_USTRLEN_PP(str) -l + repl_len + 1));
 
/* buf_len is codept count here */
buf_len = 0; idx = 0;
@@ -2637,8 +2644,8 @@
buf_len += zend_codepoint_to_uchar(ch, (UChar *)buf + 
buf_len);
}
if (repl != NULL) {
-   u_memcpy((UChar *)buf + buf_len, Z_USTRVAL_PP(repl), 
Z_USTRLEN_PP(repl));
-   buf_len += Z_USTRLEN_PP(repl);
+   u_memcpy((UChar *)buf + buf_len, Z_USTRVAL_PP(repl), 
repl_len);
+   buf_len += repl_len;
}
U16_FWD_N(Z_USTRVAL_PP(str), idx, Z_USTRLEN_PP(str), l);
u_memcpy((UChar *)buf + buf_len, Z_USTRVAL_PP(str) + idx, 
Z_USTRLEN_PP(str) - idx);
@@ -2648,14 +2655,14 @@
buf = erealloc(buf, UBYTES(buf_len + 1));
} else {
/* buf_len is char count here */
-   buf_len = Z_STRLEN_PP(str) - l + Z_STRLEN_PP(repl);
+   buf_len = Z_STRLEN_PP(str) - l + repl_len;
buf = emalloc(buf_len + 1);
 
memcpy(buf, Z_STRVAL_PP(str), f);
-   if (repl != NULL ) {
-   memcpy((char *)buf + f, Z_STRVAL_PP(repl), 
Z_STRLEN_PP(repl));
+   if (repl != NULL) {
+   memcpy((char *)buf + f, Z_STRVAL_PP(repl), repl_len);
}
-   memcpy((char *)buf + f + Z_STRLEN_PP(repl), Z_STRVAL_PP(str) + 
f + l, Z_STRLEN_PP(str) - f - l);
+   memcpy((char *)buf + f + repl_len, Z_STRVAL_PP(str) + f + l, 
Z_STRLEN_PP(str) - f - l);
 
*((char *)buf + buf_len) = '\0';
}
@@ -2706,11 +2713,7 @@
}
} else {
if (Z_TYPE_PP(str) != IS_ARRAY) {
-   if (Z_TYPE_PP(str) == IS_UNICODE) {
-   l = Z_USTRLEN_PP(str);
-   } else {
-   l = Z_STRLEN_PP(str);
-   }
+   l = Z_UNILEN_PP(str);
}
}
 
@@ -2744,7 +2747,7 @@
tmp_repl = repl;
}
 
-   if (Z_TYPE_PP(str) != Z_TYPE_PP(tmp_repl))
+   if (tmp_repl  Z_TYPE_PP(str) != Z_TYPE_PP(tmp_repl))
php_unify_string_types(str, tmp_repl TSRMLS_CC);
php_adjust_limits(str, f, l);
result_len = php_do_substr_replace(result, str, 
tmp_repl, f, l TSRMLS_CC);
@@ -2795,20 +2798,13 @@
l = Z_LVAL_PP(tmp_len);

zend_hash_move_forward_ex(Z_ARRVAL_PP(len), pos_len);
} else {
-   if (Z_TYPE_PP(tmp_str) == IS_UNICODE) {
-   l = Z_USTRLEN_PP(tmp_str);
-   } else {
-   l = Z_STRLEN_PP(tmp_str);
-   }
+   l = Z_UNILEN_PP(tmp_str);
}
} else if (argc  3) {
/* 'l' parsed  set at top of funcn */
+   l = Z_LVAL_PP(len);
} else {
-   if (Z_TYPE_PP(tmp_str) == IS_UNICODE) {
-   l = Z_USTRLEN_PP(tmp_str);
-   } else {
-   l = Z_STRLEN_PP(tmp_str);
-   }
+   l = 

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

2005-09-08 Thread Dmitry Stogov
Hi Roland,

This patch introduced crashes in substr_replace().
Probably I fixed all of them.

Please check your patches before commit.
Do make test and make utest before and after patch to see that you broke
nothing.

Dmitry.

 -Original Message-
 From: Rolland Santimano [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 08, 2005 9:06 AM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src /ext/standard string.c 
 
 
 rolland   Thu Sep  8 01:05:38 2005 EDT
 
   Modified files:  
 /php-src/ext/standard string.c 
   Log:
   - Unicode impl of substr_replace()
   
   
 

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



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

2005-09-08 Thread Antony Dovgal
tony2001Thu Sep  8 09:16:27 2005 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  use connections instead of links everywhere to avoid possible confusion
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.273r2=1.274ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.273 php-src/ext/oci8/oci8.c:1.274
--- php-src/ext/oci8/oci8.c:1.273   Tue Sep  6 17:42:26 2005
+++ php-src/ext/oci8/oci8.c Thu Sep  8 09:16:24 2005
@@ -26,7 +26,7 @@
+--+
 */
 
-/* $Id: oci8.c,v 1.273 2005/09/06 21:42:26 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.274 2005/09/08 13:16:24 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -609,12 +609,12 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.273 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.274 $);
 
sprintf(buf, %ld, OCI_G(num_persistent));
-   php_info_print_table_row(2, Active Persistent Links, buf);
+   php_info_print_table_row(2, Active Persistent Connections, buf);
sprintf(buf, %ld, OCI_G(num_links));
-   php_info_print_table_row(2, Active Links, buf);
+   php_info_print_table_row(2, Active Connections, buf);
 
 #if !defined(PHP_WIN32)  !defined(HAVE_OCI_INSTANT_CLIENT)
php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION );
@@ -1017,7 +1017,7 @@

if (OCI_G(max_persistent)!=-1  
OCI_G(num_persistent)=OCI_G(max_persistent)) {
/* all persistent connactions are in use, 
fallback to non-persistent connection creation */
-   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Too 
many open persistent links (%ld), OCI_G(num_persistent));
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Too 
many open persistent connections (%ld), OCI_G(num_persistent));
alloc_non_persistent = 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 string.c

2005-09-08 Thread Derick Rethans
derick  Thu Sep  8 10:07:42 2005 EDT

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  - Make ord() work on binary strings too.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.480r2=1.481ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.480 php-src/ext/standard/string.c:1.481
--- php-src/ext/standard/string.c:1.480 Thu Sep  8 08:40:00 2005
+++ php-src/ext/standard/string.c   Thu Sep  8 10:07:40 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.480 2005/09/08 12:40:00 dmitry Exp $ */
+/* $Id: string.c,v 1.481 2005/09/08 14:07:40 derick Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2902,8 +2902,12 @@
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) == FAILURE) 
{
WRONG_PARAM_COUNT;
}
-   convert_to_text_ex(str);
 
+   if (Z_TYPE_PP(str) == IS_BINARY) {
+   RETURN_LONG((unsigned char) Z_STRVAL_PP(str)[0]);
+   }
+
+   convert_to_text_ex(str);
if (Z_TYPE_PP(str) == IS_UNICODE) {
RETURN_LONG(zend_get_codepoint_at(Z_USTRVAL_PP(str), 
Z_USTRLEN_PP(str), 0));
} else {

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



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

2005-09-08 Thread Ilia Alshanetsky
iliaa   Thu Sep  8 10:50:00 2005 EDT

  Modified files:  
/php-src/ext/curl   multi.c 
  Log:
  Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()).
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/multi.c?r1=1.19r2=1.20ty=u
Index: php-src/ext/curl/multi.c
diff -u php-src/ext/curl/multi.c:1.19 php-src/ext/curl/multi.c:1.20
--- php-src/ext/curl/multi.c:1.19   Wed Aug  3 10:06:44 2005
+++ php-src/ext/curl/multi.cThu Sep  8 10:49:58 2005
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: multi.c,v 1.19 2005/08/03 14:06:44 sniper Exp $ */
+/* $Id: multi.c,v 1.20 2005/09/08 14:49:58 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -111,8 +111,6 @@
ZEND_FETCH_RESOURCE(mh, php_curlm *, z_mh, -1, 
le_curl_multi_handle_name, le_curl_multi_handle);
ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl);
 
-   zval_ptr_dtor(z_ch);
-
--ch-uses;

RETURN_LONG((long) curl_multi_remove_handle(mh-multi, ch-cp));

-- 
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/curl multi.c

2005-09-08 Thread Ilia Alshanetsky
iliaa   Thu Sep  8 10:50:23 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
/php-src/ext/curl   multi.c 
  Log:
  MFH: Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.53r2=1.2027.2.54ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.53 php-src/NEWS:1.2027.2.54
--- php-src/NEWS:1.2027.2.53Wed Sep  7 11:11:29 2005
+++ php-src/NEWSThu Sep  8 10:50:23 2005
@@ -23,6 +23,7 @@
 - Fixed make test to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()). (Ilia)
 - Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
 - Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)
 - Fixed bug #34310 (foreach($arr as $c-d = $x) crashes). (Dmitry)
http://cvs.php.net/diff.php/php-src/ext/curl/multi.c?r1=1.19r2=1.19.2.1ty=u
Index: php-src/ext/curl/multi.c
diff -u php-src/ext/curl/multi.c:1.19 php-src/ext/curl/multi.c:1.19.2.1
--- php-src/ext/curl/multi.c:1.19   Wed Aug  3 10:06:44 2005
+++ php-src/ext/curl/multi.cThu Sep  8 10:50:23 2005
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: multi.c,v 1.19 2005/08/03 14:06:44 sniper Exp $ */
+/* $Id: multi.c,v 1.19.2.1 2005/09/08 14:50:23 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -111,8 +111,6 @@
ZEND_FETCH_RESOURCE(mh, php_curlm *, z_mh, -1, 
le_curl_multi_handle_name, le_curl_multi_handle);
ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl);
 
-   zval_ptr_dtor(z_ch);
-
--ch-uses;

RETURN_LONG((long) curl_multi_remove_handle(mh-multi, ch-cp));

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