Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21681 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43162 invoked by uid 1010); 25 Jan 2006 13:36:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43147 invoked from network); 25 Jan 2006 13:36:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2006 13:36:51 -0000 X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from ([192.38.9.232:3891] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 74/AC-06819-1FE77D34 for ; Wed, 25 Jan 2006 08:36:49 -0500 Received: from foxbox (IGLD-84-228-50-112.inter.net.il [84.228.50.112]) by gw2.emini.dk (Postfix) with ESMTP id 02F3E9F526; Wed, 25 Jan 2006 14:36:44 +0100 (CET) Message-ID: <488c01c621b4$6471b040$6402a8c0@foxbox> Reply-To: "Steph Fox" To: "Markus Fischer" , "Jani Taskinen" Cc: "John Coggeshall" , "Andi Gutmans" , , References: <42D78B4A.7080208@fischer.name> <42D78B4A.7080208@fischer.name> <5.1.0.14.2.20050715120049.02739670@localhost> <431602E7.5050500@fischer.name> <43A00874.8000706@fischer.name> <43D77A82.7030901@fischer.name> Date: Wed, 25 Jan 2006 15:36:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] [Patch] tidy node and getParent From: steph@zend.com ("Steph Fox") It's been in PAT for ages, unless you made any changes to it Markus? http://www.zend.com/zend/week/pat/pat52.txt ----- Original Message ----- From: "Markus Fischer" To: "Jani Taskinen" Cc: "John Coggeshall" ; "Andi Gutmans" ; ; Sent: Wednesday, January 25, 2006 3:17 PM Subject: Re: [PHP-DEV] [Patch] tidy node and getParent > Hi, > > the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023 ) or > do you meant something else? > > thanks, > - Markus > > Jani Taskinen wrote: >> >> If the patch was downloadable somewhere, I bet someone had >> already committed it. :) >> >> --Jani >> >> >> On Wed, 14 Dec 2005, Markus Fischer wrote: >> >>> >>> Hi, >>> >>> any chance for http://bugs.php.net/bug.php?id=34023 this time? >>> >>> thanks, >>> - Markus >>> >>> Markus Fischer wrote: >>>> Hi, >>>> >>>> can this be taken into consideration for HEAD now that RC1 is out of >>>> the door? >>>> >>>> thanks, >>>> - Markus >>>> >>>> Andi Gutmans wrote: >>>> >>>>> We're in a feature freeze so please hold it to after 5.1.0 is out the >>>>> door. You'll be able to commit to head when RC1 is branched off. >>>>> >>>>> Thanks, >>>>> Andi >>>>> >>>>> At 01:31 PM 7/15/2005 -0400, John Coggeshall wrote: >>>>> >>>>>> I'll take a look at it and commit if it looks good. >>>>>> >>>>>> John >>>>>> >>>>>> On Fri, 2005-07-15 at 12:09 +0200, Markus Fischer wrote: >>>>>> > Hi, >>>>>> > >>>>>> > attached is a patch to add the getParent() method for the tidyNode >>>>>> > against HEAD. >>>>>> > >>>>>> > It's just a quick patch for me. I don't know if all tidy version >>>>>> support >>>>>> > the getTidyParent function and if it's memory leak free so someone >>>>>> > should review it first. >>>>>> > >>>>>> > cheers, >>>>>> > - Markus >>>>>> > plain text document attachment (tidy_getParent.diff.txt) >>>>>> > ? tidy_getParent.diff.txt >>>>>> > Index: php_tidy.h >>>>>> > =================================================================== >>>>>> > RCS file: /repository/php-src/ext/tidy/php_tidy.h,v >>>>>> > retrieving revision 1.25 >>>>>> > diff -u -r1.25 php_tidy.h >>>>>> > --- php_tidy.h 25 Apr 2005 20:46:16 -0000 1.25 >>>>>> > +++ php_tidy.h 15 Jul 2005 09:59:44 -0000 >>>>>> > @@ -89,6 +89,7 @@ >>>>>> > TIDY_NODE_METHOD(isJste); >>>>>> > TIDY_NODE_METHOD(isAsp); >>>>>> > TIDY_NODE_METHOD(isPhp); >>>>>> > +TIDY_NODE_METHOD(getParent); >>>>>> > >>>>>> > ZEND_BEGIN_MODULE_GLOBALS(tidy) >>>>>> > char *default_config; >>>>>> > Index: tidy.c >>>>>> > =================================================================== >>>>>> > RCS file: /repository/php-src/ext/tidy/tidy.c,v >>>>>> > retrieving revision 1.65 >>>>>> > diff -u -r1.65 tidy.c >>>>>> > --- tidy.c 25 Apr 2005 20:46:16 -0000 1.65 >>>>>> > +++ tidy.c 15 Jul 2005 09:59:45 -0000 >>>>>> > @@ -291,6 +291,7 @@ >>>>>> > TIDY_NODE_ME(isJste, NULL) >>>>>> > TIDY_NODE_ME(isAsp, NULL) >>>>>> > TIDY_NODE_ME(isPhp, NULL) >>>>>> > + TIDY_NODE_ME(getParent, NULL) >>>>>> > {NULL, NULL, NULL} >>>>>> > }; >>>>>> > >>>>>> > @@ -1668,6 +1669,30 @@ >>>>>> > } >>>>>> > /* }}} */ >>>>>> > >>>>>> > +/* {{{ proto boolean tidyNode::getParent() >>>>>> > + Returns the parent node if available or NULL */ >>>>>> > +TIDY_NODE_METHOD(getParent) >>>>>> > +{ >>>>>> > + TidyNode parent_node; >>>>>> > + PHPTidyObj *newobj; >>>>>> > + TIDY_FETCH_ONLY_OBJECT; >>>>>> > + >>>>>> > + parent_node = tidyGetParent(obj->node); >>>>>> > + if(parent_node) { >>>>>> > + tidy_instanciate(tidy_ce_node, return_value >>>>>> TSRMLS_CC); >>>>>> > + newobj = (PHPTidyObj *) >>>>>> zend_object_store_get_object(return_value TSRMLS_CC); >>>>>> > + newobj->node = parent_node; >>>>>> > + newobj->type = is_node; >>>>>> > + newobj->ptdoc = obj->ptdoc; >>>>>> > + newobj->ptdoc->ref_count++; >>>>>> > + tidy_add_default_properties(newobj, is_node >>>>>> TSRMLS_CC); >>>>>> > + } else { >>>>>> > + ZVAL_NULL(return_value); >>>>>> > + } >>>>>> > +} >>>>>> > +/* }}} */ >>>>>> > + >>>>>> > + >>>>>> > static void _php_tidy_register_nodetypes(INIT_FUNC_ARGS) >>>>>> > { >>>>>> > TIDY_NODE_CONST(ROOT, Root); >>>>>> > >>>>>> > -- >>>>>> > PHP Internals - PHP Runtime Development Mailing List >>>>>> > To unsubscribe, visit: http://www.php.net/unsub.php >>>>>> >>>>>> -- >>>>>> PHP Internals - PHP Runtime Development Mailing List >>>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > > __________ NOD32 1.1377 (20060124) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > >