derick Mon, 28 Dec 2009 17:36:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=3169
Log:
- Remove no longer used code (it was used by the GDB handler only).
Changed paths:
U xdebug/trunk/xdebug_var.c
Modified: xdebug/trunk/xdebug_var.c
===================================================================
--- xdebug/trunk/xdebug_var.c 2009-12-28 17:34:25 UTC (rev 3168)
+++ xdebug/trunk/xdebug_var.c 2009-12-28 17:36:20 UTC (rev 3169)
@@ -457,152 +457,6 @@
}
/*****************************************************************************
-** XML variable printing routines
-*/
-
-static int xdebug_array_element_export_xml(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
-{
- int level;
- xdebug_str *str;
-#if !defined(PHP_VERSION_ID) || PHP_VERSION_ID < 50300
- TSRMLS_FETCH();
-#endif
-
- level = va_arg(args, int);
- str = va_arg(args, struct xdebug_str*);
-
- xdebug_str_addl(str, "<var", 4, 0);
- if (hash_key->nKeyLength == 0) { /* numeric key */
- xdebug_str_add(str, xdebug_sprintf(" name='%ld'", hash_key->h), 1);
- } else { /* string key */
- xdebug_str_add(str, xdebug_sprintf(" name='%s'", hash_key->arKey), 1);
- }
- xdebug_str_add(str, xdebug_sprintf(" id='%p'>", *zv), 1);
- xdebug_var_export_xml(zv, str, level + 1 TSRMLS_CC);
- xdebug_str_addl(str, "</var>", 6, 0);
- return 0;
-}
-
-static int xdebug_object_element_export_xml(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
-{
- int level;
- xdebug_str *str;
- char *prop_name, *class_name, *modifier;
-#if !defined(PHP_VERSION_ID) || PHP_VERSION_ID < 50300
- TSRMLS_FETCH();
-#endif
-
- level = va_arg(args, int);
- str = va_arg(args, struct xdebug_str*);
-
- xdebug_str_addl(str, "<var", 4, 0);
- if (hash_key->nKeyLength != 0) {
- modifier = xdebug_get_property_info(hash_key->arKey, hash_key->nKeyLength, &prop_name, &class_name);
- xdebug_str_add(str, xdebug_sprintf(" name='%s' facet='%s'", prop_name, modifier), 1);
- }
- xdebug_str_add(str, xdebug_sprintf(" id='%p'>", *zv), 1);
- xdebug_var_export_xml(zv, str, level + 1 TSRMLS_CC);
- xdebug_str_addl(str, "</var>", 6, 0);
- return 0;
-}
-
-void xdebug_var_export_xml(zval **struc, xdebug_str *str, int level TSRMLS_DC)
-{
- HashTable *myht;
- char* tmp_str;
- int newlen;
-
- if (!*struc) {
- xdebug_str_addl(str, "<uninitialized/>", 16, 0);
- return;
- }
-
- switch (Z_TYPE_PP(struc)) {
- case IS_BOOL:
- xdebug_str_add(str, xdebug_sprintf("<bool>%s</bool>", Z_LVAL_PP(struc) ? "1" : "0"), 1);
- break;
-
- case IS_NULL:
- xdebug_str_addl(str, "<null/>", 7, 0);
- break;
-
- case IS_LONG:
- xdebug_str_add(str, xdebug_sprintf("<int>%ld</int>", Z_LVAL_PP(struc)), 1);
- break;
-
- case IS_DOUBLE:
- xdebug_str_add(str, xdebug_sprintf("<float>%.*G</float>", (int) EG(precision), Z_DVAL_PP(struc)), 1);
- break;
-
- case IS_STRING:
- xdebug_str_addl(str, "<string>", 8, 0);
- tmp_str = xdebug_xmlize(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &newlen);
- xdebug_str_addl(str, tmp_str, newlen, 0);
- efree(tmp_str);
- xdebug_str_addl(str, "</string>", 9, 0);
- break;
-
- case IS_ARRAY:
- myht = Z_ARRVAL_PP(struc);
- if (myht->nApplyCount < 1) {
- xdebug_str_addl(str, "<array>", 7, 0);
- zend_hash_apply_with_arguments(myht XDEBUG_ZEND_HASH_APPLY_TSRMLS_CC, (apply_func_args_t) xdebug_array_element_export_xml, 2, level, str);
- xdebug_str_addl(str, "</array>", 8, 0);
- } else {
- xdebug_str_addl(str, "<array hidden='true' recursive='true'/>", 39, 0);
- }
- break;
-
- case IS_OBJECT:
- myht = Z_OBJPROP_PP(struc);
- if (myht->nApplyCount < 1) {
- char *class_name;
- zend_uint class_name_len;
-
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
- xdebug_str_add(str, xdebug_sprintf("<object class='%s'>", class_name), 1);
- zend_hash_apply_with_arguments(myht XDEBUG_ZEND_HASH_APPLY_TSRMLS_CC, (apply_func_args_t) xdebug_object_element_export_xml, 2, level, str);
- xdebug_str_addl(str, "</object>", 9, 0);
- } else {
- xdebug_str_addl(str, "<object hidden='true' recursive='true'/>", 40, 0);
- }
- break;
-
- case IS_RESOURCE: {
- char *type_name;
-
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
- xdebug_str_add(str, xdebug_sprintf("<resource id='%ld' type='%s'/>", Z_LVAL_PP(struc), type_name ? type_name : "Unknown"), 1);
- break;
- }
-
- default:
- xdebug_str_addl(str, "<null/>", 7, 0);
- break;
- }
-}
-
-char* xdebug_get_zval_value_xml(char *name, zval *val)
-{
- xdebug_str str = {0, 0, NULL};
- TSRMLS_FETCH();
-
- if (name) {
- xdebug_str_addl(&str, "<var name='", 11, 0);
- xdebug_str_add(&str, name, 0);
- xdebug_str_add(&str, xdebug_sprintf("' id='%p'>", val), 1);
- } else {
- xdebug_str_add(&str, xdebug_sprintf("<var id='%p'>", val), 1);
- }
-
- xdebug_var_export_xml(&val, (xdebug_str*) &str, 1 TSRMLS_CC);
-
- xdebug_str_addl(&str, "</var>", 7, 0);
-
- return str.d;
-}
-
-/*****************************************************************************
** XML node printing routines
*/
Received on Mon Dec 28 2009 - 17:36:20 GMT
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST