cvs: php-src /ext/xsl php_xsl.c

From: Date: Mon, 30 Aug 2004 14:59:31 +0000
Subject: cvs: php-src /ext/xsl php_xsl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28503@lists.php.net to get a copy of this message
rrichards Mon Aug 30 10:59:31 2004 EDT Modified files: /php-src/ext/xsl php_xsl.c Log: remove clone functionality http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.25&r2=1.26&ty=u Index: php-src/ext/xsl/php_xsl.c diff -u php-src/ext/xsl/php_xsl.c:1.25 php-src/ext/xsl/php_xsl.c:1.26 --- php-src/ext/xsl/php_xsl.c:1.25 Tue Aug 24 09:33:11 2004 +++ php-src/ext/xsl/php_xsl.c Mon Aug 30 10:59:30 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.c,v 1.25 2004/08/24 13:33:11 rrichards Exp $ */ +/* $Id: php_xsl.c,v 1.26 2004/08/30 14:59:30 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -67,61 +67,6 @@ ZEND_GET_MODULE(xsl) #endif -/* {{{ xsl_objects_clone */ -void xsl_objects_clone(void *object, void **object_clone TSRMLS_DC) -{ - xsl_object *intern = (xsl_object *) object; - xsl_object *clone; - zval *tmp; - zend_class_entry *class_type; - - class_type = intern->std.ce; - - clone = emalloc(sizeof(xsl_object)); - clone->std.ce = class_type; - clone->std.in_get = 0; - clone->std.in_set = 0; - clone->ptr = NULL; - clone->prop_handler = NULL; - clone->parameter = NULL; - clone->hasKeys = intern->hasKeys; - clone->registerPhpFunctions = 0; - clone->node_list = NULL; - - ALLOC_HASHTABLE(clone->std.properties); - zend_hash_init(clone->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); - zend_hash_copy(clone->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - ALLOC_HASHTABLE(clone->parameter); - zend_hash_init(clone->parameter, 0, NULL, ZVAL_PTR_DTOR, 0); - - *object_clone = (void *) clone; -} -/* }}} */ - -zend_object_value xsl_objects_store_clone_obj(zval *zobject TSRMLS_DC) -{ - zend_object_value retval; - void *new_object; - xsl_object *intern; - struct _store_object *obj; - zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); - - obj = &EG(objects_store).object_buckets[handle].bucket.obj; - - if (obj->clone == NULL) { - zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name); - } - - obj->clone(obj->object, &new_object TSRMLS_CC); - - retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS_CC); - intern = (xsl_object *) new_object; - intern->handle = retval.handle; - retval.handlers = Z_OBJ_HT_P(zobject); - - return retval; -} - /* {{{ xsl_objects_free_storage */ void xsl_objects_free_storage(void *object TSRMLS_DC) { @@ -173,7 +118,7 @@ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); ALLOC_HASHTABLE(intern->parameter); zend_hash_init(intern->parameter, 0, NULL, ZVAL_PTR_DTOR, 0); - retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) xsl_objects_free_storage, xsl_objects_clone TSRMLS_CC); + retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) xsl_objects_free_storage, NULL TSRMLS_CC); intern->handle = retval.handle; retval.handlers = &xsl_object_handlers; return retval; @@ -188,7 +133,7 @@ zend_class_entry ce; memcpy(&xsl_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - xsl_object_handlers.clone_obj = xsl_objects_store_clone_obj; + xsl_object_handlers.clone_obj = NULL; REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, php_xsl_xsltprocessor_class_functions, xsl_xsltprocessor_class_entry); #if HAVE_XSL_EXSLT

« previous php.cvs (#28503) next »