diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-03 10:01:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-03 10:01:20 (GMT) |
commit | 7e9565a93e51d737ba2891a4a21dee15ab5f60ce (patch) | |
tree | 56b8535b4c3d6b69e3a947d6465634b6697a38aa /generic/tclBasic.c | |
parent | de9166186fd76d3d1ddeaace858c9d8be3e96b9d (diff) | |
download | tcl-7e9565a93e51d737ba2891a4a21dee15ab5f60ce.zip tcl-7e9565a93e51d737ba2891a4a21dee15ab5f60ce.tar.gz tcl-7e9565a93e51d737ba2891a4a21dee15ab5f60ce.tar.bz2 |
Initialize legacyFreeProc with invalid value: This will result in
a crash immediately, when an extention tries to call it, in stead
of crashing some time later....
Remove some more legacy regarding accessing interp->result
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 24a1082..7202184 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -486,7 +486,11 @@ Tcl_CreateInterp(void) interp = (Tcl_Interp *) iPtr; iPtr->legacyResult = NULL; + /* Special invalid value: Any attempt to free the legacy result + * will cause a crash. */ + iPtr->legacyFreeProc = (void (*) (void))-1; iPtr->errorLine = 0; + iPtr->stubTable = &tclStubs; iPtr->objResultPtr = Tcl_NewObj(); Tcl_IncrRefCount(iPtr->objResultPtr); iPtr->handle = TclHandleCreate(iPtr); @@ -681,12 +685,6 @@ Tcl_CreateInterp(void) #endif /* TCL_COMPILE_STATS */ /* - * Initialise the stub table pointer. - */ - - iPtr->stubTable = &tclStubs; - - /* * Initialize the ensemble error message rewriting support. */ |