Commit Graph

262 Commits

Author SHA1 Message Date
Ilia Alshanetsky
113686caa4 MFB: Fixed possible memory leak 2006-12-21 01:58:46 +00:00
Andrei Zmievski
8a4e2184e0 Make convert_to_*() APIs return SUCCESS/FAILURE. 2006-12-16 00:21:41 +00:00
Stanislav Malyshev
40b496d63f Merge from 5.2:
Improve tolower()-related functions on Windows and VC2005 by caching locale and using
tolower_l function.
2006-12-05 02:55:27 +00:00
Antony Dovgal
7c08c95070 fix leak appearing when converting object to NULL
add test
2006-11-15 17:28:56 +00:00
Andrei Zmievski
83e0dbb3d2 - Add an extra parameter to the cast_object handler that can be used by
various types as needed.
- Use that parameter to pass a specific converter for
  IS_UNICODE/IS_STRING types.
2006-10-13 14:52:19 +00:00
Antony Dovgal
55de312ce2 throw a warning when doing modulus by 0 (fr #39027) 2006-10-03 17:54:32 +00:00
Antony Dovgal
3408bafa32 use if() instead of ?: and avoid possible optimization problems 2006-09-27 15:40:09 +00:00
Dmitry Stogov
128548a5c0 Disabled autoconversion of hash keys (from string to unicode) for PHP arrays 2006-09-19 10:38:31 +00:00
Andrei Zmievski
f34e1baa9f Make string comparison functions conver to unicode or printable strings
depending on unicode.semantics and do the right thing.
2006-08-02 20:31:40 +00:00
Andrei Zmievski
8a32effd2c Rewrite IS_LONG, IS_DOUBLE, and IS_RESOURCE to IS_UNICODE conversion to
use custom functions instead of u_sprintf() which is terribly slow at
the moment (for numbers). Now long-to-unicode is only 8% slower than
long-to-binary and double-to-unicode is actually 6% faster.
2006-08-01 17:47:24 +00:00
Andrei Zmievski
0667864631 Callable checks and class fetching and lookup should support identifer
normalization now. (Marcus, Andrei)
2006-07-18 17:52:45 +00:00
Dmitry Stogov
6687f0377b New memory manager 2006-07-18 09:08:06 +00:00
Antony Dovgal
6bcb0c9ed5 fix logic 2006-07-18 08:57:26 +00:00
Antony Dovgal
0d088b15b7 fix DVAL_TO_LVAL() macro, which doesn't seem to work correctly on AIX & GCC < 3.5 2006-07-18 08:16:18 +00:00
Andrei Zmievski
b8e488ecd5 No need for TSRMLS_FETCH(). 2006-07-12 19:34:55 +00:00
Andrei Zmievski
2c8398fe81 Implement convert_to_unicode_with_converter() and adjust zval_* APIs. 2006-07-12 17:35:06 +00:00
Marcus Boerger
3173828d9e - Reword comment 2006-07-09 18:03:17 +00:00
Marcus Boerger
9de66765b8 - Fix issue with comparing objects with objects 2006-07-09 18:01:42 +00:00
Marcus Boerger
2c6b8329e7 - Drop dead code 2006-07-09 17:11:32 +00:00
Marcus Boerger
93a1d862f8 - Fix comparision edgecases involving objects (Tony, Marcus)
- Use ZVAL_LONG() where appropriate
2006-07-09 16:57:35 +00:00
Antony Dovgal
34126e4a64 MFB: fix error messages when converting objects to other types 2006-05-25 10:34:01 +00:00
Andrei Zmievski
16c55fb25a Move to refcounted implementation of collators. 2006-04-20 21:56:43 +00:00
Andrei Zmievski
a65a781b16 Note 2006-03-28 06:30:47 +00:00
Andrei Zmievski
1709428494 Implement to-Unicode conversion error behavior. Note the adjusted APIs. 2006-03-26 06:19:24 +00:00
Andrei Zmievski
51977c926c Support warning/exceptions flag for conversion errors. 2006-03-24 07:38:07 +00:00
Andrei Zmievski
b5221e4dd9 Allow conversion between binary/Unicode strings (based on
runtime_encoding setting).
2006-03-23 21:52:49 +00:00
Dmitry Stogov
7c0e534157 Dropped zend.ze1_compatibility_mode 2006-03-16 10:33:23 +00:00
Dmitry Stogov
e3b7f3fd0d Unicode support: MS Visual C compatibility 2006-02-26 11:57:14 +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
2e5d0a3a9d WS 2006-02-21 08:00:39 +00:00
Dmitry Stogov
b424a32610 Preparation for portable string API (use macroses to access zval). 2006-02-20 19:03: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
d4307e4494 We already have default collator available. 2006-02-09 23:23:02 +00:00
Andrei Zmievski
a6e8746bbe Needs to use .ustr. portion of the union for IS_UNICODE. 2006-02-05 20:54:11 +00:00
Marcus Boerger
44baf1f3ec - Initialize variable 2006-02-05 16:25:46 +00:00
Marcus Boerger
6bfa4b19e1 - Fix comparision where one argument is an object 2006-02-05 13:12:20 +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
Andi Gutmans
5de7cc3194 - Update copyright notices to 2006 2006-01-04 23:54:12 +00:00
Marcus Boerger
e9086f967a - MFB Fix zend*_str_tolower_copy() 2005-12-13 21:09:18 +00:00
Dmitry Stogov
e9f91abfef Fixed memory leak 2005-10-07 10:06:45 +00:00
Marcus Boerger
7c083fcc07 - Have __toString() be called if available in all places an object is used
as a string.
#
# Note that "Object #<id>" is no longer afallback for debugging purpose use
# var_dump, which was made for debugging. If you used this to grab the id
# of an object you can never rely on this. For object storage look at SPL's
# ObjectStorage class.
#
# Note the signature change in the cast handler:
#
# int (*cast_t)(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC);
# int (*cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
2005-10-05 19:02:27 +00:00
Dmitry Stogov
0a54602089 Fixed bug #34199 (if($obj)/if(!$obj) inconsistency) 2005-09-12 11:48:28 +00:00
Derick Rethans
161777af26 - Reimplement SORT_LOCALE_STRING with ICU locales. 2005-09-12 09:53:23 +00:00
Andrei Zmievski
ec65bc1039 Implement Unicode support for strncasecmp(). 2005-08-23 22:05:22 +00:00
Andrei Zmievski
291c282cce Damn. 2005-08-23 21:08:35 +00:00
Andrei Zmievski
e3ec5efc5e - Rewrite zend_u_binary_strncmp() to work on codepoint level. Calling
u_strCompare() doesn't help because it assumes that the input lengths
  specify the number of UChar's.
- Change zend_u_binary_strcmp() to use u_strCompare() (and it's fine to
  use it here, since we work with whole strings here).
2005-08-23 20:11:59 +00:00
Andrei Zmievski
df3a14953e This was so embarassingly silly. 2005-08-23 16:37:24 +00:00
Andrei Zmievski
26d10c5c76 Unicode support for strcasecmp(). 2005-08-22 22:17:19 +00:00
Andrei Zmievski
87f0bee331 Unicode support for strcmp()/strncmp(). 2005-08-19 23:15:36 +00:00
Marcus Boerger
26d72ec348 - Fix TSRM 2005-08-17 20:02:45 +00:00