zeev            Tue Feb 10 04:30:42 2004 EDT

  Modified files:              
    /php-src/ext/simplexml      simplexml.c 
  Log:
  Implement get callback for SimpleXML (it now supports pre/post increment
  as well as binary-assign-ops)
  
  
http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.125&r2=1.126&ty=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.125 php-src/ext/simplexml/simplexml.c:1.126
--- php-src/ext/simplexml/simplexml.c:1.125     Sun Feb  8 12:25:54 2004
+++ php-src/ext/simplexml/simplexml.c   Tue Feb 10 04:30:38 2004
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.125 2004/02/08 17:25:54 zeev Exp $ */
+/* $Id: simplexml.c,v 1.126 2004/02/10 09:30:38 zeev Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1013,6 +1013,21 @@
 }
 /* }}} */
 
+static zval *sxe_get_value(zval *z TSRMLS_DC)
+{
+       zval *retval;
+
+       MAKE_STD_ZVAL(retval);
+
+       if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) {
+               zend_error(E_ERROR, "Unable to cast node to string");
+       }
+
+       retval->refcount = 0;
+       return retval;
+}
+
+
 static zend_object_handlers sxe_object_handlers = {
        ZEND_OBJECTS_STORE_HANDLERS,
        sxe_property_read,
@@ -1020,7 +1035,7 @@
        sxe_dimension_read,
        sxe_dimension_write,
        NULL,
-       NULL,
+       sxe_get_value,                  /* get */
        NULL,
        sxe_property_exists,
        sxe_property_delete,
@@ -1577,7 +1592,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.125 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.126 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");

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

Reply via email to