diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2001-08-15 15:44:35 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2001-08-15 15:44:35 (GMT) |
commit | 0494d6ea369901955402d84ce76a13ddc200957f (patch) | |
tree | e817d32e68064c76449930b08bb891ff654501b8 /generic/tkUtil.c | |
parent | fb862db0788d85c6d070781c2cad608e0a470a96 (diff) | |
download | tk-0494d6ea369901955402d84ce76a13ddc200957f.zip tk-0494d6ea369901955402d84ce76a13ddc200957f.tar.gz tk-0494d6ea369901955402d84ce76a13ddc200957f.tar.bz2 |
Register Tk's object types with Tcl (Tcl Bug 450545)
Diffstat (limited to 'generic/tkUtil.c')
-rw-r--r-- | generic/tkUtil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 99d1235..80f9919 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUtil.c,v 1.9 2000/04/19 23:11:24 ericm Exp $ + * RCS: @(#) $Id: tkUtil.c,v 1.10 2001/08/15 15:44:36 dkf Exp $ */ #include "tkInt.h" @@ -22,7 +22,7 @@ * Tcl object, used for quickly finding a mapping in a TkStateMap. */ -static Tcl_ObjType stateKeyType = { +Tcl_ObjType tkStateKeyObjType = { "statekey", /* name */ (Tcl_FreeInternalRepProc *) NULL, /* freeIntRepProc */ (Tcl_DupInternalRepProc *) NULL, /* dupIntRepProc */ @@ -920,7 +920,7 @@ TkFindStateNumObj(interp, optionPtr, mapPtr, keyPtr) CONST char *key; CONST Tcl_ObjType *typePtr; - if ((keyPtr->typePtr == &stateKeyType) + if ((keyPtr->typePtr == &tkStateKeyObjType) && (keyPtr->internalRep.twoPtrValue.ptr1 == (VOID *) mapPtr)) { return (int) keyPtr->internalRep.twoPtrValue.ptr2; } @@ -934,7 +934,7 @@ TkFindStateNumObj(interp, optionPtr, mapPtr, keyPtr) } keyPtr->internalRep.twoPtrValue.ptr1 = (VOID *) mapPtr; keyPtr->internalRep.twoPtrValue.ptr2 = (VOID *) mPtr->numKey; - keyPtr->typePtr = &stateKeyType; + keyPtr->typePtr = &tkStateKeyObjType; return mPtr->numKey; } } |