summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog28
-rw-r--r--generic/tclStubLib.c24
-rw-r--r--tools/genStubs.tcl12
3 files changed, 40 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index b546bf0..074f952 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,32 @@
+2008-04-02 Daniel Steffen <das@users.sourceforge.net>
+
+ * generic/tcl.decls: remove 'export' declarations of symbols now
+ only in libtclstub and no longer in libtcl.
+
+ * generic/tclStubLib.c: make symbols in libtclstub.a MODULE_SCOPE to
+ * tools/genStubs.tcl: avoid exporting them from libraries that link
+ with -ltclstub; constify tcl*StubsPtr and stub
+ table hook pointers. [Bug 1819422]
+
+ * generic/tclDecls.h: make genstubs
+ * generic/tclIntDecls.h:
+ * generic/tclIntPlatDecls.h:
+ * generic/tclPlatDecls.h:
+ * generic/tclStubInit.c:
+ * generic/tclTomMathDecls.h:
+
2008-04-02 Andreas Kupries <andreask@activestate.com>
- * generic/tclIO.c (CopyData): Applied patch for the fcopy problem
- [Bug 780533], with many thanks to Alexandre Ferrieux
- <ferrieux@users.sourceforge.net> for tracking it down and
- providing a solution. Still have to convert his test script into
- a proper test case.
+ * generic/tclIO.c (CopyData): Applied patch for fcopy problem
+ [Bug 780533], with many thanks to Alexandre Ferrieux
+ <ferrieux@users.sourceforge.net> for tracking it down and providing a
+ solution. Still have to convert his test script into a proper test case
2008-04-01 Andreas Kupries <andreask@activestate.com>
* generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp
* unix/tcl.m4: rounding setup on solaris x86, native cc), provided
- by Michael Schlenker.
+ by Michael Schlenker.
2008-04-01 Don Porter <dgp@users.sourceforge.net>
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index 0ba42d5..a724a09 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubLib.c,v 1.23 2008/04/02 03:37:32 dgp Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.24 2008/04/02 21:29:05 das Exp $
*/
/*
@@ -24,15 +24,17 @@
#include "tclInt.h"
-/*
- * Tcl_InitStubs and stub table pointers are built as exported symbols.
- */
+MODULE_SCOPE const TclStubs *tclStubsPtr;
+MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr;
+MODULE_SCOPE const TclIntStubs *tclIntStubsPtr;
+MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr;
+MODULE_SCOPE const TclTomMathStubs* tclTomMathStubsPtr;
-TclStubs *tclStubsPtr = NULL;
-TclPlatStubs *tclPlatStubsPtr = NULL;
-TclIntStubs *tclIntStubsPtr = NULL;
-TclIntPlatStubs *tclIntPlatStubsPtr = NULL;
-TclTomMathStubs* tclTomMathStubsPtr = NULL;
+const TclStubs *tclStubsPtr = NULL;
+const TclPlatStubs *tclPlatStubsPtr = NULL;
+const TclIntStubs *tclIntStubsPtr = NULL;
+const TclIntPlatStubs *tclIntPlatStubsPtr = NULL;
+const TclTomMathStubs* tclTomMathStubsPtr = NULL;
static TclStubs *
HasStubSupport(
@@ -77,7 +79,7 @@ static int isDigit(const int c)
*----------------------------------------------------------------------
*/
-CONST char *
+MODULE_SCOPE CONST char *
Tcl_InitStubs(
Tcl_Interp *interp,
CONST char *version,
@@ -159,7 +161,7 @@ Tcl_InitStubs(
*----------------------------------------------------------------------
*/
-CONST char*
+MODULE_SCOPE CONST char*
TclTomMathInitializeStubs(
Tcl_Interp* interp, /* Tcl interpreter */
CONST char* version, /* Tcl version needed */
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index eceea00..0f69997 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: genStubs.tcl,v 1.23 2008/04/01 16:23:42 dgp Exp $
+# RCS: @(#) $Id: genStubs.tcl,v 1.24 2008/04/02 21:29:05 das Exp $
package require Tcl 8.4
@@ -984,13 +984,13 @@ proc genStubs::emitHeader {name} {
foreach hook $hooks($name) {
set capHook [string toupper [string index $hook 0]]
append capHook [string range $hook 1 end]
- append text " struct ${capHook}Stubs *${hook}Stubs;\n"
+ append text " CONST struct ${capHook}Stubs *${hook}Stubs;\n"
}
append text "} ${capName}StubHooks;\n"
}
append text "\ntypedef struct ${capName}Stubs {\n"
append text " int magic;\n"
- append text " struct ${capName}StubHooks *hooks;\n\n"
+ append text " CONST struct ${capName}StubHooks *hooks;\n\n"
emitSlots $name text
@@ -998,9 +998,7 @@ proc genStubs::emitHeader {name} {
set upName [string toupper $libraryName]
append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
- append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
- append text "extern ${capName}Stubs *${name}StubsPtr;\n"
- append text "#ifdef __cplusplus\n}\n#endif\n"
+ append text "EXTERN CONST ${capName}Stubs *${name}StubsPtr;"
append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
emitMacros $name text
@@ -1050,7 +1048,7 @@ proc genStubs::emitInit {name textVar} {
append capName [string range $name 1 end]
if {[info exists hooks($name)]} {
- append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
+ append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n"
set sep " "
foreach sub $hooks($name) {
append text $sep "&${sub}Stubs"