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: fix PR python/11915


> From: Tom Tromey <tromey@redhat.com>
> Date: Fri, 20 Aug 2010 16:32:22 -0600
> 
> This patch fixes PR python/11915.
> 
> It adds a new method, Type.array, so that users can create new array
> types at runtime.

Thanks.

> +@defmethod Type array @var{n1} @r{[}@var{n2}@r{]}
> +Return a new @code{gdb.Type} object which represents an array of this
> +type.  If one argument is given, it is the inclusive upper bound of
> +the array; in this case the lower bound is zero.  If two arguments are

"Inclusive upper bound"?  Does this mean that if the argument is N,
then the array will have N+1 members, from zero to N?  That sounds
against the intuition, doesn't it?

> +given, the first argument is the lower bound of the array, and the
> +second argument is the upper bound of the array.

Will the reader know whether negative arguments are allowed (provided
that the second is greater than the first)?  Or is it a good idea to
tell explicitly?


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