This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


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

[PATCH] Tcl cleanups from Ian


Hi,

I've committed the following patch to the repository.

My thanks to Ian for looking into this nightmare.
Keith

ChangeLog
2001-08-16  Keith Seitz  <keiths@redhat.com>

	From Ian Roxborough  <irox@redhat.com>
	* generic/gdbtk-hooks.c (x_event): Deal with Tcl API insanity
	for Tcl_ObjGetVar2 or Tcl_GetObjVar2.
	(gdbtk_trace_find): Likewise for Tcl_GlobalEvalObj
	or Tcl_EvalObj (TCL_EVAL_GLOBAL).

Patch
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.17
diff -u -p -r1.17 gdbtk-hooks.c
--- gdbtk-hooks.c	2001/08/13 18:30:36	1.17
+++ gdbtk-hooks.c	2001/08/16 15:17:59
@@ -462,7 +462,7 @@ x_event (signo)
       int val;
       if (varname == NULL)
 	{
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1
+#if TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION < 1 || TCL_MINOR_VERSION > 2)
 	  Tcl_Obj *varnamestrobj = Tcl_NewStringObj ("download_cancel_ok", -1);
 	  varname = Tcl_ObjGetVar2 (gdbtk_interp, varnamestrobj, NULL, TCL_GLOBAL_ONLY);
 #else
@@ -733,7 +733,7 @@ gdbtk_trace_find (arg, from_tty)
 			Tcl_NewStringObj ("gdbtk_tcl_trace_find_hook", -1));
   Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewStringObj (arg, -1));
   Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewIntObj (from_tty));
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1
+#if TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION < 1 || TCL_MINOR_VERSION > 2)
   if (Tcl_GlobalEvalObj (gdbtk_interp, cmdObj) != TCL_OK)
     report_error ();
 #else


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