summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-03-31 13:48:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-03-31 13:48:11 (GMT)
commitfa08af34c6ae5907fc9a6f4c20182dd11ba28f45 (patch)
tree42924b8cb10e56c26438c69ad96dc12c0b84be2e /generic
parent258e927279e1a28d29a07a1c07ebee9a99890e69 (diff)
downloadtcl-fa08af34c6ae5907fc9a6f4c20182dd11ba28f45.zip
tcl-fa08af34c6ae5907fc9a6f4c20182dd11ba28f45.tar.gz
tcl-fa08af34c6ae5907fc9a6f4c20182dd11ba28f45.tar.bz2
Start of implementation of TIP 400: zlib improvements
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tclDecls.h5
-rw-r--r--generic/tclStubInit.c1
-rw-r--r--generic/tclZlib.c23
4 files changed, 32 insertions, 1 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 7e5bbbb..bb9f71e 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2318,6 +2318,10 @@ declare 629 {
int Tcl_FSUnloadFile(Tcl_Interp *interp, Tcl_LoadHandle handlePtr)
}
+declare 630 {
+ void* Tcl_ZlibStreamGetZstreamp(Tcl_ZlibStream zshandle)
+}
+
# ----- BASELINE -- FOR -- 8.6.0 ----- #
##############################################################################
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 1f7dfe6..1d6a866 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1807,6 +1807,8 @@ EXTERN void* Tcl_FindSymbol(Tcl_Interp *interp,
/* 629 */
EXTERN int Tcl_FSUnloadFile(Tcl_Interp *interp,
Tcl_LoadHandle handlePtr);
+/* 630 */
+EXTERN void* Tcl_ZlibStreamGetZstreamp(Tcl_ZlibStream zshandle);
typedef struct TclStubHooks {
const struct TclPlatStubs *tclPlatStubs;
@@ -2472,6 +2474,7 @@ typedef struct TclStubs {
int (*tcl_LoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *const symv[], int flags, void *procPtrs, Tcl_LoadHandle *handlePtr); /* 627 */
void* (*tcl_FindSymbol) (Tcl_Interp *interp, Tcl_LoadHandle handle, const char *symbol); /* 628 */
int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */
+ void* (*tcl_ZlibStreamGetZstreamp) (Tcl_ZlibStream zshandle); /* 630 */
} TclStubs;
#ifdef __cplusplus
@@ -3764,6 +3767,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_FindSymbol) /* 628 */
#define Tcl_FSUnloadFile \
(tclStubsPtr->tcl_FSUnloadFile) /* 629 */
+#define Tcl_ZlibStreamGetZstreamp \
+ (tclStubsPtr->tcl_ZlibStreamGetZstreamp) /* 630 */
#endif /* defined(USE_TCL_STUBS) */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 32e9557..eec540c 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -1301,6 +1301,7 @@ const TclStubs tclStubs = {
Tcl_LoadFile, /* 627 */
Tcl_FindSymbol, /* 628 */
Tcl_FSUnloadFile, /* 629 */
+ Tcl_ZlibStreamGetZstreamp, /* 630 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 81012dc..6f82e06 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -864,7 +864,7 @@ Tcl_ZlibStreamEof(
*/
int
-Tcl_ZlibStreamChecksum(
+Tcl_ZlibStreamGetZstreamp(
Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */
{
ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle;
@@ -875,6 +875,27 @@ Tcl_ZlibStreamChecksum(
/*
*----------------------------------------------------------------------
*
+ * Tcl_ZlibStreamGetZstreamp --
+ *
+ * Return the z_streamp for the stream (though not typed as such, so as
+ * to avoid type interface poisoning). Shouldn't be used to poke around
+ * excessively.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void *
+Tcl_ZlibStreamGetZstreamp(
+ Tcl_ZlibStream zshandle)
+{
+ ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle;
+
+ return &zshPtr->stream;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* Tcl_ZlibStreamPut --
*
* Add data to the stream for compression or decompression from a