|
From: <arj...@us...> - 2010-12-22 08:12:26
|
Revision: 11383
http://plplot.svn.sourceforge.net/plplot/?rev=11383&view=rev
Author: arjenmarkus
Date: 2010-12-22 08:12:20 +0000 (Wed, 22 Dec 2010)
Log Message:
-----------
Solve bug 3140458 - replace the code that accessed the Tcl internals by a call to Tcl_GetStringResult().
Also removed the #ifdefs involving TCL_MEM_DEBUG via the patch by Brad Harder:
- Tcl_InitMemory() is a no-op if memory debugging is not enabled
- The clean-up code relied on a non-declared variable, so could never have worked. The purpose of the code was not clear either.
Modified Paths:
--------------
trunk/bindings/tcl/tclMain.c
Modified: trunk/bindings/tcl/tclMain.c
===================================================================
--- trunk/bindings/tcl/tclMain.c 2010-12-21 08:46:53 UTC (rev 11382)
+++ trunk/bindings/tcl/tclMain.c 2010-12-22 08:12:20 UTC (rev 11383)
@@ -234,9 +234,7 @@
Tcl_FindExecutable( argv[0] );
interp = Tcl_CreateInterp();
-#ifdef TCL_MEM_DEBUG
- Tcl_InitMemory( interp );
-#endif
+ Tcl_InitMemory( interp ); //no-op if TCL_MEM_DEBUG undefined
// First process plplot-specific args using the PLplot parser.
@@ -314,7 +312,7 @@
code = Tcl_VarEval( interp, tclStartupScript, (char *) NULL );
if ( code != TCL_OK )
{
- fprintf( stderr, "%s\n", interp->result );
+ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
exitCode = 1;
}
}
@@ -471,14 +469,6 @@
}
}
}
-#ifdef TCL_MEM_DEBUG
- if ( tclMemDumpFileName != NULL )
- {
- Tcl_DecrRefCount( commandPtr );
- Tcl_DeleteInterp( interp );
- Tcl_Exit( 0 );
- }
-#endif
}
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|