]> granicus.if.org Git - php/commitdiff
MFH: remove clone functionality
authorRob Richards <rrichards@php.net>
Mon, 30 Aug 2004 15:00:07 +0000 (15:00 +0000)
committerRob Richards <rrichards@php.net>
Mon, 30 Aug 2004 15:00:07 +0000 (15:00 +0000)
ext/xsl/php_xsl.c

index 6aa442fb1028f172af5c601c4b5cc8e59521c537..70c8419012600f94c3f340dea4769ede04da8ac5 100644 (file)
@@ -67,61 +67,6 @@ zend_module_entry xsl_module_entry = {
 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_object_value xsl_objects_new(zend_class_entry *class_type TSRMLS_DC)
        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 @@ PHP_MINIT_FUNCTION(xsl)
        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