From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32198 invoked by alias); 9 Dec 2001 07:07:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31868 invoked from network); 9 Dec 2001 07:05:37 -0000 Received: from unknown (HELO fishpond.ninemoons.com) (64.232.230.104) by sources.redhat.com with SMTP; 9 Dec 2001 07:05:37 -0000 Received: (from fnf@localhost) by fishpond.ninemoons.com (8.11.6/8.11.6) id fB970F116869; Sun, 9 Dec 2001 00:00:15 -0700 From: Fred Fish Message-Id: <200112090700.fB970F116869@fishpond.ninemoons.com> Subject: RFA: Remove another handcrafted type initialization To: gdb-patches@sources.redhat.com Date: Sat, 08 Dec 2001 23:07:00 -0000 Cc: fnf@redhat.com Reply-To: fnf@redhat.com X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00246.txt.bz2 Here's another case of gdb type initialization than can be handled by init_type(). -Fred 2001-12-08 Fred Fish * gdbtypes.c (allocate_stub_method): Replace hand crafted type initialization with call to the init_type() function. Index: gdbtypes.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtypes.c,v retrieving revision 1.29 diff -u -p -r1.29 gdbtypes.c --- gdbtypes.c 2001/12/07 22:11:51 1.29 +++ gdbtypes.c 2001/12/09 07:03:44 @@ -542,13 +542,11 @@ allocate_stub_method (struct type *type) { struct type *mtype; - mtype = alloc_type (TYPE_OBJFILE (type)); + mtype = init_type (TYPE_CODE_METHOD, 1, TYPE_FLAG_STUB, NULL, + TYPE_OBJFILE (type)); TYPE_TARGET_TYPE (mtype) = type; /* _DOMAIN_TYPE (mtype) = unknown yet */ /* _ARG_TYPES (mtype) = unknown yet */ - TYPE_FLAGS (mtype) = TYPE_FLAG_STUB; - TYPE_CODE (mtype) = TYPE_CODE_METHOD; - TYPE_LENGTH (mtype) = 1; return (mtype); }