diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-26 23:57:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-26 23:57:26 (GMT) |
commit | 513b2d50314fa22ef6df699c698ee0f05b7f59b5 (patch) | |
tree | c4417e67a6e82b80abac34e9d224fa6a64357880 /generic/tclInt.h | |
parent | bfe8928bed8d82210b9a892f1ea0add32ac7ad59 (diff) | |
download | tcl-513b2d50314fa22ef6df699c698ee0f05b7f59b5.zip tcl-513b2d50314fa22ef6df699c698ee0f05b7f59b5.tar.gz tcl-513b2d50314fa22ef6df699c698ee0f05b7f59b5.tar.bz2 |
HAS_ABSTRACTLIST_PROC
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index a58c401..0ff0d8e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1076,14 +1076,6 @@ typedef struct ActiveInterpTrace { * in reverse order. */ } ActiveInterpTrace; - -#define TCL_OBJTYPE_V0_1 ((size_t)1) /* For internal core use only */ - -typedef struct { /* For internal core use only */ - Tcl_ObjType objType; - unsigned long long (*lengthProc)(Tcl_Obj *obj); -} TclObjTypeWithAbstractList; - /* * Flag values designating types of execution traces. See tclTrace.c for * related flag values. @@ -1099,6 +1091,16 @@ typedef struct { /* For internal core use only */ #define TCL_TRACE_ENTER_EXEC 1 #define TCL_TRACE_LEAVE_EXEC 2 +typedef struct { /* For internal core use only */ + Tcl_ObjType objType; + unsigned long long (*lengthProc)(Tcl_Obj *obj); +} TclObjTypeWithAbstractList; +#define TCL_OBJTYPE_V0_1(lengthProc) (sizeof(TclObjTypeWithAbstractList)) \ + }, lengthProc /* For internal core use only */ +#define HAS_ABSTRACTLIST_PROC(objPtr, proc) (objPtr->typePtr \ + && (objPtr->typePtr->version > offsetof(TclObjTypeWithAbstractList, proc)) \ + && (((const TclObjTypeWithAbstractList *)objPtr->typePtr)->proc)) + /* * The structure below defines an entry in the assocData hash table which is * associated with an interpreter. The entry contains a pointer to a function |