diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2021-08-01 11:47:23 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2021-08-01 11:47:23 (GMT) |
commit | 36dbbdbb723b994c072318068ca9c78aac8a2bcf (patch) | |
tree | 3ef46d84fc83d53f05ae6a3b492ac02d64935dce /generic/tclOO.c | |
parent | f107311e0a841c8971f748594a6e0bd179a2e436 (diff) | |
download | tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.zip tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.gz tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.bz2 |
Turn code snippets in TIP into a branch.
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r-- | generic/tclOO.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index 405d5d0..bdceec4 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -3144,6 +3144,26 @@ Tcl_ObjectSetMethodNameMapper( { ((Object *) object)->mapMethodNameProc = mapMethodNameProc; } + +Tcl_Class +Tcl_GetClassOfObject( + Tcl_Object object) +{ + return (Tcl_Class) ((Object *) object)->selfCls; +} + +Tcl_Obj * +Tcl_GetObjectClassName( + Tcl_Interp *interp, + Tcl_Object object) +{ + Tcl_Object classObj = (Tcl_Object) (((Object *) object)->selfCls)->thisPtr; + + if (classObj == NULL) { + return NULL; + } + return Tcl_GetObjectName(interp, classObj); +} /* * Local Variables: |