Tk Source Code

View Ticket
Login
Ticket UUID: 3e92a1c629090a260651f6f9c6c915072ae10f6c
Title: Tk_NameToWindow doc incomplete description
Type: Bug Version:
Submitter: emiliano Created on: 2025-02-07 12:19:48
Subsystem: 99. Other Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-02-23 01:21:16
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2025-02-23 01:21:16
Description:
The Tk_NameToWindow documentation reads

"It normally returns a token for the named window, but if no such window exists Tk_NameToWindow  leaves  an  error message in interpreter interp's result and returns NULL".

It doesn't mention that the interp argument can be NULL, and is used only for error reporting.
User Comments: jan.nijtmans added on 2025-02-23 01:21:16:

Actually, whenever "interp" (which is always an "in" argument) is used for error-reporting only, it should always allowed to be NULL. That's not always the case.

Some more examples [330177f183d5747f|here] (not complete)


fvogel added on 2025-02-22 11:57:06:

Done in [266ab33403]. Thanks!


emiliano added on 2025-02-07 12:33:22:
Well, it *does* mention that the interp is for error reporting in SYNOPSIS, but still doesn't mention it can be NULL.