This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 3/5] Introduce gdbpy_subclass and use it to simplify some logic


On 01/15/2017 01:42 PM, Tom Tromey wrote:

> diff --git a/gdb/python/py-ref.h b/gdb/python/py-ref.h
> index b2479bf..3430768 100644
> --- a/gdb/python/py-ref.h
> +++ b/gdb/python/py-ref.h
> @@ -1,6 +1,6 @@
>  /* Python reference-holding class
>  
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016, 2017 Free Software Foundation, Inc.

No sure the end-year script converts this to a range automatically.
Better write 2016-2017 from the get go.


>  /* A gdb::ref_ptr that has been specialized for Python objects.  */
> -typedef gdb::ref_ptr<PyObject, gdbpy_ref_policy> gdbpy_ref;
> +typedef gdb::ref_ptr<PyObject, gdbpy_ref_policy<PyObject> > gdbpy_ref;

No need for the space in "> >" in C++11.

Other than the naming issue, this looks really nice to me.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]