From 5964f0af379da6d133cf236fa9ad9eb9a7fc39fb Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 25 Mar 2011 21:16:15 +0000 Subject: [Bug 3007895]: Tcl_(Find|Create)HashEntry stub entries can never be called. They still cannot be called (no change in functionality), but at least they now do exactly the same as the Tcl_(Find|Create)HashEntry macro's, so the confusion addressed in this Bug report is gone. Merged --cherrypick from Tcl8.5 (2010-12-31,e75735ef76) --- ChangeLog | 9 +++++++++ generic/tclHash.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f90c9f2..9875500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-03-25 Jan Nijtmans + + * generic/tclHash.c: [Bug 3007895]: Tcl_(Find|Create)HashEntry + stub entries can never be called. They still cannot be called + (no change in functionality), but at least they now do + exactly the same as the Tcl_(Find|Create)HashEntry macro's, + so the confusion addressed in this Bug report is gone. + Merged --cherrypick from Tcl8.5 (2010-12-31,e75735ef76) + 2011-03-24 Donal K. Fellows * generic/tclFCmd.c (TclFileAttrsCmd): Ensure that any reference to diff --git a/generic/tclHash.c b/generic/tclHash.c index 716d251..53d9919 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -90,6 +90,11 @@ static Tcl_HashEntry * BogusFind _ANSI_ARGS_((Tcl_HashTable *tablePtr, CONST char *key)); static Tcl_HashEntry * BogusCreate _ANSI_ARGS_((Tcl_HashTable *tablePtr, CONST char *key, int *newPtr)); +static Tcl_HashEntry * FindHashEntry _ANSI_ARGS_((Tcl_HashTable *tablePtr, + CONST char *key)); +static Tcl_HashEntry * CreateHashEntry _ANSI_ARGS_((Tcl_HashTable *tablePtr, + CONST char *key, int *newPtr)); + #endif static void RebuildTable _ANSI_ARGS_((Tcl_HashTable *tablePtr)); @@ -204,8 +209,8 @@ Tcl_InitCustomHashTable(tablePtr, keyType, typePtr) tablePtr->mask = 3; tablePtr->keyType = keyType; #if TCL_PRESERVE_BINARY_COMPATABILITY - tablePtr->findProc = Tcl_FindHashEntry; - tablePtr->createProc = Tcl_CreateHashEntry; + tablePtr->findProc = FindHashEntry; + tablePtr->createProc = CreateHashEntry; if (typePtr == NULL) { /* @@ -272,6 +277,16 @@ Tcl_HashEntry * Tcl_FindHashEntry(tablePtr, key) Tcl_HashTable *tablePtr; /* Table in which to lookup entry. */ CONST char *key; /* Key to use to find matching entry. */ +#if TCL_PRESERVE_BINARY_COMPATABILITY +{ + return tablePtr->findProc(tablePtr, key); +} + +static Tcl_HashEntry * +FindHashEntry(tablePtr, key) + Tcl_HashTable *tablePtr; /* Table in which to lookup entry. */ + CONST char *key; /* Key to use to find matching entry. */ +#endif /* TCL_PRESERVE_BINARY_COMPATABILITY */ { register Tcl_HashEntry *hPtr; Tcl_HashKeyType *typePtr; @@ -371,6 +386,19 @@ Tcl_CreateHashEntry(tablePtr, key, newPtr) * entry. */ int *newPtr; /* Store info here telling whether a new * entry was created. */ +#if TCL_PRESERVE_BINARY_COMPATABILITY +{ + return tablePtr->createProc(tablePtr, key, newPtr); +} + +static Tcl_HashEntry * +CreateHashEntry(tablePtr, key, newPtr) + Tcl_HashTable *tablePtr; /* Table in which to lookup entry. */ + CONST char *key; /* Key to use to find or create matching + * entry. */ + int *newPtr; /* Store info here telling whether a new + * entry was created. */ +#endif /* TCL_PRESERVE_BINARY_COMPATABILITY */ { register Tcl_HashEntry *hPtr; Tcl_HashKeyType *typePtr; -- cgit v0.12 From f6e39f12097065e62da6885b91213f473f1ae69e Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 26 Mar 2011 06:25:03 +0000 Subject: The -debug:full option is not supported when using the modern versions of link.exe included with MSVC, use -debug instead --- win/configure | 2 +- win/tcl.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/win/configure b/win/configure index f67e4b7..f7da2f0 100755 --- a/win/configure +++ b/win/configure @@ -1866,7 +1866,7 @@ EOF EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" - LDFLAGS_DEBUG="-debug:full" + LDFLAGS_DEBUG="-debug" LDFLAGS_OPTIMIZE="-release" # Specify the CC output file names based on the target name diff --git a/win/tcl.m4 b/win/tcl.m4 index 7fe2ae3..a766b7c 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -747,7 +747,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" - LDFLAGS_DEBUG="-debug:full" + LDFLAGS_DEBUG="-debug" LDFLAGS_OPTIMIZE="-release" # Specify the CC output file names based on the target name -- cgit v0.12