Overview
| Artifact ID: | b6567fba22bd2adc016b6819a6b1b53b4d159b41 |
|---|---|
| Ticket: | 187d7f499bfc71c054b7ebd745a37b8154b5ddb6
Fix minor regexp bugs by adopting past Postgres patches |
| User & Date: | oehhar on 2015-09-21 08:58:44 |
Changes
- comment changed to:
The attached patch, if applied on top of the changes recommended in open tickets * [http://core.tcl.tk/tcl/tktview?name=d7ea9f9853] * [http://core.tcl.tk/tcl/tktview?name=a3c3508599] * [http://core.tcl.tk/tcl/tktview?name=0e0e150e49] syncs Tcl 8.6.4's regexp library with Postgres HEAD as of today, at least about as well as the two code bases are ever likely to be in sync. (There are a lot of differences in locale handling, in particular, which I doubt we can remove because of differing project requirements.) These changes correspond to the following commits in the Postgres repo at [http://git.postgresql.org/gitweb/?p=postgresql.git] You can look at the commit log entries for them if you want more detail. * Speed up regex execution by creating/destroying subre DFAs only once per exec(), not once per recursive dissection call: <verbatim> 587359479acbbdc95c8e37da40707e37097423f5 ea8c7e9054abf23fa3de2f8e4414f60ac8a8b620 </verbatim> * Simplify and document cNFA representation: <verbatim> c6aae3042be5249e672b731ebeb21875b5343010 </verbatim> * Fix assorted memory leaks and missed error checks: <verbatim> d9c0c728afe734b7087dbb9a4bc16d5b682d139d 8a0258c31808c514755e3bba03cb052084c4887c 1567e659a877d35ab4b85dafff41b2845d50990f 54fd196ffc6432b62fe075e564f457db64fb288c </verbatim> * Const-ify variables where possible (you'd done some of this already): <verbatim> 0d79c0a8cc20dbaa39112d78a9abb821c4ca3554 </verbatim> * Suppress compiler warnings (in particular, build cleanly with -DREG_DEBUG): <verbatim> e621037eec4a1c9ec2d7056c9c1c11b9b03932cb 06ce02f989598506f611ef48ccb68e5e47d02859 </verbatim> * Make dumpcolors() have tolerable performance: <verbatim> 298c4575200e25d1e1c3447b5400e1a6f91bc500 </verbatim> As in my previous patch submission, I've not tried very hard to meet all Tcl layout conventions, in particular I've not added braces around single-line if-blocks. I'm hoping you have some automated way of dealing with that.
- icomment:
Thank you for the patch, I would appreciate if you would get commit rights on tcl core, so you could add it as branch. Core internal documentation is in this fossil wiki. I just started a page with your provided info: [https://core.tcl.tk/tcl/wiki?name=regexp] That is better than nothing. Another wizard will probably include your patch and close the ticket. Thank you, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"