diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixTest.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index c5ac52a..70d15cd 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -75,6 +75,21 @@ static Tcl_CmdProc TestsetdefencdirCmd; static Tcl_FileProc TestFileHandlerProc; static void AlarmHandler(int signum); +static void +Tcl_AppendElement ( + Tcl_Interp *interp, + const char *element) +{ + Tcl_Obj *resPtr = Tcl_GetObjResult(interp); + + if (Tcl_IsShared(resPtr)) { + resPtr = Tcl_DuplicateObj(resPtr); + } + + (void) Tcl_ListObjAppendElement(interp, resPtr, Tcl_NewStringObj(element, -1)); + Tcl_SetObjResult(interp, resPtr); +} + /* *---------------------------------------------------------------------- * |