[xdebug-dev] xdebug xdebug/xdebug_var.c - fix issue where full name would have $$varname rather than $varname

From: Shane Caraveo <shane[@]caraveo.com>
Date: Thu, 15 Jul 2004 04:15:49 +0200

Date: Thu Jul 15 04:15:49 CEST 2004
User: Shane Caraveo
Directory: xdebug

Log Message:
[0.3]
- fix issue where full name would have $$varname rather than $varname
Modified files:
           xdebug/xdebug_var.c (version: 1.46)

[FILE: /xdebug/xdebug_var.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- xdebug/xdebug_var.c:1.45 Tue Apr 20 19:51:55 2004 GMT
+++ xdebug/xdebug_var.c Thu Jul 15 00:15:49 2004 GMT
@@ -392,10 +392,18 @@
         
         if (hash_key->nKeyLength != 0) {
                 name = xdstrdup(hash_key->arKey);
- full_name = xdebug_sprintf("$%s['%s']", parent_name, name);
+ if (parent_name[0] != '$') {
+ full_name = xdebug_sprintf("$%s['%s']", parent_name, name);
+ } else {
+ full_name = xdebug_sprintf("%s['%s']", parent_name, name);
+ }
         } else {
                 name = xdebug_sprintf("%ld", hash_key->h);
- full_name = xdebug_sprintf("$%s[%s]", parent_name, name);
+ if (parent_name[0] != '$') {
+ full_name = xdebug_sprintf("$%s[%s]", parent_name, name);
+ } else {
+ full_name = xdebug_sprintf("%s[%s]", parent_name, name);
+ }
         }
 
         xdebug_xml_add_attribute_ex(node, "name", name, 0, 1);
@@ -426,7 +434,11 @@
                 modifier = xdebug_get_property_info(hash_key->arKey, &prop_name);
                 xdebug_xml_add_attribute(node, "name", prop_name);
                 /* XXX static vars? */
- full_name = xdebug_sprintf("$%s->%s", parent_name, prop_name);
+ if (parent_name[0] != '$') {
+ full_name = xdebug_sprintf("$%s->%s", parent_name, prop_name);
+ } else {
+ full_name = xdebug_sprintf("%s->%s", parent_name, prop_name);
+ }
                 xdebug_xml_add_attribute_ex(node, "fullname", full_name, 0, 1);
                 xdebug_xml_add_attribute(node, "facet", modifier);
         }
Received on Thu Jul 15 2004 - 04:15:56 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:02 BST