Tcl Source Code

Check-in [434596e345]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Oops!
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3293874
Files: files | file ages | folders
SHA1: 434596e345389c6d8e5a3677452fe50469efb1ef
User & Date: dgp 2011-05-11 20:42:14
Context
2011-05-12
15:00
Set the defaults of all growth algorithm parameters based on one master value. check-in: e0b726da8e user: dgp tags: bug-3293874
2011-05-11
20:42
Oops! check-in: 434596e345 user: dgp tags: bug-3293874
20:33
First draft of bug fix. check-in: ea441b300e user: dgp tags: bug-3293874
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclListObj.c.

904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
	} else {
	    newMax = listRepPtr->maxElemCount;
	}

	listRepPtr = AttemptNewList(NULL, newMax, NULL);
	if (listRepPtr == NULL) {
	    unsigned int limit = LIST_MAX - numRequired;
	    unsigned int extra = numRequired - listRepPtr->elemCount
		    + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_Obj *);
	    int growth = (int) ((extra > limit) ? limit : extra);

	    listRepPtr = AttemptNewList(NULL, numRequired + growth, NULL);
	    if (listRepPtr == NULL) {
		listRepPtr = AttemptNewList(interp, numRequired, NULL);
		if (listRepPtr == NULL) {







|







904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
	} else {
	    newMax = listRepPtr->maxElemCount;
	}

	listRepPtr = AttemptNewList(NULL, newMax, NULL);
	if (listRepPtr == NULL) {
	    unsigned int limit = LIST_MAX - numRequired;
	    unsigned int extra = numRequired - numElems
		    + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_Obj *);
	    int growth = (int) ((extra > limit) ? limit : extra);

	    listRepPtr = AttemptNewList(NULL, numRequired + growth, NULL);
	    if (listRepPtr == NULL) {
		listRepPtr = AttemptNewList(interp, numRequired, NULL);
		if (listRepPtr == NULL) {