public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Convert example plug-in to object interface
@ 2004-12-08 20:24 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2004-12-08 20:24 UTC (permalink / raw)
  To: insight

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

Hi,

I've committed the attached patch to eliminate some compiler warnings.
Okay, actually, the patch was not to fix the warnings, but it was time
that this plugin used the object interface instead of the older
argc/argv interface. Conveniently, this also whacked the compiler
warning. :-)

Thank you for pointing this out Ben (Elliston)!
Keith

ChangeLog:
2004-12-08  Keith Seitz  <kseitz@sources.redhat.com>
 
        From Ben Elliston (bje@gnu.org):
        * rhabout.c (extra_text): Convert to object interface.
        (Rhabout_Init): Use Tcl_CreateObjCommand instead of older
argc/argv
        Tcl_CreateCommand.


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

Index: plugins/rhabout/rhabout.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/rhabout/rhabout.c,v
retrieving revision 1.1
diff -u -p -r1.1 rhabout.c
--- plugins/rhabout/rhabout.c	14 Aug 2002 18:06:06 -0000	1.1
+++ plugins/rhabout/rhabout.c	8 Dec 2004 20:20:45 -0000
@@ -12,7 +12,7 @@
 
 int extra_text (ClientData clientData,
                 Tcl_Interp *interp,
-                int argc, char *argv[]);
+                int objc, Tcl_Obj *CONST objv[]);
 
 /* Here you actually do whatever you want, like calling your target 
    libraries etc.  Here we just return a string. */
@@ -20,7 +20,7 @@ int extra_text (ClientData clientData,
 int
 extra_text (ClientData clientData,
                 Tcl_Interp *interp,
-                int argc, char *argv[])
+                int objc, Tcl_Obj *CONST objv[])
 {
   interp->result = "\nThis is a sample plug-in\n";
   return TCL_OK;
@@ -32,8 +32,8 @@ int EXPORT
 Rhabout_Init (Tcl_Interp *interp)
 {
   /* Register your command as a Tcl command with this interpreter. */
-  Tcl_CreateCommand (interp, "rhabout_extra_text", extra_text,
-                     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+  Tcl_CreateObjCommand (interp, "rhabout_extra_text", extra_text,
+                        (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
 
   /* Register this package */
   Tcl_PkgProvide (interp, "RHABOUT", "1.0");

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

only message in thread, other threads:[~2004-12-08 20:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-08 20:24 [PATCH] Convert example plug-in to object interface 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).