summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-09-27 13:20:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-09-27 13:20:19 (GMT)
commitbda6ac15c46541159d2fcded8ca59bda4cb43fc6 (patch)
treec6104d356639f75366fc05b1b466c6d029c2c6bb /generic
parentb7cd960861e7a39e5bc448dca9438210b99c53ec (diff)
parent4d029b8f63e5b8a33f96fa20b068a22fdc8472e6 (diff)
downloadtcl-bda6ac15c46541159d2fcded8ca59bda4cb43fc6.zip
tcl-bda6ac15c46541159d2fcded8ca59bda4cb43fc6.tar.gz
tcl-bda6ac15c46541159d2fcded8ca59bda4cb43fc6.tar.bz2
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/tclOO.c20
-rw-r--r--generic/tclOO.decls5
-rw-r--r--generic/tclOODecls.h19
-rw-r--r--generic/tclOOStubInit.c6
4 files changed, 36 insertions, 14 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 4dbe668..b9c976e 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:
diff --git a/generic/tclOO.decls b/generic/tclOO.decls
index ef67160..c6ffccd 100644
--- a/generic/tclOO.decls
+++ b/generic/tclOO.decls
@@ -129,8 +129,11 @@ declare 28 {
declare 29 {
int Tcl_MethodIsPrivate(Tcl_Method method)
}
+declare 30 {
+ Tcl_Class Tcl_GetClassOfObject(Tcl_Object object)
+}
declare 31 {
- void TclOOUnusedStubEntry(void)
+ Tcl_Obj *Tcl_GetObjectClassName(Tcl_Interp *interp, Tcl_Object object)
}
######################################################################
diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h
index d3ec358..6ba5d14 100644
--- a/generic/tclOODecls.h
+++ b/generic/tclOODecls.h
@@ -118,9 +118,11 @@ TCLAPI Tcl_Obj * Tcl_GetObjectName(Tcl_Interp *interp,
Tcl_Object object);
/* 29 */
TCLAPI int Tcl_MethodIsPrivate(Tcl_Method method);
-/* Slot 30 is reserved */
+/* 30 */
+TCLAPI Tcl_Class Tcl_GetClassOfObject(Tcl_Object object);
/* 31 */
-TCLAPI void TclOOUnusedStubEntry(void);
+TCLAPI Tcl_Obj * Tcl_GetObjectClassName(Tcl_Interp *interp,
+ Tcl_Object object);
typedef struct {
const struct TclOOIntStubs *tclOOIntStubs;
@@ -160,8 +162,8 @@ typedef struct TclOOStubs {
void (*tcl_ClassSetDestructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 27 */
Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp *interp, Tcl_Object object); /* 28 */
int (*tcl_MethodIsPrivate) (Tcl_Method method); /* 29 */
- void (*reserved30)(void);
- void (*tclOOUnusedStubEntry) (void); /* 31 */
+ Tcl_Class (*tcl_GetClassOfObject) (Tcl_Object object); /* 30 */
+ Tcl_Obj * (*tcl_GetObjectClassName) (Tcl_Interp *interp, Tcl_Object object); /* 31 */
} TclOOStubs;
extern const TclOOStubs *tclOOStubsPtr;
@@ -236,14 +238,13 @@ extern const TclOOStubs *tclOOStubsPtr;
(tclOOStubsPtr->tcl_GetObjectName) /* 28 */
#define Tcl_MethodIsPrivate \
(tclOOStubsPtr->tcl_MethodIsPrivate) /* 29 */
-/* Slot 30 is reserved */
-#define TclOOUnusedStubEntry \
- (tclOOStubsPtr->tclOOUnusedStubEntry) /* 31 */
+#define Tcl_GetClassOfObject \
+ (tclOOStubsPtr->tcl_GetClassOfObject) /* 30 */
+#define Tcl_GetObjectClassName \
+ (tclOOStubsPtr->tcl_GetObjectClassName) /* 31 */
#endif /* defined(USE_TCLOO_STUBS) */
/* !END!: Do not edit above this line. */
-#undef TclOOUnusedStubEntry
-
#endif /* _TCLOODECLS */
diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c
index 4b6559a..b9034f0 100644
--- a/generic/tclOOStubInit.c
+++ b/generic/tclOOStubInit.c
@@ -14,8 +14,6 @@ MODULE_SCOPE const TclOOStubs tclOOStubs;
#pragma GCC dependency "tclOO.decls"
#endif
-#define TclOOUnusedStubEntry 0
-
/* !BEGIN!: Do not edit below this line. */
static const TclOOIntStubs tclOOIntStubs = {
@@ -76,8 +74,8 @@ const TclOOStubs tclOOStubs = {
Tcl_ClassSetDestructor, /* 27 */
Tcl_GetObjectName, /* 28 */
Tcl_MethodIsPrivate, /* 29 */
- 0, /* 30 */
- TclOOUnusedStubEntry, /* 31 */
+ Tcl_GetClassOfObject, /* 30 */
+ Tcl_GetObjectClassName, /* 31 */
};
/* !END!: Do not edit above this line. */