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: [PATCH] Move "types deeply equal" code from py-type.c to gdbtypes.c


On 11/6/13 9:00 AM, Doug Evans wrote:
> Hi.
> 
> There's nothing python-specific about the bulk of this code so I've
> moved it out of py-type.c.
> 
> Ok to check in?
> 
> 2013-11-06  Doug Evans  <dje@sebabeach.org>
> 
>         * gdbtypes.c: #include bcache.h, dwarf2loc.h.
>         (type_equality_entry): Move here from python/py-type.c.
>         (type_equality_entry_d): Ditto.
>         (compare_maybe_null_strings, check_types_equal): Ditto.
>         (check_types_worklist, types_deeply_equal): Ditto.
>         * gdbtypes.h (types_deeply_equal): Declare.
>         * python/py-type.c: Remove inclusion of bcache.h, dwarf2loc.h.
>         (typy_richcompare): Update.
> 

+/* A helper function for tyscm_richcompare that checks two types for
+   "deep" equality.  Returns non-zero if the types are considered the
+   same, zero otherwise.  */

"tyscm_richcompare"?  Should that be typy_... ?

The comments should be maybe be phrased to emphasize the
quasi-librariness of the code, so that future generations aren't
confused if it seems unused by core GDB (which could happen if python
becomes plugin
instead of subdir, for example).

Stan
stan@codesourcery.com


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