diff options
Diffstat (limited to 'generic/tkColor.c')
-rw-r--r-- | generic/tkColor.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/generic/tkColor.c b/generic/tkColor.c index bc4c30c..baff5e7 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -5,8 +5,8 @@ * order to avoid round-trips to the server to map color names to pixel * values. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -56,12 +56,14 @@ static void InitColorObj(Tcl_Obj *objPtr); * of the Tcl_Obj points to a TkColor object. */ -const Tcl_ObjType tkColorObjType = { - "color", /* name */ +const TkObjType tkColorObjType = { + {"color", /* name */ FreeColorObjProc, /* freeIntRepProc */ DupColorObjProc, /* dupIntRepProc */ NULL, /* updateStringProc */ - NULL /* setFromAnyProc */ + NULL, /* setFromAnyProc */ + TCL_OBJTYPE_V1(TkLengthOne)}, + 0 }; /* @@ -99,7 +101,7 @@ Tk_AllocColorFromObj( { TkColor *tkColPtr; - if (objPtr->typePtr != &tkColorObjType) { + if (objPtr->typePtr != &tkColorObjType.objType) { InitColorObj(objPtr); } tkColPtr = (TkColor *) objPtr->internalRep.twoPtrValue.ptr1; @@ -661,7 +663,7 @@ Tk_GetColorFromObj( Tcl_HashEntry *hashPtr; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; - if (objPtr->typePtr != &tkColorObjType) { + if (objPtr->typePtr != &tkColorObjType.objType) { InitColorObj(objPtr); } @@ -749,7 +751,7 @@ InitColorObj( if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { typePtr->freeIntRepProc(objPtr); } - objPtr->typePtr = &tkColorObjType; + objPtr->typePtr = &tkColorObjType.objType; objPtr->internalRep.twoPtrValue.ptr1 = NULL; } @@ -822,9 +824,9 @@ TkDebugColor( Tcl_Obj *objPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(NULL, objPtr, - Tcl_NewIntObj(tkColPtr->resourceRefCount)); + Tcl_NewWideIntObj((Tcl_WideInt)tkColPtr->resourceRefCount)); Tcl_ListObjAppendElement(NULL, objPtr, - Tcl_NewIntObj(tkColPtr->objRefCount)); + Tcl_NewWideIntObj((Tcl_WideInt)tkColPtr->objRefCount)); Tcl_ListObjAppendElement(NULL, resultPtr, objPtr); } } |