From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14031 invoked by alias); 25 May 2009 18:39:03 -0000 Received: (qmail 13998 invoked by uid 22791); 25 May 2009 18:38:53 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 May 2009 18:38:42 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4PIcehG029729 for ; Mon, 25 May 2009 14:38:40 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4PIcdxa000701 for ; Mon, 25 May 2009 14:38:39 -0400 Received: from toner.yyz.redhat.com (toner.yyz.redhat.com [10.15.16.55]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4PIcctO002313 for ; Mon, 25 May 2009 14:38:39 -0400 Message-ID: <4A1AE557.6070300@redhat.com> Date: Mon, 25 May 2009 18:39:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: GDB Patches Subject: [RFA] Renam sutruct using_direct members Content-Type: multipart/mixed; boundary="------------080804010208050201070403" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00565.txt.bz2 This is a multi-part message in MIME format. --------------080804010208050201070403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 4155 struct using_direct { char *inner; char *outer; struct using_direct *next; }; The names inner and outer are not very clear. I certainly found it unintuitive while working on namespace support. This patch renames them no import_src and import_dest respectively 2009-05-25 Sami Wagiaalla * cp-support.h (struct using_direct): renamed members inner, and outer to import_src, and import_dest respectively. Updated all reverences. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index c6c5617..05776e5 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -172,9 +172,9 @@ cp_add_using_directive (const char *name, unsigned int outer_length, for (current = using_list; current != NULL; current = current->next) { - if ((strncmp (current->inner, name, inner_length) == 0) - && (strlen (current->inner) == inner_length) - && (strlen (current->outer) == outer_length)) + if ((strncmp (current->import_src, name, inner_length) == 0) + && (strlen (current->import_src) == inner_length) + && (strlen (current->import_dest) == outer_length)) return; } @@ -248,8 +248,8 @@ cp_add_using (const char *name, gdb_assert (outer_len < inner_len); retval = xmalloc (sizeof (struct using_direct)); - retval->inner = savestring (name, inner_len); - retval->outer = savestring (name, outer_len); + retval->import_src = savestring (name, inner_len); + retval->import_dest = savestring (name, outer_len); retval->next = next; return retval; @@ -271,14 +271,14 @@ cp_copy_usings (struct using_direct *using, { struct using_direct *retval = obstack_alloc (obstack, sizeof (struct using_direct)); - retval->inner = obsavestring (using->inner, strlen (using->inner), + retval->import_src = obsavestring (using->import_src, strlen (using->import_src), obstack); - retval->outer = obsavestring (using->outer, strlen (using->outer), + retval->import_dest = obsavestring (using->import_dest, strlen (using->import_dest), obstack); retval->next = cp_copy_usings (using->next, obstack); - xfree (using->inner); - xfree (using->outer); + xfree (using->import_src); + xfree (using->import_dest); xfree (using); return retval; @@ -380,9 +380,9 @@ cp_lookup_symbol_namespace (const char *namespace, current != NULL; current = current->next) { - if (strcmp (namespace, current->outer) == 0) + if (strcmp (namespace, current->import_dest) == 0) { - sym = cp_lookup_symbol_namespace (current->inner, + sym = cp_lookup_symbol_namespace (current->import_src, name, linkage_name, block, diff --git a/gdb/cp-support.c b/gdb/cp-support.c index bf42636..f12d785 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -716,10 +716,10 @@ make_symbol_overload_list_using (const char *func_name, current != NULL; current = current->next) { - if (strcmp (namespace, current->outer) == 0) + if (strcmp (namespace, current->import_dest) == 0) { make_symbol_overload_list_using (func_name, - current->inner); + current->import_src); } } diff --git a/gdb/cp-support.h b/gdb/cp-support.h index 837ca6c..bd86638 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -37,15 +37,15 @@ struct type; struct demangle_component; /* This struct is designed to store data from using directives. It - says that names from namespace INNER should be visible within - namespace OUTER. OUTER should always be a strict initial substring - of INNER. These form a linked list; NEXT is the next element of - the list. */ + says that names from namespace IMPORT_SRC should be visible within + namespace IMPORT_DEST. IMPORT_DEST should always be a strict initial + substring of IMPORT_SRC. These form a linked list; NEXT is the next element + of the list. */ struct using_direct { - char *inner; - char *outer; + char *import_src; + char *import_dest; struct using_direct *next; }; --------------080804010208050201070403 Content-Type: text/plain; name="using_diret-rename.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="using_diret-rename.patch" Content-length: 3613 diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index c6c5617..05776e5 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -172,9 +172,9 @@ cp_add_using_directive (const char *name, unsigned int outer_length, for (current = using_list; current != NULL; current = current->next) { - if ((strncmp (current->inner, name, inner_length) == 0) - && (strlen (current->inner) == inner_length) - && (strlen (current->outer) == outer_length)) + if ((strncmp (current->import_src, name, inner_length) == 0) + && (strlen (current->import_src) == inner_length) + && (strlen (current->import_dest) == outer_length)) return; } @@ -248,8 +248,8 @@ cp_add_using (const char *name, gdb_assert (outer_len < inner_len); retval = xmalloc (sizeof (struct using_direct)); - retval->inner = savestring (name, inner_len); - retval->outer = savestring (name, outer_len); + retval->import_src = savestring (name, inner_len); + retval->import_dest = savestring (name, outer_len); retval->next = next; return retval; @@ -271,14 +271,14 @@ cp_copy_usings (struct using_direct *using, { struct using_direct *retval = obstack_alloc (obstack, sizeof (struct using_direct)); - retval->inner = obsavestring (using->inner, strlen (using->inner), + retval->import_src = obsavestring (using->import_src, strlen (using->import_src), obstack); - retval->outer = obsavestring (using->outer, strlen (using->outer), + retval->import_dest = obsavestring (using->import_dest, strlen (using->import_dest), obstack); retval->next = cp_copy_usings (using->next, obstack); - xfree (using->inner); - xfree (using->outer); + xfree (using->import_src); + xfree (using->import_dest); xfree (using); return retval; @@ -380,9 +380,9 @@ cp_lookup_symbol_namespace (const char *namespace, current != NULL; current = current->next) { - if (strcmp (namespace, current->outer) == 0) + if (strcmp (namespace, current->import_dest) == 0) { - sym = cp_lookup_symbol_namespace (current->inner, + sym = cp_lookup_symbol_namespace (current->import_src, name, linkage_name, block, diff --git a/gdb/cp-support.c b/gdb/cp-support.c index bf42636..f12d785 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -716,10 +716,10 @@ make_symbol_overload_list_using (const char *func_name, current != NULL; current = current->next) { - if (strcmp (namespace, current->outer) == 0) + if (strcmp (namespace, current->import_dest) == 0) { make_symbol_overload_list_using (func_name, - current->inner); + current->import_src); } } diff --git a/gdb/cp-support.h b/gdb/cp-support.h index 837ca6c..bd86638 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -37,15 +37,15 @@ struct type; struct demangle_component; /* This struct is designed to store data from using directives. It - says that names from namespace INNER should be visible within - namespace OUTER. OUTER should always be a strict initial substring - of INNER. These form a linked list; NEXT is the next element of - the list. */ + says that names from namespace IMPORT_SRC should be visible within + namespace IMPORT_DEST. IMPORT_DEST should always be a strict initial + substring of IMPORT_SRC. These form a linked list; NEXT is the next element + of the list. */ struct using_direct { - char *inner; - char *outer; + char *import_src; + char *import_dest; struct using_direct *next; }; --------------080804010208050201070403--