summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
Commit message (Collapse)AuthorAgeFilesLines
* A few more tweaks to streamline and clarify.bug_716b427f76dgp2017-06-061-13/+17
|
* makes TclStringCatObjv safe accepting objc = 0 (or 1), then fast exits with ↵sebres2017-06-061-12/+16
| | | | new object / first; check-cycles rewritten to be still more faster.
* amend to [eac4656f1e8cf793] (moved to scope where numChars != 0 in Unicode case)sebres2017-06-061-3/+3
|
* small code review: don't need to check length if unchanged + the same case ↵sebres2017-06-061-17/+18
| | | | if 0 length
* Optimize TclStringCatObjv() for case when only one argument is non-empty.dgp2017-06-051-8/+22
|
* merge core-8-6-branchjan.nijtmans2017-05-291-13/+13
|\
| * Tcl_UtfToUniChar() -> TclUtfToUniChar() in various places: No change in ↵jan.nijtmans2017-05-291-13/+13
| | | | | | | | functionality, just faster if ASCII only strings are involved.
* | If %llu is considered invalid, it means that "%" TCL_LL_MODIFIER "u" cannot ↵jan.nijtmans2017-04-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | be used Tcl_ObjPrintf(), but only in sprintf(). That's unfortunate, clearly an oversight in TIP #237. Conclusion: new TIP must be written to correct this. I'll read a TIP and see what case you have, but TCL_LL_MODIFIER was never meant to play any role in [format] or in Tcl_ObjPrintf(). TCL_LL_MODIFIER exists to help deal with platform differences in sprintf() calls. Tcl_ObjPrintf() in contrast ought to be consistent in its behavior across platforms and should not need such things. If that's false, then fixes to Tcl_ObjPrintf() are in order.
* | Revert recent commit. TIP 237 is clear that %llu is invalid.dgp2017-04-121-9/+5
|\ \ | |/
| * Revert recent commit [80252e0aed]. TIP 237 is clear that %llu is invalid.dgp2017-04-121-9/+5
| |
* | Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu ↵jan.nijtmans2017-04-051-5/+9
|\ \ | |/ | | | | doesn't work. Also added new test-cases showing the expected behavior.
| * Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu ↵jan.nijtmans2017-04-051-5/+9
| | | | | | | | doesn't work. Also added new test-cases showing the expected behavior.
* | Merge core-8-6-branch.jan.nijtmans2017-04-031-6/+27
|\ \ | |/ | | Add test-cases showing that the (undocumented) %p format (and also %zd/%td) are harmless, since they are equivalent to other already existing formats.
| * Code optimization/reduction: If TCL_WIDE_INT_IS_LONG is defined, the ↵jan.nijtmans2017-04-031-5/+12
| | | | | | | | variable useWide is always 0, so related code can be eliminated without loss of functionality.
* | Supply more C99-compatible (and MSVC) format options: '%p' for pointers, ↵jan.nijtmans2017-03-241-6/+33
| | | | | | | | | | 'z'/'j'/'I' for size_t/intptr_diff, 'j'/'q' for long long. Also add "I32" froom MSVC. Remove TCL_LL_MODIFIER specified as "L" for Borland: This must be wrong as "L" is meant for long double. Just assume that later Borland compilers are MSVC-compatible.
* | In TclGetNumberFromObj() macro (tclExecute.c): Don't fill in type if ↵jan.nijtmans2017-02-031-6/+6
| | | | | | | | | | TCL_ERROR is returned: The caller doesn't do anything with this. Don't access (non-const) variable tclEmptyStringRep any more, use its value (&tclEmptyString) directly. Only keep it in tclPkg.c, for error checking.
* | Implement all possible TCL_LL_MODIFIER formats in Tcl_ObjPrintf(), can be ↵jan.nijtmans2016-12-141-0/+19
|\ \ | | | | | | | | | "ll", "I64" and "L", whatever the platform defines for long long integer. With test-cases.
| * | Implement all possible TCL_LL_MODIFIER formats in Tcl_ObjPrintf(), can be ↵jn_wide_printfjan.nijtmans2016-12-141-1/+10
| | | | | | | | | | | | "ll", "I64" and "L", whatever the platform defines for long long integer. With test-cases.
| * | implement "I64" format in Tcl_ObjPrintf as well. Still to be tested.jan.nijtmans2016-12-021-3/+13
| | |
* | | Avoid "warning: format '%llu' expects argument of type 'long long unsigned ↵andy2016-12-021-3/+6
|/ / | | | | | | int', but argument 2 has type 'long unsigned int'" on platforms where TCL_WIDE_INT_IS_LONG. Warning introduced by check-in [e3ba334a42] which was merged to trunk by [eac13870dc]. This fix also was made by [418b169207] which has not yet been merged to trunk.
* | Implement %ll (WideInt) handling for Tcl_ObjPrintf(). Use it in some places. jan.nijtmans2016-12-021-8/+12
| | | | | | Moved to feature branch temporarily. Breaks build.
* | compatability -> compatibilityjan.nijtmans2016-12-011-1/+1
|\ \ | |/
* | Route all [string repeat] operations through a common implementation.dgp2016-11-301-0/+140
| | | | | | | | | | Code that to preserve bytearrays, eliminate unnecessary string rep generation, increase efficiency, and encapsulate access to internal rep details.
* | Where feasible, convert concatenation panics into errors.dgp2016-11-291-9/+46
| |
* | Route all [string last] operations through a common implementation.dgp2016-11-081-1/+105
| |
* | Optimize case of all single-byte chars.dgp_string_finddgp2016-11-071-2/+20
| |
* | Consolidate the "find empty string" cases.dgp2016-11-071-16/+11
| |
* | First draft refactoring the [string first] functionality.dgp2016-11-041-0/+84
| |
* | Make packages msgcat and tcltest work unmodified in "novem". Make more ↵jan.nijtmans2016-11-041-2/+2
|\ \ | |/ | | | | test-cases work unmodified in "novem".
* | Replace indexing with pointer increments.dgp_string_catdgp2016-11-011-13/+18
| |
* | Expand all the cases of the [string cat] engine.dgp2016-11-011-27/+129
| |
* | Reduce copies in the pure binary implementation of [string cat].dgp2016-10-311-7/+19
| |
* | Complete the "pure binary" implementation of the [string cat] engine.dgp2016-10-311-6/+20
| |
* | WIPdgp2016-10-281-1/+57
| |
* | merge trunkdgp2016-10-281-0/+2
|\ \
| * \ Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
| |\ \ | | |/
| | * Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
| | |\
| | | * Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
| | | |
* | | | merge trunkdgp2016-10-281-0/+9
|\ \ \ \ | |/ / /
| * | | Add obvious optimization to Tcl_GetCharLength().dgp2016-10-281-0/+9
| | | |
* | | | Start bringing all `string cat` operations into one place so it can be codeddgp2016-10-271-0/+40
|/ / / | | | | | | correctly one time instead of badly multiple times.
* | | Merge INST_STR_REPLACE fixes and improvements.dgp2016-10-131-0/+10
|\ \ \ | |/ /
| * | Stop invading the String internals to work around a bug. Fix it instead.dgp2016-10-131-0/+10
| | |
* | | Micro-optimization: Use TclGetStringFromObj in stead of Tcl_GetStringFromObj ↵jan.nijtmans2016-07-081-1/+1
| | | | | | | | | | | | in many places where possible.
* | | Rename UtfCount() to TclUtfCount() and use it in more places. Suggested by ↵jan.nijtmans2016-04-051-2/+2
| | | | | | | | | | | | pspjuth here: [e99a79a32650e7e5]
* | | No longer a need to keep around 'revert to 8.5' code.dgp2016-03-241-80/+3
|/ /
* | Factor out string internal rep definition so fix for [1af8de570511] is less ↵dkf2016-03-221-54/+1
| | | | | | | | awful.
* | Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-8/+8
|\ \ | |/
| * Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-2/+2
| |
* | Merge the checkins of the dgp-read-bytes branch onto the trunk, up todgp2014-03-231-7/+48
|\ \ | |/ | | | | | | | | and including checkin a1e82fb63e . Do not merge checkin bae1c688f2 which starts to take the dgp-read-bytes branch into directions apparently unfriendly to stacked channels, which tests for [chan push] on the trunk help us to detect.