| Ticket UUID: | d556d5472319117b076232810416ca2ac41b6b6 | |||
| Title: | Inconsistency in Tcl declaration of Tcl_EventuallyFree and Tcl_SetResult causes warnings when compiling. | |||
| Type: | Patch | Version: | 8.6.14 | |
| Submitter: | sysadm@prs.de | Created on: | 2024-07-03 16:20:49 | |
| Subsystem: | 52. Portability Support | Assigned To: | jan.nijtmans | |
| Priority: | 3 Low | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2024-07-03 20:19:11 | |
| Resolution: | Duplicate | Closed By: | jan.nijtmans | |
| Closed on: | 2024-07-03 20:19:11 | |||
| Description: |
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.
| |||
| User Comments: |
jan.nijtmans added on 2024-07-03 20:19:11:
Dup of [df85199878]: Already fixed | |||