summaryrefslogtreecommitdiffstats
path: root/generic/tkTextMark.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-08-05 04:30:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-08-05 04:30:37 (GMT)
commitb5333ac3910c2299be88875fe833d76136a92fc0 (patch)
tree7d072949961c0e2749f8fc33c73bf1d093c3d635 /generic/tkTextMark.c
parent54f11088e5bee7a0f06235e8b67cdde9dfa614d4 (diff)
downloadtk-b5333ac3910c2299be88875fe833d76136a92fc0.zip
tk-b5333ac3910c2299be88875fe833d76136a92fc0.tar.gz
tk-b5333ac3910c2299be88875fe833d76136a92fc0.tar.bz2
Applied companion patch for Tcl Patch 585105,
updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h)
Diffstat (limited to 'generic/tkTextMark.c')
-rw-r--r--generic/tkTextMark.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index 3e97d7f..4378112 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextMark.c,v 1.5 2002/04/05 08:43:22 hobbs Exp $
+ * RCS: @(#) $Id: tkTextMark.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -42,9 +42,9 @@ static int MarkLayoutProc _ANSI_ARGS_((TkText *textPtr,
int noCharsYet, TkWrapMode wrapMode,
TkTextDispChunk *chunkPtr));
static int MarkFindNext _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *markName));
+ TkText *textPtr, CONST char *markName));
static int MarkFindPrev _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *markName));
+ TkText *textPtr, CONST char *markName));
/*
@@ -99,7 +99,7 @@ TkTextMarkCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "mark". */
{
@@ -235,7 +235,7 @@ TkTextMarkCmd(textPtr, interp, argc, argv)
TkTextSegment *
TkTextSetMark(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget in which to create mark. */
- char *name; /* Name of mark to set. */
+ CONST char *name; /* Name of mark to set. */
TkTextIndex *indexPtr; /* Where to set mark. */
{
Tcl_HashEntry *hPtr;
@@ -350,7 +350,7 @@ TkTextMarkSegToIndex(textPtr, markPtr, indexPtr)
int
TkTextMarkNameToIndex(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget containing mark. */
- char *name; /* Name of mark. */
+ CONST char *name; /* Name of mark. */
TkTextIndex *indexPtr; /* Index information gets stored here. */
{
Tcl_HashEntry *hPtr;
@@ -647,7 +647,7 @@ static int
MarkFindNext(interp, textPtr, string)
Tcl_Interp *interp; /* For error reporting */
TkText *textPtr; /* The widget */
- char *string; /* The starting index or mark name */
+ CONST char *string; /* The starting index or mark name */
{
TkTextIndex index;
Tcl_HashEntry *hPtr;
@@ -721,7 +721,7 @@ static int
MarkFindPrev(interp, textPtr, string)
Tcl_Interp *interp; /* For error reporting */
TkText *textPtr; /* The widget */
- char *string; /* The starting index or mark name */
+ CONST char *string; /* The starting index or mark name */
{
TkTextIndex index;
Tcl_HashEntry *hPtr;