summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2008-06-12 06:29:14 (GMT)
committerdas <das>2008-06-12 06:29:14 (GMT)
commit3e497c1f548a8cbba7c7211b72f9b476f4093355 (patch)
tree51011188377a8200015fe034379e37100688c9a5 /generic
parent478314cd955802ff15753a226ac6a1e7ee7d73d8 (diff)
downloadtcl-3e497c1f548a8cbba7c7211b72f9b476f4093355.zip
tcl-3e497c1f548a8cbba7c7211b72f9b476f4093355.tar.gz
tcl-3e497c1f548a8cbba7c7211b72f9b476f4093355.tar.bz2
* generic/tclOO.c: use TclOOStubs hooks field to retrieve
* generic/tclOODecls.h: TclOOIntStubs pointer. [Bug 1980953] * generic/tclOOIntDecls.h: * generic/tclOOStubInit.c: * generic/tclOOStubLib.c:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclOO.c6
-rw-r--r--generic/tclOODecls.h4
-rw-r--r--generic/tclOOIntDecls.h11
-rw-r--r--generic/tclOOStubInit.c11
-rw-r--r--generic/tclOOStubLib.c10
5 files changed, 16 insertions, 26 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c
index f374876..667210b 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOO.c,v 1.7 2008/06/02 02:19:41 kennykb Exp $
+ * RCS: @(#) $Id: tclOO.c,v 1.8 2008/06/12 06:29:17 das Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -118,7 +118,7 @@ static char initScript[] =
/* "tcl_findLibrary tcloo $oo::version $oo::version" */
/* " tcloo.tcl OO_LIBRARY oo::library;"; */
-MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr;
+MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr;
/*
* Convenience macro for getting the foundation from an interpreter.
@@ -164,7 +164,7 @@ TclOOInit(
}
return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION,
- (ClientData) tclOOStubAPIPtr);
+ (ClientData) tclOOConstStubPtr);
}
/*
diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h
index 375abf3..969cd5d 100644
--- a/generic/tclOODecls.h
+++ b/generic/tclOODecls.h
@@ -1,5 +1,5 @@
/*
- * $Id: tclOODecls.h,v 1.4 2008/06/01 02:02:48 kennykb Exp $
+ * $Id: tclOODecls.h,v 1.5 2008/06/12 06:29:18 das Exp $
*
* This file is (mostly) automatically generated from tclOO.decls.
*/
@@ -22,7 +22,7 @@
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
- * in the generic/tcl.decls script.
+ * in the generic/tclOO.decls script.
*/
diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h
index bc6c2d3..de761a7 100644
--- a/generic/tclOOIntDecls.h
+++ b/generic/tclOOIntDecls.h
@@ -1,5 +1,5 @@
/*
- * $Id: tclOOIntDecls.h,v 1.4 2008/06/01 02:02:49 kennykb Exp $
+ * $Id: tclOOIntDecls.h,v 1.5 2008/06/12 06:29:18 das Exp $
*
* This file is (mostly) automatically generated from tclOO.decls.
*/
@@ -21,7 +21,7 @@
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
- * in the generic/tcl.decls script.
+ * in the generic/tclOO.decls script.
*/
/* !BEGIN!: Do not edit below this line. */
@@ -258,12 +258,7 @@ extern CONST TclOOIntStubs *tclOOIntStubsPtr;
/* !END!: Do not edit above this line. */
-struct TclOOStubAPI {
- CONST TclOOStubs *stubsPtr;
- CONST TclOOIntStubs *intStubsPtr;
-};
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-#endif /* _TCLOODECLS */
+#endif /* _TCLOOINTDECLS */
diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c
index 522fa6b..06e22d0 100644
--- a/generic/tclOOStubInit.c
+++ b/generic/tclOOStubInit.c
@@ -1,5 +1,5 @@
/*
- * $Id: tclOOStubInit.c,v 1.3 2008/06/01 00:33:05 dkf Exp $
+ * $Id: tclOOStubInit.c,v 1.4 2008/06/12 06:29:18 das Exp $
*
* This file is (mostly) automatically generated from tclOO.decls.
* It is compiled and linked in with the tclOO package proper.
@@ -73,11 +73,6 @@ static const TclOOStubs tclOOStubs = {
/* !END!: Do not edit above this line. */
-static const struct TclOOStubAPI tclOOStubAPI = {
- &tclOOStubs,
- &tclOOIntStubs
-};
-
-MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr;
-const struct TclOOStubAPI * const tclOOStubAPIPtr = &tclOOStubAPI;
+MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr;
+const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs;
diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c
index 280854b..0414ae4 100644
--- a/generic/tclOOStubLib.c
+++ b/generic/tclOOStubLib.c
@@ -1,5 +1,5 @@
/*
- * $Id: tclOOStubLib.c,v 1.3 2008/06/01 00:33:05 dkf Exp $
+ * $Id: tclOOStubLib.c,v 1.4 2008/06/12 06:29:18 das Exp $
* ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17
*/
@@ -53,16 +53,16 @@ TclOOInitializeStubs(
ClientData clientData = NULL;
const char *actualVersion =
Tcl_PkgRequireEx(interp, packageName,version, exact, &clientData);
- struct TclOOStubAPI *stubsAPIPtr = clientData;
- if (stubsAPIPtr == NULL) {
+ if (clientData == NULL) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "Error loading ", packageName, " package; ",
"package not present or incomplete", NULL);
return NULL;
} else {
- const TclOOStubs * const stubsPtr = stubsAPIPtr->stubsPtr;
- const TclOOIntStubs * const intStubsPtr = stubsAPIPtr->intStubsPtr;
+ const TclOOStubs * const stubsPtr = clientData;
+ const TclOOIntStubs * const intStubsPtr = stubsPtr->hooks ?
+ stubsPtr->hooks->tclOOIntStubs : NULL;
if (!actualVersion) {
return NULL;