From 8852e00049c50af24808ee5d609065b76f829fe9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 May 2022 15:18:31 +0000 Subject: Deprecate 2 internal typedefs: TclCmdProcType/TclObjCmdProcType. Too little benefit to keep them --- generic/tclInt.decls | 4 ++-- generic/tclInt.h | 2 ++ generic/tclIntDecls.h | 4 ++-- generic/tclProc.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 8cefc34..6b0bdae 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -150,7 +150,7 @@ declare 32 { } # Removed in 8.5: #declare 33 { -# TclCmdProcType TclGetInterpProc(void) +# Tcl_CmdProc *TclGetInterpProc(void) #} declare 34 {deprecated {Use Tcl_GetIntForIndex}} { int TclGetIntForIndex(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -175,7 +175,7 @@ declare 38 { const char **simpleNamePtr) } declare 39 { - TclObjCmdProcType TclGetObjInterpProc(void) + Tcl_ObjCmdProc *TclGetObjInterpProc(void) } declare 40 { int TclGetOpenMode(Tcl_Interp *interp, const char *str, int *seekFlagPtr) diff --git a/generic/tclInt.h b/generic/tclInt.h index 59106cd..294ff97 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2644,8 +2644,10 @@ typedef Tcl_Channel (TclOpenFileChannelProc_)(Tcl_Interp *interp, *---------------------------------------------------------------- */ +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 typedef Tcl_CmdProc *TclCmdProcType; typedef Tcl_ObjCmdProc *TclObjCmdProcType; +#endif /* *---------------------------------------------------------------- diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index f4e657b..28b2a61 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -146,7 +146,7 @@ EXTERN int TclGetNamespaceForQualName(Tcl_Interp *interp, Namespace **actualCxtPtrPtr, const char **simpleNamePtr); /* 39 */ -EXTERN TclObjCmdProcType TclGetObjInterpProc(void); +EXTERN Tcl_ObjCmdProc * TclGetObjInterpProc(void); /* 40 */ EXTERN int TclGetOpenMode(Tcl_Interp *interp, const char *str, int *seekFlagPtr); @@ -703,7 +703,7 @@ typedef struct TclIntStubs { void (*reserved36)(void); int (*tclGetLoadedPackages) (Tcl_Interp *interp, const char *targetName); /* 37 */ int (*tclGetNamespaceForQualName) (Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, const char **simpleNamePtr); /* 38 */ - TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ + Tcl_ObjCmdProc * (*tclGetObjInterpProc) (void); /* 39 */ int (*tclGetOpenMode) (Tcl_Interp *interp, const char *str, int *seekFlagPtr); /* 40 */ Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ const char * (*tclpGetUserHome) (const char *name, Tcl_DString *bufferPtr); /* 42 */ diff --git a/generic/tclProc.c b/generic/tclProc.c index 8c65de3..f2dd98a 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -2274,10 +2274,10 @@ TclUpdateReturnInfo( *---------------------------------------------------------------------- */ -TclObjCmdProcType +Tcl_ObjCmdProc * TclGetObjInterpProc(void) { - return (TclObjCmdProcType) TclObjInterpProc; + return (Tcl_ObjCmdProc *) TclObjInterpProc; } /* -- cgit v0.12