Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge trunk |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | novem |
Files: | files | file ages | folders |
SHA1: |
f7688ef8a27869d8fcbe93407b30b922 |
User & Date: | dgp 2017-06-16 20:35:32 |
Context
2017-06-19
| ||
17:56 | Merge trunk. Improve test http-4.16 in robustness and result utility. check-in: 854cdede26 user: dgp tags: novem | |
2017-06-16
| ||
20:41 | merge novem check-in: ec44855767 user: dgp tags: dgp-properbytearray | |
20:40 | merge novem check-in: 95b720f9ff user: dgp tags: dgp-refactor | |
20:35 | merge trunk check-in: f7688ef8a2 user: dgp tags: novem | |
19:54 | Another reworking, now with comments. check-in: e9f3293d67 user: dgp tags: trunk | |
2017-06-09
| ||
11:17 | merge trunk check-in: f0e33a9d48 user: jan.nijtmans tags: novem | |
Changes
Changes to doc/dict.n.
︙ | ︙ | |||
433 434 435 436 437 438 439 | .CS set foo {foo {a b} bar 2 baz 3} \fBdict with\fR foo {} puts $foo # prints: \fIa b foo {a b} bar 2 baz 3\fR .CE .SH "SEE ALSO" | | | 433 434 435 436 437 438 439 440 441 442 443 444 445 | .CS set foo {foo {a b} bar 2 baz 3} \fBdict with\fR foo {} puts $foo # prints: \fIa b foo {a b} bar 2 baz 3\fR .CE .SH "SEE ALSO" append(n), array(n), foreach(n), incr(n), list(n), lappend(n), lmap(n), set(n) .SH KEYWORDS dictionary, create, update, lookup, iterate, filter, map '\" Local Variables: '\" mode: nroff '\" End: |
Changes to generic/tclStrToD.c.
︙ | ︙ | |||
1126 1127 1128 1129 1130 1131 1132 1133 1134 | case sINFINI: case sINFINIT: #ifdef IEEE_FLOATING_POINT case sN: case sNA: case sNANPAREN: case sNANHEX: Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'", acceptState, bytes); | > < | 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 | case sINFINI: case sINFINIT: #ifdef IEEE_FLOATING_POINT case sN: case sNA: case sNANPAREN: case sNANHEX: #endif Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'", acceptState, bytes); case BINARY: shift = numTrailZeros; if (!significandOverflow && significandWide != 0 && ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide > (MOST_BITS + signum) >> shift)) { significandOverflow = 1; TclBNInitBignumFromWideUInt(&significandBig, significandWide); |
︙ | ︙ |
Changes to generic/tclStringObj.c.
︙ | ︙ | |||
2844 2845 2846 2847 2848 2849 2850 | TclStringCatObjv( Tcl_Interp *interp, int inPlace, int objc, Tcl_Obj * const objv[], Tcl_Obj **objPtrPtr) { | | | > > | | 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 | TclStringCatObjv( Tcl_Interp *interp, int inPlace, int objc, Tcl_Obj * const objv[], Tcl_Obj **objPtrPtr) { Tcl_Obj *objResultPtr, * const *ov; int oc, length = 0, binary = 1; int allowUniChar = 1, requestUniChar = 0; int first = objc - 1; /* Index of first value possibly not empty */ int last = 0; /* Index of last value possibly not empty */ /* assert ( objc >= 0 ) */ if (objc <= 1) { /* Only one or no objects; return first or empty */ *objPtrPtr = objc ? objv[0] : Tcl_NewObj(); return TCL_OK; } /* assert ( objc >= 2 ) */ /* * Analyze to determine what representation result should be. * GOALS: Avoid shimmering & string rep generation. * Produce pure bytearray when possible. * Error on overflow. */ ov = objv, oc = objc; do { Tcl_Obj *objPtr = *ov++; if (objPtr->bytes) { /* Value has a string rep. */ if (objPtr->length) { /* * Non-empty string rep. Not a pure bytearray, so we * won't create a pure bytearray |
︙ | ︙ | |||
2903 2904 2905 2906 2907 2908 2909 | } } while (--oc && (binary || allowUniChar)); if (binary) { /* Result will be pure byte array. Pre-size it */ ov = objv; oc = objc; do { | | | < < > | > > > > > > > > | | | > > > | > > > > > > | > > | > > > > | | > > > > > > > > | | < | > | > | | < > | > | | > > > > > > > > > > > > > > > > > | | | 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 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 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 | } } while (--oc && (binary || allowUniChar)); if (binary) { /* Result will be pure byte array. Pre-size it */ ov = objv; oc = objc; do { Tcl_Obj *objPtr = *ov++; if (objPtr->bytes == NULL) { int numBytes; Tcl_GetByteArrayFromObj(objPtr, &numBytes); /* PANIC? */ if (numBytes) { last = objc - oc; if (length == 0) { first = last; } else if (numBytes > INT_MAX - length) { goto overflow; } length += numBytes; } } } while (--oc); } else if (allowUniChar && requestUniChar) { /* Result will be pure Tcl_UniChar array. Pre-size it. */ ov = objv; oc = objc; do { Tcl_Obj *objPtr = *ov++; if ((objPtr->bytes == NULL) || (objPtr->length)) { int numChars; Tcl_GetUnicodeFromObj(objPtr, &numChars); /* PANIC? */ if (numChars) { last = objc - oc; if (length == 0) { first = last; } else if (numChars > INT_MAX - length) { goto overflow; } length += numChars; } } } while (--oc); } else { /* Result will be concat of string reps. Pre-size it. */ ov = objv; oc = objc; do { Tcl_Obj *pendingPtr = NULL; /* * Loop until a possibly non-empty value is reached. * Keep string rep generation pending when possible. */ do { /* assert ( pendingPtr == NULL ) */ /* assert ( length == 0 ) */ Tcl_Obj *objPtr = *ov++; if (objPtr->bytes == NULL) { /* No string rep; Take the chance we can avoid making it */ pendingPtr = objPtr; } else { Tcl_GetStringFromObj(objPtr, &length); /* PANIC? */ } } while (--oc && (length == 0) && (pendingPtr == NULL)); /* * Either we found a possibly non-empty value, and we * remember this index as the first and last such value so * far seen, or (oc == 0) and all values are known empty, * so first = last = objc - 1 signals the right quick return. */ first = last = objc - oc - 1; if (oc && (length == 0)) { int numBytes; /* assert ( pendingPtr != NULL ) */ /* * There's a pending value followed by more values. * Loop over remaining values generating strings until * a non-empty value is found, or the pending value gets * its string generated. */ do { Tcl_Obj *objPtr = *ov++; Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */ } while (--oc && numBytes == 0 && pendingPtr->bytes == NULL); if (numBytes) { last = objc -oc -1; } if (oc || numBytes) { Tcl_GetStringFromObj(pendingPtr, &length); } if (length == 0) { if (numBytes) { first = last; } } else if (numBytes > INT_MAX - length) { goto overflow; } length += numBytes; } } while (oc && (length == 0)); 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; } objv += first; objc = (last - first + 1); if (binary) { |
︙ | ︙ |
Changes to tests/string.test.
︙ | ︙ | |||
2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 | tcl::unsupported::representation \ [string cat [encoding convertto utf-8 {}] [list x]] } -match glob -result {*, string representation "x"} test string-29.13 {string cat, efficiency} -body { tcl::unsupported::representation [string cat \ [encoding convertto utf-8 {}] [encoding convertto utf-8 {}] [list x]] } -match glob -result {*, string representation "x"} # cleanup rename MemStress {} catch {rename foo {}} ::tcltest::cleanupTests | > > > > > > > > > > > > > > > | 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 | tcl::unsupported::representation \ [string cat [encoding convertto utf-8 {}] [list x]] } -match glob -result {*, string representation "x"} test string-29.13 {string cat, efficiency} -body { tcl::unsupported::representation [string cat \ [encoding convertto utf-8 {}] [encoding convertto utf-8 {}] [list x]] } -match glob -result {*, string representation "x"} test string-29.14 {string cat, efficiency} -setup { set e [encoding convertto utf-8 {}] } -cleanup { unset e } -body { tcl::unsupported::representation [string cat $e $e [list x]] } -match glob -result {*no string representation} test string-29.15 {string cat, efficiency} -setup { set e [encoding convertto utf-8 {}] set f [encoding convertto utf-8 {}] } -cleanup { unset e f } -body { tcl::unsupported::representation [string cat $e $f $e $f [list x]] } -match glob -result {*no string representation} # cleanup rename MemStress {} catch {rename foo {}} ::tcltest::cleanupTests |
︙ | ︙ |
Changes to unix/tclUnixSock.c.
︙ | ︙ | |||
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | * Side effects: * Adds three elements do dsPtr * *---------------------------------------------------------------------- */ #ifndef NEED_FAKE_RFC2553 static inline int IPv6AddressNeedsNumericRendering( struct in6_addr addr) { if (IN6_ARE_ADDR_EQUAL(&addr, &in6addr_any)) { return 1; } /* * The IN6_IS_ADDR_V4MAPPED macro has a problem with aliasing warnings on * at least some versions of OSX. */ | > > < < < > | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | * Side effects: * Adds three elements do dsPtr * *---------------------------------------------------------------------- */ #ifndef NEED_FAKE_RFC2553 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" static inline int IPv6AddressNeedsNumericRendering( struct in6_addr addr) { if (IN6_ARE_ADDR_EQUAL(&addr, &in6addr_any)) { return 1; } /* * The IN6_IS_ADDR_V4MAPPED macro has a problem with aliasing warnings on * at least some versions of OSX. */ if (!IN6_IS_ADDR_V4MAPPED(&addr)) { return 0; } return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0 && addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0); } #pragma GCC diagnostic pop #endif /* NEED_FAKE_RFC2553 */ static void TcpHostPortList( Tcl_Interp *interp, Tcl_DString *dsPtr, address addr, |
︙ | ︙ |