This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 4/7] [python] API for macros: Add methods to get a gdb.Macro.
Phil Muldoon <email@example.com> writes:
> Tom Tromey <firstname.lastname@example.org> writes:
>>>>>>> "Phil" == Phil Muldoon <email@example.com> writes:
>> Phil> I think this should return a Tuple. Tuples are immutable, and unless
>> Phil> you for see a use for the user to manipulate the List, we should guard
>> Phil> against it. If you agree, please alter stpy_macros too.
>> Using a tuple means you have to iterate twice -- once to count the
>> objects and once to make the tuple.
> You can use a list, and then convert it to a tuple:
> We already use the above.
> If you wanted to, you could use PyTuple_Ruse, as long as there is
> one reference to the tuple.
Apologies for the typos, but the above should read:
If you wanted too, you could use PyTuple_Resize, as long as there is
only one reference to the tuple.