From: Donald G P. <dg...@ca...> - 2000-09-01 18:14:38
|
> From: Brent Welch <we...@aj...> > If there are major objections, please speak up. Otherwise someone ought > to formulate a simple patch that we should adopt. Is the following patch (against revision 1.17 of generic/tclStringObj.c) the subject of this proposal? *** tclStringObj.c Fri Sep 1 10:47:04 2000 --- tclStringObj.c.new Wed Aug 30 11:42:38 2000 *************** *** 667,678 **** * Not enough space in current string. Reallocate the string * space and free the old string. */ ! ! new = (char *) ckalloc((unsigned) (length+1)); ! if (objPtr->bytes != NULL) { ! memcpy((VOID *) new, (VOID *) objPtr->bytes, ! (size_t) objPtr->length); ! Tcl_InvalidateStringRep(objPtr); } objPtr->bytes = new; stringPtr->allocated = length; --- 712,730 ---- * Not enough space in current string. Reallocate the string * space and free the old string. */ ! if (objPtr->bytes != tclEmptyStringRep) { ! new = (char *) ckrealloc((char *)objPtr->bytes, ! (unsigned)(length+1)); ! } else { ! new = NULL; ! } ! if (new == NULL) { ! new = (char *) ckalloc((unsigned) (length+1)); ! if (objPtr->bytes != NULL && objPtr->length != 0) { ! memcpy((VOID *) new, (VOID *) objPtr->bytes, ! (size_t) objPtr->length); ! Tcl_InvalidateStringRep(objPtr); ! } } objPtr->bytes = new; stringPtr->allocated = length; If so, then my vote is yes. > I'd rather not have to vote on every core change so long as there is > general concensus. Yes, it would be better to set up something more like the staged commits that were discussed here a few days ago. Whatever maintainers were assigned to the file generic/tclStringObj.c would just make the call. Their decisions are, of course, subject to the peer review inherent in open source development, so if they do something really dumb, it can be taken out later, but that system avoids lots of bureaucratic systems on the front end. DGP -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |