diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-14 10:10:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-14 10:10:30 (GMT) |
commit | f1b74b07572c8ac168a3313a6c71ec30f1a7485c (patch) | |
tree | f0aed383ff3df3c53cde48d4c9d5717d0580289b /generic/tclIORTrans.c | |
parent | 8a90d26eafca6f78203e2af6e227e6404041b851 (diff) | |
parent | a9eaf6765198716158f4927d71f64d20182f1ad2 (diff) | |
download | tcl-f1b74b07572c8ac168a3313a6c71ec30f1a7485c.zip tcl-f1b74b07572c8ac168a3313a6c71ec30f1a7485c.tar.gz tcl-f1b74b07572c8ac168a3313a6c71ec30f1a7485c.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclIORTrans.c')
-rw-r--r-- | generic/tclIORTrans.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index c143497..dc6c9a7 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -91,20 +91,20 @@ static const Tcl_ChannelType tclRTransformType = { typedef struct { unsigned char *buf; /* Reference to the buffer area. */ - int allocated; /* Allocated size of the buffer area. */ - int used; /* Number of bytes in the buffer, + size_t allocated; /* Allocated size of the buffer area. */ + size_t used; /* Number of bytes in the buffer, * <= allocated. */ } ResultBuffer; #define ResultLength(r) ((r)->used) /* static int ResultLength(ResultBuffer *r); */ -static void ResultClear(ResultBuffer *r); -static void ResultInit(ResultBuffer *r); -static void ResultAdd(ResultBuffer *r, unsigned char *buf, - int toWrite); -static int ResultCopy(ResultBuffer *r, unsigned char *buf, - int toRead); +static inline void ResultClear(ResultBuffer *r); +static inline void ResultInit(ResultBuffer *r); +static inline void ResultAdd(ResultBuffer *r, unsigned char *buf, + size_t toWrite); +static inline size_t ResultCopy(ResultBuffer *r, unsigned char *buf, + size_t toRead); #define RB_INCREMENT (512) @@ -2924,7 +2924,7 @@ TimerRun( *---------------------------------------------------------------------- */ -static void +static inline void ResultInit( ResultBuffer *rPtr) /* Reference to the structure to * initialize. */ @@ -2949,7 +2949,7 @@ ResultInit( *---------------------------------------------------------------------- */ -static void +static inline void ResultClear( ResultBuffer *rPtr) /* Reference to the buffer to clear out */ { @@ -2980,11 +2980,11 @@ ResultClear( *---------------------------------------------------------------------- */ -static void +static inline void ResultAdd( ResultBuffer *rPtr, /* The buffer to extend */ unsigned char *buf, /* The buffer to read from */ - int toWrite) /* The number of bytes in 'buf' */ + size_t toWrite) /* The number of bytes in 'buf' */ { if ((rPtr->used + toWrite + 1) > rPtr->allocated) { /* @@ -3028,11 +3028,11 @@ ResultAdd( *---------------------------------------------------------------------- */ -static int +static inline size_t ResultCopy( ResultBuffer *rPtr, /* The buffer to read from */ unsigned char *buf, /* The buffer to copy into */ - int toRead) /* Number of requested bytes */ + size_t toRead) /* Number of requested bytes */ { int copied; |