[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Dec 22 01:31:07 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1040r2=1.1041diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1040 ZendEngine2/ChangeLog:1.1041 --- ZendEngine2/ChangeLog:1.1040Thu Dec 21 01:31:02 2006 +++ ZendEngine2/ChangeLog Fri Dec 22 01:31:06 2006 @@ -1,3 +1,34 @@ +2006-12-21 Marcus Boerger [EMAIL PROTECTED] + +* zend_interfaces.c: + -Serialization doesn't work with unicode data + +2006-12-21 Antony Dovgal [EMAIL PROTECTED] + +* zend_execute_API.c: + fix possible leak + +2006-12-21 Ilia Alshanetsky [EMAIL PROTECTED] + +* zend_compile.c: + MFB: Fix a possible memory leak + +* (PHP_5_2) + zend_compile.c: + Fix a possible memory leak + +* zend_operators.c: + MFB: Fixed possible memory leak + +* (PHP_5_2) + zend_operators.c: + Fixed possible memory leak + +2006-12-21 Antony Dovgal [EMAIL PROTECTED] + +* zend_unicode.c: + make sure err_char is initialized properly + 2006-12-20 Antony Dovgal [EMAIL PROTECTED] * zend_builtin_functions.c: @@ -16250,7 +16281,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1040 2006/12/21 01:31:02 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1041 2006/12/22 01:31:06 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -17974,7 +18005,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1040 2006/12/21 01:31:02 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1041 2006/12/22 01:31:06 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Dec 22 01:31:03 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2548r2=1.2549diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2548 php-src/ChangeLog:1.2549 --- php-src/ChangeLog:1.2548Thu Dec 21 01:31:00 2006 +++ php-src/ChangeLog Fri Dec 22 01:31:02 2006 @@ -1,3 +1,235 @@ +2006-12-21 Andrei Zmievski [EMAIL PROTECTED] + +* ext/standard/levenshtein.c: + levenshtein() already supported Unicode. + +* ext/standard/metaphone.c: + Metaphone will work only with binary runtime-encoded strings. + +2006-12-21 Marcus Boerger [EMAIL PROTECTED] + +* ext/standard/var.c: + - No misleading comments + +* ext/spl/spl_observer.c + ext/spl/spl_sxe.c: + - Mark a fewthings as unicode ready + +* ext/standard/var.c: + - Serialization doesn't work with unicode data + +* ZendEngine2/zend_interfaces.c: + -Serialization doesn't work with unicode data + +2006-12-21 Antony Dovgal [EMAIL PROTECTED] + +* ext/oci8/oci8_interface.c: + temporary fix for oci_error(), just to make it work + it should be using add_ascii_assoc_text() instead + +* ext/oci8/oci8_interface.c: + added support for CALL statement type (patch by Chris Jones) + +* main/SAPI.c: + fix ws, cs and overall code readability + +2006-12-21 Andrei Zmievski [EMAIL PROTECTED] + +* unicode-progress.txt + ext/standard/array.c + ext/standard/php_string.h + ext/standard/string.c + ext/standard/strnatcmp.c: + Bite the bullet and port the natural comparison algorithm to support + UChar strings. Also, simplify the original code. + + +2006-12-21 Antony Dovgal [EMAIL PROTECTED] + +* ext/standard/datetime.c: + temp is freed in zend_unicode_to_string() on failure + +* ext/standard/browscap.c: + lookup_browser_name cannot be NULL + +* (PHP_5_2) + ext/oci8/tests/array_bind_014.phpt + ext/oci8/tests/array_bind_int1.phpt + ext/oci8/tests/fetch_all2.phpt + ext/oci8/tests/lob_020.phpt + ext/oci8/tests/lob_027.phpt + ext/oci8/tests/lob_033.phpt + ext/oci8/tests/lob_034.phpt + ext/oci8/tests/lob_035.phpt: + improve tests + +* ext/oci8/tests/array_bind_014.phpt + ext/oci8/tests/array_bind_014.phpt + ext/oci8/tests/array_bind_int1.phpt + ext/oci8/tests/error1.phpt + ext/oci8/tests/fetch_all2.phpt + ext/oci8/tests/fetch_all2.phpt + ext/oci8/tests/lob_020.phpt + ext/oci8/tests/lob_027.phpt + ext/oci8/tests/lob_033.phpt + ext/oci8/tests/lob_033.phpt + ext/oci8/tests/lob_034.phpt + ext/oci8/tests/lob_034.phpt + ext/oci8/tests/lob_035.phpt + ext/oci8/tests/lob_035.phpt + ext/oci8/tests/privileged_connect1.phpt: + + improve tests, add new ones + +2006-12-21 Seiji Masugata [EMAIL PROTECTED] + +* ext/mbstring/libmbfl/filters/mbfilter_cp51932.c + ext/mbstring/libmbfl/filters/mbfilter_cp51932.h: + Initial commit(Synced PHP_5_2 Branch.). + +* ext/mbstring/config.m4 + ext/mbstring/mb_gpc.c + ext/mbstring/mbstring.c + ext/mbstring/libmbfl/libmbfl.dsw + ext/mbstring/libmbfl/libmbfl.sln + ext/mbstring/libmbfl/libmbfl.vcproj + ext/mbstring/libmbfl/filters/Makefile.am + ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c + ext/mbstring/libmbfl/filters/mbfilter_jis.c + ext/mbstring/libmbfl/filters/mbfilter_jis.h + ext/mbstring/libmbfl/filters/unicode_table_jis.h + ext/mbstring/libmbfl/mbfl/mbfilter.c + ext/mbstring/libmbfl/mbfl/mbfl_convert.c + ext/mbstring/libmbfl/mbfl/mbfl_encoding.c + ext/mbstring/libmbfl/mbfl/mbfl_encoding.h + ext/mbstring/libmbfl/mbfl/mbfl_ident.c + ext/mbstring/libmbfl/nls/nls_ru.c + ext/mbstring/libmbfl/nls/nls_ru.h: + Synced PHP_5_2 Branch. + +* (PHP_4_4) + ext/mbstring/mbstring.c + ext/mbstring/mbstring.c: + Fixed bug #39361, #39400 (mbstring function overloading problem). + +2006-12-21 Dmitry Stogov [EMAIL PROTECTED] + +* php.ini-dist + php.ini-dist + php.ini-recommended + php.ini-recommended: + Fixed comments + +2006-12-21 Rob Richards [EMAIL PROTECTED] + +* ext/dom/domimplementation.c + ext/dom/text.c: + MFB: fix issues identitified by coverity + +* (PHP_5_2) + ext/dom/domimplementation.c + ext/dom/text.c: + fix issues identitified by coverity + +2006-12-21 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + ext/oci8/tests/lob_030.phpt + ext/oci8/tests/lob_031.phpt + ext/oci8/tests/lob_032.phpt: + new tests + +* ext/oci8/tests/lob_030.phpt + ext/oci8/tests/lob_030.phpt + ext/oci8/tests/lob_031.phpt + ext/oci8/tests/lob_031.phpt + ext/oci8/tests/lob_032.phpt + ext/oci8/tests/lob_032.phpt: + + new tests
Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c
Hello Andrei, cast tells mewhat type is requested. That must not necessarily be what UG(unicode) tells me. So i have toreturn whatever that type says. best regards marcus Thursday, December 21, 2006, 7:43:18 AM, you wrote: If UG(unicode) is on, ZVAL_ASCII_STRING() will convert binary string arg to Unicode and return it as IS_UNICODE, otherwise it will return string as-is (IS_STRING). In the former case, the string is assumed to contain only ASCII chars. What are you after exactly? -Andrei On Dec 20, 2006, at 3:30 PM, Marcus Boerger wrote: helly Wed Dec 20 23:30:23 2006 UTC Modified files: /php-src/ext/spl spl_directory.c Log: - Quick hackto make tests pass # There is something missing, ZVAL_TYPED_ASCII_STRING(z, type, char*,flags) # Or am i overseeinghow that works? http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c? r1=1.105r2=1.106diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.105 php-src/ext/spl/ spl_directory.c:1.106 --- php-src/ext/spl/spl_directory.c:1.105 Sun Nov 12 17:56:14 2006 +++ php-src/ext/spl/spl_directory.c Wed Dec 20 23:30:23 2006 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: spl_directory.c,v 1.105 2006/11/12 17:56:14 helly Exp $ */ +/* $Id: spl_directory.c,v 1.106 2006/12/20 23:30:23 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1225,16 +1225,28 @@ { spl_filesystem_object *intern = (spl_filesystem_object*) zend_object_store_get_object(readobj TSRMLS_CC); - if (type == IS_STRING) { - switch (intern-type) { - case SPL_FS_INFO: - case SPL_FS_FILE: + switch (intern-type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + if (type == IS_STRING) { ZVAL_STRINGL(writeobj, intern-file_name, intern- file_name_len, 1); return SUCCESS; - case SPL_FS_DIR: + } + if (type == IS_UNICODE UG(unicode)) { + ZVAL_ASCII_STRINGL(writeobj, intern-file_name, intern- file_name_len, 1); + return SUCCESS; + } + break; + case SPL_FS_DIR: + if (type == IS_STRING) { ZVAL_STRING(writeobj, intern-u.dir.entry.d_name, 1); return SUCCESS; } + if (type == IS_UNICODE UG(unicode)) { + ZVAL_ASCII_STRING(writeobj, intern-u.dir.entry.d_name, 1); + return SUCCESS; + } + break; } ZVAL_NULL(writeobj); return FAILURE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8/tests lob_030.phpt lob_031.phpt lob_032.phpt
tony2001Thu Dec 21 12:41:03 2006 UTC Added files: /php-src/ext/oci8/tests lob_030.phpt lob_031.phpt lob_032.phpt Log: new tests by Christopher Jones http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_030.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_030.phpt +++ php-src/ext/oci8/tests/lob_030.phpt --TEST-- Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; require dirname(__FILE__).'/create_table.inc'; function insert_verify($c, $tn, $id, $length) { // Insert the data $ora_sql = INSERT INTO .$tn. (id, clob) VALUES (.$id., empty_clob()) RETURNING clob INTO :v_clob ; $statement = oci_parse($c,$ora_sql); $clob = oci_new_descriptor($c,OCI_D_LOB); oci_bind_by_name($statement,:v_clob, $clob, -1, OCI_B_CLOB); oci_execute($statement, OCI_DEFAULT); $data = str_pad(x, $length, x); $clob-write($data); // Verify the data $select_sql = SELECT clob FROM .$tn. where id = .$id; $s = oci_parse($c, $select_sql); oci_execute($s); $row = oci_fetch_array($s, OCI_RETURN_LOBS); var_dump(strlen($row[0])); } echo Test 1: A CLOB with an even number of bytes\n; insert_verify($c, $schema.$table_name, 1, 105); echo Test 2: A CLOB with an odd number of bytes\n; insert_verify($c, $schema.$table_name, 2, 1050001); echo Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation)\n; insert_verify($c, $schema.$table_name, 3, 1048576); echo Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code)\n; insert_verify($c, $schema.$table_name, 4, 1049028); echo Test 5: A CLOB of 1049028-1 bytes\n; insert_verify($c, $schema.$table_name, 5, 1049028-1); echo Test 6: A CLOB of 1049028+1 bytes\n; insert_verify($c, $schema.$table_name, 6, 1049028+1); require dirname(__FILE__).'/drop_table.inc'; echo Done\n; ? --EXPECTF-- Test 1: A CLOB with an even number of bytes int(105) Test 2: A CLOB with an odd number of bytes int(1050001) Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation) int(1048576) Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code) int(1049028) Test 5: A CLOB of 1049028-1 bytes int(1049027) Test 6: A CLOB of 1049028+1 bytes int(1049029) Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_031.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_031.phpt +++ php-src/ext/oci8/tests/lob_031.phpt --TEST-- Test LOB-read(), LOB-seek() and LOB-tell() with nul bytes in data --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; require dirname(__FILE__).'/create_table.inc'; $ora_sql = INSERT INTO .$schema.$table_name. (blob) VALUES (empty_blob()) RETURNING blob INTO :v_blob ; $statement = oci_parse($c,$ora_sql); $blob = oci_new_descriptor($c,OCI_D_LOB); oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB); oci_execute($statement, OCI_DEFAULT); $blob-write(btest); $blob-tell(); $blob-seek(10, OCI_SEEK_CUR); $blob-write(bstring); $blob-flush(); $select_sql = SELECT blob FROM .$schema.$table_name; $s = oci_parse($c, $select_sql); oci_execute($s); $row = oci_fetch_array($s); $row[0]-read(3); echo 1. .$row[0]-tell(). \n; $row[0]-read(3); echo 2. .$row[0]-tell(). \n; $row[0]-read(3); echo 3. .$row[0]-tell(). \n; $row[0]-read(6); echo 4. .$row[0]-tell(). \n; $row[0]-read(4); echo 5. .$row[0]-tell(). \n; // Read past end $row[0]-read(5); echo 6. .$row[0]-tell(). \n; $row[0]-read(1); echo 8. .$row[0]-tell(). \n; // Now seek $row[0]-seek(1); echo 9. .$row[0]-tell(). \n; $row[0]-seek(8); echo 10. .$row[0]-tell(). \n; $row[0]-seek(20); echo 11. .$row[0]-tell(). \n; // Seek past end $row[0]-seek(25); echo 12. .$row[0]-tell(). \n; // Seek past end $row[0]-seek(2, OCI_SEEK_SET); echo 13. .$row[0]-tell(). \n; // Move on 2 more $row[0]-seek(2, OCI_SEEK_CUR); echo 14. .$row[0]-tell(). \n; // Move 3 past the end $row[0]-seek(3, OCI_SEEK_END); echo 15. .$row[0]-tell(). \n; // Move 4 before the end $row[0]-seek(-4, OCI_SEEK_END); echo 16. .$row[0]-tell(). \n; require dirname(__FILE__).'/drop_table.inc'; echo Done\n; ? --EXPECTF-- 1. 3 2. 6 3. 9 4. 15 5. 19 6. 20 8. 20 9. 1 10. 8 11. 20 12. 25 13. 2 14. 4 15. 23 16. 16 Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_032.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_032.phpt +++ php-src/ext/oci8/tests/lob_032.phpt --TEST-- oci_lob_write() and friends --SKIPIF-- ?php if
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8/tests lob_030.phpt lob_031.phpt lob_032.phpt
tony2001Thu Dec 21 12:41:36 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/oci8/tests lob_030.phpt lob_031.phpt lob_032.phpt Log: new tests http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_030.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_030.phpt +++ php-src/ext/oci8/tests/lob_030.phpt --TEST-- Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; require dirname(__FILE__).'/create_table.inc'; function insert_verify($c, $tn, $id, $length) { // Insert the data $ora_sql = INSERT INTO .$tn. (id, clob) VALUES (.$id., empty_clob()) RETURNING clob INTO :v_clob ; $statement = oci_parse($c,$ora_sql); $clob = oci_new_descriptor($c,OCI_D_LOB); oci_bind_by_name($statement,:v_clob, $clob, -1, OCI_B_CLOB); oci_execute($statement, OCI_DEFAULT); $data = str_pad(x, $length, x); $clob-write($data); // Verify the data $select_sql = SELECT clob FROM .$tn. where id = .$id; $s = oci_parse($c, $select_sql); oci_execute($s); $row = oci_fetch_array($s, OCI_RETURN_LOBS); var_dump(strlen($row[0])); } echo Test 1: A CLOB with an even number of bytes\n; insert_verify($c, $schema.$table_name, 1, 105); echo Test 2: A CLOB with an odd number of bytes\n; insert_verify($c, $schema.$table_name, 2, 1050001); echo Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation)\n; insert_verify($c, $schema.$table_name, 3, 1048576); echo Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code)\n; insert_verify($c, $schema.$table_name, 4, 1049028); echo Test 5: A CLOB of 1049028-1 bytes\n; insert_verify($c, $schema.$table_name, 5, 1049028-1); echo Test 6: A CLOB of 1049028+1 bytes\n; insert_verify($c, $schema.$table_name, 6, 1049028+1); require dirname(__FILE__).'/drop_table.inc'; echo Done\n; ? --EXPECTF-- Test 1: A CLOB with an even number of bytes int(105) Test 2: A CLOB with an odd number of bytes int(1050001) Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation) int(1048576) Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code) int(1049028) Test 5: A CLOB of 1049028-1 bytes int(1049027) Test 6: A CLOB of 1049028+1 bytes int(1049029) Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_031.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_031.phpt +++ php-src/ext/oci8/tests/lob_031.phpt --TEST-- Test LOB-read(), LOB-seek() and LOB-tell() with nul bytes in data --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; require dirname(__FILE__).'/create_table.inc'; $ora_sql = INSERT INTO .$schema.$table_name. (blob) VALUES (empty_blob()) RETURNING blob INTO :v_blob ; $statement = oci_parse($c,$ora_sql); $blob = oci_new_descriptor($c,OCI_D_LOB); oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB); oci_execute($statement, OCI_DEFAULT); $blob-write(btest); $blob-tell(); $blob-seek(10, OCI_SEEK_CUR); $blob-write(bstring); $blob-flush(); $select_sql = SELECT blob FROM .$schema.$table_name; $s = oci_parse($c, $select_sql); oci_execute($s); $row = oci_fetch_array($s); $row[0]-read(3); echo 1. .$row[0]-tell(). \n; $row[0]-read(3); echo 2. .$row[0]-tell(). \n; $row[0]-read(3); echo 3. .$row[0]-tell(). \n; $row[0]-read(6); echo 4. .$row[0]-tell(). \n; $row[0]-read(4); echo 5. .$row[0]-tell(). \n; // Read past end $row[0]-read(5); echo 6. .$row[0]-tell(). \n; $row[0]-read(1); echo 8. .$row[0]-tell(). \n; // Now seek $row[0]-seek(1); echo 9. .$row[0]-tell(). \n; $row[0]-seek(8); echo 10. .$row[0]-tell(). \n; $row[0]-seek(20); echo 11. .$row[0]-tell(). \n; // Seek past end $row[0]-seek(25); echo 12. .$row[0]-tell(). \n; // Seek past end $row[0]-seek(2, OCI_SEEK_SET); echo 13. .$row[0]-tell(). \n; // Move on 2 more $row[0]-seek(2, OCI_SEEK_CUR); echo 14. .$row[0]-tell(). \n; // Move 3 past the end $row[0]-seek(3, OCI_SEEK_END); echo 15. .$row[0]-tell(). \n; // Move 4 before the end $row[0]-seek(-4, OCI_SEEK_END); echo 16. .$row[0]-tell(). \n; require dirname(__FILE__).'/drop_table.inc'; echo Done\n; ? --EXPECTF-- 1. 3 2. 6 3. 9 4. 15 5. 19 6. 20 8. 20 9. 1 10. 8 11. 20 12. 25 13. 2 14. 4 15. 23 16. 16 Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_032.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_032.phpt +++ php-src/ext/oci8/tests/lob_032.phpt --TEST-- oci_lob_write() and friends --SKIPIF-- ?php if (!extension_loaded('oci8'))
[PHP-CVS] cvs: php-src /ext/dom domimplementation.c text.c
rrichards Thu Dec 21 12:52:12 2006 UTC Modified files: /php-src/ext/domdomimplementation.c text.c Log: MFB: fix issues identitified by coverity http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domimplementation.c?r1=1.21r2=1.22diff_format=u Index: php-src/ext/dom/domimplementation.c diff -u php-src/ext/dom/domimplementation.c:1.21 php-src/ext/dom/domimplementation.c:1.22 --- php-src/ext/dom/domimplementation.c:1.21Fri Dec 8 16:28:33 2006 +++ php-src/ext/dom/domimplementation.c Thu Dec 21 12:52:12 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: domimplementation.c,v 1.21 2006/12/08 16:28:33 rrichards Exp $ */ +/* $Id: domimplementation.c,v 1.22 2006/12/21 12:52:12 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -115,6 +115,11 @@ doctype = xmlCreateIntSubset(NULL, localname, pch1, pch2); xmlFree(localname); + if (doctype == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to create DocumentType); + RETURN_FALSE; + } + DOM_RET_OBJ(rv, (xmlNodePtr) doctype, ret, NULL); } /* }}} end dom_domimplementation_create_document_type */ http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/dom/text.c diff -u php-src/ext/dom/text.c:1.29 php-src/ext/dom/text.c:1.30 --- php-src/ext/dom/text.c:1.29 Fri Dec 8 16:28:33 2006 +++ php-src/ext/dom/text.c Thu Dec 21 12:52:12 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: text.c,v 1.29 2006/12/08 16:28:33 rrichards Exp $ */ +/* $Id: text.c,v 1.30 2006/12/21 12:52:12 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -156,6 +156,10 @@ xmlFree(first); xmlFree(second); + if (nnode == NULL) { + RETURN_FALSE; + } + if (node-parent != NULL) { nnode-type = XML_ELEMENT_NODE; xmlAddNextSibling(node, nnode); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / php.ini-dist php.ini-recommended
dmitry Thu Dec 21 13:05:28 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcphp.ini-dist php.ini-recommended Log: Fixed comments http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.231.2.10.2.14r2=1.231.2.10.2.15diff_format=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.231.2.10.2.14 php-src/php.ini-dist:1.231.2.10.2.15 --- php-src/php.ini-dist:1.231.2.10.2.14Thu Dec 21 09:12:42 2006 +++ php-src/php.ini-distThu Dec 21 13:05:27 2006 @@ -254,7 +254,7 @@ max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) +memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) ;; http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.179.2.11.2.14r2=1.179.2.11.2.15diff_format=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.179.2.11.2.14 php-src/php.ini-recommended:1.179.2.11.2.15 --- php-src/php.ini-recommended:1.179.2.11.2.14 Thu Dec 21 09:12:42 2006 +++ php-src/php.ini-recommended Thu Dec 21 13:05:27 2006 @@ -299,7 +299,7 @@ max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) +memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) ;; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended
dmitry Thu Dec 21 13:06:03 2006 UTC Modified files: /php-srcphp.ini-dist php.ini-recommended Log: Fixed comments http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.259r2=1.260diff_format=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.259 php-src/php.ini-dist:1.260 --- php-src/php.ini-dist:1.259 Thu Dec 21 09:12:59 2006 +++ php-src/php.ini-distThu Dec 21 13:06:03 2006 @@ -202,7 +202,7 @@ max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) +memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) ;; http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.208r2=1.209diff_format=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.208 php-src/php.ini-recommended:1.209 --- php-src/php.ini-recommended:1.208 Thu Dec 21 09:12:59 2006 +++ php-src/php.ini-recommended Thu Dec 21 13:06:03 2006 @@ -235,7 +235,7 @@ max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) +memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) ;; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended /main main.c
Thanks Matt. I don't like to read a lot of comments an documentation. :) Dmitry. -Original Message- From: Matt Wilmas [mailto:[EMAIL PROTECTED] Sent: Thursday, December 21, 2006 12:38 PM To: Dmitry Stogov; php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended /main main.c Hi Dmitry, -memory_limit = 16M ; Maximum amount of memory a script may consume (16MB) +memory_limit = 128M ; Maximum amount of memory a script may consume (16MB) It still says 16MB in parentheses. :-) Matt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
mj Thu Dec 21 17:00:12 2006 UTC Modified files: /CVSROOTavail Log: * PEAR karma for Adam Harvey http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1226r2=1.1227diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1226 CVSROOT/avail:1.1227 --- CVSROOT/avail:1.1226Wed Dec 20 16:07:31 2006 +++ CVSROOT/avail Thu Dec 21 17:00:12 2006 @@ -368,6 +368,7 @@ avail|ashnazg|pear/PhpDocumentor,peardoc avail|zhaowei|pecl/mailparse avail|wormus|pear/Validate,peardoc +avail|aharvey|pear/Auth,pear/Config,peardoc # php windows installer avail|jmertic|php-src/win32/installer -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring mbstring.c
masugataThu Dec 21 17:26:05 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c Log: Fixed bug #39361, #39400 (mbstring function overloading problem). http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.17r2=1.224.2.22.2.18diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.17 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.18 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.17 Fri Nov 3 19:55:50 2006 +++ php-src/ext/mbstring/mbstring.c Thu Dec 21 17:26:05 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.17 2006/11/03 19:55:50 iliaa Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.18 2006/12/21 17:26:05 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -1346,7 +1346,7 @@ MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; MBSTRG(current_filter_illegal_substchar) = Z_LVAL_PP(arg1); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown character.); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown character.); RETVAL_FALSE; } } @@ -1605,11 +1605,11 @@ } if (offset 0 || (unsigned long)offset haystack.len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset is out of range); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset not contained in string.); RETURN_FALSE; } if (needle.len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty needle); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty delimiter.); RETURN_FALSE; } @@ -1639,7 +1639,7 @@ /* }}} */ /* {{{ proto int mb_strrpos(string haystack, string needle [, int offset [, string encoding]]) - Find the last occurrence of a character in a string within another */ + Find position of last occurrence of a string within another */ PHP_FUNCTION(mb_strrpos) { int n; @@ -1712,11 +1712,9 @@ } if (haystack.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty haystack); RETURN_FALSE; } if (needle.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); RETURN_FALSE; } n = mbfl_strpos(haystack, needle, offset, 1); @@ -1770,6 +1768,10 @@ RETURN_FALSE; } + if(offset old_haystack_len){ + RETURN_FALSE; + } + n = php_mb_stripos(1, old_haystack, old_haystack_len, old_needle, old_needle_len, offset, from_encoding TSRMLS_CC); if (n = 0) { @@ -1810,7 +1812,7 @@ } if (needle.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); + php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty delimiter.); RETURN_FALSE; } n = mbfl_strpos(haystack, needle, 0, 0); @@ -1868,11 +1870,9 @@ } if (haystack.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty haystack); RETURN_FALSE; } if (needle.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); RETURN_FALSE; } n = mbfl_strpos(haystack, needle, 0, 1); @@ -1920,6 +1920,11 @@ RETURN_FALSE; } + if(!needle.len){ + php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty delimiter.); + RETURN_FALSE; + } + haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(from_encoding); if (haystack.no_encoding == mbfl_no_encoding_invalid) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding \%s\, from_encoding); @@ -2033,7 +2038,7 @@ } if (needle.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); + php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty substring.); RETURN_FALSE; } @@ -4225,6 +4230,7 @@ str[i] = ret-val; len[i] = ret-len; } + MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); mbfl_buffer_converter_delete(convd); } @@ -4334,7 +4340,6 @@ } if (haystack.len = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty haystack);
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c
masugataThu Dec 21 17:28:58 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/mbstring mbstring.c Log: Fixed bug #39361, #39400 (mbstring function overloading problem). http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.18r2=1.142.2.47.2.19diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.18 php-src/ext/mbstring/mbstring.c:1.142.2.47.2.19 --- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.18 Fri Nov 3 02:24:50 2006 +++ php-src/ext/mbstring/mbstring.c Thu Dec 21 17:28:57 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.142.2.47.2.18 2006/11/03 02:24:50 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.142.2.47.2.19 2006/12/21 17:28:57 masugata Exp $ */ /* * PHP4 Multibyte String module mbstring @@ -2197,11 +2197,11 @@ convert_to_string_ex(arg2); if (offset 0 || offset Z_STRLEN_PP(arg1)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset is out of range); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Offset not contained in string.); RETURN_FALSE; } if (Z_STRLEN_PP(arg2) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty needle); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty delimiter.); RETURN_FALSE; } haystack.val = (unsigned char *)Z_STRVAL_PP(arg1); @@ -2272,11 +2272,9 @@ convert_to_string_ex(arg1); convert_to_string_ex(arg2); if (Z_STRLEN_PP(arg1) = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty haystack); RETURN_FALSE; } if (Z_STRLEN_PP(arg2) = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); RETURN_FALSE; } haystack.val = (unsigned char *)Z_STRVAL_PP(arg1); @@ -2331,7 +2329,7 @@ convert_to_string_ex(arg2); if (Z_STRLEN_PP(arg2) = 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); + php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty substring.); RETURN_FALSE; } haystack.val = (unsigned char *)Z_STRVAL_PP(arg1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/libmbfl/filters mbfilter_cp51932.c mbfilter_cp51932.h
masugataThu Dec 21 17:44:40 2006 UTC Modified files: /php-src/ext/mbstring/libmbfl/filters mbfilter_cp51932.c mbfilter_cp51932.h Log: Initial commit(Synced PHP_5_2 Branch.). http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c?r1=1.1r2=1.2diff_format=u Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c diff -u /dev/null php-src/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c:1.2 --- /dev/null Thu Dec 21 17:44:40 2006 +++ php-src/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c Thu Dec 21 17:44:40 2006 @@ -0,0 +1,360 @@ +/* + * streamable kanji code filter and converter + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of streamable kanji code filter and converter, + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with streamable kanji code filter and converter; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * The source code included in this files was separated from mbfilter_ja.c + * by moriyoshi koizumi [EMAIL PROTECTED] on 4 dec 2002. + * + */ + +#ifdef HAVE_CONFIG_H +#include config.h +#endif + +#include mbfilter.h +#include mbfilter_cp51932.h + +#include unicode_table_cp932_ext.h +#include unicode_table_jis.h +#include cp932_table.h + +static int mbfl_filt_ident_cp51932(int c, mbfl_identify_filter *filter); + +static const unsigned char mblen_table_eucjp[] = { /* 0xA1-0xFE */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 +}; + + +static const char *mbfl_encoding_cp51932_aliases[] = {cp51932, NULL}; + +const struct mbfl_identify_vtbl vtbl_identify_cp51932 = { + mbfl_no_encoding_cp51932, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_cp51932 +}; + +const mbfl_encoding mbfl_encoding_cp51932 = { + mbfl_no_encoding_cp51932, + CP51932, + CP51932, + (const char *(*)[])mbfl_encoding_cp51932_aliases, + mblen_table_eucjp, + MBFL_ENCTYPE_MBCS +}; + +const struct mbfl_convert_vtbl vtbl_cp51932_wchar = { + mbfl_no_encoding_cp51932, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_cp51932_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp51932 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp51932, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_cp51932, + mbfl_filt_conv_common_flush +}; + +#define CK(statement) do { if ((statement) 0) return (-1); } while (0) + +#define sjistoidx(c1, c2) \ +(((c1) 0x9f) \ +? (((c1) - 0xc1) * 188 + (c2) - (((c2) 0x7e) ? 0x41 : 0x40)) \ +: (((c1) - 0x81) * 188 + (c2) - (((c2) 0x7e) ? 0x41 : 0x40))) +#define idxtoeuc1(c) (((c) / 94) + 0xa1) +#define idxtoeuc2(c) (((c) % 94) + 0xa1) + +/* + * cp51932 = wchar + */ +int +mbfl_filt_conv_cp51932_wchar(int c, mbfl_convert_filter *filter) +{ + int c1, s, w; + + switch (filter-status) { + case 0: + if (c = 0 c 0x80) { /* latin */ + CK((*filter-output_function)(c, filter-data)); + } else if (c 0xa0 c 0xff) { /* CP932 first char */ + filter-status = 1; + filter-cache = c; + } else if (c == 0x8e) { /* kana first char */ + filter-status = 2; + } else { + w = c MBFL_WCSGROUP_MASK; + w |=
Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c
So do an if() statement then.. -Andrei On Dec 21, 2006, at 12:21 AM, Marcus Boerger wrote: Hello Andrei, cast tells mewhat type is requested. That must not necessarily be what UG(unicode) tells me. So i have toreturn whatever that type says. best regards marcus Thursday, December 21, 2006, 7:43:18 AM, you wrote: If UG(unicode) is on, ZVAL_ASCII_STRING() will convert binary string arg to Unicode and return it as IS_UNICODE, otherwise it will return string as-is (IS_STRING). In the former case, the string is assumed to contain only ASCII chars. What are you after exactly? -Andrei On Dec 20, 2006, at 3:30 PM, Marcus Boerger wrote: helly Wed Dec 20 23:30:23 2006 UTC Modified files: /php-src/ext/spl spl_directory.c Log: - Quick hackto make tests pass # There is something missing, ZVAL_TYPED_ASCII_STRING(z, type, char*,flags) # Or am i overseeinghow that works? http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c? r1=1.105r2=1.106diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.105 php-src/ext/spl/ spl_directory.c:1.106 --- php-src/ext/spl/spl_directory.c:1.105 Sun Nov 12 17:56:14 2006 +++ php-src/ext/spl/spl_directory.c Wed Dec 20 23:30:23 2006 @@ -16,7 +16,7 @@ + - -+ */ -/* $Id: spl_directory.c,v 1.105 2006/11/12 17:56:14 helly Exp $ */ +/* $Id: spl_directory.c,v 1.106 2006/12/20 23:30:23 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1225,16 +1225,28 @@ { spl_filesystem_object *intern = (spl_filesystem_object*) zend_object_store_get_object(readobj TSRMLS_CC); - if (type == IS_STRING) { - switch (intern-type) { - case SPL_FS_INFO: - case SPL_FS_FILE: + switch (intern-type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + if (type == IS_STRING) { ZVAL_STRINGL(writeobj, intern-file_name, intern- file_name_len, 1); return SUCCESS; - case SPL_FS_DIR: + } + if (type == IS_UNICODE UG(unicode)) { + ZVAL_ASCII_STRINGL(writeobj, intern-file_name, intern- file_name_len, 1); + return SUCCESS; + } + break; + case SPL_FS_DIR: + if (type == IS_STRING) { ZVAL_STRING(writeobj, intern-u.dir.entry.d_name, 1); return SUCCESS; } + if (type == IS_UNICODE UG(unicode)) { + ZVAL_ASCII_STRING(writeobj, intern-u.dir.entry.d_name, 1); + return SUCCESS; + } + break; } ZVAL_NULL(writeobj); return FAILURE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8/tests array_bind_014.phpt array_bind_int1.phpt error1.phpt fetch_all2.phpt lob_020.phpt lob_027.phpt lob_033.phpt lob_034.phpt lob_035.phpt privileged_connect1.phpt
tony2001Thu Dec 21 19:22:49 2006 UTC Added files: /php-src/ext/oci8/tests array_bind_014.phpt fetch_all2.phpt lob_033.phpt lob_034.phpt lob_035.phpt Modified files: /php-src/ext/oci8/tests array_bind_int1.phpt error1.phpt lob_020.phpt lob_027.phpt privileged_connect1.phpt Log: improve tests, add new ones http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/array_bind_int1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/oci8/tests/array_bind_int1.phpt diff -u php-src/ext/oci8/tests/array_bind_int1.phpt:1.2 php-src/ext/oci8/tests/array_bind_int1.phpt:1.3 --- php-src/ext/oci8/tests/array_bind_int1.phpt:1.2 Thu Dec 8 22:31:55 2005 +++ php-src/ext/oci8/tests/array_bind_int1.phpt Thu Dec 21 19:22:49 2006 @@ -50,7 +50,7 @@ $array = Array(1,2,3,4,5); -oci_bind_array_by_name($statement, :c1, $array, 10, 5, SQLT_NUM); +oci_bind_array_by_name($statement, :c1, $array, 10, 5, SQLT_INT); oci_execute($statement); http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/error1.phpt?r1=1.8r2=1.9diff_format=u Index: php-src/ext/oci8/tests/error1.phpt diff -u php-src/ext/oci8/tests/error1.phpt:1.8 php-src/ext/oci8/tests/error1.phpt:1.9 --- php-src/ext/oci8/tests/error1.phpt:1.8 Thu Nov 23 16:08:41 2006 +++ php-src/ext/oci8/tests/error1.phpt Thu Dec 21 19:22:49 2006 @@ -32,7 +32,7 @@ [code]= int(12154) [message]= - unicode(45) ORA-12154: TNS:could not resolve %s + unicode(%d) ORA-12154: TNS:could not resolve %s [offset]= int(0) [sqltext]= http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_020.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/oci8/tests/lob_020.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_027.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/oci8/tests/lob_027.phpt diff -u php-src/ext/oci8/tests/lob_027.phpt:1.1 php-src/ext/oci8/tests/lob_027.phpt:1.2 --- php-src/ext/oci8/tests/lob_027.phpt:1.1 Mon Dec 11 12:31:54 2006 +++ php-src/ext/oci8/tests/lob_027.phpt Thu Dec 21 19:22:49 2006 @@ -47,6 +47,16 @@ oci_commit($c); } +$select_sql = SELECT blob FROM .$schema.$table_name. FOR UPDATE; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +$row = oci_fetch_array($s); +var_dump($row['BLOB']-load()); +var_dump($row['BLOB']-truncate(-1)); +var_dump($row['BLOB']-truncate(0)); + +oci_commit($c); require dirname(__FILE__).'/drop_table.inc'; @@ -85,6 +95,11 @@ Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in %s on line %d bool(false) +string(0) + +Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in %s on line %d +bool(false) +bool(true) Done --UEXPECTF-- object(OCI-Lob)#%d (1) { @@ -118,4 +133,9 @@ Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in %s on line %d bool(false) +string(0) + +Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in %s on line %d +bool(false) +bool(true) Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/privileged_connect1.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/oci8/tests/privileged_connect1.phpt diff -u php-src/ext/oci8/tests/privileged_connect1.phpt:1.4 php-src/ext/oci8/tests/privileged_connect1.phpt:1.5 --- php-src/ext/oci8/tests/privileged_connect1.phpt:1.4 Tue Dec 12 13:12:22 2006 +++ php-src/ext/oci8/tests/privileged_connect1.phpt Thu Dec 21 19:22:49 2006 @@ -25,3 +25,12 @@ Warning: oci_connect() expects parameter 5 to be long, string given in %s on line %d Done +--UEXPECTF-- +Warning: oci_connect(): ORA-01017: invalid username/password; logon denied in %s on line %d + +Warning: oci_connect(): ORA-01017: invalid username/password; logon denied in %s on line %d + +Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d + +Warning: oci_connect() expects parameter 5 to be long, Unicode string given in %s on line %d +Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/array_bind_014.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/array_bind_014.phpt +++ php-src/ext/oci8/tests/array_bind_014.phpt --TEST-- oci_bind_array_by_name() and NUMBERs --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; $drop = DROP table bind_test; $statement = oci_parse($c, $drop); @oci_execute($statement); $create = CREATE table bind_test(name NUMBER); $statement = oci_parse($c, $create); oci_execute($statement); $create_pkg = CREATE OR REPLACE PACKAGE ARRAYBINDPKG1 AS TYPE ARRTYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAYBINDPKG1;; $statement = oci_parse($c, $create_pkg); oci_execute($statement); $create_pkg_body = CREATE OR REPLACE PACKAGE BODY ARRAYBINDPKG1 AS CURSOR CUR IS SELECT name FROM bind_test;
[PHP-CVS] cvs: php-src /ext/standard datetime.c
tony2001Thu Dec 21 21:40:53 2006 UTC Modified files: /php-src/ext/standard datetime.c Log: temp is freed in zend_unicode_to_string() on failure http://cvs.php.net/viewvc.cgi/php-src/ext/standard/datetime.c?r1=1.142r2=1.143diff_format=u Index: php-src/ext/standard/datetime.c diff -u php-src/ext/standard/datetime.c:1.142 php-src/ext/standard/datetime.c:1.143 --- php-src/ext/standard/datetime.c:1.142 Thu Dec 21 00:25:58 2006 +++ php-src/ext/standard/datetime.c Thu Dec 21 21:40:53 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: datetime.c,v 1.142 2006/12/21 00:25:58 tony2001 Exp $ */ +/* $Id: datetime.c,v 1.143 2006/12/21 21:40:53 tony2001 Exp $ */ #include php.h #include zend_operators.h @@ -113,7 +113,6 @@ ts_length = temp_len; if (zend_unicode_to_string(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), temp, temp_len, format.u, format_length TSRMLS_CC) == FAILURE) { - efree(ts.s); RETURN_FALSE; } format.s = temp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard array.c php_string.h string.c strnatcmp.c
andrei Thu Dec 21 21:47:56 2006 UTC Modified files: /php-srcunicode-progress.txt /php-src/ext/standard array.c php_string.h string.c strnatcmp.c Log: Bite the bullet and port the natural comparison algorithm to support UChar strings. Also, simplify the original code. # Arhh, post-incremented iteration sucks. That means you, U16_* stuff. http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.70r2=1.71diff_format=u Index: php-src/unicode-progress.txt diff -u php-src/unicode-progress.txt:1.70 php-src/unicode-progress.txt:1.71 --- php-src/unicode-progress.txt:1.70 Wed Dec 20 21:02:11 2006 +++ php-src/unicode-progress.txtThu Dec 21 21:47:56 2006 @@ -11,15 +11,6 @@ Params API, what encoding to use for the message, handling email option - array.c - --- -natsort(), natcasesort() -Params API -Either port strnatcmp() to support Unicode or maybe use ICU's -numeric collation. Update: can't seem to get the right collation -parameters to duplicate strnatcmp() functionality. Conclusion: port -to support Unicode. - string.c parse_str() @@ -28,9 +19,6 @@ sscanf() Params API. Rest - no idea yet. -strnatcmp(), strnatcasecmp() -Params API. The rest depends on porting of strnatcmp.c - wordwrap() Upgrade, do wordwrapping on codepoint (or glyph ?) level, maybe use additional whitespace chars instead of just space. @@ -538,6 +526,7 @@ in_array() min() max() +natsort(), natcasesort() range() shuffle() @@ -609,6 +598,7 @@ stripslashes() stripos() stristr() +strnatcmp(), strnatcasecmp() strpbrk() strpos() strrchr() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.400r2=1.401diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.400 php-src/ext/standard/array.c:1.401 --- php-src/ext/standard/array.c:1.400 Tue Dec 19 21:38:59 2006 +++ php-src/ext/standard/array.cThu Dec 21 21:47:56 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.400 2006/12/19 21:38:59 andrei Exp $ */ +/* $Id: array.c,v 1.401 2006/12/21 21:47:56 andrei Exp $ */ #include php.h #include php_ini.h @@ -394,6 +394,7 @@ zval *fval, *sval; zval first, second; int result; + zend_uchar type; f = *((Bucket **) a); s = *((Bucket **) b); @@ -402,20 +403,26 @@ sval = *((zval **) s-pData); first = *fval; second = *sval; - if (Z_TYPE_P(fval) != IS_STRING) { + + type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(fval), Z_TYPE_P(sval)); + if (Z_TYPE_P(fval) != type) { zval_copy_ctor(first); - convert_to_string(first); + convert_to_explicit_type(first, type); } - if (Z_TYPE_P(sval) != IS_STRING) { + if (Z_TYPE_P(sval) != type) { zval_copy_ctor(second); - convert_to_string(second); + convert_to_explicit_type(second, type); } - result = strnatcmp_ex(Z_STRVAL(first), Z_STRLEN(first), Z_STRVAL(second), Z_STRLEN(second), fold_case); + if (type == IS_UNICODE) { + result = u_strnatcmp_ex(Z_USTRVAL(first), Z_USTRLEN(first), Z_USTRVAL(second), Z_USTRLEN(second), fold_case); + } else { + result = strnatcmp_ex(Z_STRVAL(first), Z_STRLEN(first), Z_STRVAL(second), Z_STRLEN(second), fold_case); + } - if (Z_TYPE_P(fval) != IS_STRING) + if (Z_TYPE_P(fval) != type) zval_dtor(first); - if (Z_TYPE_P(sval) != IS_STRING) + if (Z_TYPE_P(sval) != type) zval_dtor(second); return result; @@ -433,14 +440,14 @@ static void php_natsort(INTERNAL_FUNCTION_PARAMETERS, int fold_case) { - zval **array; + zval *array; HashTable *target_hash; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, array) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, array) == FAILURE) { + return; } - target_hash = HASH_OF(*array); + target_hash = HASH_OF(array); if (!target_hash) { php_error_docref(NULL TSRMLS_CC, E_WARNING, The argument should be an array); return; @@ -460,7 +467,7 @@ } -/* {{{ proto void natsort(array array_arg) +/* {{{ proto void natsort(array array_arg) U Sort an array using natural sort */ PHP_FUNCTION(natsort) { @@ -469,7 +476,7 @@ /* }}} */ -/* {{{ proto void natcasesort(array array_arg) +/* {{{ proto void natcasesort(array array_arg) U Sort an array using case-insensitive natural sort */ PHP_FUNCTION(natcasesort) {
[PHP-CVS] cvs: php-src /main SAPI.c
tony2001Thu Dec 21 21:49:13 2006 UTC Modified files: /php-src/main SAPI.c Log: fix ws, cs and overall code readability http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.218r2=1.219diff_format=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.218 php-src/main/SAPI.c:1.219 --- php-src/main/SAPI.c:1.218 Mon Dec 18 13:15:18 2006 +++ php-src/main/SAPI.c Thu Dec 21 21:49:13 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.218 2006/12/18 13:15:18 tony2001 Exp $ */ +/* $Id: SAPI.c,v 1.219 2006/12/21 21:49:13 tony2001 Exp $ */ #include ctype.h #include sys/stat.h @@ -849,13 +849,15 @@ { if (sapi_module.getenv) { char *value, *tmp = sapi_module.getenv(name, name_len TSRMLS_CC); - if(tmp) value = estrdup(tmp); - else return NULL; + if (tmp) { + value = estrdup(tmp); + } else { + return NULL; + } sapi_module.input_filter(PARSE_ENV, name, value, strlen(value), NULL TSRMLS_CC); return value; - } else { - return NULL; - } + } + return NULL; } SAPI_API int sapi_get_fd(int *fd TSRMLS_DC) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard var.c var_unserializer.c var_unserializer.re /ext/standard/tests/serialize 005.phpt
helly Fri Dec 22 00:47:27 2006 UTC Modified files: /php-src/ext/standard var.c var_unserializer.c var_unserializer.re /php-src/ext/standard/tests/serialize 005.phpt Log: - Make custom serializing work with zstr (as discussed with andrei) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.256r2=1.257diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.256 php-src/ext/standard/var.c:1.257 --- php-src/ext/standard/var.c:1.256Thu Dec 21 23:19:48 2006 +++ php-src/ext/standard/var.c Fri Dec 22 00:47:27 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var.c,v 1.256 2006/12/21 23:19:48 helly Exp $ */ +/* $Id: var.c,v 1.257 2006/12/22 00:47:27 helly Exp $ */ @@ -972,10 +972,12 @@ if(ce ce-serialize != NULL) { /* has custom handler */ - unsigned char *serialized_data = NULL; + int serialized_type; + zstr serialized_data; zend_uint serialized_length; - if(ce-serialize(struc, serialized_data, serialized_length, (zend_serialize_data *)var_hash TSRMLS_CC) == SUCCESS) { + serialized_data.v = NULL; + if(ce-serialize(struc, serialized_type, serialized_data, serialized_length, (zend_serialize_data *)var_hash TSRMLS_CC) == SUCCESS) { smart_str_appendl(buf, C:, 2); smart_str_append_long(buf, Z_OBJCE_P(struc)-name_length); smart_str_appendl(buf, :\, 2); @@ -989,15 +991,21 @@ smart_str_appendl(buf, \:, 2); smart_str_append_long(buf, serialized_length); - smart_str_appendl(buf, :{, 2); - /* we need binary or ascii at least not unicode */ - smart_str_appendl(buf, serialized_data, serialized_length); + if (serialized_type == IS_UNICODE) { + smart_str_appendl(buf, :U:{, 4); + php_var_serialize_ustr(buf, serialized_data.u, serialized_length); + } else if (serialized_type == IS_STRING) { + smart_str_appendl(buf, :{, 2); + smart_str_appendl(buf, serialized_data.s, serialized_length); + } else { + smart_str_appendc(buf, 'N'); + } smart_str_appendc(buf, '}'); } else { smart_str_appendl(buf, N;, 2); } - if(serialized_data) { - efree(serialized_data); + if(serialized_data.v) { + efree(serialized_data.v); } return; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.82r2=1.83diff_format=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.82 php-src/ext/standard/var_unserializer.c:1.83 --- php-src/ext/standard/var_unserializer.c:1.82Thu Dec 14 23:41:57 2006 +++ php-src/ext/standard/var_unserializer.c Fri Dec 22 00:47:27 2006 @@ -1,4 +1,4 @@ -/* Generated by re2c 0.9.12 on Thu Dec 14 15:32:34 2006 */ +/* Generated by re2c 0.10.2 on Thu Dec 21 19:19:25 2006 */ #line 1 ext/standard/var_unserializer.re /* +--+ @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var_unserializer.c,v 1.82 2006/12/14 23:41:57 andrei Exp $ */ +/* $Id: var_unserializer.c,v 1.83 2006/12/22 00:47:27 helly Exp $ */ #include php.h #include ext/standard/php_var.h @@ -347,6 +347,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) { long datalen; + int type;
[PHP-CVS] cvs: php-src /ext/spl php_spl.c
helly Fri Dec 22 00:57:52 2006 UTC Modified files: /php-src/ext/splphp_spl.c Log: - Fix memory allocation/deallocation to match http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.104r2=1.105diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.104 php-src/ext/spl/php_spl.c:1.105 --- php-src/ext/spl/php_spl.c:1.104 Wed Dec 20 22:11:14 2006 +++ php-src/ext/spl/php_spl.c Fri Dec 22 00:57:51 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.104 2006/12/20 22:11:14 helly Exp $ */ +/* $Id: php_spl.c,v 1.105 2006/12/22 00:57:51 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,7 +282,7 @@ RETURN_FALSE; } - copy = pos1 = zend_zstrndup(ZEND_STR_TYPE, file_exts, file_exts_len); + copy = pos1 = ezstrndup(ZEND_STR_TYPE, file_exts, file_exts_len); lc_name = zend_u_str_tolower_dup(ZEND_STR_TYPE, class_name, class_name_len); while(pos1.v (unicode ? *pos1.u : *pos1.s) !EG(exception)) { EG(return_value_ptr_ptr) = original_return_value; @@ -310,12 +310,9 @@ } efree(lc_name.v); -#if MBO_0 - /* UTODO: This is actually correct but sometimesfails in tests, no idea why */ if (copy.v) { efree(copy.v); } -#endif EG(return_value_ptr_ptr) = original_return_value; EG(opline_ptr) = original_opline_ptr; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php