Re: cvs: php-src / NEWS /ext/standard basic_functions.c file.c php_string.h string.c
| From: | Andrei Zmievski | Date: | Tue, 05 Dec 2006 17:12:38 +0000 |
| Subject: | Re: cvs: php-src / NEWS /ext/standard basic_functions.c file.c php_string.h string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-41913@lists.php.net to get a copy of this message | ||
That's some scary code there, Sara. What about endianness and portability?
-Andrei
On Dec 4, 2006, at 8:52 PM, Sara Golemon wrote:
+ if (str_type == IS_UNICODE) { + UChar udelim = ',', uenc = '"', uesc = '\\'; + + /* Non-passed params would need to be upconverted, but we can cheat with some local declarations */ + if (delim_type == IS_STRING) { + delim = (char*)&udelim; + delim_len = 1; + } + if (enc_type == IS_STRING) { + enc = (char*)&uenc; + enc_len = 1; + } + if (esc_type == IS_STRING) { + esc = (char*)&uesc; + esc_len = 1; + }