summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-27 18:48:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-27 18:48:07 (GMT)
commit0168ad2d1560f60f5c553ac803ca502744173886 (patch)
tree1ea8708b5841b141d11446582517c28e22d45de4 /generic/tclZlib.c
parentbd29ae07a53328e8ad67294f0c49727d334d1854 (diff)
downloadtcl-0168ad2d1560f60f5c553ac803ca502744173886.zip
tcl-0168ad2d1560f60f5c553ac803ca502744173886.tar.gz
tcl-0168ad2d1560f60f5c553ac803ca502744173886.tar.bz2
Tolerate NULL interps
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c18
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;
}