Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Remove another handcrafted type initialization
@ 2001-12-08 23:07 Fred Fish
  2001-12-09 19:04 ` Jim Blandy
  0 siblings, 1 reply; 2+ messages in thread
From: Fred Fish @ 2001-12-08 23:07 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

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);
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFA: Remove another handcrafted type initialization
  2001-12-08 23:07 RFA: Remove another handcrafted type initialization Fred Fish
@ 2001-12-09 19:04 ` Jim Blandy
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Blandy @ 2001-12-09 19:04 UTC (permalink / raw)
  To: fnf; +Cc: gdb-patches


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);
>  }
>  
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-10  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-08 23:07 RFA: Remove another handcrafted type initialization Fred Fish
2001-12-09 19:04 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox