| Ticket UUID: | 85b87a7570d65ad9ab32c63a18e91400724e4557 | ||
| Title: | TclByteArrayMatch - unused? premature opt? | ||
| Type: | Bug | Created on: | 2016-03-07 19:32:18 |
| Submitter: | dgp | Assigned to: | nobody |
| Subsystem: | 10. Objects | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2016-03-08 03:44:58 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | trunk | ||
| Description: | ||||
The routine TclByteArrayMatch() in tclUtil.c is not covered at all by the test suite. Is there any actual known or expected use case that justifies it? Or just code for code's sake? | ||||
| User Comments: | ||||
dgp added on 2016-03-08 03:44:58:
Ok, the routine originated here: http://core.tcl.tk/tcl/info/d6f120464eb07ce6 but apparently before it was realized that it was only appropriate for pure bytearray values because the string -> bytearray transformation is not a reversible one. Once it is realized that the routine can only be used for pure bytearrays and is constrained to only be called on pure bytearrays, then defining it makes roughly as much sense as defining a "string match" routine specialized to lists -- not much. I'm not compelled to remove it just to remove it, but I'll try to remember how useless it is if/when it becomes an obstacle to internal reform efforts. | ||||
