summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 09:50:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 09:50:25 (GMT)
commit87baa038943501504fc76d2f330ad6987b384602 (patch)
tree33c3840eabf6acfd11a09700fb3f2b73ba82c214 /generic/tcl.h
parent213b1d92a8e4221ed74ab0f006c76090dde3ad5e (diff)
downloadtcl-87baa038943501504fc76d2f330ad6987b384602.zip
tcl-87baa038943501504fc76d2f330ad6987b384602.tar.gz
tcl-87baa038943501504fc76d2f330ad6987b384602.tar.bz2
Make Tcl_Interp a fully opaque structure if TCL_NO_DEPRECATED is set (TIP 330 and 336).
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 32d8e1e..3f9f06a 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -500,7 +500,9 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
* accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
*/
-typedef struct Tcl_Interp {
+typedef struct Tcl_Interp
+#ifndef TCL_NO_DEPRECATED
+{
/* TIP #330: Strongly discourage extensions from using the string
* result. */
#ifdef USE_INTERP_RESULT
@@ -517,8 +519,8 @@ typedef struct Tcl_Interp {
* Tcl_Eval must free it before executing next
* command. */
#else
- char *unused3 TCL_DEPRECATED_API("bad field access");
- void (*unused4) (char *) TCL_DEPRECATED_API("bad field access");
+ char *resultDontUse; /* Don't use in extensions! */
+ void (*freeProcDontUse) (char *); /* Don't use in extensions! */
#endif
#ifdef USE_INTERP_ERRORLINE
int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine");
@@ -526,9 +528,11 @@ typedef struct Tcl_Interp {
* line number within the command where the
* error occurred (1 if first line). */
#else
- int unused5 TCL_DEPRECATED_API("bad field access");
+ int errorLineDontUse; /* Don't use in extensions! */
#endif
-} Tcl_Interp;
+}
+#endif /* TCL_NO_DEPRECATED */
+Tcl_Interp;
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
typedef struct Tcl_Channel_ *Tcl_Channel;