public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: insight <insight@sourceware.org>
Subject: [PATCH] Use Tcl_SetObjResult in rhabout plugin
Date: Sat, 16 Feb 2013 17:07:00 -0000	[thread overview]
Message-ID: <511FBCDC.60803@redhat.com> (raw)

[-- 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;
 }
 

                 reply	other threads:[~2013-02-16 17:07 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=511FBCDC.60803@redhat.com \
    --to=keiths@redhat.com \
    --cc=insight@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).