Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplify the final loop when we know we're generating strings for all. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
20cca1d020399042bf9078ef5836f175 |
User & Date: | dgp 2017-06-16 16:23:22 |
Context
2017-06-16
| ||
19:54 | Another reworking, now with comments. check-in: e9f3293d67 user: dgp tags: trunk | |
16:23 | Simplify the final loop when we know we're generating strings for all. check-in: 20cca1d020 user: dgp tags: trunk | |
16:07 | Split loop into two cases for further simplification. check-in: afd6a2812b user: dgp tags: trunk | |
Changes
Changes to generic/tclStringObj.c.
︙ | ︙ | |||
3003 3004 3005 3006 3007 3008 3009 | goto overflow; } length += numBytes; } --oc; } | | < < < < < < < < < < < | < | | | < < < < < < < < < < < < < < | | | | 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 | goto overflow; } length += numBytes; } --oc; } while (oc) { int numBytes; Tcl_Obj *objPtr = *ov++; /* assert ( length > 0 && pendingPtr == NULL ) */ Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */ if (numBytes) { last = objc - oc; if (numBytes > INT_MAX - length) { goto overflow; } length += numBytes; } --oc; } } if (last <= first /*|| length == 0 */) { /* Only one non-empty value or zero length; return first */ /* NOTE: (length == 0) implies (last <= first) */ *objPtrPtr = objv[first]; return TCL_OK; |
︙ | ︙ |