summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.h5
-rwxr-xr-xgeneric/tclArithSeries.c3
-rw-r--r--generic/tclAssembly.c3
-rw-r--r--generic/tclBinary.c3
-rw-r--r--generic/tclCompile.c4
-rw-r--r--generic/tclDictObj.c3
-rw-r--r--generic/tclDisassemble.c1
-rw-r--r--generic/tclEncoding.c8
-rw-r--r--generic/tclEnsemble.c3
-rw-r--r--generic/tclExecute.c5
-rw-r--r--generic/tclIO.c3
-rw-r--r--generic/tclIndexObj.c3
-rw-r--r--generic/tclLink.c3
-rw-r--r--generic/tclListObj.c3
-rw-r--r--generic/tclNamesp.c3
-rw-r--r--generic/tclOOCall.c3
-rw-r--r--generic/tclObj.c15
-rw-r--r--generic/tclPathObj.c3
-rw-r--r--generic/tclProc.c8
-rw-r--r--generic/tclRegexp.c3
-rw-r--r--generic/tclStringObj.c3
-rw-r--r--generic/tclUtil.c3
-rw-r--r--generic/tclVar.c4
23 files changed, 66 insertions, 29 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index a2fd2a4..580397d 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -633,7 +633,12 @@ typedef struct Tcl_ObjType {
/* Called to convert the object's internal rep
* to this type. Frees the internal rep of the
* old type. Returns TCL_ERROR on failure. */
+ size_t version;
} Tcl_ObjType;
+#define TCL_OBJTYPE_V0 0 /* Pre-Tcl 9. Set to 0 so compiler will auto-init
+ * when existing code that does not init this
+ * field is compiled with Tcl9 headers */
+#define TCL_OBJTYPE_CURRENT TCL_OBJTYPE_V0
/*
* The following structure stores an internal representation (internalrep) for
diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c
index 8a84bea..3fa9792 100755
--- a/generic/tclArithSeries.c
+++ b/generic/tclArithSeries.c
@@ -75,7 +75,8 @@ const Tcl_ObjType tclArithSeriesType = {
FreeArithSeriesInternalRep, /* freeIntRepProc */
DupArithSeriesInternalRep, /* dupIntRepProc */
UpdateStringOfArithSeries, /* updateStringProc */
- SetArithSeriesFromAny /* setFromAnyProc */
+ SetArithSeriesFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index b7bfd2d..9448162 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -325,7 +325,8 @@ static const Tcl_ObjType assembleCodeType = {
FreeAssembleCodeInternalRep, /* freeIntRepProc */
DupAssembleCodeInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index f27bb93..84188ef 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -162,7 +162,8 @@ static const Tcl_ObjType properByteArrayType = {
FreeProperByteArrayInternalRep,
DupProperByteArrayInternalRep,
UpdateStringOfByteArray,
- NULL
+ NULL,
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 1ce6d8e..9708255 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -715,7 +715,8 @@ const Tcl_ObjType tclByteCodeType = {
FreeByteCodeInternalRep, /* freeIntRepProc */
DupByteCodeInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetByteCodeFromAny /* setFromAnyProc */
+ SetByteCodeFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
@@ -729,6 +730,7 @@ static const Tcl_ObjType substCodeType = {
DupByteCodeInternalRep, /* dupIntRepProc - shared with bytecode */
NULL, /* updateStringProc */
NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define SubstFlags(objPtr) (objPtr)->internalRep.twoPtrValue.ptr2
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index ca2501c..26f98e1 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -146,7 +146,8 @@ const Tcl_ObjType tclDictType = {
FreeDictInternalRep, /* freeIntRepProc */
DupDictInternalRep, /* dupIntRepProc */
UpdateStringOfDict, /* updateStringProc */
- SetDictFromAny /* setFromAnyProc */
+ SetDictFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define DictSetInternalRep(objPtr, dictRepPtr) \
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index 536d016..66acade 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -42,6 +42,7 @@ static const Tcl_ObjType instNameType = {
NULL, /* dupIntRepProc */
UpdateStringOfInstName, /* updateStringProc */
NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0,
};
#define InstNameSetInternalRep(objPtr, inst) \
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index c592145..455d7a6 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -236,8 +236,14 @@ static Tcl_EncodingConvertProc Iso88591ToUtfProc;
*/
static const Tcl_ObjType encodingType = {
- "encoding", FreeEncodingInternalRep, DupEncodingInternalRep, NULL, NULL
+ "encoding",
+ FreeEncodingInternalRep,
+ DupEncodingInternalRep,
+ NULL,
+ NULL,
+ TCL_OBJTYPE_V0,
};
+
#define EncodingSetInternalRep(objPtr, encoding) \
do { \
Tcl_ObjInternalRep ir; \
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index a4a0250..6a9dc9e 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -81,7 +81,8 @@ static const Tcl_ObjType ensembleCmdType = {
FreeEnsembleCmdRep, /* freeIntRepProc */
DupEnsembleCmdRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define ECRSetInternalRep(objPtr, ecRepPtr) \
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index e2a2705..926fd61 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -663,7 +663,8 @@ static const Tcl_ObjType exprCodeType = {
FreeExprCodeInternalRep, /* freeIntRepProc */
DupExprCodeInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
@@ -674,7 +675,7 @@ static const Tcl_ObjType exprCodeType = {
static const Tcl_ObjType dictIteratorType = {
"dictIterator",
ReleaseDictIterator,
- NULL, NULL, NULL
+ NULL, NULL, NULL, TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclIO.c b/generic/tclIO.c
index bf3f543..8594aa0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -332,7 +332,8 @@ static const Tcl_ObjType chanObjType = {
FreeChannelInternalRep, /* freeIntRepProc */
DupChannelInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define ChanSetInternalRep(objPtr, resPtr) \
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index aab7820..58bcc04 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -41,7 +41,8 @@ static const Tcl_ObjType indexType = {
FreeIndex, /* freeIntRepProc */
DupIndex, /* dupIntRepProc */
UpdateStringOfIndex, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 8579f36..79a0f3e 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -114,7 +114,8 @@ static Tcl_ObjType invalidRealType = {
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index ccd23a1..ea5afac 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -155,7 +155,8 @@ const Tcl_ObjType tclListType = {
FreeListInternalRep, /* freeIntRepProc */
DupListInternalRep, /* dupIntRepProc */
UpdateStringOfList, /* updateStringProc */
- SetListFromAny /* setFromAnyProc */
+ SetListFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/* Macros to manipulate the List internal rep */
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 979426c..1882e0a 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -130,7 +130,8 @@ static const Tcl_ObjType nsNameType = {
FreeNsNameInternalRep, /* freeIntRepProc */
DupNsNameInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetNsNameFromAny /* setFromAnyProc */
+ SetNsNameFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define NsNameSetInternalRep(objPtr, nnPtr) \
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 912c368..450fc9f 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -150,7 +150,8 @@ static const Tcl_ObjType methodNameType = {
FreeMethodNameRep,
DupMethodNameRep,
NULL,
- NULL
+ NULL,
+ TCL_OBJTYPE_V0
};
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d385ed0..df2ed6d 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -230,28 +230,32 @@ const Tcl_ObjType tclBooleanType = {
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
NULL, /* updateStringProc */
- TclSetBooleanFromAny /* setFromAnyProc */
+ TclSetBooleanFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
const Tcl_ObjType tclDoubleType = {
"double", /* name */
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
UpdateStringOfDouble, /* updateStringProc */
- SetDoubleFromAny /* setFromAnyProc */
+ SetDoubleFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
const Tcl_ObjType tclIntType = {
"int", /* name */
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
UpdateStringOfInt, /* updateStringProc */
- SetIntFromAny /* setFromAnyProc */
+ SetIntFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
const Tcl_ObjType tclBignumType = {
"bignum", /* name */
FreeBignum, /* freeIntRepProc */
DupBignum, /* dupIntRepProc */
UpdateStringOfBignum, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
@@ -295,7 +299,8 @@ Tcl_ObjType tclCmdNameType = {
FreeCmdNameInternalRep, /* freeIntRepProc */
DupCmdNameInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetCmdNameFromAny /* setFromAnyProc */
+ SetCmdNameFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 40955b1..17bbc46 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -41,7 +41,8 @@ static const Tcl_ObjType fsPathType = {
FreeFsPathInternalRep, /* freeIntRepProc */
DupFsPathInternalRep, /* dupIntRepProc */
UpdateStringOfFsPath, /* updateStringProc */
- SetFsPathFromAny /* setFromAnyProc */
+ SetFsPathFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclProc.c b/generic/tclProc.c
index e51b80d..e97cb10 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -63,8 +63,9 @@ const Tcl_ObjType tclProcBodyType = {
NULL, /* UpdateString function; Tcl_GetString and
* Tcl_GetStringFromObj should panic
* instead. */
- NULL /* SetFromAny function; Tcl_ConvertToType
+ NULL, /* SetFromAny function; Tcl_ConvertToType
* should panic instead. */
+ TCL_OBJTYPE_V0
};
#define ProcSetInternalRep(objPtr, procPtr) \
@@ -93,7 +94,7 @@ const Tcl_ObjType tclProcBodyType = {
static const Tcl_ObjType levelReferenceType = {
"levelReference",
- NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, TCL_OBJTYPE_V0
};
/*
@@ -110,7 +111,8 @@ static const Tcl_ObjType lambdaType = {
FreeLambdaInternalRep, /* freeIntRepProc */
DupLambdaInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetLambdaFromAny /* setFromAnyProc */
+ SetLambdaFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define LambdaSetInternalRep(objPtr, procPtr, nsObjPtr) \
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 5fe5412..259e3f7 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -106,7 +106,8 @@ const Tcl_ObjType tclRegexpType = {
FreeRegexpInternalRep, /* freeIntRepProc */
DupRegexpInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetRegexpFromAny /* setFromAnyProc */
+ SetRegexpFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
#define RegexpSetInternalRep(objPtr, rePtr) \
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 7c0d626..607bfab 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -90,7 +90,8 @@ const Tcl_ObjType tclStringType = {
FreeStringInternalRep, /* freeIntRepPro */
DupStringInternalRep, /* dupIntRepProc */
UpdateStringOfString, /* updateStringProc */
- SetStringFromAny /* setFromAnyProc */
+ SetStringFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 92dac30..aa5f9e8 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -127,7 +127,8 @@ static const Tcl_ObjType endOffsetType = {
NULL, /* freeIntRepProc */
NULL, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 337f923..6226e1e 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -245,7 +245,7 @@ static Tcl_DupInternalRepProc DupParsedVarName;
static const Tcl_ObjType localVarNameType = {
"localVarName",
- FreeLocalVarName, DupLocalVarName, NULL, NULL
+ FreeLocalVarName, DupLocalVarName, NULL, NULL, TCL_OBJTYPE_V0
};
#define LocalSetInternalRep(objPtr, index, namePtr) \
@@ -268,7 +268,7 @@ static const Tcl_ObjType localVarNameType = {
static const Tcl_ObjType parsedVarNameType = {
"parsedVarName",
- FreeParsedVarName, DupParsedVarName, NULL, NULL
+ FreeParsedVarName, DupParsedVarName, NULL, NULL, TCL_OBJTYPE_V0
};
#define ParsedSetInternalRep(objPtr, arrayPtr, elem) \