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 80494f3..f1d27ef 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -616,7 +616,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. */
+ unsigned char 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 d88c8ed..65807c3 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 a7d6617..7e2634c 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 a57743c..fc2b6b7 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -708,7 +708,8 @@ const Tcl_ObjType tclByteCodeType = {
FreeByteCodeInternalRep, /* freeIntRepProc */
DupByteCodeInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetByteCodeFromAny /* setFromAnyProc */
+ SetByteCodeFromAny, /* setFromAnyProc */
+ TCL_OBJTYPE_V0
};
/*
@@ -722,6 +723,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 8fd90a3..9670b84 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 e366904..7e7c1a6 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 8bb90da..44179cf 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 4b9ed0d..2ec0337 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 5f831c9..8d54045 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 2649d12..d184700 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 14f6132..06a316f 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 5e55784..eeaa727 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 acb520c..a9baba2 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 ProcSetIntRep(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 LambdaSetIntRep(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 cf23aab..fb7e45a 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 5870781..cdaa242 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) \