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/Python] Fix int() builtin with range type gdb.Value objects.


>>>>> "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


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