diff options
author | dgp <dgp@users.sourceforge.net> | 2016-03-22 23:45:12 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-03-22 23:45:12 (GMT) |
commit | d463eab85013e0b97b466dcf724ba9378a1cff6c (patch) | |
tree | 43820fdeedfba5b62591d99148b16be1a7794060 | |
parent | 4fa57e693d3fd91d3be6e3ae92244008e00990d1 (diff) | |
download | tcl-d463eab85013e0b97b466dcf724ba9378a1cff6c.zip tcl-d463eab85013e0b97b466dcf724ba9378a1cff6c.tar.gz tcl-d463eab85013e0b97b466dcf724ba9378a1cff6c.tar.bz2 |
First simple step implementing TIP 445.
-rw-r--r-- | generic/tcl.decls | 8 | ||||
-rw-r--r-- | generic/tclDecls.h | 5 | ||||
-rw-r--r-- | generic/tclObj.c | 24 | ||||
-rw-r--r-- | generic/tclStubInit.c | 1 |
4 files changed, 38 insertions, 0 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 574b49b..707420d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2326,6 +2326,14 @@ declare 630 { # ----- BASELINE -- FOR -- 8.6.0 ----- # +# TIP #445 + +declare 631 { + void Tcl_FreeIntRep(Tcl_Obj *objPtr) +} + +# ----- BASELINE -- FOR -- 8.7.0 ----- # + ############################################################################## # Define the platform specific public Tcl interface. These functions are only diff --git a/generic/tclDecls.h b/generic/tclDecls.h index b022d3c..4275b91 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1816,6 +1816,8 @@ EXTERN int Tcl_FSUnloadFile(Tcl_Interp *interp, EXTERN void Tcl_ZlibStreamSetCompressionDictionary( Tcl_ZlibStream zhandle, Tcl_Obj *compressionDictionaryObj); +/* 631 */ +EXTERN void Tcl_FreeIntRep(Tcl_Obj *objPtr); typedef struct { const struct TclPlatStubs *tclPlatStubs; @@ -2482,6 +2484,7 @@ typedef struct TclStubs { void * (*tcl_FindSymbol) (Tcl_Interp *interp, Tcl_LoadHandle handle, const char *symbol); /* 628 */ int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */ void (*tcl_ZlibStreamSetCompressionDictionary) (Tcl_ZlibStream zhandle, Tcl_Obj *compressionDictionaryObj); /* 630 */ + void (*tcl_FreeIntRep) (Tcl_Obj *objPtr); /* 631 */ } TclStubs; extern const TclStubs *tclStubsPtr; @@ -3774,6 +3777,8 @@ extern const TclStubs *tclStubsPtr; (tclStubsPtr->tcl_FSUnloadFile) /* 629 */ #define Tcl_ZlibStreamSetCompressionDictionary \ (tclStubsPtr->tcl_ZlibStreamSetCompressionDictionary) /* 630 */ +#define Tcl_FreeIntRep \ + (tclStubsPtr->tcl_FreeIntRep) /* 631 */ #endif /* defined(USE_TCL_STUBS) */ diff --git a/generic/tclObj.c b/generic/tclObj.c index c641152..b2b962c 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -1726,6 +1726,30 @@ Tcl_InvalidateStringRep( /* *---------------------------------------------------------------------- * + * Tcl_FreeIntRep -- + * + * This function is called to free an object's internal representation. + * + * Results: + * None. + * + * Side effects: + * Calls the freeIntRepProc of the current Tcl_ObjType, if any. + * Sets typePtr field to NULL. + * + *---------------------------------------------------------------------- + */ + +void +Tcl_FreeIntRep( + Tcl_Obj *objPtr) /* Object whose internal rep should be freed. */ +{ + TclFreeIntRep(objPtr); +} + +/* + *---------------------------------------------------------------------- + * * Tcl_NewBooleanObj -- * * This function is normally called when not debugging: i.e., when diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 5b7a1cd..83dd9d6 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1415,6 +1415,7 @@ const TclStubs tclStubs = { Tcl_FindSymbol, /* 628 */ Tcl_FSUnloadFile, /* 629 */ Tcl_ZlibStreamSetCompressionDictionary, /* 630 */ + Tcl_FreeIntRep, /* 631 */ }; /* !END!: Do not edit above this line. */ |