summaryrefslogtreecommitdiffstats
path: root/generic/tclOO.c
diff options
context:
space:
mode:
authordas <das>2008-05-31 23:35:27 (GMT)
committerdas <das>2008-05-31 23:35:27 (GMT)
commitc15ddd7ee91e72940a679b63fe643f1a21b4b006 (patch)
tree8421cfbab846400cfd9d99c73da61dbace260bf9 /generic/tclOO.c
parentcb040a93eb1479ce0896588e2e4cad823dab7b55 (diff)
downloadtcl-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/tclOO.c')
-rw-r--r--generic/tclOO.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 73b1034..ef939e8 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.5 2008/05/31 22:29:45 dkf Exp $
+ * RCS: @(#) $Id: tclOO.c,v 1.6 2008/05/31 23:35:27 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;"; */
-extern struct TclOOStubAPI tclOOStubAPI;
+MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr;
/*
* Convenience macro for getting the foundation from an interpreter.
@@ -163,7 +163,8 @@ TclOOInit(
return TCL_ERROR;
}
- return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, &tclOOStubAPI);
+ return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION,
+ (ClientData) tclOOStubAPIPtr);
}
/*
@@ -246,14 +247,14 @@ InitFoundation(
Tcl_DStringAppend(&buffer, "::oo::define::", 14);
Tcl_DStringAppend(&buffer, defineCmds[i].name, -1);
Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
- defineCmds[i].objProc, (void *) defineCmds[i].flag, NULL);
+ defineCmds[i].objProc, INT2PTR(defineCmds[i].flag), NULL);
Tcl_DStringFree(&buffer);
}
for (i=0 ; objdefCmds[i].name ; i++) {
Tcl_DStringAppend(&buffer, "::oo::objdefine::", 17);
Tcl_DStringAppend(&buffer, objdefCmds[i].name, -1);
Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
- objdefCmds[i].objProc, (void *) objdefCmds[i].flag, NULL);
+ objdefCmds[i].objProc, INT2PTR(objdefCmds[i].flag), NULL);
Tcl_DStringFree(&buffer);
}