summaryrefslogtreecommitdiffstats
path: root/generic/tkTest.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-11-19 23:45:08 (GMT)
committernijtmans <nijtmans>2009-11-19 23:45:08 (GMT)
commit930fbd756216e095a887d89e631cc699a97406bf (patch)
treeae364155226308454d7c9368c5364a9f4ac440a5 /generic/tkTest.c
parentb36e07917dbad9ecfad09b3941e0aabbdc9f3747 (diff)
downloadtk-930fbd756216e095a887d89e631cc699a97406bf.zip
tk-930fbd756216e095a887d89e631cc699a97406bf.tar.gz
tk-930fbd756216e095a887d89e631cc699a97406bf.tar.bz2
Compile tkTest.c and friends with Stubs
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r--generic/tkTest.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 22879ee..b90d689 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -13,9 +13,15 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTest.c,v 1.42 2009/09/07 07:29:04 das Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.43 2009/11/19 23:45:08 nijtmans Exp $
*/
+#ifndef USE_TCL_STUBS
+# define USE_TCL_STUBS
+#endif
+#ifndef USE_TK_STUBS
+# define USE_TK_STUBS
+#endif
#include "tkInt.h"
#include "tkText.h"
@@ -33,6 +39,15 @@
#endif
/*
+ * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
+ * Tcltest_Init declaration is in the source file itself, which is only
+ * accessed when we are building a library.
+ */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+EXTERN int Tktest_Init(Tcl_Interp *interp);
+/*
* The following data structure represents the master for a test image:
*/
@@ -241,6 +256,13 @@ Tktest_Init(
{
static int initialized = 0;
+ if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
+ return TCL_ERROR;
+ }
+
/*
* Create additional commands for testing Tk.
*/