diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-29 17:55:29 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-29 17:55:29 (GMT) |
commit | 27b42b57118a651074b7f1fcc859fc4ae00090d0 (patch) | |
tree | 08f1a3f320a79a97a0575dbb2738fa3fde376755 /generic/tkTextMark.c | |
parent | 77acd42d86b6416b8ee9420f6e9ff759f06c28ab (diff) | |
download | tk-27b42b57118a651074b7f1fcc859fc4ae00090d0.zip tk-27b42b57118a651074b7f1fcc859fc4ae00090d0.tar.gz tk-27b42b57118a651074b7f1fcc859fc4ae00090d0.tar.bz2 |
Purged Tcl_AppendElement from all non-test code.
Diffstat (limited to 'generic/tkTextMark.c')
-rw-r--r-- | generic/tkTextMark.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index 52df787..77cf2c5 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -179,19 +179,27 @@ TkTextMarkCmd( TkBTreeLinkSegment(markPtr, &index); break; } - case MARK_NAMES: + case MARK_NAMES: { + Tcl_Obj *resultObj; + if (objc != 3) { Tcl_WrongNumArgs(interp, 3, objv, NULL); return TCL_ERROR; } - Tcl_AppendElement(interp, "insert"); - Tcl_AppendElement(interp, "current"); + resultObj = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj( + "insert", -1)); + Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj( + "current", -1)); for (hPtr = Tcl_FirstHashEntry(&textPtr->sharedTextPtr->markTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { - Tcl_AppendElement(interp, - Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable, hPtr)); + Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj( + Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable, hPtr), + -1)); } + Tcl_SetObjResult(interp, resultObj); break; + } case MARK_NEXT: if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "index"); |