diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-17 10:41:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-17 10:41:56 (GMT) |
commit | 7d1100313a68cf7d64f008b426f663c7af9362ae (patch) | |
tree | 612039a181bb9293de45bbd842fcbad149b7188b | |
parent | 06b24153f7ea8257a0e26ec56f8db1ac74c77031 (diff) | |
parent | c6dcb383b3da1763e3f325a5163925f49736195b (diff) | |
download | tcl-7d1100313a68cf7d64f008b426f663c7af9362ae.zip tcl-7d1100313a68cf7d64f008b426f663c7af9362ae.tar.gz tcl-7d1100313a68cf7d64f008b426f663c7af9362ae.tar.bz2 |
Deprecate Tcl_GetAlias()
-rw-r--r-- | doc/CrtAlias.3 | 9 | ||||
-rw-r--r-- | generic/tcl.decls | 2 | ||||
-rw-r--r-- | generic/tclDecls.h | 5 | ||||
-rw-r--r-- | generic/tclInterp.c | 3 | ||||
-rw-r--r-- | generic/tclStubInit.c | 1 |
5 files changed, 12 insertions, 8 deletions
diff --git a/doc/CrtAlias.3 b/doc/CrtAlias.3 index fba6253..eece208 100644 --- a/doc/CrtAlias.3 +++ b/doc/CrtAlias.3 @@ -168,16 +168,17 @@ restrictions on how they are related. that it takes a vector of values to pass as additional arguments instead of a vector of strings. .PP -\fBTcl_GetAlias\fR returns information about an alias \fIaliasName\fR +\fBTcl_GetAliasObj\fR returns information in the form of a pointer to +a vector of Tcl_Obj structures about an alias \fIaliasName\fR in \fIinterp\fR. Any of the result fields can be \fBNULL\fR, in which case the corresponding datum is not returned. If a result field is non\-\fBNULL\fR, the address indicated is set to the corresponding datum. For example, if \fItargetNamePtr\fR is non\-\fBNULL\fR it is set to a pointer to the string containing the name of the target command. .PP -\fBTcl_GetAliasObj\fR is similar to \fBTcl_GetAlias\fR except that it -returns a pointer to a vector of Tcl_Obj structures instead of a vector of -strings. +\fBTcl_GetAlias\fR is similar to \fBTcl_GetAliasObj\fR except that it +returns a pointer to a vector of string instead of a vector of +Tcl_Obj structures. \fBTcl_GetAlias\fR is deprecated. .PP \fBTcl_ExposeCommand\fR moves the command named \fIhiddenCmdName\fR from the set of hidden commands to the set of exposed commands, putting diff --git a/generic/tcl.decls b/generic/tcl.decls index 5f82a1c..3048f97 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -470,7 +470,7 @@ declare 145 { declare 146 { int Tcl_Flush(Tcl_Channel chan) } -declare 148 { +declare 148 {deprecated {Use Tcl_GetAliasObj}} { int Tcl_GetAlias(Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *argcPtr, const char ***argvPtr) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0d5bfe5..cdfe075 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -428,7 +428,8 @@ EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, EXTERN int Tcl_Flush(Tcl_Channel chan); /* Slot 147 is reserved */ /* 148 */ -EXTERN int Tcl_GetAlias(Tcl_Interp *interp, +TCL_DEPRECATED("Use Tcl_GetAliasObj") +int Tcl_GetAlias(Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *argcPtr, @@ -2027,7 +2028,7 @@ typedef struct TclStubs { Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr); /* 145 */ int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ void (*reserved147)(void); - int (*tcl_GetAlias) (Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *argcPtr, const char ***argvPtr); /* 148 */ + TCL_DEPRECATED_API("Use Tcl_GetAliasObj") int (*tcl_GetAlias) (Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *argcPtr, const char ***argvPtr); /* 148 */ int (*tcl_GetAliasObj) (Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objv); /* 149 */ void * (*tcl_GetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr); /* 150 */ Tcl_Channel (*tcl_GetChannel) (Tcl_Interp *interp, const char *chanName, int *modePtr); /* 151 */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 5127936..d953bc0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -1288,7 +1288,7 @@ Tcl_CreateAliasObj( * *---------------------------------------------------------------------- */ - +#ifndef TCL_NO_DEPRECATED int Tcl_GetAlias( Tcl_Interp *interp, /* Interp to start search from. */ @@ -1334,6 +1334,7 @@ Tcl_GetAlias( } return TCL_OK; } +#endif /* TCL_NO_DEPRECATED */ /* *---------------------------------------------------------------------- diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 92e9b1c..f837e2c 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -74,6 +74,7 @@ # define TclGetStringFromObj 0 # define TclGetBytesFromObj 0 # define TclGetUnicodeFromObj 0 +# define Tcl_GetAlias 0 #endif #undef Tcl_Close #define Tcl_Close 0 |