summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-10-22 00:13:28 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-10-22 00:13:28 (GMT)
commit26d407419e1440003de4682f5d60c8c45ec76260 (patch)
treeb77bf364d44aa23e0ee2899d93b8e0118c972b1a /generic/tcl.h
parent90490cce920eb45b480cff3690ae01e5e2241794 (diff)
downloadtcl-26d407419e1440003de4682f5d60c8c45ec76260.zip
tcl-26d407419e1440003de4682f5d60c8c45ec76260.tar.gz
tcl-26d407419e1440003de4682f5d60c8c45ec76260.tar.bz2
* generic/tcl.h:
* generic/tclHash.c: Tcl_FindHashEntry() now calls Tcl_CreateHashEntry() with a newPtr set to NULL: this would have caused a segfault previously and eliminates duplicated code. A macro has been added to tcl.h (only used when TCL_PRESERVE_BINARY_COMPATABALITY is not set - ie, not by default).
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 3501c96..922da8f 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -13,7 +13,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.219 2006/10/20 15:16:47 dkf Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.220 2006/10/22 00:13:29 msofer Exp $
*/
#ifndef _TCL
@@ -1394,7 +1394,9 @@ typedef struct Tcl_HashSearch {
* Macro to use new extended version of Tcl_InitHashTable.
*/
# define Tcl_InitHashTable(tablePtr, keyType) \
- Tcl_InitHashTableEx(tablePtr, keyType, NULL)
+ Tcl_InitHashTableEx((tablePtr), (keyType), NULL)
+# define Tcl_FindHashEntry(tablePtr, key) \
+ Tcl_CreateHashEntry((tablePtr), (key), NULL)
#endif /* TCL_PRESERVE_BINARY_COMPATABILITY */
/*