Revision: 12688
http://sourceforge.net/p/plplot/code/12688
Author: airwin
Date: 2013-11-13 06:30:19 +0000 (Wed, 13 Nov 2013)
Log Message:
-----------
Correct possible USE_TCL_STUBS and USE_TK_STUBS error which consist of
calling Tcl_InitStubs, Tk_InitStubs, and (redundantly) Tcl_InitStubs
(first thing done inside the call to PlbasicInit). That redundant
call might be an issue. Anyhow, eliminate it by calling PlbasicInit
(which includes no Tk calls), then Tk_InitStubs. This is the method
used by bindings/tk/Pltk_Init.c.
N.B. We have never tested the Tcl/Tk stubs system because the
build system does not set USE_TCL_STUBS or USE_TK_STUBS and
does not link to the stubs versions of the Tcl/Tk libraries.
So the possible error above has never been tested and the
fix also won't be tested unless and until we "stubify" our
PLplot extensions to Tcl/Tk. Nevertheless, the Pltk_Init.c
stubs initiation is obviously correct so it is good to use
exactly the same method for Plplotter_Init.c.
Modified Paths:
--------------
trunk/bindings/tk-x-plat/Plplotter_Init.c
Modified: trunk/bindings/tk-x-plat/Plplotter_Init.c
===================================================================
--- trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-13 01:15:42 UTC (rev 12687)
+++ trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-13 06:30:19 UTC (rev 12688)
@@ -55,25 +55,23 @@
PLDLLIMPEXP_DRIVER EXTERN int
Plplotter_Init( Tcl_Interp *interp )
{
-#ifdef USE_TCL_STUBS
- //
- // We hard-wire 8.1 here, rather than TCL_VERSION, TK_VERSION because
- // we really don't mind which version of Tcl, Tk we use as long as it
- // is 8.1 or newer. Otherwise if we compiled against 8.2, we couldn't
- // be loaded into 8.1
- //
- Tcl_InitStubs( interp, "8.1", 0 );
-#endif
-#ifdef USE_TK_STUBS
- Tk_InitStubs( interp, "8.1", 0 );
-#endif
// This must be before any other Tcl related calls
if ( PlbasicInit( interp ) != TCL_OK )
{
return TCL_ERROR;
}
+#ifdef USE_TK_STUBS
//
+ // We hard-wire 8.1 here (as is done for the USE_TCL_STUBS case in
+ // PlbasisInit above) rather than TK_VERSION because we really don't
+ // mind which version of Tcl, Tk we use as long as it is 8.1 or
+ // newer. Otherwise if we compiled against 8.2, we couldn't be
+ // loaded into 8.1
+ //
+ Tk_InitStubs( interp, "8.1", 0 );
+#endif
+ //
// Note, the old technique of:
// main = Tk_MainWindow(interp);
// and then passing main to 'plframe' as the clientdata can
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|