This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch][gold] Add some typedefs
- From: Ian Lance Taylor <iant at google dot com>
- To: Rafael Espindola <espindola at google dot com>
- Cc: Binutils <binutils at sourceware dot org>, Mikolaj Zalewski <mikolajz at google dot com>
- Date: Tue, 24 Nov 2009 11:11:37 -0800
- Subject: Re: [patch][gold] Add some typedefs
- References: <38a0d8450911241020j3327d6f9m201e6749b0a6dec@mail.gmail.com>
Rafael Espindola <espindola@google.com> writes:
> 2009-11-24 Rafael Avila de Espindola <espindola@google.com>
>
> * incremental.cc (Incremental_inputs_header,
> Incremental_inputs_header_write, Incremental_inputs_entry,
> Incremental_inputs_entry_write): Add a typedef with the data type.
> template<int size, bool big_endian>
> class Incremental_inputs_header
> {
> + private:
> + typedef internal::Incremental_inputs_header_data data_type;
In gold, local types are always capitalized. So this should be
typedef internal::Incremental_inputs_header_data Data_type;
> + const data_type* p_;
In gold, the private data members always go at the bottom of the class
definition. You can change the definition of p_ to use the typedef,
but leave the definition at the bottom where it already is.
> template<int size, bool big_endian>
> class Incremental_inputs_header_write
> {
> + private:
> + typedef internal::Incremental_inputs_header_data data_type;
Capitalize data_type.
> + data_type* p_;
Keep p_ at the bottom of the class.
> @@ -155,12 +157,16 @@ class Incremental_inputs_header_write
> template<int size, bool big_endian>
> class Incremental_inputs_entry
> {
> + private:
> + typedef internal::Incremental_inputs_entry_data data_type;
Same.
> + const data_type* p_;
Same.
> @@ -195,12 +198,16 @@ class Incremental_inputs_entry
> template<int size, bool big_endian>
> class Incremental_inputs_entry_write
> {
> + private:
> + typedef internal::Incremental_inputs_entry_data data_type;
Same.
> + data_type* p_;
Same.
This is OK with those changes.
Thanks.
Ian