summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix gcc warning (discovered with latest mingw, based on gcc 4.6.1)jan.nijtmans2011-10-071-2/+0
|
* Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| | | more harm than good. Purged them.
* * generic/tclIORChan.c: [Bug 3034840]: Fixed reference countingandreas_kupries2010-08-041-24/+63
| | | | * tests/ioCmd.test: in InvokeTclMethod and callers.
* * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput,andreas_kupries2010-03-301-47/+86
| | | | | | | | ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve ReflectedChannel* structures across handler invokations, to avoid crashes when the handler implementation induces nested callbacks and destruction of the channel deep inside such a nesting.
* * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieuxandreas_kupries2010-03-091-6/+27
| | | | | | * doc/refchan.n: <ferrieux@users.sourceforge.net> for debugging and fixing * tests/ioCmd.test: the problem. It is the write-side equivalent to the bug fixed 2009-08-06.
* * generic/tclIORChan.c (ErrnoReturn): Replace the hardwiredandreas_kupries2009-10-071-2/+2
| | | | | | constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break with the hardwired number. Reported by emiliano on the chat.
* * doc/refchan.n [Bug 2827000]: Extended the implementation ofandreas_kupries2009-08-061-4/+71
| | | | | | | | * generic/tclIORChan.c: reflective channels (TIP 219, method * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to indicate 'no data, but not at EOF either', and other system errors. Updated documentation, extended testsuite (New test cases iocmd*-23.{9,10}).
* * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202].andreas_kupries2009-01-221-8/+13
| | | | | | Closing a channel may supply NULL for the 'interp'. Test for finalization needs to be different, and one place has to pull the interp out of the channel instead.
* * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leakandreas_kupries2008-07-031-1/+13
| | | | | reported in [Bug 1987821]. Thanks to Miguel for the rpeort and Don Porter for tracking the cause down.
* fix warningdas2008-05-031-2/+1
|
* * tests/ioCmd.test: Extended testsuite for reflected channelandreas_kupries2008-04-241-48/+334
| | | | | | | | | | implementation. Added test cases about how it handles if the rug is pulled out from under a channel (= killing threads, interpreters containing the tcl command for a channel, and channel sitting in a different interpreter/thread.) * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, redone most of the cleanup and exit handling.
* * generic/tclIORChan.c (ReflectOutput): Allow zero return fromandreas_kupries2008-04-041-2/+13
| | | | | | | | write when input was zero-length anyway. Otherwise keept it an error, and separate the message from 'written too much'. * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed message.
* * generic/tclIORChan.c (ReflectClose): Added missing removal ofandreas_kupries2008-04-041-1/+15
| | | | | | | | | the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed reflected channel, dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above.
* More stray trailing ","s.jenglish2008-02-261-2/+2
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclIORChan.c: Fixed a problem with reflectedandreas_kupries2007-11-241-10/+146
| | | | | | | | | | | | | | | | | | channels. 'chan postevent' is defined to work only from within the interpreter containing the handler command. Sensible, we want only handler commands to use it. It identifies the channel by handle. The channel moves to a different interpreter or thread. The interpreter containing the handler command doesn't know the channel any longer. 'chan postevent' fails, not finding the channel any longer. Uhm. Fixed by creating a second per-interpreter channel table, just for reflected channels, where each interpreter remembers for which reflected channels it has the handler command. This info does not move with the channel itself. The table is updated by 'chan create', and used by 'chan postevent'. * tests/ioCmd.test: Updated the testsuite.
* improvements to commentsdkf2007-11-191-39/+43
|
* * generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of theKevin B Kenny2007-04-241-1/+4
| | | | | | | | buffer object if the physocal read returned an error and the bypass area had no message. * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the return value from the "initialize" method of a channel handler.
* Plugged two memory leaksKevin B Kenny2007-04-231-3/+3
|
* Complete conversion to ANSI function definitionsdkf2007-04-101-3/+3
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-9/+8
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclIORChan.c (FreeReflectedChannel): Added the missingandreas_kupries2007-02-261-1/+10
| | | | | refcount release between NewRC and FreeRC for the channel handle object, spotted by Don Porter. This fixes the bug 1667990.
* various "const" additions, in line with TIP #27nijtmans2007-02-201-36/+36
|
* TIP#270 IMPLEMENTATIONdgp2006-11-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-5/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-14/+9
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made itandreas_kupries2006-03-271-16/+18
| | | | | | | | | | | | | | * generic/tcl.h: the version where the "truncateProc" * generic/tclIO.c: is defined at, and moved all channel * generic/tclIOGT.c: drivers of Tcl to v5. * generic/tclIORChan.c: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * win/tclWinChan.c: * win/tclWinConsole.c: * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* * generic/tclIORChan.c: Revised error message generation and handlingdgp2006-02-171-63/+73
| | | | | * tests/ioCmd.test: of exceptional return codes in the channel reflection layer. [Bug 1372348].
* * generic/tclIO.c: Made several routines tolerant ofdgp2006-02-151-1/+4
| | | | | * generic/tclIORChan.c: interp == NULL arguments. [Bug 1380662] * generic/tclIOUtil.c:
* Export stubs for libtommath; fix mingw compiler warningsKevin B Kenny2005-12-131-3/+3
|
* Fix crash caused by passing -1 as the length to TclNewStringObj(). Only dkf2005-10-191-12/+7
| | | | | Tcl_NewStringObj (the function call, not the macro) handles that sort of thing correctly.
* Silence a warningdkf2005-10-191-2/+2
|
* More typos obscured by typos fixed in previous checkin...dkf2005-10-191-4/+4
|
* Fix silly typosdkf2005-10-191-14/+15
|
* General cleanup of reflected channel codedkf2005-10-191-1609/+1490
|
* * generic/tclIORChan.c (RcClose): Removed unreachable panic/returnandreas_kupries2005-10-051-4/+1
| | | | statements. This fixes the remainder of [SF Tcl Bug 1286256].
* * generic/tclBasic.c: More callers of TclObjPrintf anddgp2005-09-151-4/+6
| | | | | | | | | | | | | | * generic/tclCkalloc.c: TclFormatToErrorInfo. * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c * unix/configure: autoconf-2.59
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-15/+7
| | | | | | | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
* * generic/tclIORChan.c (RcDecodeEventMask): Added missing typeandreas_kupries2005-09-091-1/+2
| | | | | | declaration for the parameter 'mask'. This fixes the [SF Tcl Bug 1286256]. The other warning can be removed only by removing the panic/return code.
* * unix/tclUnixSock.c (InitializeHostName): Synchronized use ofandreas_kupries2005-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | static modifier in declaration and definition of function. * unix/tclUnixChan.c (FileTruncateProc): Synchronized use of static modifier in declaration and definition of function. * generic/tclResult.c (ReleaseKeys): Synchronized use of static modifier in declaration and definition of function. * generic/tclListObj.c (NewListIntRep): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (InitializeEncodingSearchPath): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of static modifier in declaration and definition of function. * generic/tclIORChan.c (RcNewHandle): Synchronized use of static modifier in declaration and definition of function.
* TIP#219 IMPLEMENTATIONandreas_kupries2005-08-241-0/+2668
* doc/SetChanErr.3: ** New File **. Documentation of the new channel API functions. * generic/tcl.decls: Stub declarations of the new channel API. * generic/tclDecls.h: Regenerated * generic/tclStubInit.c: * tclIORChan.c: ** New File **. Implementation of the reflected channel. * generic/tclInt.h: Integration of reflected channel and new error * generic/tclIO.c: propagation into the generic I/O core. * generic/tclIOCmd.c: * generic/tclIO.h: * library/init.tcl: * tests/io.test: Extended testsuite. * tests/ioCmd.test: * tests/chan.test: * generic/tclTest.c: * generic/tclThreadTest.c: * unix/Makefile.in: Integration into the build machinery. * win/Makefile.in: * win/Makefile.vc: