Tk Source Code

View Ticket
Login
2025-03-27
10:24 Closed ticket [25b84e1246]: Remove leftover of old image type plus 7 other changes artifact: d5aa24323f user: oehhar
10:23
Ticket [25b84e1246] Removal of old image code leftover check-in: ff43d4d23c user: oehhar tags: core-9-0-branch
10:15
Ticket [25b84e1246] Removal of old image code leftover check-in: 9087179e31 user: oehhar tags: trunk, main
2025-03-25
19:34 Ticket [25b84e1246] Remove leftover of old image type status still Open with 3 other changes artifact: 60adf8938f user: oehhar
19:31 Ticket [25b84e1246]: 4 changes artifact: 6edb3ed9ef user: oehhar
19:29
Ticket [25b84e1246] Remove old image code leftover Closed-Leaf check-in: 1b7c72a66b user: oehhar tags: 25b84e1246-old-image-leftover-removal
19:17 New ticket [25b84e1246] Rmove leftover of old image type. artifact: f76d4eeb5b user: oehhar

Ticket UUID: 25b84e12464cc60cdf6588f45e3ea9262902f54c
Title: Remove leftover of old image type
Type: Bug Version: 9.0+
Submitter: oehhar Created on: 2025-03-25 19:17:14
Subsystem: 39. Image Basics Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-03-27 10:24:48
Resolution: Fixed Closed By: oehhar
    Closed on: 2025-03-27 10:24:48
Description:

generic/tkImage.c in Tk 8.6 contains two different implementations, which are switched by the define USE_OLD_IMAGE

The old interface uses char*, while the new uses TCL_Obj as parameters.

The define USE_OLD_IMAGE is removed for Tk 9.0.

But there are leftovers.

The thread specific data contains:

typedef struct {
    Tk_ImageType *imageTypeList;/* First in a list of all known image
                 * types. */
    Tk_ImageType *oldImageTypeList;
                /* First in a list of all known old-style
                 * image types. */
    int initialized;        /* Set to 1 if we've initialized the
                 * structure. */
} ThreadSpecificData;

The oldImageTypeList may not be set anymore and may be removed with a considerable amount of code.

Don Porter points out, that this mechanism is crucial in Tk 8.6 and should not be removed there.

Any comments appreciated. I will start a branch and look what that does.

Thanks for all, Harald

User Comments: oehhar added on 2025-03-27 10:24:48:

Merged to:

  • main: [9087179e]
  • core-9-0-branch: [ff43d4d2]

No changes.mk entry necessary, no changed functionality.

Thanks for all, Harald


oehhar added on 2025-03-25 19:31:50:

Proposal starting with commit [1b7c72a6] in branch [25b84e1246-old-image-leftover-removal].

Any review please.

Proposal to merge to main and core-9-0-branch.

Thanks, Harald