This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
[PATCH] Use Tcl_SetObjResult in rhabout plugin
- From: Keith Seitz <keiths at redhat dot com>
- To: insight <insight at sourceware dot org>
- Date: Sat, 16 Feb 2013 09:07:40 -0800
- Subject: [PATCH] Use Tcl_SetObjResult in rhabout plugin
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.
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;
}