summaryrefslogtreecommitdiffstats
path: root/unix/dltest
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 /unix/dltest
parentcf69221a17e60a1984bbfe3792a195489502fd5e (diff)
parent2dc26cc732ba64065c0bf64d8c63a2c82c539999 (diff)
downloadtcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.zip
tcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.tar.gz
tcl-bef1344ee20d514e4e7f663cdcf09c3970ba8fa0.tar.bz2
merge trunk
Diffstat (limited to 'unix/dltest')
-rw-r--r--unix/dltest/pkgooa.c21
1 files changed, 11 insertions, 10 deletions
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].
*