diff options
author | dgp <dgp@users.sourceforge.net> | 2013-02-26 16:38:17 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-02-26 16:38:17 (GMT) |
commit | cdd95b37ba2c5f847143cb367518f2eb11f59330 (patch) | |
tree | c89a9667569815de5421bdf48dc2906d17cd87c8 /generic | |
parent | 3113125de488bc505861db30785af63bae2e531c (diff) | |
download | tcl-cdd95b37ba2c5f847143cb367518f2eb11f59330.zip tcl-cdd95b37ba2c5f847143cb367518f2eb11f59330.tar.gz tcl-cdd95b37ba2c5f847143cb367518f2eb11f59330.tar.bz2 |
struct NextChannelHandler used only locally. Remove from tclIO.h.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 24 | ||||
-rw-r--r-- | generic/tclIO.h | 25 |
2 files changed, 24 insertions, 25 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index ed08112..a944314 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -22,6 +22,30 @@ /* + * This structure keeps track of the current ChannelHandler being invoked in + * the current invocation of ChannelHandlerEventProc. There is a potential + * problem if a ChannelHandler is deleted while it is the current one, since + * ChannelHandlerEventProc needs to look at the nextPtr field. To handle this + * problem, structures of the type below indicate the next handler to be + * processed for any (recursively nested) dispatches in progress. The + * nextHandlerPtr field is updated if the handler being pointed to is deleted. + * The nextPtr field is used to chain together all recursive invocations, so + * that Tcl_DeleteChannelHandler can find all the recursively nested + * invocations of ChannelHandlerEventProc and compare the handler being + * deleted against the NEXT handler to be invoked in that invocation; when it + * finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr + * field of the structure to the next handler. + */ + +typedef struct NextChannelHandler { + ChannelHandler *nextHandlerPtr; /* The next handler to be invoked in + * this invocation. */ + struct NextChannelHandler *nestedHandlerPtr; + /* Next nested invocation of + * ChannelHandlerEventProc. */ +} NextChannelHandler; + +/* * All static variables used in this file are collected into a single * instance of the following structure. For multi-threaded implementations, * there is one instance of this structure for each thread. diff --git a/generic/tclIO.h b/generic/tclIO.h index 2c7978a..876bf1d 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -342,31 +342,6 @@ typedef struct ChannelHandler { } ChannelHandler; /* - * This structure keeps track of the current ChannelHandler being invoked in - * the current invocation of ChannelHandlerEventProc. There is a potential - * problem if a ChannelHandler is deleted while it is the current one, since - * ChannelHandlerEventProc needs to look at the nextPtr field. To handle this - * problem, structures of the type below indicate the next handler to be - * processed for any (recursively nested) dispatches in progress. The - * nextHandlerPtr field is updated if the handler being pointed to is deleted. - * The nextPtr field is used to chain together all recursive invocations, so - * that Tcl_DeleteChannelHandler can find all the recursively nested - * invocations of ChannelHandlerEventProc and compare the handler being - * deleted against the NEXT handler to be invoked in that invocation; when it - * finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr - * field of the structure to the next handler. - */ - -typedef struct NextChannelHandler { - ChannelHandler *nextHandlerPtr; /* The next handler to be invoked in - * this invocation. */ - struct NextChannelHandler *nestedHandlerPtr; - /* Next nested invocation of - * ChannelHandlerEventProc. */ -} NextChannelHandler; - - -/* * The following structure describes the event that is added to the Tcl * event queue by the channel handler check procedure. */ |