summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-15 14:46:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-15 14:46:11 (GMT)
commit4fb66d5d55a3239a342ae799da586966fe8326cf (patch)
treebde9681917ff48b59d2fafff4aa3b65a73e26559 /generic
parent556dc3036e36d2449fe4feaece94487adfd745b8 (diff)
downloadtcl-4fb66d5d55a3239a342ae799da586966fe8326cf.zip
tcl-4fb66d5d55a3239a342ae799da586966fe8326cf.tar.gz
tcl-4fb66d5d55a3239a342ae799da586966fe8326cf.tar.bz2
Mark TclPrecTraceProc() as deprecated, and remove it when compiling with -DTCL_NO_DEPRECATED. See TIP #488
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclInt.decls2
-rw-r--r--generic/tclIntDecls.h5
-rw-r--r--generic/tclStubInit.c1
-rw-r--r--generic/tclUtil.c2
5 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index eceea31..406d0b1 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -954,9 +954,11 @@ Tcl_CreateInterp(void)
Tcl_SetVar2(interp, "tcl_patchLevel", NULL, TCL_PATCH_LEVEL, TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "tcl_version", NULL, TCL_VERSION, TCL_GLOBAL_ONLY);
+#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
Tcl_TraceVar2(interp, "tcl_precision", NULL,
TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
TclPrecTraceProc, NULL);
+#endif /* !TCL_NO_DEPRECATED */
TclpSetVariables(interp);
#ifdef TCL_THREADS
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 33bf0b3..175ea9c 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -355,7 +355,7 @@ declare 81 {
# declare 87 {
# void TclPlatformInit(Tcl_Interp *interp)
# }
-declare 88 {
+declare 88 {deprecated {}} {
char *TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp,
const char *name1, const char *name2, int flags)
}
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 5848bb3..bc8f7b8 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -233,7 +233,8 @@ EXTERN char * TclpRealloc(char *ptr, unsigned int size);
/* Slot 86 is reserved */
/* Slot 87 is reserved */
/* 88 */
-EXTERN char * TclPrecTraceProc(ClientData clientData,
+TCL_DEPRECATED("")
+char * TclPrecTraceProc(ClientData clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
/* 89 */
@@ -743,7 +744,7 @@ typedef struct TclIntStubs {
void (*reserved85)(void);
void (*reserved86)(void);
void (*reserved87)(void);
- char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); /* 88 */
+ TCL_DEPRECATED_API("") char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); /* 88 */
int (*tclPreventAliasLoop) (Tcl_Interp *interp, Tcl_Interp *cmdInterp, Tcl_Command cmd); /* 89 */
void (*reserved90)(void);
void (*tclProcCleanupProc) (Proc *procPtr); /* 91 */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 6c20340..bd0971b 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -64,6 +64,7 @@ static int TclSockMinimumBuffersOld(int sock, int size)
# define TclGetStartupScriptPath 0
# define TclSetStartupScriptFileName 0
# define TclGetStartupScriptFileName 0
+# define TclPrecTraceProc 0
# define TclpInetNtoa 0
# define TclWinGetServByName 0
# define TclWinGetSockOpt 0
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 51af016..d84163c 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3298,6 +3298,7 @@ Tcl_PrintDouble(
*----------------------------------------------------------------------
*/
+#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
/* ARGSUSED */
char *
TclPrecTraceProc(
@@ -3355,6 +3356,7 @@ TclPrecTraceProc(
*precisionPtr = prec;
return NULL;
}
+#endif /* !TCL_NO_DEPRECATED)*/
/*
*----------------------------------------------------------------------