summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-10-13 11:02:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-10-13 11:02:12 (GMT)
commitbef1344ee20d514e4e7f663cdcf09c3970ba8fa0 (patch)
treef910d556d808d174a1acacf716ed9c8ca0dfb762
parentcf69221a17e60a1984bbfe3792a195489502fd5e (diff)
parent2dc26cc732ba64065c0bf64d8c63a2c82c539999 (diff)
downloadtcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.zip
tcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.tar.gz
tcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.tar.bz2
merge trunk
-rw-r--r--generic/tclOO.c2
-rw-r--r--tests/oo.test2
-rw-r--r--tests/zlib.test9
-rw-r--r--unix/dltest/pkgooa.c21
4 files changed, 21 insertions, 13 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 2593234..326f1ae 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -271,7 +271,7 @@ TclOOInit(
return TCL_ERROR;
}
- return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION,
+ return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_PATCHLEVEL,
(ClientData) &tclOOStubs);
}
diff --git a/tests/oo.test b/tests/oo.test
index 37bbadb..d63e931 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -101,7 +101,7 @@ test oo-0.8 {leak in variable management} -setup {
test oo-0.9 {various types of presence of the TclOO package} {
list [lsearch -nocase -all -inline [package names] tcloo] \
[package present TclOO] [package versions TclOO]
-} [list TclOO $::oo::version $::oo::version]
+} [list TclOO $::oo::patchlevel $::oo::patchlevel]
test oo-1.1 {basic test of OO functionality: no classes} {
set result {}
diff --git a/tests/zlib.test b/tests/zlib.test
index 0712929..4e51ebb 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -16,6 +16,13 @@ if {"::tcltest" ni [namespace children]} {
}
testConstraint zlib [llength [info commands zlib]]
+testConstraint recentZlib 0
+catch {
+ # Work around a bug in some versions of zlib; known to manifest on at
+ # least Mac OS X Mountain Lion...
+ testConstraint recentZlib \
+ [package vsatisfies [zlib::pkgconfig get zlibVersion] 1.2.6]
+}
test zlib-1.1 {zlib basics} -constraints zlib -returnCodes error -body {
zlib
@@ -269,7 +276,7 @@ test zlib-8.9 {transformation and fconfigure} -setup {
} -result {3064818174 358 358}
test zlib-8.10 {transformation and fconfigure} -setup {
lassign [chan pipe] inSide outSide
-} -constraints zlib -body {
+} -constraints {zlib recentZlib} -body {
zlib push deflate $outSide -dictionary $spdyDict
fconfigure $outSide -blocking 0 -translation binary -buffering none
fconfigure $inSide -blocking 0 -translation binary
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index bdac9db..7276c2c 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -15,14 +15,6 @@
#include <string.h>
/*
- * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
- * Pkgooa_Init declaration is in the source file itself, which is only
- * accessed when we are building a library.
- */
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
-
-/*
* Prototypes for procedures defined later in this file:
*/
@@ -99,19 +91,28 @@ static TclOOStubs stubsCopy = {
* needed for this test-case. */
};
-EXTERN int
+DLLEXPORT int
Pkgooa_Init(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
{
int code;
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ return TCL_ERROR;
+ }
+ if (tclStubsPtr == NULL) {
+ Tcl_AppendResult(interp, "Tcl stubs are not inialized, "
+ "did you compile using -DUSE_TCL_STUBS? ");
return TCL_ERROR;
}
if (Tcl_OOInitStubs(interp) == NULL) {
return TCL_ERROR;
}
+ if (tclOOStubsPtr == NULL) {
+ Tcl_AppendResult(interp, "TclOO stubs are not inialized");
+ return TCL_ERROR;
+ }
/* Test case for Bug [f51efe99a7].
*