- May 31, 2020
-
-
Marcus Comstedt authored
-
- Dec 16, 2016
-
-
Henrik (Grubba) Grubbström authored
Don't propagate the min range from the empty string when adding strings. Code that triggered the bug: string res = ""; foreach(a, string segment) { res += segment + "/"; // Adds "" + segment + "/". // res here got min set to 0 (kept from ""). // ... } This caused string_has_null() to return true for the above string res. Fixes [bug 7826].
-
Henrik (Grubba) Grubbström authored
Get rid of magic numeric constant ~15 in string handling.
-
- Oct 11, 2015
-
-
Henrik (Grubba) Grubbström authored
The floating point renderer used the wrong flag to indicate that a sign was always wanted. Also adds some comments about what string_builder_sprintf() supports.
-
Henrik (Grubba) Grubbström authored
This adds a simple way to render a pike_type to a string_buffer.
-
- Jun 11, 2015
-
-
Martin Karlgren authored
-
- Nov 12, 2014
-
-
Per Hedbor authored
An empty string: - IS lowercase - IS uppercase 'STRING_IS_LOWERCASE' means the same string will be returned for lower_case(str), and 'STRING_IS_UPPERCASE' means the same string will be returned for upper_case(str). Having this be wrong for the empty string is not really a good idea, since when strings are constructed using += the bits will not be set correctly if you start with the empty string. Also note: All code using string ranges really needs a special case for the empty string, since its range of characters, when checked using check_string_range, will be 0..255 (loose check), or -MAX_INT32..MAX_INT32 (non-loose check). This is done correctly in the 'string_has_null' function, which is what is supposed to be used to check if strings contain null characters.
-
- Nov 11, 2014
-
-
Stephen R. van den Berg authored
An empty string: - is NOT lowercase. - is NOT uppercase. - does NOT have a minimum and maximum equal to zero.
-
- Sep 29, 2014
-
-
Martin Nilsson authored
-
- Sep 22, 2014
-
-
Henrik (Grubba) Grubbström authored
-
- Sep 11, 2014
-
-
Stephen R. van den Berg authored
-
- Sep 10, 2014
-
-
Henrik (Grubba) Grubbström authored
This reverts commit a9693064. As mentioned in [LysLysKOM 20949405] (which probably hasn't been exported correctly to the mailinglist yet): The old code looks correct to me. * Restore s->s->len to the value it had when s->s was allocated (aka s->malloced). * Reallocate s->s with the new (now known) final length. The question does however arise whether the code is correct on realloc failure.
-
- Sep 09, 2014
-
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
Stephen R. van den Berg authored
-
- Sep 03, 2014
-
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
Martin Nilsson authored
-
- Aug 26, 2014
-
-
Stephen R. van den Berg authored
-
- Jul 02, 2014
-
-
Arne Goedeke authored
Character ranges of strings are stored in two unsigned chars. For wide strings, the values between 0 and 255 represent blocks of 255 and (1<<24) characters, respectively. The previous code had several issues: 1) After calculating the actual min/max values of the character range, these value were rounded up, which could lead to an overflow. The result was that both min and max could end up being 0. An example is the string (string)({ (1<<16)-1 }). 2) The 32 bit case used blocks of 16 bit instead of 24 bit.
-
- Jun 19, 2014
-
-
Per Hedbor authored
-
- Jun 18, 2014
-
-
Henrik (Grubba) Grubbström authored
Make it easier to keep track of state in the visit_*() API by tracking when we start and stop visiting things.
-
- Jun 17, 2014
-
-
Henrik (Grubba) Grubbström authored
All the visit_*() functions now have all arguments.
-
- Jun 01, 2014
-
-
Arne Goedeke authored
-
- May 23, 2014
-
-
Per Hedbor authored
This feature has not worked since at least y2k (5b15bb75) In fact, it never did work very well even befor that, and has always much slower than not running unlocked. Especially on multi-cpu systems.
-
- May 10, 2014
-
-
Per Hedbor authored
Mainly avoid type warnings by casting everything to void*.
-
Per Hedbor authored
It actually checks if the string should be narrowed. Used by cpp to avoid code duplication for different shifts. Removed binary_findstring_shift
-
- May 06, 2014
-
-
Arne Goedeke authored
-
- May 05, 2014
-
-
Per Hedbor authored
-
- Apr 27, 2014
-
-
Martin Nilsson authored
-