summaryrefslogtreecommitdiffstats
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
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).
-rw-r--r--ChangeLog5
-rw-r--r--generic/tcl.h14
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2360718..b6addcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-19 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tcl.h: make Tcl_Interp a fully opaque structure
+ if TCL_NO_DEPRECATED is set (TIP 330 and 336).
+
2012-09-07 Harald Oehlmann <oehhar@users.sf.net>
*** 8.6b3 TAGGED FOR RELEASE ***
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;