diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-20 23:02:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-20 23:02:59 (GMT) |
commit | 29df448c956c297a8f4c1dfda0ee2c257c48e030 (patch) | |
tree | 1ea9341c4c38d30fcb532d2c73ff4fa836838644 /generic | |
parent | 6ed98c8c895eeae9795af8e3bf600485ce7bfbef (diff) | |
download | tk-29df448c956c297a8f4c1dfda0ee2c257c48e030.zip tk-29df448c956c297a8f4c1dfda0ee2c257c48e030.tar.gz tk-29df448c956c297a8f4c1dfda0ee2c257c48e030.tar.bz2 |
Slightly biger "lenght" variables, in case we are using Tcl 9
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkClipboard.c | 4 | ||||
-rw-r--r-- | generic/tkSelect.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index ed555a9..f09958e 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -60,7 +60,7 @@ ClipboardHandler( TkClipboardBuffer *cbPtr; char *srcPtr, *destPtr; size_t count = 0; - int scanned = 0; + size_t scanned = 0; size_t length, freeCount; /* @@ -71,7 +71,7 @@ ClipboardHandler( if (cbPtr == NULL) { return 0; } - if (scanned + cbPtr->length > offset) { + if (scanned + cbPtr->length > (size_t)offset) { break; } scanned += cbPtr->length; diff --git a/generic/tkSelect.h b/generic/tkSelect.h index d7df94e..405cbea 100644 --- a/generic/tkSelect.h +++ b/generic/tkSelect.h @@ -107,7 +107,7 @@ typedef struct TkSelRetrievalInfo { typedef struct TkClipboardBuffer { char *buffer; /* Null terminated data buffer. */ - long length; /* Length of string in buffer. */ + size_t length; /* Length of string in buffer. */ struct TkClipboardBuffer *nextPtr; /* Next in list of buffers. NULL means end of * list . */ |