diff options
author | nijtmans <nijtmans> | 2009-01-06 21:58:15 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-01-06 21:58:15 (GMT) |
commit | 201429e710c7c59022b3773a0368171bf3475eb6 (patch) | |
tree | 1a968bb5892ca2303852db486e841748082bebb9 /generic/tkCanvPoly.c | |
parent | 647d64253b5c0c4ad94711d033771789bbc6bc6c (diff) | |
download | tk-201429e710c7c59022b3773a0368171bf3475eb6.zip tk-201429e710c7c59022b3773a0368171bf3475eb6.tar.gz tk-201429e710c7c59022b3773a0368171bf3475eb6.tar.bz2 |
A few const -> CONST86 modifications, improving
backwards compatibility. Change Tk_ItemIndexProc
and Tk_ItemInsertProc signature to have a Tcl_Obj parameter
in stead of a string parameter. This is binary
and source compatible with previous API, it just prevents
the need for a type cast in the Tk_ItemType table construction.
Bring doc in line with API.
Diffstat (limited to 'generic/tkCanvPoly.c')
-rw-r--r-- | generic/tkCanvPoly.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index bbdf91a..aaa2d3a 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.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: tkCanvPoly.c,v 1.23 2008/11/09 21:53:39 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvPoly.c,v 1.24 2009/01/06 21:58:15 nijtmans Exp $ */ #include <stdio.h> @@ -205,10 +205,10 @@ Tk_ItemType tkPolygonType = { PolygonToPostscript, /* postscriptProc */ ScalePolygon, /* scaleProc */ TranslatePolygon, /* translateProc */ - (Tk_ItemIndexProc *) GetPolygonIndex,/* indexProc */ + GetPolygonIndex, /* indexProc */ NULL, /* icursorProc */ NULL, /* selectionProc */ - (Tk_ItemInsertProc *) PolygonInsert,/* insertProc */ + PolygonInsert, /* insertProc */ PolygonDeleteCoords, /* dTextProc */ NULL, /* nextPtr */ }; @@ -287,7 +287,7 @@ CreatePolygon( */ for (i = 0; i < objc; i++) { - char *arg = Tcl_GetString(objv[i]); + const char *arg = Tcl_GetString(objv[i]); if ((arg[0] == '-') && (arg[1] >= 'a') && (arg[1] <= 'z')) { break; @@ -1679,7 +1679,7 @@ GetPolygonIndex( { PolygonItem *polyPtr = (PolygonItem *) itemPtr; int length; - char *string = Tcl_GetStringFromObj(obj, &length); + const char *string = Tcl_GetStringFromObj(obj, &length); if (string[0] == 'e') { if (strncmp(string, "end", (unsigned)length) != 0) { @@ -1689,7 +1689,8 @@ GetPolygonIndex( } else if (string[0] == '@') { int i; double x, y, bestDist, dist, *coordPtr; - char *end, *p; + char *end; + const char *p; p = string+1; x = strtod(p, &end); |