diff options
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclHash.c | 2 | ||||
-rw-r--r-- | generic/tclObj.c | 11 | ||||
-rw-r--r-- | generic/tclVar.c | 11 |
4 files changed, 16 insertions, 14 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 13e2303..a08edde 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -144,7 +144,11 @@ extern "C" { #if defined(__GNUC__) && (__GNUC__ > 2) # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b))) # define TCL_NORETURN __attribute__ ((noreturn)) -# define TCL_NORETURN1 __attribute__ ((noreturn)) +# if defined(BUILD_tcl) || defined(BUILD_tk) +# define TCL_NORETURN1 __attribute__ ((noreturn)) +# else +# define TCL_NORETURN1 /* nothing */ +# endif #else # define TCL_FORMAT_PRINTF(a,b) # if defined(_MSC_VER) && (_MSC_VER >= 1310) diff --git a/generic/tclHash.c b/generic/tclHash.c index 90be511..1991aea 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -326,7 +326,7 @@ CreateHashEntry( continue; } #endif - if (compareKeysProc((void *) key, hPtr)) { + if (((void *) key == hPtr) || compareKeysProc((void *) key, hPtr)) { if (newPtr) { *newPtr = 0; } diff --git a/generic/tclObj.c b/generic/tclObj.c index f9216b3..15ea91f 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3971,12 +3971,11 @@ TclCompareObjKeys( /* * If the object pointers are the same then they match. - */ - - if (objPtr1 == objPtr2) { - return 1; - } - + * OPT: this comparison was moved to the caller + + if (objPtr1 == objPtr2) return 1; + */ + /* * Don't use Tcl_GetStringFromObj as it would prevent l1 and l2 being * in a register. diff --git a/generic/tclVar.c b/generic/tclVar.c index b37283b..f93de3b 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -6364,12 +6364,11 @@ CompareVarKeys( /* * If the object pointers are the same then they match. - */ - - if (objPtr1 == objPtr2) { - return 1; - } - + * OPT: this comparison was moved to the caller + + if (objPtr1 == objPtr2) return 1; + */ + /* * Don't use Tcl_GetStringFromObj as it would prevent l1 and l2 being in a * register. |