public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: doc fix for pretty-printer registration
@ 2011-12-01 20:27 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2011-12-01 20:27 UTC (permalink / raw)
  To: gdb-patches

I'm checking this in.

I was writing a little pretty-printer today and consulted the docs.
They mention using the 'add' method, but this is wrong; the method is
called 'append'.

Tom

2011-12-01  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Writing a Pretty-Printer): Use append method, not
	add.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.901
diff -u -r1.901 gdb.texinfo
--- gdb.texinfo	22 Nov 2011 21:25:18 -0000	1.901
+++ gdb.texinfo	1 Dec 2011 20:26:33 -0000
@@ -22591,7 +22591,7 @@
 
 @smallexample
 def register_printers(objfile):
-    objfile.pretty_printers.add(str_lookup_function)
+    objfile.pretty_printers.append(str_lookup_function)
 @end smallexample
 
 @noindent

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-01 20:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-01 20:27 FYI: doc fix for pretty-printer registration Tom Tromey

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).