Skip to content

Commit 014cec4

Browse files
author
jan.nijtmans
committed
(cherry-pick): Fix a lot of comments, regarding argv/argc -> objv/objc
1 parent 3cb4326 commit 014cec4

File tree

16 files changed

+30
-30
lines changed

16 files changed

+30
-30
lines changed

generic/tkBind.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3824,9 +3824,9 @@ GetAllVirtualEvents(
38243824
* an XEvent, constructed from information parsed from the event
38253825
* description string and its optional arguments.
38263826
*
3827-
* argv[0] contains name of the target window.
3828-
* argv[1] contains pattern string for one event (e.g, <Control-v>).
3829-
* argv[2..argc-1] contains -field/option pairs for specifying additional
3827+
* objv[0] contains name of the target window.
3828+
* objv[1] contains pattern string for one event (e.g, <Control-v>).
3829+
* objv[2..objc-1] contains -field/option pairs for specifying additional
38303830
* detail in the generated event.
38313831
*
38323832
* Either virtual or physical events can be generated this way. The event

generic/tkCanvText.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static const Tk_ConfigSpec configSpecs[] = {
223223

224224
static void ComputeTextBbox(Tk_Canvas canvas, TextItem *textPtr);
225225
static int ConfigureText(Tcl_Interp *interp,
226-
Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size argc,
226+
Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size objc,
227227
Tcl_Obj *const objv[], int flags);
228228
static int CreateText(Tcl_Interp *interp,
229229
Tk_Canvas canvas, struct Tk_Item *itemPtr,

generic/tkCmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,17 +446,17 @@ TkFreeBindingTags(
446446
TkWindow *winPtr) /* Window whose tags are to be released. */
447447
{
448448
Tcl_Size i;
449-
const char *p;
449+
char *p;
450450

451451
for (i = 0; i < winPtr->numTags; i++) {
452-
p = (const char *)winPtr->tagPtr[i];
452+
p = (char *)winPtr->tagPtr[i];
453453
if (*p == '.') {
454454
/*
455455
* Names starting with "." are malloced rather than Uids, so they
456456
* have to be freed.
457457
*/
458458

459-
ckfree((char *)p);
459+
ckfree(p);
460460
}
461461
}
462462
ckfree(winPtr->tagPtr);

generic/tkEntry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ DestroyEntry(
10861086
*
10871087
* ConfigureEntry --
10881088
*
1089-
* This function is called to process an argv/argc list, plus the Tk
1089+
* This function is called to process an objv/objc list, plus the Tk
10901090
* option database, in order to configure (or reconfigure) an entry
10911091
* widget.
10921092
*

generic/tkFont.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ Tk_FontObjCmd(
648648
return result;
649649
}
650650
return GetAttributeInfoObj(interp, &nfPtr->fa, objPtr);
651-
}
651+
}
652652
case FONT_CREATE: {
653653
int skip = 3, i;
654654
const char *name;
@@ -3403,7 +3403,7 @@ noMapping: ;
34033403
*
34043404
* Side effects:
34053405
* The fields of the font attributes structure get filled in with
3406-
* information from argc/argv. If an error occurs while parsing, the font
3406+
* information from objv/objc. If an error occurs while parsing, the font
34073407
* attributes structure will contain all modifications specified in the
34083408
* command line options up to the point of the error.
34093409
*

generic/tkImgGIF.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ FileReadGIF(
424424
int fileWidth, fileHeight, imageWidth, imageHeight;
425425
unsigned int nBytes;
426426
int index = 0, result = TCL_ERROR;
427-
Tcl_Size argc = 0, i;
427+
Tcl_Size objc = 0, i;
428428
Tcl_Obj **objv;
429429
unsigned char buf[100];
430430
unsigned char *trashBuffer = NULL;
@@ -455,16 +455,16 @@ FileReadGIF(
455455
*/
456456

457457
if (format && Tcl_ListObjGetElements(interp, format,
458-
&argc, &objv) != TCL_OK) {
458+
&objc, &objv) != TCL_OK) {
459459
return TCL_ERROR;
460460
}
461-
for (i = 1; i < argc; i++) {
461+
for (i = 1; i < objc; i++) {
462462
int optionIdx;
463463
if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
464464
sizeof(char *), "option name", 0, &optionIdx) != TCL_OK) {
465465
return TCL_ERROR;
466466
}
467-
if (i == (argc-1)) {
467+
if (i == (objc-1)) {
468468
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
469469
"no value given for \"%s\" option",
470470
Tcl_GetString(objv[i])));

generic/tkImgListFormat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Tk_PhotoImageFormat tkImgFmtDefault = {
181181
* Side effects:
182182
* The value in *indexPtr is updated to the index of the fist
183183
* element in argv[] that does not look like an option/value, or to
184-
* argc if parsing reached the end of argv[].
184+
* objc if parsing reached the end of argv[].
185185
*
186186
*----------------------------------------------------------------------
187187
*/

generic/tkImgPhoto.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,17 @@ static Tcl_ThreadDataKey dataKey;
167167

168168
static const Tk_ConfigSpec configSpecs[] = {
169169
{TK_CONFIG_STRING, "-data", NULL, NULL,
170-
NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL},
170+
NULL, TCL_INDEX_NONE, TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL},
171171
{TK_CONFIG_STRING, "-file", NULL, NULL,
172-
NULL, offsetof(PhotoModel, fileObj), TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL},
172+
NULL, offsetof(PhotoModel, fileObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL},
173173
{TK_CONFIG_STRING, "-format", NULL, NULL,
174-
NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL},
174+
NULL, TCL_INDEX_NONE, TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL},
175175
{TK_CONFIG_DOUBLE, "-gamma", NULL, NULL,
176176
DEF_PHOTO_GAMMA, offsetof(PhotoModel, gamma), 0, NULL},
177177
{TK_CONFIG_INT, "-height", NULL, NULL,
178178
DEF_PHOTO_HEIGHT, offsetof(PhotoModel, userHeight), 0, NULL},
179179
{TK_CONFIG_STRING, "-metadata", NULL, NULL,
180-
NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL},
180+
NULL, TCL_INDEX_NONE, TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL},
181181
{TK_CONFIG_UID, "-palette", NULL, NULL,
182182
DEF_PHOTO_PALETTE, offsetof(PhotoModel, palette), 0, NULL},
183183
{TK_CONFIG_INT, "-width", NULL, NULL,
@@ -1650,7 +1650,7 @@ GetExtension(
16501650
* Side effects:
16511651
* Fields in *optPtr get filled in. The value of optIndexPtr is updated
16521652
* to contain the index of the first element in argv[] that was not
1653-
* parsed, or argc if the end of objv[] was reached.
1653+
* parsed, or objc if the end of objv[] was reached.
16541654
*
16551655
*----------------------------------------------------------------------
16561656
*/

generic/tkMenu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ MenuWorldChanged(
15641564
*
15651565
* ConfigureMenu --
15661566
*
1567-
* This function is called to process an argv/argc list, plus the Tk
1567+
* This function is called to process an objv/objc list, plus the Tk
15681568
* option database, in order to configure (or reconfigure) a menu widget.
15691569
*
15701570
* Results:
@@ -1946,7 +1946,7 @@ PostProcessEntry(
19461946
*
19471947
* ConfigureMenuEntry --
19481948
*
1949-
* This function is called to process an argv/argc list in order to
1949+
* This function is called to process an objv/objc list in order to
19501950
* configure (or reconfigure) one entry in a menu.
19511951
*
19521952
* Results:

generic/tkMenubutton.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ DestroyMenuButton(
449449
*
450450
* ConfigureMenuButton --
451451
*
452-
* This function is called to process an argv/argc list, plus the Tk
452+
* This function is called to process an objv/objc list, plus the Tk
453453
* option database, in order to configure (or reconfigure) a menubutton
454454
* widget.
455455
*

0 commit comments

Comments
 (0)