Tcl Source Code

View Ticket
Login
Ticket UUID: 597c31a3876f1ceaa1ed80c779c22b9bd2e57ff0
Title: outdated comment in ScanNumber()
Type: Patch Version:
Submitter: chrstphrchvz Created on: 2022-02-17 09:28:49
Subsystem: 16. Commands A-H Assigned To: nobody
Priority: 5 Medium Severity: Cosmetic
Status: Open Last Modified: 2022-02-17 09:29:16
Resolution: None Closed By: nobody
    Closed on:
Description:

There is a comment in ScanNumber() that seems outdated and/or redundant; I suggest removing it (see attached patch).

From what I can tell, a long time ago (Tcl 8.0), ScanNumber() used to declare buffer to be char* of unspecified signedness. Eventually some portability handling and explanatory comment were added. But not too long after this, ScanNumber() declared buffer to be unsigned char* and removed a bunch of casts to unsigned char, but left the comment as-is.

Both the comment and the type declaration change appeared in Tcl 8.1a1, and in the check-in history I only found the cumulative changes for 8.1a2: https://core.tcl-lang.org/tcl/fdiff?v1=c5dc6b7b98a880a4&v2=0ad90ea0fbbdd13b, and I did not locate a remark about it in the change log files. However a patch posted to comp.lang.tcl seems to confirm that the comment is older, and that there was intention to remove it (at least at one point): https://groups.google.com/g/comp.lang.tcl/c/4hFpmsMDFOQ/m/jGgcGwvT_LoJ


Attachments: