diff options
author | das <das@noemail.net> | 2008-05-31 23:35:26 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2008-05-31 23:35:26 (GMT) |
commit | 5bccd9e995a0c4b88fa151166715629ba59c87a3 (patch) | |
tree | 8421cfbab846400cfd9d99c73da61dbace260bf9 /generic/tclOOStubLib.c | |
parent | e0b18f7a55c6638dab564f3fc8adcfd6552e39be (diff) | |
download | tcl-5bccd9e995a0c4b88fa151166715629ba59c87a3.zip tcl-5bccd9e995a0c4b88fa151166715629ba59c87a3.tar.gz tcl-5bccd9e995a0c4b88fa151166715629ba59c87a3.tar.bz2 |
* generic/tclOOStubLib.c: ensure use of tcl stubs; include in
* unix/Makefile.in: stub lib; disable broken tclOO genstubs
* generic/tclOO.c: make tclOO stubs tables 'static const'
* generic/tclOODecls.h: and stub table pointers MODULE_SCOPE
* generic/tclOOIntDecls.h: (change generated files manually
* generic/tclOOStubInit.c: pending genstubs support for tclOO).
* generic/tclOOStubLib.c:
* generic/tclOO.c: fix warnings for 'int<->ptr conversion'
* generic/tclOOCall.c: and 'signed vs unsigned comparison'.
* generic/tclOOMethod.c:
FossilOrigin-Name: 7efe478a950202363e8139834344966e364c3088
Diffstat (limited to 'generic/tclOOStubLib.c')
-rw-r--r-- | generic/tclOOStubLib.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c index 6988638..fe3b6be 100644 --- a/generic/tclOOStubLib.c +++ b/generic/tclOOStubLib.c @@ -1,8 +1,16 @@ /* - * $Id: tclOOStubLib.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * $Id: tclOOStubLib.c,v 1.2 2008/05/31 23:35:28 das Exp $ * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ +/* + * We need to ensure that we use the tcl stub macros so that this file + * contains no references to any of the tcl stub functions. + */ + +#undef USE_TCL_STUBS +#define USE_TCL_STUBS + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -12,8 +20,11 @@ #include "tclOO.h" #include "tclOOInt.h" -const TclOOStubs *tclOOStubsPtr; -const TclOOIntStubs *tclOOIntStubsPtr; +MODULE_SCOPE const TclOOStubs *tclOOStubsPtr; +MODULE_SCOPE const TclOOIntStubs *tclOOIntStubsPtr; + +const TclOOStubs *tclOOStubsPtr = NULL; +const TclOOIntStubs *tclOOIntStubsPtr = NULL; /* *---------------------------------------------------------------------- @@ -29,9 +40,11 @@ const TclOOIntStubs *tclOOIntStubsPtr; * Side effects: * Sets the stub table pointer. * + *---------------------------------------------------------------------- */ -const char *TclOOInitializeStubs( +MODULE_SCOPE const char * +TclOOInitializeStubs( Tcl_Interp *interp, const char *version, int epoch, int revision) { int exact = 0; @@ -48,8 +61,8 @@ const char *TclOOInitializeStubs( "package not present or incomplete", NULL); return NULL; } else { - TclOOStubs *stubsPtr = stubsAPIPtr->stubsPtr; - TclOOIntStubs *intStubsPtr = stubsAPIPtr->intStubsPtr; + const TclOOStubs * const stubsPtr = stubsAPIPtr->stubsPtr; + const TclOOIntStubs * const intStubsPtr = stubsAPIPtr->intStubsPtr; if (!actualVersion) { return NULL; |