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]

FYI: doc fix for pretty-printer registration


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


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