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

2004-01-22 Thread changelog
changelog   Thu Jan 22 20:32:07 2004 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1515r2=1.1516ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.1515 php-src/ChangeLog:1.1516
--- php-src/ChangeLog:1.1515Wed Jan 21 20:32:08 2004
+++ php-src/ChangeLog   Thu Jan 22 20:32:05 2004
@@ -1,3 +1,71 @@
+2004-01-22  Rob Richards  [EMAIL PROTECTED]
+
+* ext/dom/tests/dom003.phpt:
+  update test
+
+2004-01-22  Marcus Boerger  [EMAIL PROTECTED]
+
+* ext/simplexml/tests/bug27010.phpt:
+  Add new test
+
+* ext/simplexml/tests/007.phpt
+  ext/simplexml/tests/015.phpt
+  ext/simplexml/tests/016.phpt
+  ext/simplexml/tests/bug24392.phpt:
+  Update tests
+
+2004-01-22  Rob Richards  [EMAIL PROTECTED]
+
+* ext/simplexml/php_simplexml.h
+  ext/simplexml/simplexml.c:
+  Fix bug #27010: segfault after returning nodes with children()
+  Fix segfault in match_ns when matching prefix and node without ns
+  some general cleanup and code consilidation
+  better write handling - engine support dependent
+  better isset handling - engine support dependent
+  namespace fixes for reading/writing
+
+* ext/dom/attr.c
+  ext/dom/cdatasection.c
+  ext/dom/comment.c
+  ext/dom/document.c
+  ext/dom/documentfragment.c
+  ext/dom/element.c
+  ext/dom/entityreference.c
+  ext/dom/namednodemap.c
+  ext/dom/nodelist.c
+  ext/dom/php_dom.c
+  ext/dom/php_dom.h
+  ext/dom/processinginstruction.c
+  ext/dom/text.c
+  ext/dom/xpath.c:
+  update constructors so they cant be called statically
+
+2004-01-22  Marcus Boerger  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_default_classes.c:
+  Fix internal access to exception properties
+
+2004-01-22  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/oci8/config.w32:
+  add collections support to win32 build
+
+* ext/oci8/oci8.c:
+  add missing protos
+  and some minor changes
+
+* ext/oci8/oci8.c:
+  MFB
+  oci_lob_save() should be removed indeed, but we're already in feature
+  freeze =(
+
+2004-01-22  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  ext/standard/fsock.c:
+  Nuke unused variable
+
 2004-01-21  Jani Taskinen  [EMAIL PROTECTED]
 
 * ext/standard/tests/file/bug26938.phpt:


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

2004-01-22 Thread changelog
changelog   Thu Jan 22 20:32:09 2004 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.390r2=1.391ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.390 ZendEngine2/ChangeLog:1.391
--- ZendEngine2/ChangeLog:1.390 Mon Jan 19 20:32:06 2004
+++ ZendEngine2/ChangeLog   Thu Jan 22 20:32:09 2004
@@ -1,3 +1,8 @@
+2004-01-22  Marcus Boerger  [EMAIL PROTECTED]
+
+* zend_default_classes.c:
+  Fix internal access to exception properties
+
 2004-01-19  Andi Gutmans  [EMAIL PROTECTED]
 
 * zend_execute.c
@@ -2928,7 +2933,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.390 2004/01/20 01:32:06 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.391 2004/01/23 01:32:09 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -4652,7 +4657,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.390 2004/01/20 01:32:06 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.391 2004/01/23 01:32:09 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


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

2004-01-22 Thread Antony Dovgal
tony2001Thu Jan 22 03:05:16 2004 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  MFB
  oci_lob_save() should be removed indeed, but we're already in feature freeze =(
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.236r2=1.237ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.236 php-src/ext/oci8/oci8.c:1.237
--- php-src/ext/oci8/oci8.c:1.236   Wed Jan 21 11:18:58 2004
+++ php-src/ext/oci8/oci8.c Thu Jan 22 03:05:14 2004
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.236 2004/01/21 16:18:58 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.237 2004/01/22 08:05:14 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -785,7 +785,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.236 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.237 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -3842,8 +3842,8 @@
 
if (offparam == -1) {
offset = curloblen;
-   } else if ((ub4) offparam = curloblen) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset 
smaller than current LOB-Size - appending);
+   } else if (offparam = curloblen) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset is 
bigger than current LOB-Size - appending);
offset = curloblen;
} else {
offset = offparam;
@@ -3852,7 +3852,6 @@
WRONG_PARAM_COUNT;
}
 
-   offset++;
convert_to_string_ex(arg);
loblen = Z_STRLEN_PP(arg);


-- 
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

2004-01-22 Thread Antony Dovgal
tony2001Thu Jan 22 03:39:51 2004 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  add missing protos
  and some minor changes
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.237r2=1.238ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.237 php-src/ext/oci8/oci8.c:1.238
--- php-src/ext/oci8/oci8.c:1.237   Thu Jan 22 03:05:14 2004
+++ php-src/ext/oci8/oci8.c Thu Jan 22 03:39:50 2004
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.237 2004/01/22 08:05:14 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.238 2004/01/22 08:39:50 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -785,7 +785,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.237 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.238 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -3798,7 +3798,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_save()
+/* {{{ proto bool oci_lob_save( string data [, int offset ])
Saves a large object */
 PHP_FUNCTION(oci_lob_save)
 {
@@ -3892,7 +3892,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_import()
+/* {{{ proto bool oci_lob_import( string filename )
Saves a large object to file */
 PHP_FUNCTION(oci_lob_import)
 {
@@ -4002,7 +4002,7 @@
 }
 /* }}} */
 
-/* {{{ proto string oci_lob_read()
+/* {{{ proto string oci_lob_read( int length )
Reads particular part of a large object */
 PHP_FUNCTION(oci_lob_read)
 {
@@ -4105,7 +4105,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_seek()
+/* {{{ proto bool oci_lob_seek( int offset [, int whence ])
Moves the pointer of a LOB */
 PHP_FUNCTION(oci_lob_seek)
 {
@@ -4189,7 +4189,7 @@
 }
 /* }}} */
 
-/* {{{ proto int oci_lob_write()
+/* {{{ proto int oci_lob_write( string string [, int length ])
Writes data to current position of a LOB */
 PHP_FUNCTION(oci_lob_write)
 {
@@ -4280,7 +4280,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_append()
+/* {{{ proto bool oci_lob_append( object lob )
Appends data from a LOB to another LOB */
 PHP_FUNCTION(oci_lob_append)
 {
@@ -4311,6 +4311,7 @@
}

if (zend_get_parameters_ex(1, arg) == SUCCESS) {
+   convert_to_object_ex(arg);
if ((inx = _oci_get_ocidesc(*arg,from_descr TSRMLS_CC)) == 0) 
{
RETURN_FALSE;
}
@@ -4355,7 +4356,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_truncate()
+/* {{{ proto bool oci_lob_truncate( [ int length ])
Truncates a LOB */
 PHP_FUNCTION(oci_lob_truncate)
 {
@@ -4424,7 +4425,7 @@
 }
 /* }}} */
 
-/* {{{ proto int oci_lob_erase()
+/* {{{ proto int oci_lob_erase( [ int offset [, int length ] ] )
Erases a specified portion of the internal LOB, starting at a specified offset */
 PHP_FUNCTION(oci_lob_erase)
 {
@@ -4501,7 +4502,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_flush()
+/* {{{ proto bool oci_lob_flush( [ int flag ] )
Flushes the LOB buffer */
 PHP_FUNCTION(oci_lob_flush)
 {
@@ -4549,7 +4550,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool ocisetbufferinglob()
+/* {{{ proto bool ocisetbufferinglob( boolean flag )
Enables/disables buffering for a LOB */
 PHP_FUNCTION(ocisetbufferinglob)
 {
@@ -4671,7 +4672,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_copy()
+/* {{{ proto bool oci_lob_copy( object lob_to, object lob_from [, int length ] )
Copies data from a LOB to another LOB */
 PHP_FUNCTION(oci_lob_copy)
 {
@@ -4686,9 +4687,8 @@
WRONG_PARAM_COUNT;
}
 
-   if ((*arg1)-type != IS_OBJECT || (*arg2)-type != IS_OBJECT) {
-   RETURN_FALSE;
-   }
+   convert_to_object_ex(arg1);
+   convert_to_object_ex(arg2);

if ((inx = _oci_get_ocidesc(*arg1,descr TSRMLS_CC)) == 0 || (inx = 
_oci_get_ocidesc(*arg2,from_descr TSRMLS_CC)) == 0) {
RETURN_FALSE;
@@ -4743,7 +4743,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_is_equal()
+/* {{{ proto bool oci_lob_is_equal( object lob1, object lob2 )
Tests to see if two LOB/FILE locators are equal */
 PHP_FUNCTION(oci_lob_is_equal)
 {
@@ -4758,10 +4758,9 @@
WRONG_PARAM_COUNT;
}
 
-   if ((*arg1)-type != IS_OBJECT || (*arg2)-type != IS_OBJECT) {
-   RETURN_FALSE;
-   }
-
+   convert_to_object_ex(arg1);
+   convert_to_object_ex(arg2);
+   
if ((inx = _oci_get_ocidesc(*arg1,first_descr TSRMLS_CC)) == 0 || 
(inx = _oci_get_ocidesc(*arg2,second_descr TSRMLS_CC)) == 0) {
RETURN_FALSE;
}

-- 
PHP CVS Mailing List (http://www.php.net/)

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

2004-01-22 Thread Antony Dovgal
tony2001Thu Jan 22 09:42:18 2004 EDT

  Modified files:  
/php-src/ext/oci8   config.w32 
  Log:
  add collections support to win32 build
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/config.w32?r1=1.2r2=1.3ty=u
Index: php-src/ext/oci8/config.w32
diff -u php-src/ext/oci8/config.w32:1.2 php-src/ext/oci8/config.w32:1.3
--- php-src/ext/oci8/config.w32:1.2 Wed Jan  7 15:06:29 2004
+++ php-src/ext/oci8/config.w32 Thu Jan 22 09:42:17 2004
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.2 2004/01/07 20:06:29 wez Exp $
+// $Id: config.w32,v 1.3 2004/01/22 14:42:17 tony2001 Exp $
 // vim:ft=javascript
 
 ARG_WITH(oci8, OCI8 support, no);
@@ -14,6 +14,7 @@
AC_DEFINE('HAVE_OCI8_TEMP_LOB', 1);
AC_DEFINE('HAVE_OCI8', 1);
AC_DEFINE('HAVE_OCI8_ATTR_STATEMENT', 1);
+   AC_DEFINE('PHP_OCI8_HAVE_COLLECTIONS', 1);
 
} else {
WARNING(oci8 not enabled; libraries and headers not found);

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



[PHP-CVS] cvs: php-src /ext/dom attr.c cdatasection.c comment.c document.c documentfragment.c element.c entityreference.c namednodemap.c nodelist.c php_dom.c php_dom.h processinginstruction.c text.c xpath.c

2004-01-22 Thread Rob Richards
rrichards   Thu Jan 22 16:16:06 2004 EDT

  Modified files:  
/php-src/ext/domattr.c cdatasection.c comment.c document.c 
documentfragment.c element.c entityreference.c 
namednodemap.c nodelist.c php_dom.c php_dom.h 
processinginstruction.c text.c xpath.c 
  Log:
  update constructors so they cant be called statically
  http://cvs.php.net/diff.php/php-src/ext/dom/attr.c?r1=1.9r2=1.10ty=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.9 php-src/ext/dom/attr.c:1.10
--- php-src/ext/dom/attr.c:1.9  Thu Jan  8 03:15:16 2004
+++ php-src/ext/dom/attr.c  Thu Jan 22 16:16:05 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.9 2004/01/08 08:15:16 andi Exp $ */
+/* $Id: attr.c,v 1.10 2004/01/22 21:16:05 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -54,13 +54,12 @@
char *name, *value = NULL;
int name_len, value_len;
 
-   id = getThis();
-   intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
-
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|s, name, name_len, 
value, value_len) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os|s, 
id, dom_attr_class_entry, name, name_len, value, value_len) == FAILURE) {
return;
}
 
+   intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
+
if (name_len == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Attribute name is 
required);
RETURN_FALSE;
http://cvs.php.net/diff.php/php-src/ext/dom/cdatasection.c?r1=1.6r2=1.7ty=u
Index: php-src/ext/dom/cdatasection.c
diff -u php-src/ext/dom/cdatasection.c:1.6 php-src/ext/dom/cdatasection.c:1.7
--- php-src/ext/dom/cdatasection.c:1.6  Thu Jan  8 03:15:16 2004
+++ php-src/ext/dom/cdatasection.c  Thu Jan 22 16:16:05 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: cdatasection.c,v 1.6 2004/01/08 08:15:16 andi Exp $ */
+/* $Id: cdatasection.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -40,7 +40,7 @@
{NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_cdatasection_cdatasection([string value]); */
+/* {{{ proto domnode dom_cdatasection_cdatasection(string value); */
 PHP_FUNCTION(dom_cdatasection_cdatasection)
 {
 
@@ -50,13 +50,10 @@
char *value = NULL;
int value_len;
 
-   id = getThis();
-   
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, value, value_len) 
== FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os, 
id, dom_cdatasection_class_entry, value, value_len) == FAILURE) {
return;
}
 
-
nodep = xmlNewCDataBlock(NULL, (xmlChar *) value, value_len);
 
if (!nodep)
http://cvs.php.net/diff.php/php-src/ext/dom/comment.c?r1=1.6r2=1.7ty=u
Index: php-src/ext/dom/comment.c
diff -u php-src/ext/dom/comment.c:1.6 php-src/ext/dom/comment.c:1.7
--- php-src/ext/dom/comment.c:1.6   Thu Jan  8 03:15:16 2004
+++ php-src/ext/dom/comment.c   Thu Jan 22 16:16:05 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: comment.c,v 1.6 2004/01/08 08:15:16 andi Exp $ */
+/* $Id: comment.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -50,9 +50,7 @@
char *value = NULL;
int value_len;
 
-   id = getThis();
-   
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, value, value_len) 
== FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O|s, 
id, dom_comment_class_entry, value, value_len) == FAILURE) {
return;
}
 
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.46r2=1.47ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.46 php-src/ext/dom/document.c:1.47
--- php-src/ext/dom/document.c:1.46 Tue Jan 20 06:35:32 2004
+++ php-src/ext/dom/document.c  Thu Jan 22 16:16:05 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.46 2004/01/20 11:35:32 rrichards Exp $ */
+/* $Id: document.c,v 1.47 2004/01/22 21:16:05 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1092,10 +1092,8 @@
dom_object *intern;
char *encoding, *version = NULL;
int encoding_len = 0, version_len = 0, refcount;
-
-   id = getThis();

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |ss, version, 
version_len, encoding, encoding_len) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O|ss, 
id, dom_document_class_entry, version, version_len, encoding, 

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

2004-01-22 Thread Rob Richards
rrichards   Thu Jan 22 16:30:16 2004 EDT

  Modified files:  
/php-src/ext/simplexml  php_simplexml.h simplexml.c 
  Log:
  Fix bug #27010: segfault after returning nodes with children()
  Fix segfault in match_ns when matching prefix and node without ns
  some general cleanup and code consilidation
  better write handling - engine support dependent
  better isset handling - engine support dependent
  namespace fixes for reading/writing
  
  http://cvs.php.net/diff.php/php-src/ext/simplexml/php_simplexml.h?r1=1.16r2=1.17ty=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.16 
php-src/ext/simplexml/php_simplexml.h:1.17
--- php-src/ext/simplexml/php_simplexml.h:1.16  Sun Jan 18 10:15:55 2004
+++ php-src/ext/simplexml/php_simplexml.h   Thu Jan 22 16:30:14 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.16 2004/01/18 15:15:55 helly Exp $ */
+/* $Id: php_simplexml.h,v 1.17 2004/01/22 21:30:14 rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -59,7 +59,6 @@
HashTable *properties;
xmlXPathContextPtr xpath;
struct {
-   php_libxml_node_ptr   *node;
int   itertype;
char  *name;
char  *nsprefix;
@@ -70,9 +69,8 @@
 
 #define SXE_ITER_NONE 0
 #define SXE_ITER_ELEMENT 1
-#define SXE_ITER_ATTR 2
-#define SXE_ITER_CHILD 3
-#define SXE_ITER_ATTRLIST 4
+#define SXE_ITER_CHILD 2
+#define SXE_ITER_ATTRLIST 3
 
 #ifdef ZTS
 #define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v)
http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.121r2=1.122ty=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.121 php-src/ext/simplexml/simplexml.c:1.122
--- php-src/ext/simplexml/simplexml.c:1.121 Wed Jan 21 09:04:46 2004
+++ php-src/ext/simplexml/simplexml.c   Thu Jan 22 16:30:14 2004
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.121 2004/01/21 14:04:46 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.122 2004/01/22 21:30:14 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -121,14 +121,41 @@
return 1;
}

-   if (!xmlStrcmp(node-ns-href, name)) {
+   if (node-ns  !xmlStrcmp(node-ns-href, name)) {
return 1;
}   
 
return 0;
 }
 /* }}} */
-   
+
+/* {{{ sxe_get_element_node()
+ */
+static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, long offset, 
xmlNodePtr node) {
+   long nodendx = 0;
+
+   if (sxe-iter.type == SXE_ITER_NONE) {
+   return NULL;
+   }
+   while (node  nodendx = offset) {
+   SKIP_TEXT(node)
+   if (node-type == XML_ELEMENT_NODE  match_ns(sxe, node, 
sxe-iter.nsprefix)) {
+   if (sxe-iter.type == SXE_ITER_CHILD || (
+   sxe-iter.type == SXE_ITER_ELEMENT  
!xmlStrcmp(node-name, sxe-iter.name))) {
+   if (nodendx == offset) {
+   break;
+   }
+   nodendx++;
+   }
+   }
+next_iter:
+   node = node-next;
+   }
+
+   return node;
+}
+/* }}} */
+
 /* {{{ sxe_prop_dim_read()
  */
 static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, 
zend_bool attribs, zend_bool silent TSRMLS_DC)
@@ -140,7 +167,6 @@
xmlAttrPtr  attr;
zvaltmp_zv;
int nodendx = 0;
-   char*prefix;
 
sxe = php_sxe_fetch_object(object TSRMLS_CC);
 
@@ -179,7 +205,7 @@
while (attr  nodendx = Z_LVAL_P(member)) {
if (match_ns(sxe, (xmlNodePtr) attr, 
sxe-iter.nsprefix)) {
if (nodendx == 
Z_LVAL_P(member)) {
-   _node_as_zval(sxe, 
(xmlNodePtr) attr, return_value, SXE_ITER_NONE, NULL, NULL TSRMLS_CC);
+   _node_as_zval(sxe, 
(xmlNodePtr) attr, return_value, SXE_ITER_NONE, NULL, sxe-iter.nsprefix TSRMLS_CC);
break;
}
nodendx++;
@@ -189,7 +215,7 @@
} else {
while (attr) {
if (!xmlStrcmp(attr-name, name)  
match_ns(sxe, (xmlNodePtr) attr, sxe-iter.nsprefix)) {
-

[PHP-CVS] cvs: php-src /ext/simplexml/tests 007.phpt 015.phpt 016.phpt bug24392.phpt

2004-01-22 Thread Marcus Boerger
helly   Thu Jan 22 16:47:54 2004 EDT

  Modified files:  
/php-src/ext/simplexml/tests007.phpt 015.phpt 016.phpt 
bug24392.phpt 
  Log:
  Update tests
  
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/007.phpt?r1=1.6r2=1.7ty=u
Index: php-src/ext/simplexml/tests/007.phpt
diff -u php-src/ext/simplexml/tests/007.phpt:1.6 
php-src/ext/simplexml/tests/007.phpt:1.7
--- php-src/ext/simplexml/tests/007.phpt:1.6Sun Jan 18 10:14:03 2004
+++ php-src/ext/simplexml/tests/007.phptThu Jan 22 16:47:54 2004
@@ -66,20 +66,20 @@
   }
 }
 ===Array===
-object(simplexml_element)#2 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(5) elem1
 }
-object(simplexml_element)#6 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(5) first
 }
 ===Set===
-object(simplexml_element)#6 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(8) Changed1
 }
-object(simplexml_element)#5 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(2) 12
 }
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/015.phpt?r1=1.4r2=1.5ty=u
Index: php-src/ext/simplexml/tests/015.phpt
diff -u php-src/ext/simplexml/tests/015.phpt:1.4 
php-src/ext/simplexml/tests/015.phpt:1.5
--- php-src/ext/simplexml/tests/015.phpt:1.4Wed Jan 21 06:32:30 2004
+++ php-src/ext/simplexml/tests/015.phptThu Jan 22 16:47:54 2004
@@ -36,20 +36,20 @@
 var_dump($people-person[1]['name']);
 ?
 ===DONE===
---EXPECT--
-object(simplexml_element)#4 (1) {
+--EXPECTF--
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Joe
 }
-object(simplexml_element)#4 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Joe
 }
-object(simplexml_element)#1 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Joe
 }
-object(simplexml_element)#1 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Boe
 }
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/016.phpt?r1=1.4r2=1.5ty=u
Index: php-src/ext/simplexml/tests/016.phpt
diff -u php-src/ext/simplexml/tests/016.phpt:1.4 
php-src/ext/simplexml/tests/016.phpt:1.5
--- php-src/ext/simplexml/tests/016.phpt:1.4Sat Jan 17 14:41:32 2004
+++ php-src/ext/simplexml/tests/016.phptThu Jan 22 16:47:54 2004
@@ -28,29 +28,29 @@
 
 ?
 ===DONE===
---EXPECT--
-object(simplexml_element)#4 (1) {
+--EXPECTF--
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Joe
 }
-object(simplexml_element)#2 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(6) JoeFoo
 }
-object(simplexml_element)#5 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(9) JoeFooBar
 }
 ---[0]---
-object(simplexml_element)#3 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(3) Joe
 }
-object(simplexml_element)#2 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(6) JoeFoo
 }
-object(simplexml_element)#5 (1) {
+object(simplexml_element)#%d (1) {
   [0]=
   string(9) JoeFooBar
 }
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/bug24392.phpt?r1=1.2r2=1.3ty=u
Index: php-src/ext/simplexml/tests/bug24392.phpt
diff -u php-src/ext/simplexml/tests/bug24392.phpt:1.2 
php-src/ext/simplexml/tests/bug24392.phpt:1.3
--- php-src/ext/simplexml/tests/bug24392.phpt:1.2   Sun Oct  5 09:53:16 2003
+++ php-src/ext/simplexml/tests/bug24392.phpt   Thu Jan 22 16:47:54 2004
@@ -2,9 +2,6 @@
 Bug #24392 (empty namespaces causing confusion)
 --SKIPIF--
 ?php if (!extension_loaded(simplexml)) print skip simplexml extension is not 
loaded; ?
---POST--
---GET--
---INI--
 --FILE--
 ?php 
 $s = simplexml_load_file(dirname(__FILE__).'/bug24392.xml');

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



[PHP-CVS] cvs: php-src /ext/simplexml/tests bug27010.phpt

2004-01-22 Thread Marcus Boerger
helly   Thu Jan 22 16:55:10 2004 EDT

  Added files: 
/php-src/ext/simplexml/testsbug27010.phpt 
  Log:
  Add new test
  

http://cvs.php.net/co.php/php-src/ext/simplexml/tests/bug27010.phpt?r=1.1p=1
Index: php-src/ext/simplexml/tests/bug27010.phpt
+++ php-src/ext/simplexml/tests/bug27010.phpt
--TEST--
#27010: segfault and node text not displayed when returned from children()
--FILE--
?php

$xml=EOF
drinks xmlns:hot=http://www.example.com/hot;
 hot:drinkhot:nameCoffee/hot:name/hot:drink
 hot:drinkhot:nameTea/hot:name/hot:drink
 drinknameCola/name/drink
 drinknameJuice/name/drink
/drinks
EOF;

$sxe = simplexml_load_string($xml);

foreach ($sxe as $element_name = $element) {
print $element_name is $element-name\n;
}

foreach ($sxe-children('http://www.example.com/hot') as $element_name = $element) {
print $element_name is $element-name\n;
}
?
===DONE===
--EXPECT--
drink is Cola
drink is Juice
drink is Coffee
drink is Tea
===DONE===

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



[PHP-CVS] cvs: php-src /ext/dom/tests dom003.phpt

2004-01-22 Thread Rob Richards
rrichards   Thu Jan 22 17:12:22 2004 EDT

  Modified files:  
/php-src/ext/dom/tests  dom003.phpt 
  Log:
  update test
  
http://cvs.php.net/diff.php/php-src/ext/dom/tests/dom003.phpt?r1=1.3r2=1.4ty=u
Index: php-src/ext/dom/tests/dom003.phpt
diff -u php-src/ext/dom/tests/dom003.phpt:1.3 php-src/ext/dom/tests/dom003.phpt:1.4
--- php-src/ext/dom/tests/dom003.phpt:1.3   Thu Dec 11 08:36:42 2003
+++ php-src/ext/dom/tests/dom003.phpt   Thu Jan 22 17:12:21 2004
@@ -21,12 +21,9 @@
 ?
 --EXPECTF--
 --- Catch exception with try/catch
-object(domexception)#3 (7) {
+object(domexception)#%d (6) {
   [code]=
   int(3)
-  [trace]=
-  array(0) {
-  }
 }
 --- Don't catch exception with try/catch
 

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