[PATCH] Move "types deeply equal" code from py-type.c to gdbtypes.c
Doug Evans
dje@sebabeach.org
Thu Nov 7 07:11:00 GMT 2013
Stan Shebs <stanshebs@earthlink.net> writes:
> 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_... ?
Heh.
> 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).
Agreed.
More information about the Gdb-patches
mailing list