cvs: php4 /ext/xslt sablot.c xslt.c

From: Date: Sun, 09 Dec 2001 01:18:20 +0000
Subject: cvs: php4 /ext/xslt sablot.c xslt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8526@lists.php.net to get a copy of this message
sterling Sat Dec 8 20:18:20 2001 EDT Modified files: /php4/ext/xslt sablot.c xslt.c Log: Align comments in xslt.c First try at fixing funny resource free'ing problems with objects, don't perform a zval seperation when we're directly saving a pointer to the SAX or Scheme handlers Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.29 php4/ext/xslt/sablot.c:1.30 --- php4/ext/xslt/sablot.c:1.29 Fri Dec 7 13:16:28 2001 +++ php4/ext/xslt/sablot.c Sat Dec 8 20:18:19 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sablot.c,v 1.29 2001/12/07 18:16:28 mfischer Exp $ */ +/* $Id: sablot.c,v 1.30 2001/12/09 01:18:19 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -233,9 +233,6 @@ zend_hash_get_current_data(sax_handlers, (void **) &handler) == SUCCESS; zend_hash_move_forward(sax_handlers)) { - /* Allocate the handler */ - SEPARATE_ZVAL(handler); - key_type = zend_hash_get_current_key(sax_handlers, &string_key, &num_key, 0); if (key_type == HASH_KEY_IS_LONG) { convert_to_string_ex(handler); @@ -246,18 +243,21 @@ /* Document handlers (document start, document end) */ if (strcasecmp(string_key, "document") == 0) { + SEPERATE_ZVAL(handler); register_sax_handler_pair(&XSLT_SAX(handle).doc_start, &XSLT_SAX(handle).doc_end, handler); } /* Element handlers, start of an element, and end of an element */ else if (strcasecmp(string_key, "element") == 0) { + SEPERATE_ZVAL(handler); register_sax_handler_pair(&XSLT_SAX(handle).element_start, &XSLT_SAX(handle).element_end, handler); } /* Namespace handlers, start of a namespace, end of a namespace */ else if (strcasecmp(string_key, "namespace") == 0) { + SEPERATE_ZVAL(handler); register_sax_handler_pair(&XSLT_SAX(handle).namespace_start, &XSLT_SAX(handle).namespace_end, handler); @@ -317,8 +317,6 @@ for (zend_hash_internal_pointer_reset(scheme_handlers); zend_hash_get_current_data(scheme_handlers, (void **) &handler) == SUCCESS; zend_hash_move_forward(scheme_handlers)) { - - SEPARATE_ZVAL(handler); key_type = zend_hash_get_current_key(scheme_handlers, &string_key, &num_key, 0); if (key_type == HASH_KEY_IS_LONG) { Index: php4/ext/xslt/xslt.c diff -u php4/ext/xslt/xslt.c:1.21 php4/ext/xslt/xslt.c:1.22 --- php4/ext/xslt/xslt.c:1.21 Mon Dec 3 03:28:11 2001 +++ php4/ext/xslt/xslt.c Sat Dec 8 20:18:19 2001 @@ -217,9 +217,9 @@ zval **user_args, zval **retval) { - zval ***argv; /* Argument container, maps around for call_user_function_ex() */ - int error; /* Error container */ - int idx; /* Idx, when looping through and free'ing the arguments */ + zval ***argv; /* Argument container, maps around for call_user_function_ex() */ + int error; /* Error container */ + int idx; /* Idx, when looping through and free'ing the arguments */ TSRMLS_FETCH(); /* For TS mode, fetch the executor globals */ argv = emalloc(argc * sizeof(zval **));

« previous php.cvs (#8526) next »