diff options
author | dgp <dgp@users.sourceforge.net> | 2013-03-27 18:48:07 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-03-27 18:48:07 (GMT) |
commit | 3105dcac7e1070aadd5e3d56d75abe20db80a20e (patch) | |
tree | 1ea8708b5841b141d11446582517c28e22d45de4 /generic/tclZlib.c | |
parent | 79ad7f2edc9a935417a82892dd40a70c828f51a1 (diff) | |
download | tcl-3105dcac7e1070aadd5e3d56d75abe20db80a20e.zip tcl-3105dcac7e1070aadd5e3d56d75abe20db80a20e.tar.gz tcl-3105dcac7e1070aadd5e3d56d75abe20db80a20e.tar.bz2 |
Tolerate NULL interps
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r-- | generic/tclZlib.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c index ff887c8..9bceb4c 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3891,8 +3891,10 @@ Tcl_ZlibStreamInit( Tcl_Obj *dictObj, Tcl_ZlibStream *zshandle) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); - Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + if (interp) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); + Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + } return TCL_ERROR; } @@ -3957,8 +3959,10 @@ Tcl_ZlibDeflate( int level, Tcl_Obj *gzipHeaderDictObj) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); - Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + if (interp) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); + Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + } return TCL_ERROR; } @@ -3970,8 +3974,10 @@ Tcl_ZlibInflate( int bufferSize, Tcl_Obj *gzipHeaderDictObj) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); - Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + if (interp) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("unimplemented", -1)); + Tcl_SetErrorCode(interp, "TCL", "UNIMPLEMENTED", NULL); + } return TCL_ERROR; } |