Tcl Source Code

Check-in [f28efa3202]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | novem
Files: files | file ages | folders
SHA1: f28efa3202d9d9723d45382086574dfc8fb4d9d6
User & Date: dgp 2015-02-26 16:35:48
Context
2015-03-11
20:55
merge trunk check-in: 06a7c7a11e user: dgp tags: novem
2015-02-26
16:40
merge novem check-in: c0ddc62dbe user: dgp tags: dgp-refactor
16:35
merge trunk check-in: f28efa3202 user: dgp tags: novem
2015-02-20
20:19
[32b6159246] Accept aspect patch for broken [lreplace] bytecode. No more [lreplace {1 2 3} 2 0] => 1... check-in: a3653be454 user: dgp tags: trunk
2015-02-12
17:08
Merge trunk and tzdata2015a from ietf.org check-in: 7e2416a5da user: venkat tags: novem
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/CrtChannel.3.

332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
        Tcl_DriverTruncateProc *\fItruncateProc\fR;
} \fBTcl_ChannelType\fR;
.CE
.PP
It is not necessary to provide implementations for all channel
operations.  Those which are not necessary may be set to NULL in the
struct: \fIblockModeProc\fR, \fIseekProc\fR, \fIsetOptionProc\fR,
\fIgetOptionProc\fR, and \fIclose2Proc\fR, in addition to
\fIflushProc\fR, \fIhandlerProc\fR, \fIthreadActionProc\fR, and
\fItruncateProc\fR.  Other functions that cannot be implemented in a
meaningful way should return \fBEINVAL\fR when called, to indicate
that the operations they represent are not available. Also note that
\fIwideSeekProc\fR can be NULL if \fIseekProc\fR is.
.PP
The user should only use the above structure for \fBTcl_ChannelType\fR







|







332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
        Tcl_DriverTruncateProc *\fItruncateProc\fR;
} \fBTcl_ChannelType\fR;
.CE
.PP
It is not necessary to provide implementations for all channel
operations.  Those which are not necessary may be set to NULL in the
struct: \fIblockModeProc\fR, \fIseekProc\fR, \fIsetOptionProc\fR,
\fIgetOptionProc\fR, \fIgetHandleProc\fR, and \fIclose2Proc\fR, in addition to
\fIflushProc\fR, \fIhandlerProc\fR, \fIthreadActionProc\fR, and
\fItruncateProc\fR.  Other functions that cannot be implemented in a
meaningful way should return \fBEINVAL\fR when called, to indicate
that the operations they represent are not available. Also note that
\fIwideSeekProc\fR can be NULL if \fIseekProc\fR is.
.PP
The user should only use the above structure for \fBTcl_ChannelType\fR

Changes to generic/tclCompCmdsGR.c.

1496
1497
1498
1499
1500
1501
1502




1503
1504
1505
1506
1507
1508
1509
	return TCL_ERROR;
    }

    tokenPtr = TokenAfter(tokenPtr);
    if (GetIndexFromToken(tokenPtr, &idx2) != TCL_OK) {
	return TCL_ERROR;
    }





    /*
     * Work out what this [lreplace] is actually doing.
     */

    tmpObj = NULL;
    CompileWord(envPtr, listTokenPtr, interp, 1);







>
>
>
>







1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
	return TCL_ERROR;
    }

    tokenPtr = TokenAfter(tokenPtr);
    if (GetIndexFromToken(tokenPtr, &idx2) != TCL_OK) {
	return TCL_ERROR;
    }

    if(idx2 != INDEX_END && idx2 < idx1) {
	idx2 = idx1-1;
    }

    /*
     * Work out what this [lreplace] is actually doing.
     */

    tmpObj = NULL;
    CompileWord(envPtr, listTokenPtr, interp, 1);

Changes to generic/tclIO.c.

1544
1545
1546
1547
1548
1549
1550
















1551
1552
1553
1554
1555
1556
1557
     *
     * If this assertion fails on some system, then it can be removed only if
     * the user recompiles code with older channel drivers in the new system
     * as well.
     */

    assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc *));

















    /*
     * JH: We could subsequently memset these to 0 to avoid the numerous
     * assignments to 0/NULL below.
     */

    chanPtr = ckalloc(sizeof(Channel));







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
     *
     * If this assertion fails on some system, then it can be removed only if
     * the user recompiles code with older channel drivers in the new system
     * as well.
     */

    assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc *));
    assert(typePtr->typeName != NULL);
    if (NULL == typePtr->closeProc) {
	Tcl_Panic("channel type %s must define closeProc", typePtr->typeName);
    }
    if ((TCL_READABLE & mask) && (NULL == typePtr->inputProc)) {
	Tcl_Panic("channel type %s must define inputProc when used for reader channel", typePtr->typeName);
    }
    if ((TCL_WRITABLE & mask) &&  (NULL == typePtr->outputProc)) {
	Tcl_Panic("channel type %s must define outputProc when used for writer channel", typePtr->typeName);
    }
    if (NULL == typePtr->watchProc) {
	Tcl_Panic("channel type %s must define watchProc", typePtr->typeName);
    }
    if ((NULL!=typePtr->wideSeekProc) && (NULL == typePtr->seekProc)) {
	Tcl_Panic("channel type %s must define seekProc if defining wideSeekProc", typePtr->typeName);
    }

    /*
     * JH: We could subsequently memset these to 0 to avoid the numerous
     * assignments to 0/NULL below.
     */

    chanPtr = ckalloc(sizeof(Channel));

Changes to tests/lreplace.test.

133
134
135
136
137
138
139









140
141
142
143
144
145
146
test lreplace-4.1 {Bug ccc2c2cc98: lreplace edge case} {
    lreplace {} 1 1
} {}
# Note that this test will fail in 8.5
test lreplace-4.2 {Bug ccc2c2cc98: lreplace edge case} {
    lreplace { } 1 1
} {}










# cleanup
catch {unset foo}
::tcltest::cleanupTests
return

# Local Variables:







>
>
>
>
>
>
>
>
>







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
test lreplace-4.1 {Bug ccc2c2cc98: lreplace edge case} {
    lreplace {} 1 1
} {}
# Note that this test will fail in 8.5
test lreplace-4.2 {Bug ccc2c2cc98: lreplace edge case} {
    lreplace { } 1 1
} {}
test lreplace-4.3 {lreplace edge case} {
    lreplace {1 2 3} 2 0
} {1 2 3}
test lreplace-4.4 {lreplace edge case} {
    lreplace {1 2 3 4 5} 3 1
} {1 2 3 4 5}
test lreplace-4.4 {lreplace edge case} {
    lreplace {1 2 3 4 5} 3 0 _
} {1 2 3 _ 4 5}

# cleanup
catch {unset foo}
::tcltest::cleanupTests
return

# Local Variables: