diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-05 07:18:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-05 07:18:37 (GMT) |
commit | 82a85e5b1eb378f5a45526e1b098459f6b848f42 (patch) | |
tree | f505ea9ce02a84ba21fdda5800039ebb0519b701 /generic | |
parent | 84ff1fb2d98ae85007f676e3872803497dbea1fe (diff) | |
download | tcl-82a85e5b1eb378f5a45526e1b098459f6b848f42.zip tcl-82a85e5b1eb378f5a45526e1b098459f6b848f42.tar.gz tcl-82a85e5b1eb378f5a45526e1b098459f6b848f42.tar.bz2 |
RFE [655300]: Deprecate Tcl_MakeSafe()
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.decls | 2 | ||||
-rw-r--r-- | generic/tclDecls.h | 5 | ||||
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | generic/tclInterp.c | 6 | ||||
-rw-r--r-- | generic/tclStubInit.c | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 3cf794e..95b66f9 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -678,7 +678,7 @@ declare 187 { declare 189 { Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode) } -declare 190 { +declare 190 {deprecated {}} { int Tcl_MakeSafe(Tcl_Interp *interp) } declare 191 { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 790cddb..9a9be7a 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -602,7 +602,8 @@ EXTERN int Tcl_LinkVar(Tcl_Interp *interp, const char *varName, /* 189 */ EXTERN Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode); /* 190 */ -EXTERN int Tcl_MakeSafe(Tcl_Interp *interp); +TCL_DEPRECATED("") +int Tcl_MakeSafe(Tcl_Interp *interp); /* 191 */ EXTERN Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket); /* 192 */ @@ -2188,7 +2189,7 @@ typedef struct TclStubs { int (*tcl_LinkVar) (Tcl_Interp *interp, const char *varName, void *addr, int type); /* 187 */ void (*reserved188)(void); Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp *interp); /* 190 */ + TCL_DEPRECATED_API("") int (*tcl_MakeSafe) (Tcl_Interp *interp); /* 190 */ Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ char * (*tcl_Merge) (int argc, const char *const *argv); /* 192 */ Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch *searchPtr); /* 193 */ diff --git a/generic/tclInt.h b/generic/tclInt.h index af839fc..2546e17 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3112,6 +3112,8 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); +MODULE_SCOPE int TclMakeSafe(Tcl_Interp *interp); + MODULE_SCOPE int TclMaxListLength(const char *bytes, int numBytes, const char **endPtr); MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, diff --git a/generic/tclInterp.c b/generic/tclInterp.c index e590775..115882b 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -2468,7 +2468,7 @@ ChildCreate( ((Interp *) parentInterp)->maxNestingDepth; if (safe) { - if (Tcl_MakeSafe(childInterp) == TCL_ERROR) { + if (TclMakeSafe(childInterp) == TCL_ERROR) { goto error; } } else { @@ -3253,7 +3253,7 @@ Tcl_IsSafe( /* *---------------------------------------------------------------------- * - * Tcl_MakeSafe -- + * TclMakeSafe -- * * Makes its argument interpreter contain only functionality that is * defined to be part of Safe Tcl. Unsafe commands are hidden, the env @@ -3270,7 +3270,7 @@ Tcl_IsSafe( */ int -Tcl_MakeSafe( +TclMakeSafe( Tcl_Interp *interp) /* Interpreter to be made safe. */ { Tcl_Channel chan; /* Channel to remove from safe interpreter. */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 257c3ce..7b682d2 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -713,6 +713,7 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){ # define TclBN_s_mp_sqr 0 # undef TclBN_s_mp_sub # define TclBN_s_mp_sub 0 +# define Tcl_MakeSafe 0 #else /* TCL_NO_DEPRECATED */ # define Tcl_SeekOld seekOld # define Tcl_TellOld tellOld @@ -734,6 +735,7 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){ # define TclGetCommandFullName Tcl_GetCommandFullName # define TclpLocaltime_unix TclpLocaltime # define TclpGmtime_unix TclpGmtime +# define Tcl_MakeSafe TclMakeSafe static int seekOld( |