summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * * 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.
* | * generic/tclIORChan.c: [Bug 3034840]: Fixed reference countingandreas_kupries2010-08-041-27/+71
| | | | | | | | | | * generic/tclIORTrans.c: in InvokeTclMethod and callers. * tests/ioTrans.test:
* | Use "tclIO.h" and "tclTomMathDecls.h" everywherenijtmans2010-05-031-2/+2
| |
* | If tclInt.h or tclPort.h is alreadynijtmans2010-04-271-2/+2
| | | | | | | | | | | | | | included, don't include <limits.h> again. Follow-up to [Bug 2991415]: tclport.h #included before limits.h See comments in [Bug 2991415]
* | * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput,andreas_kupries2010-03-301-59/+98
| | | | | | | | | | | | | | | | 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.
* | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-29/+30
| |
* | * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* | Cast required when setting result using a const string. String is copied by ↵patthoyts2009-11-211-2/+2
| | | | | | | | TCL_VOLATILE.
* | Fix [Bug 2849797]: channel name inconsistencies as suggested by DKFnijtmans2009-11-181-2/+2
| | | | | | | | | | | | minor *** POTENTIAL INCOMPATIBILITY *** because Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument.
* | * 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}).
* | - eliminate some unnessary type castsnijtmans2009-02-101-2/+2
| | | | | | | | | | - some internal const decorations - spacing
* | minor formatting improvementsdkf2009-01-261-4/+5
| |
* | * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202].andreas_kupries2009-01-221-7/+12
| | | | | | | | | | | | | | * generic/tclIORTrans.c (ReflectClose): 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.
* | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-31/+31
| | | | | | | | etc.)
* | Add "const" to many internalnijtmans2008-10-161-5/+5
| | | | | | | | | | const tables. No functional or API change.
* | * 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.
* | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-94/+103
| |
* | fix warningdas2008-04-251-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
|