diff options
author | das <das> | 2008-05-31 23:35:27 (GMT) |
---|---|---|
committer | das <das> | 2008-05-31 23:35:27 (GMT) |
commit | c15ddd7ee91e72940a679b63fe643f1a21b4b006 (patch) | |
tree | 8421cfbab846400cfd9d99c73da61dbace260bf9 /generic/tclOOStubLib.c | |
parent | cb040a93eb1479ce0896588e2e4cad823dab7b55 (diff) | |
download | tcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.zip tcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.tar.gz tcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.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:
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; |