summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2001-01-18 19:09:55 (GMT)
committerandreas_kupries <akupries@shaw.ca>2001-01-18 19:09:55 (GMT)
commit7471ab66a4d23af44031f17791706a069151c70f (patch)
tree40d02cf354797352140f7949f9db3724141b834a /generic
parent0412e22f32c9b254539268b402a14c24ca59f145 (diff)
downloadtcl-7471ab66a4d23af44031f17791706a069151c70f.zip
tcl-7471ab66a4d23af44031f17791706a069151c70f.tar.gz
tcl-7471ab66a4d23af44031f17791706a069151c70f.tar.bz2
2000-01-18 Andreas Kupries <a.kupries@westend.com>
* Everything below belongs together, it fixes bug #123153. * generic/tcl.h (line 342): A bit more explanation about the default value for TCL_PRESERVE_BINARY_COMPATABILITY. * generic/tcl.h (line 1208): Removed the macro 'Tcl_InitHashTable' as it kills binary compatibility to 8.3 and earlier versions. This is the main part of the patch/change. * generic/tcl.decls (line 1469): * generic/tclHash.c (Tcl_InitHashTable): * generic/tclHash.c (Tcl_InitHashTableEx): * generic/tclObj.c (Tcl_InitObjHashTable): Changed 'Tcl_InitHashTableEx' to 'Tcl_InitCustomHashTable'. This change is more of an estethical nature, replacing the ubiquitous 'Ex' suffix with a more meaningful name. The introduced binary incompatibility is deemed acceptable as it is between alpha versions. Updated callers. * doc/Hash.3: * unix/mkLinks: Changed 'Tcl_InitHashTableEx' to 'Tcl_InitCustomHashTable'.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tcl.h9
-rw-r--r--generic/tclDecls.h12
-rw-r--r--generic/tclHash.c12
-rw-r--r--generic/tclObj.c5
-rw-r--r--generic/tclStubInit.c4
6 files changed, 25 insertions, 21 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 28905ca..6c1e790 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -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: tcl.decls,v 1.42 2000/11/03 18:46:10 hobbs Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.43 2001/01/18 19:09:55 andreas_kupries Exp $
library tcl
@@ -1466,7 +1466,7 @@ declare 422 generic {
}
declare 423 generic {
- void Tcl_InitHashTableEx(Tcl_HashTable *tablePtr, int keyType, \
+ void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr, int keyType, \
Tcl_HashKeyType *typePtr)
}
diff --git a/generic/tcl.h b/generic/tcl.h
index c8f527e..1c7160c 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.85 2000/12/08 04:22:43 ericm Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.86 2001/01/18 19:09:55 andreas_kupries Exp $
*/
#ifndef _TCL
@@ -339,7 +339,8 @@ typedef long LONG;
/*
* This flag controls whether binary compatability is maintained with
- * extensions built against a previous version of Tcl.
+ * extensions built against a previous version of Tcl. This is true
+ * by default.
*/
#ifndef TCL_PRESERVE_BINARY_COMPATABILITY
#define TCL_PRESERVE_BINARY_COMPATABILITY 1
@@ -1206,12 +1207,14 @@ typedef struct Tcl_HashSearch {
(*((tablePtr)->createProc))(tablePtr, key, newPtr)
#endif
+#if !TCL_PRESERVE_BINARY_COMPATABILITY
/*
* Macro to use new extended version of Tcl_InitHashTable.
*/
#define Tcl_InitHashTable(tablePtr, keyType) \
Tcl_InitHashTableEx(tablePtr, keyType, NULL)
-
+#endif
+
/*
* Flag values to pass to Tcl_DoOneEvent to disable searches
* for some kinds of events:
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 743cef2..869100f 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDecls.h,v 1.43 2000/11/03 18:46:11 hobbs Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.44 2001/01/18 19:09:55 andreas_kupries Exp $
*/
#ifndef _TCLDECLS
@@ -1315,7 +1315,7 @@ EXTERN Tcl_HashEntry * Tcl_CreateHashEntry _ANSI_ARGS_((
Tcl_HashTable * tablePtr, CONST char * key,
int * newPtr));
/* 423 */
-EXTERN void Tcl_InitHashTableEx _ANSI_ARGS_((
+EXTERN void Tcl_InitCustomHashTable _ANSI_ARGS_((
Tcl_HashTable * tablePtr, int keyType,
Tcl_HashKeyType * typePtr));
/* 424 */
@@ -1840,7 +1840,7 @@ typedef struct TclStubs {
int (*tcl_UniCharCaseMatch) _ANSI_ARGS_((CONST Tcl_UniChar * ustr, CONST Tcl_UniChar * pattern, int nocase)); /* 420 */
Tcl_HashEntry * (*tcl_FindHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key)); /* 421 */
Tcl_HashEntry * (*tcl_CreateHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key, int * newPtr)); /* 422 */
- void (*tcl_InitHashTableEx) _ANSI_ARGS_((Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr)); /* 423 */
+ void (*Tcl_InitCustomHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr)); /* 423 */
void (*tcl_InitObjHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 424 */
ClientData (*tcl_CommandTraceInfo) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData)); /* 425 */
int (*tcl_TraceCommand) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData)); /* 426 */
@@ -3590,9 +3590,9 @@ extern TclStubs *tclStubsPtr;
#define Tcl_CreateHashEntry \
(tclStubsPtr->tcl_CreateHashEntry) /* 422 */
#endif
-#ifndef Tcl_InitHashTableEx
-#define Tcl_InitHashTableEx \
- (tclStubsPtr->tcl_InitHashTableEx) /* 423 */
+#ifndef Tcl_InitCustomHashTable
+#define Tcl_InitCustomHashTable \
+ (tclStubsPtr->Tcl_InitCustomHashTable) /* 423 */
#endif
#ifndef Tcl_InitObjHashTable
#define Tcl_InitObjHashTable \
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 8a0f1dc..a1075c5 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.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: tclHash.c,v 1.8 2000/09/06 16:57:27 hobbs Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.9 2001/01/18 19:09:55 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -157,17 +157,17 @@ Tcl_InitHashTable(tablePtr, keyType)
* extension is rebuilt then any calls to this function will be
* redirected to the extended version by a macro.
*/
- Tcl_InitHashTableEx(tablePtr, keyType, (Tcl_HashKeyType *) -1);
+ Tcl_InitCustomHashTable(tablePtr, keyType, (Tcl_HashKeyType *) -1);
}
/*
*----------------------------------------------------------------------
*
- * Tcl_InitHashTableEx --
+ * Tcl_InitCustomHashTable --
*
* Given storage for a hash table, set up the fields to prepare
* the hash table for use. This is an extended version of
- * Tcl_InitHashTableEx which supports user defined keys.
+ * Tcl_InitHashTable which supports user defined keys.
*
* Results:
* None.
@@ -180,7 +180,7 @@ Tcl_InitHashTable(tablePtr, keyType)
*/
void
-Tcl_InitHashTableEx(tablePtr, keyType, typePtr)
+Tcl_InitCustomHashTable(tablePtr, keyType, typePtr)
register Tcl_HashTable *tablePtr; /* Pointer to table record, which
* is supplied by the caller. */
int keyType; /* Type of keys to use in table:
@@ -192,7 +192,7 @@ Tcl_InitHashTableEx(tablePtr, keyType, typePtr)
* the behaviour of this table. */
{
#if (TCL_SMALL_HASH_TABLE != 4)
- panic("Tcl_InitHashTableEx: TCL_SMALL_HASH_TABLE is %d, not 4\n",
+ panic("Tcl_InitCustomHashTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
TCL_SMALL_HASH_TABLE);
#endif
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d5d3821..e2a9bae 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.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: tclObj.c,v 1.18 2000/08/10 18:24:52 davidg Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.19 2001/01/18 19:09:55 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -2148,7 +2148,8 @@ Tcl_InitObjHashTable(tablePtr)
register Tcl_HashTable *tablePtr; /* Pointer to table record, which
* is supplied by the caller. */
{
- Tcl_InitHashTableEx (tablePtr, TCL_CUSTOM_PTR_KEYS, &tclObjHashKeyType);
+ Tcl_InitCustomHashTable(tablePtr, TCL_CUSTOM_PTR_KEYS,
+ &tclObjHashKeyType);
}
/*
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 263e2a8..cb42cc0 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.46 2000/11/03 18:46:12 hobbs Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.47 2001/01/18 19:09:55 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -826,7 +826,7 @@ TclStubs tclStubs = {
Tcl_UniCharCaseMatch, /* 420 */
Tcl_FindHashEntry, /* 421 */
Tcl_CreateHashEntry, /* 422 */
- Tcl_InitHashTableEx, /* 423 */
+ Tcl_InitCustomHashTable, /* 423 */
Tcl_InitObjHashTable, /* 424 */
Tcl_CommandTraceInfo, /* 425 */
Tcl_TraceCommand, /* 426 */