Tcl Source Code

Check-in [bff43cd4c3]
Login

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

Overview
Comment:[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discovery in Postgres.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bff43cd4c335dd760353061e88e300b0f18e4e8e
User & Date: dgp 2013-07-26 13:24:19
Context
2013-07-27
20:29
Simplify AuxData access with a macro. check-in: 3f7279e103 user: dgp tags: trunk
2013-07-26
13:30
merge trunk check-in: 19708186c4 user: dkf tags: dkf-command-type
13:27
merge trunk check-in: 737776fd62 user: dgp tags: dgp-refactor
13:24
[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discove... check-in: bff43cd4c3 user: dgp tags: trunk
13:21
[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discove... check-in: 2425a69341 user: dgp tags: core-8-5-branch
09:20
Move test for pthread_atfork inside SC_ENABLE_THREADS check-in: efa7ddd3b9 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/regexec.c.

500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
		    return REG_OKAY;
		}
		if (er != REG_NOMATCH) {
		    ERR(er);
		    return er;
		}
		if ((shorter) ? end == estop : end == begin) {
		    /*
		     * No point in trying again.
		     */

		    *coldp = cold;
		    return REG_NOMATCH;
		}

		/*
		 * Go around and try again
		 */

		if (shorter) {







<
<
<
|
<
<







500
501
502
503
504
505
506



507


508
509
510
511
512
513
514
		    return REG_OKAY;
		}
		if (er != REG_NOMATCH) {
		    ERR(er);
		    return er;
		}
		if ((shorter) ? end == estop : end == begin) {



		    break;


		}

		/*
		 * Go around and try again
		 */

		if (shorter) {

Changes to tests/regexp.test.

872
873
874
875
876
877
878




879
880
881
882
883
884
885
	append e [format %c [incr cp]]
    }
} -body {
    regexp -about $e
} -cleanup {
    unset -nocomplain e cp
} -returnCodes error  -match glob -result {*too many colors*}





test regexp-23.1 {regexp -all and -line} {
    set string ""
    list \
	[regexp -all -inline -indices -line -- {^} $string] \
	[regexp -all -inline -indices -line -- {^$} $string] \
	[regexp -all -inline -indices -line -- {$} $string]







>
>
>
>







872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
	append e [format %c [incr cp]]
    }
} -body {
    regexp -about $e
} -cleanup {
    unset -nocomplain e cp
} -returnCodes error  -match glob -result {*too many colors*}
test regexp-22.6 {Bug 6585b21ca8} {
    expr {[regexp {(\w).*?\1} Programmer m] ? $m : "<NONE>"}
} rogr


test regexp-23.1 {regexp -all and -line} {
    set string ""
    list \
	[regexp -all -inline -indices -line -- {^} $string] \
	[regexp -all -inline -indices -line -- {^$} $string] \
	[regexp -all -inline -indices -line -- {$} $string]