This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/Python] Fix int() builtin with range type gdb.Value objects.
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 18 Nov 2013 08:59:08 -0700
- Subject: Re: [RFA/Python] Fix int() builtin with range type gdb.Value objects.
- Authentication-results: sourceware.org; auth=none
- References: <1384773267-4883-1-git-send-email-brobecker at adacore dot com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> * python/py-value.c (is_intlike): Add TYPE_CODE_RANGE handling.
Joel> * gdb.ada/py_range: New testcase.
Joel> Tested on x86_64-linux. OK to apply?
Yeah, it's ok.
Joel> Looking beyond this issue, I compared this function with is_integral_type,
Joel> and found that is_integral_type also accepts TYPE_CODE_FLAGS. It seems
Joel> like we could probably do the same in is_intlike?
I think we should just drop is_intlike and use is_integral_type.
The pointer type check can be inlined into valpy_long.
Tom