--- a/generic/tclAnnotObj.c
+++ b/generic/tclAnnotObj.c
@@ -1522,13 +1522,13 @@
}
/*
- * Affichage symétrique autour de « @ » : le type résolu de l'extérieur vers
+ * Affichage symétrique autour de « @ » (withNotes) : le type résolu de l'extérieur vers
* l'intérieur, puis les notes de la plus ancienne (intérieure) à la plus
* récente (extérieure) : [email protected]. Sans note : list.int. Sans type
* résolu : @mm. Valeur non annotée : chaîne vide. Rend un objet neuf.
*/
Tcl_Obj *
-TclAnnotDisplay(Tcl_Interp *interp, Tcl_Obj *objPtr)
+TclAnnotDisplay(Tcl_Interp *interp, Tcl_Obj *objPtr, int withNotes)
{
Tcl_Obj *norm, *res = Tcl_NewObj(), *raw = NULL, *content, *notes, *j;
TclType *tp = NULL;
@@ -1554,7 +1554,7 @@
Tcl_AppendObjToObj(res, raw);
}
notes = n;
- if (notes != NULL) {
+ if (withNotes && notes != NULL) {
j = NotesJoined(notes);
Tcl_AppendToObj(res, "@", 1);
Tcl_AppendObjToObj(res, j);
--- a/generic/tclTypes.c
+++ b/generic/tclTypes.c
@@ -2599,8 +2599,8 @@
Tcl_WrongNumArgs(interp, 2, objv, "value");
return TCL_ERROR;
}
- /* Le type résolu, puis « @ » et les notes : [email protected] */
- Tcl_SetObjResult(interp, TclAnnotDisplay(interp, objv[2]));
+ /* Le type résolu seul ; les notes se lisent avec « note get ». */
+ Tcl_SetObjResult(interp, TclAnnotDisplay(interp, objv[2], 0));
return TCL_OK;
}
--- a/generic/tclTypes.h
+++ b/generic/tclTypes.h
@@ -208,7 +208,7 @@
Tcl_Obj *TclAnnotNotes(Tcl_Obj *objPtr);
Tcl_Obj *TclAnnotNormalize(Tcl_Interp *interp, Tcl_Obj *objPtr);
int TclAnnotIsNoteOnly(Tcl_Obj *objPtr);
-Tcl_Obj *TclAnnotDisplay(Tcl_Interp *interp, Tcl_Obj *objPtr);
+Tcl_Obj *TclAnnotDisplay(Tcl_Interp *interp, Tcl_Obj *objPtr, int withNotes);
int TclAnnotSuffixIsLiteral(struct Tcl_Token *tokenPtr, Tcl_Size count);
int TclAnnotateValue(Tcl_Interp *interp, Tcl_Obj *typeText, Tcl_Obj *value,
Tcl_Obj **resultPtr);