public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Project Archer <archer@sourceware.org>
Subject: [python] a couple more documentation tweaks
Date: Wed, 08 Apr 2009 01:08:00 -0000	[thread overview]
Message-ID: <m31vs4ymst.fsf@fleche.redhat.com> (raw)

This fixes a couple more documentation review items from upstream.

Tom

2009-04-07  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Types In Python): Updates.

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8b1b944..8509ecc 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -18510,9 +18510,9 @@ unusual platforms, this type may have a different size.
 
 @defivar Type tag
 The tag name for this type.  The tag name is the name after
-@code{struct}, @code{union}, or @code{enum} in C; not all languages
-have this concept.  If this type has no tag name, then @code{None} is
-returned.
+@code{struct}, @code{union}, or @code{enum} in C and C@t{++}; not all
+languages have this concept.  If this type has no tag name, then
+@code{None} is returned.
 @end defivar
 @end table
 
@@ -18530,8 +18530,9 @@ into one of these categories, an empty sequence will be returned.
 Each field is an object, with some pre-defined attributes:
 @table @code
 @item bitpos
-This attribute is not available for @code{static} fields.  For
-non-@code{static} fields, the value is the bit position of the field.
+This attribute is not available for @code{static} fields (as in
+C@t{++} or Java).  For non-@code{static} fields, the value is the bit
+position of the field.
 
 @item name
 The name of the field, or @code{None} for anonymous fields.
@@ -18583,20 +18584,23 @@ Return a new @code{gdb.Type} object which represents the target type
 of this type.
 
 For a pointer type, the target type is the type of the pointed-to
-object.  For an array type, the target type is the type of the
-elements of the array.  For a function type, the target type is the
-type of the return value.  For a complex type, the target type is the
-type of the elements.  For a typedef, the target type is the aliased
-type.
+object.  For an array type (meaning C-like arrays), the target type is
+the type of the elements of the array.  For a function or method type,
+the target type is the type of the return value.  For a complex type,
+the target type is the type of the elements.  For a typedef, the
+target type is the aliased type.
+
+If the type does not have a target, this method will throw an
+exception.
 @end defmethod
 
 @defmethod Type template_argument n [block]
-If this @code{gdb.Type} is a template type, this will return a new
-@code{gdb.Type} which represents the type of the @var{n}th template
-argument.
+If this @code{gdb.Type} is an instantiation of a template, this will
+return a new @code{gdb.Type} which represents the type of the
+@var{n}th template argument.
 
 If this @code{gdb.Type} is not a template type, this will throw an
-exception.
+exception.  Ordinarily, only C@t{++} code will have template types.
 
 If @var{block} is given, then @var{name} is looked up in that scope.
 Otherwise, it is searched for globally.
@@ -18859,7 +18863,7 @@ the printer example above might be written.
 @smallexample
 def str_lookup_function (val):
 
-    lookup_tag = val.type ().tag ()
+    lookup_tag = val.type.tag
     regex = re.compile ("^std::basic_string<char,.*>$")
     if lookup_tag == None:
         return None

                 reply	other threads:[~2009-04-08  1:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31vs4ymst.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).