Skip to content
Tcl Source Code Artifact [b9918e3a5e]
Login

Artifact [b9918e3a5e]

Artifact b9918e3a5ee8ae87576286794f8477c59d6f7718d1071fdcada949fb0ce686ce:


--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -545,6 +545,8 @@
 TclNarrowToBytes(
     Tcl_Obj *objPtr)
 {
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : le contenu, pas la valeur
+					 * annotée (son type, ses notes) */
     if (NULL == TclFetchInternalRep(objPtr, &properByteArrayType)) {
 	Tcl_ObjInternalRep ir;
 	ByteArray *byteArrayPtr;
--- a/generic/tclClockFmt.c
+++ b/generic/tclClockFmt.c
@@ -11,6 +11,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 #include "tclStrIdxTree.h"
 #include "tclDate.h"
 
@@ -763,6 +764,7 @@
 {
     Tcl_Obj *keyObj;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k */
     if (objPtr->typePtr != &ClockFmtObjType) {
 	if (ClockFmtObj_SetFromAny(interp, objPtr) != TCL_OK) {
 	    return NULL;
@@ -878,6 +880,9 @@
 {
     ClockFmtScnStorage *fss;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     if (objPtr->typePtr != &ClockFmtObjType) {
 	if (ClockFmtObj_SetFromAny(interp, objPtr) != TCL_OK) {
 	    return NULL;
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -4808,7 +4808,8 @@
 	sortInfo.compareCmdPtr = newCommandPtr;
     }
 
-    if (TclObjTypeHasProc(objv[1], getElementsProc)) {
+    if (TclObjTypeHasProc(listObj, getElementsProc)) {	/* v18k : la liste,
+				 * pas objv[1] (une option, peut-être annotée) */
 	sortInfo.resultCode =
 	    TclObjTypeGetElements(interp, listObj, &length, &listObjPtrs);
     } else {
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -10,6 +10,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 
 typedef size_t (LengthProc)(const char *src);
 
@@ -316,8 +317,11 @@
     Tcl_Encoding *encodingPtr)
 {
     Tcl_Encoding encoding;
-    const char *name = TclGetString(objPtr);
+    const char *name;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+    name = TclGetString(objPtr);
     EncodingGetInternalRep(objPtr, encoding);
     if (encoding == NULL) {
 	encoding = Tcl_GetEncoding(interp, name);
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -11,6 +11,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 #include "tclCompile.h"
 
 /*
@@ -1819,7 +1820,7 @@
 	 */
 	EnsembleCmdRep *ensembleCmd;
 
-	ECRGetInternalRep(subObj, ensembleCmd);
+	ECRGetInternalRep(TCL_ANNOT_CONV(subObj), ensembleCmd);	/* v18k */
 	if (ensembleCmd) {
 	    if (ensembleCmd->epoch == ensemblePtr->epoch &&
 		    ensembleCmd->token == (Command *) ensemblePtr->token) {
@@ -2493,6 +2494,8 @@
 {
     EnsembleCmdRep *ensembleCmd;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
     ECRGetInternalRep(objPtr, ensembleCmd);
     if (ensembleCmd) {
 	TclCleanupCommandMacro(ensembleCmd->token);
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1442,6 +1442,9 @@
      * is valid in the current context.
      */
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     ByteCodeGetInternalRep(objPtr, &tclExprCodeType, codePtr);
 
     if (codePtr != NULL) {
@@ -1593,6 +1596,9 @@
      * compilation). Otherwise, check that it is "fresh" enough.
      */
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     ByteCodeGetInternalRep(objPtr, &tclByteCodeType, codePtr);
     if (codePtr != NULL) {
 	/*
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -13,6 +13,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 #include "tclIO.h"
 
 /*
@@ -1523,6 +1524,9 @@
 	return TCL_ERROR;
     }
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     ChanGetInternalRep(objPtr, resPtr);
     if (resPtr) {
 	/*
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -14,6 +14,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 
 /*
  * Prototypes for functions defined later in this file:
@@ -201,6 +202,9 @@
     IndexRep *indexRep;
     const Tcl_ObjInternalRep *irPtr;
 
+    objPtr = objPtr ? TCL_ANNOT_CONV(objPtr) : NULL;	/* v18k : au
+					 * contenu, la valeur annotée reste */
+
     if (offset < (Tcl_Size)sizeof(char *)) {
 	if (interp) {
 	    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -3006,6 +3006,9 @@
 {
     ResolvedNsName *resNamePtr;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     NsNameGetInternalRep(objPtr, resNamePtr);
     if (resNamePtr) {
 	Namespace *nsPtr, *refNsPtr;
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3181,6 +3181,7 @@
     Tcl_Obj *objPtr,            /* Object from which to get a wide int. */
     Tcl_WideInt *wideIntPtr)    /* Place to store resulting wide integer. */
 {
+    TCL_ANNOT_UNWRAP(interp, objPtr, TCLWANT_INT);	/* v18k */
     do {
 	if (TclHasInternalRep(objPtr, &tclIntType)) {
 	    *wideIntPtr = objPtr->internalRep.wideValue;
@@ -4344,6 +4345,9 @@
 {
     ResolvedCmdName *resPtr;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     /*
      * Get the internal representation, converting to a command type if
      * needed. The internal representation is a ResolvedCmdName that points to
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -12,6 +12,7 @@
  */
 
 #include "tclInt.h"
+#include "tclTypes.h"	/* v18k : TCL_ANNOT_CONV */
 #include "tclRegexp.h"
 #include "tclTomMath.h"
 
@@ -597,6 +598,9 @@
     TclRegexp *regexpPtr;
     const char *pattern;
 
+    objPtr = TCL_ANNOT_CONV(objPtr);	/* v18k : la représentation va au
+					 * contenu, la valeur annotée reste */
+
     RegexpGetInternalRep(objPtr, regexpPtr);
 
     if ((regexpPtr == NULL) || (regexpPtr->flags != flags)) {