Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-07-03
20:19 • Closed ticket [d556d54723]: Inconsistency in Tcl declaration of Tcl_EventuallyFr... artifact: 92e8b69fae user: jan.nijtmans
16:22 • Ticket [d556d54723]: 5 changes artifact: 54439259d5 user: [email protected]
16:20 • New ticket [d556d54723]. artifact: 4816a856c5 user: [email protected]

Inconsistency in Tcl declaration of Tcl_EventuallyFree and Tcl_SetResult causes warnings when compiling.

Closed / Duplicated556d5472319117b076232810416ca2ac41b6b6fCreated 2 years agoUpdated 2 years ago
Descriptionplain2024-07-03 16:20:49
tclDecls.h comes with a new redefinition which is in effect when compiling against Tcl stubs (-DUSE_TCL_STUBS) around line 3975:

#ifndef __cplusplus
#   undef Tcl_EventuallyFree
#   define Tcl_EventuallyFree \
           ((void (*)(void *,void *))(void *)(tclStubsPtr->tcl_EventuallyFree)) /* 132 */
#   undef Tcl_SetResult
#   define Tcl_SetResult \
           ((void (*)(Tcl_Interp *, char *, void *))(void *)(tclStubsPtr->tcl_SetResult)) /* 232 */
#endif

This should be disabled since Tcl_FreeProc does not match the declared prototype. I removed this setting and rebuild Tcl on Linux/Windows/macos without problems and I was able to compile extensions against the stub library.

I propose to remove this questionable redefinition to avoid compiler warnings about non-matching types for TCL_STATIC, TCL_DYNAMIC and friends.
[email protected] Ticket [d556d54723]: 5 changes [History diff]2024-07-03 16:22:20
jan.nijtmanswiki2024-07-03 20:19:11

Dup of [df85199878]: Already fixed

Log in (anonymous is fine) to add a comment.