diff options
| author | griffin <briang42@easystreet.net> | 2022-12-21 06:59:38 (GMT) |
|---|---|---|
| committer | griffin <briang42@easystreet.net> | 2022-12-21 06:59:38 (GMT) |
| commit | bc3ff73062b718a3411ad95f90e0d55fed46ebd4 (patch) | |
| tree | 4cc614c14e8355eee212f1192127026bb46b2d87 /generic/tcl.h | |
| parent | a3f8bc6993db508508f569ffc66150ce09a8a122 (diff) | |
| download | tcl-bc3ff73062b718a3411ad95f90e0d55fed46ebd4.zip tcl-bc3ff73062b718a3411ad95f90e0d55fed46ebd4.tar.gz tcl-bc3ff73062b718a3411ad95f90e0d55fed46ebd4.tar.bz2 | |
Make as much abstract list implementation as possible internal.
Other code cleanup also.
Diffstat (limited to 'generic/tcl.h')
| -rw-r--r-- | generic/tcl.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 63be548..30ae8c7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -738,52 +738,6 @@ typedef struct Tcl_Obj { Tcl_ObjInternalRep internalRep; /* The internal representation: */ } Tcl_Obj; - -/* - * Abstract List - * - * This structure provides the functions used in List operations to emulate a - * List for AbstractList types. - */ - - -#define Tcl_ObjTypeIndex(interp, objPtr, index, elemObjPtr) \ - (objPtr)->typePtr->indexProc((interp),(objPtr),(index),(elemObjPtr)) -#define Tcl_ObjTypeSlice(interp, objPtr, fromIdx, toIdx, newObjPtr) \ - (objPtr)->typePtr->sliceProc((interp),(objPtr),(fromIdx),(toIdx),(newObjPtr)) -#define Tcl_ObjTypeReverse(interp, objPtr, newObjPtr) \ - (objPtr)->typePtr->reverseProc((interp),(objPtr),(newObjPtr)) -#define Tcl_ObjTypeGetElements(interp, objPtr, objCPtr, objVPtr) \ - (objPtr)->typePtr->getElementsProc((interp),(objPtr),(objCPtr),(objVPtr)) -#define Tcl_ObjTypeSetElement(interp, objPtr, indexCount, indexArray, valueObj) \ - (objPtr)->typePtr->setElementProc((interp), (objPtr), (indexCount), (indexArray), (valueObj)) -#define Tcl_ObjTypeReplace(interp, objPtr, first, numToDelete, numToInsert, insertObjs) \ - (objPtr)->typePtr->replaceProc((interp), (objPtr), (first), (numToDelete), (numToInsert), (insertObjs)) - - -/* - * Sets the storage used by the concrete abstract list type - * Caller has to ensure type is AbstractList. Existing rep will be - * overwritten so caller has to free previous rep if necessary. - */ -static inline void Tcl_ObjSetConcreteRep( - Tcl_Obj *objPtr, /* Object of type AbstractList */ - void *repPtr) /* New representation */ -{ - /* assert(objPtr->typePtr == &tclAbstractListType); */ - objPtr->internalRep.twoPtrValue.ptr1 = repPtr; -} - -/* - * Return the internal rep for the Obj. - * Note: Caller is responsible for confirming and casting returned value. - */ -static inline void* Tcl_ObjGetConcreteRep( - Tcl_Obj *objPtr) /* Object of type AbstractList */ -{ - return objPtr->internalRep.twoPtrValue.ptr1; -} - /* *---------------------------------------------------------------------------- * The following definitions support Tcl's namespace facility. Note: the first |
