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
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);
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
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.cRCS 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);
I've created a bug report ( http://bugs.php.net/34023 ) so it doesn't
get forgotten.
- 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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);
Hey Markus,
As we're waiting for Wez to commit fixes, and this patch is just
adding a new function (and not messing with existing functionality),
I think it's OK to include...
We'll have to roll RC2.
Rasmus, Wez - Any idea about timing for PDO? Are all these bugs
crucial to fix for 5.1?
Andi
At 12:20 PM 8/31/2005, 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
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.cRCS 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);
I seem to have lost the patch, can someone send it to me again and I'll
apply it? Andi it's okay I include this in 5.1?
John
Hey Markus,
As we're waiting for Wez to commit fixes, and this patch is just
adding a new function (and not messing with existing functionality),
I think it's OK to include...
We'll have to roll RC2.
Rasmus, Wez - Any idea about timing for PDO? Are all these bugs
crucial to fix for 5.1?Andi
At 12:20 PM 8/31/2005, 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
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.cRCS 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);
Andi Gutmans wrote:
Hey Markus,
As we're waiting for Wez to commit fixes, and this patch is just adding
a new function (and not messing with existing functionality), I think
it's OK to include...
We'll have to roll RC2.
Rasmus, Wez - Any idea about timing for PDO? Are all these bugs crucial
to fix for 5.1?
I still think #34199 needs to be fixed. We have already analyzed it and
the fix seems straightforward. I was hoping Stas would fix it since it
is in his code.
As for the PDO ones. I went through them today. I really don't have
anybody to look at the Windows-related problems. But of the non-Windows
ones I see:
#33533 - Informix (we have no Informix experience)
#33707 - Oracle
#33876 - PostgreSQL (not sure this one is fixable in PHP)
#33970 - MySQL
#34185 - SQLite (can someone reproduce this one?)
#34203 - PostgreSQL
#34233 - PostgreSQL (reproduce?)
#34235 - (Markus?)
#34270 - Which DB? (reproduce?)
So I can try to get someone to look at #33707, #33970, and #34203. The
others either don't have enough info or I plain don't understand them
well enough to get someone up to speed on how to fix them.
-Rasmus
Rasmus, Wez - Any idea about timing for PDO? Are all these bugs
crucial to fix for 5.1?
Yeah. I don't anticipate each bug as taking a long time to fix, it's
just finding the time to do it. Although we have a long weekend this
weekend, we have family visiting us and decorating to do (not my idea,
but...)
I'll see if I can squeeze some bug fixes in this weekend (and next),
but I think I'm going to be really limited on time until php|works.
--Wez.
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);
If the patch was downloadable somewhere, I bet someone had
already committed it. :)
--Jani
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);--
--
--
Give me your money at @ http://pecl.php.net/wishlist.php/sniper
Donating money may make me happier and friendlier for a limited period!
Death to all 4 letter abbreviations starting with P!
It is. Try PAT.
----- Original Message -----
From: "Jani Taskinen" sniper@iki.fi
To: "Markus Fischer" markus@fischer.name
Cc: "John Coggeshall" john@coggeshall.org; "Andi Gutmans" andi@zend.com;
internals@lists.php.net; iliaa@php.net
Sent: Wednesday, December 14, 2005 2:11 PM
Subject: Re: [PHP-DEV] [Patch] tidy node and getParent
If the patch was downloadable somewhere, I bet someone had already committed it. :) --Jani
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);--
--
--
Give me your money at @ http://pecl.php.net/wishlist.php/sniper
Donating money may make me happier and friendlier for a limited period!
Death to all 4 letter abbreviations starting with P!
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
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);
Hi,
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023 )
or do you meant something else?
Jani meant that it would be better to put this patch as a downloadable file
(applying copy-pasted patches causes some problems with tabs/whitespaces).
Also, some .phpt tests testing new method would be great.
--
Wbr,
Antony Dovgal
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).
As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .
Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
Sorry this fell off my radar. Is getParent() a new function to tidy? I
may have to include some lib checks in my config...
John
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
plain text document attachment (tidy_019.phpt.txt)
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(4) "body"
John Coggeshall wrote:
Sorry this fell off my radar. Is getParent() a new function to tidy? I
may have to include some lib checks in my config...
I can't tell, http://tidy.sourceforge.net/docs/api/group__Tree.html
lists it and the page was generated in 2002 if that date is correct.
Ob my systen (debian sarge) the library seems to be a snapshot from
20050415 and it includes it.
From the SF CVS it seems to be there from the first hour on (
http://cvs.sourceforge.net/viewcvs.py/tidy/tidy/src/tidylib.c?rev=1.1.2.1&view=markup
).
HTH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
okay, so with whom I've to sleep to get this patch in? :)
cheers,
-
- Markus
Markus Fischer wrote:
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(4) "body"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEIoOg1nS0RcInK9ARAiQoAKCTDFX2S96rE9jj8dfplaaSWBbZDQCbBEwU
xkG9JkMubeZN33BCrWh/Deg=
=1niF
-----END PGP SIGNATURE
Committed to HEAD.. I'll let the RM decide where this belongs for PHP
5.1+ before PHP 6 (5.2 probably) Sorry I misspelled your name in the
commit ;)
John
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
okay, so with whom I've to sleep to get this patch in? :)
cheers,
- Markus
Markus Fischer wrote:
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(4) "body"-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiD8DBQFEIoOg1nS0RcInK9ARAiQoAKCTDFX2S96rE9jj8dfplaaSWBbZDQCbBEwU
xkG9JkMubeZN33BCrWh/Deg=
=1niF
-----END PGP SIGNATURE
Ilia, but don't worry, he's a good looking guy :) hehe
At 03:16 AM 3/23/2006, Markus Fischer wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
okay, so with whom I've to sleep to get this patch in? :)
cheers,
- Markus
Markus Fischer wrote:
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(4) "body"-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiD8DBQFEIoOg1nS0RcInK9ARAiQoAKCTDFX2S96rE9jj8dfplaaSWBbZDQCbBEwU
xkG9JkMubeZN33BCrWh/Deg=
=1niF
-----END PGP SIGNATURE
Send a bottle of Stolichnaya, this could solve your issue :)
Andrey
Andi Gutmans wrote:
Ilia, but don't worry, he's a good looking guy :) hehe
At 03:16 AM 3/23/2006, Markus Fischer wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
okay, so with whom I've to sleep to get this patch in? :)
cheers,
- Markus
Markus Fischer wrote:
Hi,
Antony Dovgal wrote:
the patch is in the bug report ( http://bugs.php.net/bug.php?id=34023
) or do you meant something else?Jani meant that it would be better to put this patch as a downloadable
file (applying copy-pasted patches causes some problems with
tabs/whitespaces).As written in the other email, the path is online at
http://www.zend.com/zend/week/pat/pat52.txt .Also, some .phpt tests testing new method would be great.
Thanks, I've attached a simple test to this email.
- Markus
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(4) "body"-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiD8DBQFEIoOg1nS0RcInK9ARAiQoAKCTDFX2S96rE9jj8dfplaaSWBbZDQCbBEwU
xkG9JkMubeZN33BCrWh/Deg=
=1niF
-----END PGP SIGNATURE
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" markus@fischer.name
To: "Jani Taskinen" sniper@iki.fi
Cc: "John Coggeshall" john@coggeshall.org; "Andi Gutmans" andi@zend.com;
internals@lists.php.net; iliaa@php.net
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
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,
AndiAt 01:31 PM 7/15/2005 -0400, John Coggeshall wrote:
I'll take a look at it and commit if it looks good.
John
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.cRCS 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);--
--
--
__________ NOD32 1.1377 (20060124) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
Steph Fox wrote:
It's been in PAT for ages, unless you made any changes to it Markus?
No change was done. Wow, I didn't knew that this exists. And now it
makes sense because you were mentioned PAT in your email back then which
didn't mean anything to me :)
thanks,
- Markus