diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-07 15:58:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-07 15:58:24 (GMT) |
commit | 390585bc36d575c11753e5b95e1ab4fe8ea04b3b (patch) | |
tree | c33439d23f88366b73e60a23484f375014e7d2c4 /generic/tkEntry.c | |
parent | 138756ef22142304a7a02b2f780b3bed1c4c8133 (diff) | |
download | tk-390585bc36d575c11753e5b95e1ab4fe8ea04b3b.zip tk-390585bc36d575c11753e5b95e1ab4fe8ea04b3b.tar.gz tk-390585bc36d575c11753e5b95e1ab4fe8ea04b3b.tar.bz2 |
Another round of int -> Tcl_Size changes
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 3d7d056..dfb2ce2 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -406,7 +406,7 @@ static const char *const selElementNames[] = { */ static int ConfigureEntry(Tcl_Interp *interp, Entry *entryPtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int DeleteChars(Entry *entryPtr, Tcl_Size index, Tcl_Size count); static Tcl_FreeProc DestroyEntry; static void DisplayEntry(void *clientData); @@ -437,9 +437,7 @@ static int EntryValueChanged(Entry *entryPtr, const char *newValue); static void EntryVisibleRange(Entry *entryPtr, double *firstPtr, double *lastPtr); -static int EntryWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc EntryWidgetObjCmd; static void EntryWorldChanged(void *instanceData); static int GetEntryIndex(Tcl_Interp *interp, Entry *entryPtr, Tcl_Obj *indexObj, Tcl_Size *indexPtr); @@ -449,9 +447,7 @@ static int InsertChars(Entry *entryPtr, Tcl_Size index, const char *string); * These forward declarations are the spinbox specific ones: */ -static int SpinboxWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc SpinboxWidgetObjCmd; static int GetSpinboxElement(Spinbox *sbPtr, int x, int y); static int SpinboxInvoke(Tcl_Interp *interp, Spinbox *sbPtr, int element); @@ -1051,7 +1047,7 @@ DestroyEntry( * Tk_FreeOptions handle all the standard option-related stuff. */ - ckfree((char *)entryPtr->string); + ckfree((void *)entryPtr->string); if (entryPtr->textVarName != NULL) { Tcl_UntraceVar2(entryPtr->interp, entryPtr->textVarName, NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, @@ -1066,7 +1062,7 @@ DestroyEntry( } Tcl_DeleteTimerHandler(entryPtr->insertBlinkHandler); if (entryPtr->displayString != entryPtr->string) { - ckfree((char *)entryPtr->displayString); + ckfree((void *)entryPtr->displayString); } if (entryPtr->type == TK_SPINBOX) { Spinbox *sbPtr = (Spinbox *) entryPtr; @@ -1113,7 +1109,7 @@ ConfigureEntry( Tcl_Interp *interp, /* Used for error reporting. */ Entry *entryPtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_SavedOptions savedOptions; @@ -1400,7 +1396,7 @@ ConfigureEntry( } snprintf(sbPtr->formatBuf, formatSpace, sbPtr->valueFormat, dvalue); - /* + /* * No check for error return here as well, because any possible * error will be trapped below when attempting tracing. */ @@ -1980,7 +1976,7 @@ EntryComputeGeometry( char *p; if (entryPtr->displayString != entryPtr->string) { - ckfree((char *)entryPtr->displayString); + ckfree((void *)entryPtr->displayString); entryPtr->displayString = entryPtr->string; entryPtr->numDisplayBytes = entryPtr->numBytes; } @@ -2188,7 +2184,7 @@ InsertChars( return TCL_OK; } - ckfree((char *)string); + ckfree((void *)string); entryPtr->string = newStr; /* @@ -2294,7 +2290,7 @@ DeleteChars( } ckfree(toDelete); - ckfree((char *)entryPtr->string); + ckfree((void *)entryPtr->string); entryPtr->string = newStr; entryPtr->numChars -= count; entryPtr->numBytes -= byteCount; @@ -2484,13 +2480,13 @@ EntrySetValue( if (entryPtr->flags & VALIDATE_ABORT) { entryPtr->flags &= ~VALIDATE_ABORT; - ckfree((char *)value); + ckfree((void *)value); return; } } oldSource = entryPtr->string; - ckfree((char *)entryPtr->string); + ckfree((void *)entryPtr->string); if (malloced) { entryPtr->string = value; |