Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: fnf@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: Remove another handcrafted type initialization
Date: Sun, 09 Dec 2001 19:04:00 -0000	[thread overview]
Message-ID: <npg06j3hcl.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: Fred Fish's message of Sun, 9 Dec 2001 00:00:15 -0700 (MST)


Approved.

Fred Fish <fnf@ns1.ninemoons.com> writes:

> 
> Here's another case of gdb type initialization than can be handled
> by init_type().
> 
> -Fred
> 
> 2001-12-08  Fred Fish  <fnf@redhat.com>
> 
> 	* 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);
>  }
>  
> 


      reply	other threads:[~2001-12-10  3:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-08 23:07 Fred Fish
2001-12-09 19:04 ` Jim Blandy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=npg06j3hcl.fsf@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=fnf@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox