diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-10-31 09:14:36 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-10-31 09:14:36 (GMT) |
commit | 0b9fa5408c816ce2b76239a66b3bbc63da4b5d92 (patch) | |
tree | ca8b13afd3a31b6aab658490cd75939ecb66ef80 /generic/tclOO.c | |
parent | be68513a3f06cf74f2b112128b14a9a5ddbf9211 (diff) | |
download | tcl-0b9fa5408c816ce2b76239a66b3bbc63da4b5d92.zip tcl-0b9fa5408c816ce2b76239a66b3bbc63da4b5d92.tar.gz tcl-0b9fa5408c816ce2b76239a66b3bbc63da4b5d92.tar.bz2 |
Added more API as requested by Arnulf Wiedermann <arnulf@wiedermann-pri.de>
Also added more comments.
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r-- | generic/tclOO.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index 498d923..768993c 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.1.2.67 2006/10/23 21:20:47 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.1.2.68 2006/10/31 09:14:36 dkf Exp $ */ #include "tclInt.h" @@ -3285,6 +3285,19 @@ InitEnsembleRewrite( return argObjs; } +/* + * ---------------------------------------------------------------------- + * + * Tcl_ObjectContextMethod, ... -- + * + * Simple introspector functions. People would read the structures + * directly for this sort of information, except that we discourage that + * sort of thing as it makes it harder to evolve the internal data + * structures. None of these change anything. + * + * ---------------------------------------------------------------------- + */ + Tcl_Method Tcl_ObjectContextMethod( Tcl_ObjectContext context) @@ -3396,6 +3409,32 @@ Tcl_GetClassAsObject( } /* + * ---------------------------------------------------------------------- + * + * Tcl_OOGetObjectClass, Tcl_OOGetClassClass -- + * + * Get the basic ::oo::object and ::oo::class classes. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Class +Tcl_OOGetObjectClass( + Tcl_Interp *interp) +{ + Foundation *fPtr = ((Interp *) interp)->ooFoundation; + return (Tcl_Class) fPtr->objectCls; +} + +Tcl_Class +Tcl_OOGetClassClass( + Tcl_Interp *interp) +{ + Foundation *fPtr = ((Interp *) interp)->ooFoundation; + return (Tcl_Class) fPtr->classCls; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 |