diff options
author | nijtmans <nijtmans> | 2008-12-16 23:24:13 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2008-12-16 23:24:13 (GMT) |
commit | 1d90238ed304fdd70f1a56dfc4f94a7add80c736 (patch) | |
tree | 692c37174e83ec64e5f20f728d49cea200dae3f3 /generic/tclThreadTest.c | |
parent | 74318119b04effffec948581aa1004b23fdd6c3b (diff) | |
download | tcl-1d90238ed304fdd70f1a56dfc4f94a7add80c736.zip tcl-1d90238ed304fdd70f1a56dfc4f94a7add80c736.tar.gz tcl-1d90238ed304fdd70f1a56dfc4f94a7add80c736.tar.bz2 |
eliminate -Wwrite-strings warnings in enable-threads build.
use TclNewLiteralStringObj()
Diffstat (limited to 'generic/tclThreadTest.c')
-rw-r--r-- | generic/tclThreadTest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 82485ff..cad9e11 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.28 2008/11/19 00:04:49 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.29 2008/12/16 23:24:13 nijtmans Exp $ */ #include "tclInt.h" @@ -60,7 +60,7 @@ static struct ThreadSpecificData *threadList; */ typedef struct ThreadCtrl { - char *script; /* The Tcl command this thread should + const char *script; /* The Tcl command this thread should * execute */ int flags; /* Initial value of the "flags" field in the * ThreadSpecificData structure for the new @@ -124,7 +124,7 @@ EXTERN int TclThread_Init(Tcl_Interp *interp); EXTERN int Tcl_ThreadObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -EXTERN int TclCreateThread(Tcl_Interp *interp, char *script, +EXTERN int TclCreateThread(Tcl_Interp *interp, const char *script, int joinable); EXTERN int TclThreadList(Tcl_Interp *interp); EXTERN int TclThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, @@ -281,7 +281,7 @@ Tcl_ThreadObjCmd( return TclThreadCancel(interp, (Tcl_ThreadId) id, result, flags); } case THREAD_CREATE: { - char *script; + const char *script; int joinable, len; if (objc == 2) { @@ -505,7 +505,7 @@ Tcl_ThreadObjCmd( int TclCreateThread( Tcl_Interp *interp, /* Current interpreter. */ - char *script, /* Script to execute */ + const char *script, /* Script to execute */ int joinable) /* Flag, joinable thread or not */ { ThreadCtrl ctrl; @@ -1189,7 +1189,7 @@ ThreadExitProc( * going to call free on it. */ - char *msg = "target thread died"; + const char *msg = "target thread died"; resultPtr->result = ckalloc(strlen(msg)+1); strcpy(resultPtr->result, msg); |