Commit Graph

381 Commits

Author SHA1 Message Date
Antony Dovgal
d350e4b038 fix logic and memleak 2006-08-08 18:06:43 +00:00
Antony Dovgal
dbe2092313 implement zend_unicode_to_string() and zend_string_to_unicode()
part #2 (of 2)
2006-08-08 16:59:11 +00:00
Andrei Zmievski
768a9227ed - Adjusted php_u_strtoupper/php_u_strtolower/php_u_strtotitle API to be
more sane.
- Upgrade strtoupper(), strtolower(), strtotitle() to use params API.
2006-08-03 23:09:29 +00:00
Dmitry Stogov
be56f79c6f zts fix 2006-08-02 07:54:41 +00:00
Andrei Zmievski
263d329acd Fix leaks. 2006-08-02 02:11:56 +00:00
Andrei Zmievski
b67e1d9f92 Add SORT_LOCALE_STRING support to array_multisort() and mark it with U. 2006-08-01 22:28:26 +00:00
Andrei Zmievski
7b0fc1bb1c Whew. Fix up extract to params API, Unicode support, and simplify it as
well.
2006-08-01 21:50:44 +00:00
Andrei Zmievski
bcb2df2974 Apply Matt W's patch (with a fix) for array_combine() binary key safety. 2006-07-21 23:47:40 +00:00
Andrei Zmievski
54528ce322 Remove references to BG(user_compare_fnnc_name).
# Less bickering, more coding!
2006-07-21 23:29:25 +00:00
Andrei Zmievski
d32d425468 Make array_*intersect* functions use params API with FCI cache and mark
them with U.
2006-07-21 23:25:08 +00:00
Dmitry Stogov
7a09b15702 ZTS fix 2006-07-21 07:34:18 +00:00
Andrei Zmievski
40b4c60b9a Make array_walk(_recursive) use params API with FCI cache and mark them
with U.
2006-07-20 23:21:32 +00:00
Andrei Zmievski
6e9dcc4800 Make all array_*diff* functions use params API (along with FCI cache)
and mark them with U.

# What a mess (before my changes of course) :)
2006-07-20 22:51:20 +00:00
Andrei Zmievski
e9a9a26e7e Rewrite array_map() to use params API with fci cache and mark it with U. 2006-07-20 20:54:23 +00:00
Andrei Zmievski
675832c204 Update array_filter() and array_reduce() to use params API with FCI
cache and mark them with U.
2006-07-17 22:18:01 +00:00
Andrei Zmievski
34e5b3befa Upgrade uasort() and uksort() to use params API with FCI cache and mark
them with U.
2006-07-17 21:20:02 +00:00
Andrei Zmievski
fdf280b41b - Upgrade usort() to support Unicode (including valid Unicode callbacks).
- Make usort() use 'f' specifier for function call info/cache.
2006-07-17 20:52:12 +00:00
Marcus Boerger
dd47d64887 - Readd proto 2006-07-15 12:09:13 +00:00
Marcus Boerger
adc5a7f087 - Update array_fill_keys, better unicode support, use new param parsing API 2006-07-15 12:06:10 +00:00
Marcus Boerger
da5c076100 - Add array_fill_keys() (Matt W, php_lists at realplain com) 2006-07-15 10:10:47 +00:00
Andrei Zmievski
853ab6e09f Adjust array_pad(), array_reverse(), and array_unique() for params API
and mark them with U.
2006-07-14 22:41:22 +00:00
Andrei Zmievski
5766cdbd01 - Simplify array_combine() and adjust for params API
- Adjust array_count_values() and array_rand() for params API and mark
  with U
2006-07-14 22:15:54 +00:00
Andrei Zmievski
40cabdca59 Adjust array_key_exists(), array_slice(), and array_splice() for params
API and mark them with U.
2006-07-14 21:16:30 +00:00
Andrei Zmievski
8d28257255 Make array_change_key_case() -- a candidate for the quite possibly the
most useless function ever -- use params API and mark it with U.
2006-07-14 20:07:57 +00:00
Andrei Zmievski
6dfb4768b4 Update end(), prev(), next(), reset(), current(), and key() for params
API and mark with U.
2006-07-14 18:12:45 +00:00
Andrei Zmievski
0322c14d14 Update array_search()/in_array() for params API and mark with U. 2006-07-14 18:03:13 +00:00
Andrei Zmievski
f344fe0153 Update array_keys() and array_values() for params API and mark with U. 2006-07-14 17:55:27 +00:00
Andrei Zmievski
c30d1ecf11 - Simplify array_fill().
- Do params API for a couple of funcs and mark them as Unicode
  compliant.
2006-07-14 17:35:54 +00:00
Andrei Zmievski
c8254d82d7 Update array_sum() and array_product() (U). 2006-07-13 22:26:42 +00:00
Andrei Zmievski
8553cf9da8 Mark a few more funcs. 2006-07-13 22:03:42 +00:00
Andrei Zmievski
2fbc36496f - Let the caller output a warning instead of having
zend_get_unified_string_type() do it.
- Mark a few more functions are Unicode compatible.
2006-07-13 21:27:48 +00:00
Andrei Zmievski
c01957091a - Make compact() normalize variablem name before checking symtable.
- Mark tested/upgraded functions with 'U' flag.
2006-07-13 21:08:43 +00:00
Hannes Magnusson
bf0a79d381 Updated protos
Fixed vim folding
2006-06-25 19:19:31 +00:00
Andrei Zmievski
a871adf6bb MFB 2006-06-03 18:58:40 +00:00
Johannes Schlüter
e7747e8d74 - Fix bug #37060 (Type of retval of Countable::count() is not checked) 2006-04-12 19:29:52 +00:00
Derick Rethans
ad6a972de3 - Implemented basic collation support. For some reason "new Collator" gives segfaults when the object's collation resource is used.
- The following example shows what is implemented:

<?php
$orig = $strings = array(
    'côte',
    'cote',
    'côté',
    'coté',
    'fluße',
    'flüße',
);

echo "German phonebook:\n";
$c = collator_create( "de@collation=phonebook" );
foreach($c->sort($strings) as $string) {
    echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
    ? "With" : "Without", " french accent sorting order\n";

echo "\nFrench with options:\n";
$c = collator_create( "fr" );
$c->setAttribute(Collator::CASE_FIRST, Collator::UPPER_FIRST);
$c->setAttribute(Collator::CASE_LEVEL, Collator::ON);
$c->setStrength(Collator::SECONDARY);
foreach($c->sort($strings) as $string) {
    echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
    ? "With" : "Without", " french accent sorting order\n";
?>
2006-03-26 11:06:24 +00:00
Antony Dovgal
932c5d9e0e MF51: prevent segfault when exception is thrown from Countable::count() 2006-03-22 22:06:08 +00:00
Antony Dovgal
2c750d7f84 make the code a bit cleaner - no need for two different checks that are doing effectively the same 2006-03-19 22:12:39 +00:00
Dmitry Stogov
c366cc6d1a Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings 2006-03-02 13:12:45 +00:00
Dmitry Stogov
e3b7f3fd0d Unicode support: MS Visual C compatibility 2006-02-26 11:57:14 +00:00
Dmitry Stogov
84f0adff86 Unicode support: fixed GLOBALS protection 2006-02-22 13:10:32 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Dmitry Stogov
09ca61c125 Made server wide switch for unicode on/off (according to PDM). 2006-02-13 10:23:59 +00:00
Andrei Zmievski
f0a9b2d51b MFB. 2006-02-07 17:54:52 +00:00
Dmitry Stogov
227295a4f1 Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00
Andrey Hristov
9be53ac7a5 cast and fix a warning 2006-01-04 22:42:17 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Antony Dovgal
64d9c70e4c tweak the fix 2005-12-27 23:27:02 +00:00
Antony Dovgal
41973d8969 MF51: fix #35821 (array_map() segfaults when exception is throwed from the callback) 2005-12-27 22:33:40 +00:00
foobar
0ac2b74b0b - Nuke php3 legacy 2005-12-05 22:53:34 +00:00