public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Use Tcl_SetObjResult in rhabout plugin
@ 2013-02-16 17:07 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2013-02-16 17:07 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

Hi,

While mucking around with Tcl 8.6, the compiler noticed that I'd missed 
one place where the code was directly setting the interpreter's result. 
This patch fixes that.

Keith

2013-02-16  Keith Seitz  <keiths@redhat.com>

	* rhabout.c (extra_text): Use Tcl_SetObjResult instead
	of setting the interpreter's result directly.

[-- Attachment #2: rhabout.patch --]
[-- Type: text/x-patch, Size: 592 bytes --]

Index: rhabout.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/rhabout/rhabout.c,v
retrieving revision 1.2
diff -u -p -r1.2 rhabout.c
--- rhabout.c	8 Dec 2004 20:21:08 -0000	1.2
+++ rhabout.c	16 Feb 2013 17:03:35 -0000
@@ -22,7 +22,8 @@ extra_text (ClientData clientData,
                 Tcl_Interp *interp,
                 int objc, Tcl_Obj *CONST objv[])
 {
-  interp->result = "\nThis is a sample plug-in\n";
+  Tcl_SetObjResult (interp,
+		    Tcl_NewStringObj ("\nThis is a sample plug-in\n", -1));
   return TCL_OK;
 }
 

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

only message in thread, other threads:[~2013-02-16 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-16 17:07 [PATCH] Use Tcl_SetObjResult in rhabout plugin Keith Seitz

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