dmitry Tue Aug 16 11:09:53 2005 EDT
Modified files:
/php-src/ext/dom/tests bug28817.phpt
/php-src/ext/simplexml simplexml.c
/php-src/ext/simplexml/tests 008.phpt 009.phpt 015.phpt 022.phpt
/php-src/ext/spl spl_sxe.c
/php-src/ext/spl/tests sxe_002.phpt sxe_003.phpt sxe_004.phpt
/php-src/ext/sqlite sqlite.c
/php-src/ext/sqlite/tests sqlite_002.phpt sqlite_003.phpt
sqlite_005.phpt sqlite_006.phpt
sqlite_007.phpt sqlite_008.phpt
sqlite_009.phpt sqlite_010.phpt
sqlite_011.phpt sqlite_012.phpt
sqlite_013.phpt sqlite_014.phpt
sqlite_015.phpt sqlite_016.phpt
sqlite_019.phpt sqlite_022.phpt
sqlite_023.phpt sqlite_024.phpt
sqlite_025.phpt sqlite_026.phpt
sqlite_oo_002.phpt sqlite_oo_003.phpt
sqlite_oo_008.phpt sqlite_oo_009.phpt
sqlite_oo_010.phpt sqlite_oo_011.phpt
sqlite_oo_012.phpt sqlite_oo_013.phpt
sqlite_oo_014.phpt sqlite_oo_015.phpt
sqlite_oo_016.phpt sqlite_oo_020.phpt
sqlite_oo_021.phpt sqlite_oo_022.phpt
sqlite_oo_024.phpt sqlite_oo_025.phpt
sqlite_oo_026.phpt sqlite_oo_028.phpt
sqlite_oo_030.phpt
Log:
Unicode support
http://cvs.php.net/diff.php/php-src/ext/dom/tests/bug28817.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/dom/tests/bug28817.phpt
diff -u php-src/ext/dom/tests/bug28817.phpt:1.1
php-src/ext/dom/tests/bug28817.phpt:1.2
--- php-src/ext/dom/tests/bug28817.phpt:1.1 Sat Dec 4 06:40:10 2004
+++ php-src/ext/dom/tests/bug28817.phpt Tue Aug 16 11:09:42 2005
@@ -36,3 +36,15 @@
string(4) "tiro"
}
string(30) "Cessante causa cessat effectus"
+--UEXPECTF--
+array(4) {
+ [0]=>
+ unicode(5) "bonus"
+ [1]=>
+ unicode(3) "vir"
+ [2]=>
+ unicode(6) "semper"
+ [3]=>
+ unicode(4) "tiro"
+}
+unicode(30) "Cessante causa cessat effectus"
http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.155&r2=1.156&ty=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.155
php-src/ext/simplexml/simplexml.c:1.156
--- php-src/ext/simplexml/simplexml.c:1.155 Tue Aug 16 02:04:58 2005
+++ php-src/ext/simplexml/simplexml.c Tue Aug 16 11:09:44 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.155 2005/08/16 06:04:58 rolland Exp $ */
+/* $Id: simplexml.c,v 1.156 2005/08/16 15:09:44 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -280,6 +280,7 @@
case IS_BOOL:
case IS_DOUBLE:
case IS_NULL:
+ case IS_UNICODE:
if (value->refcount > 1) {
value_copy = *value;
zval_copy_ctor(&value_copy);
@@ -288,6 +289,7 @@
convert_to_string(value);
/* break missing intentionally */
case IS_STRING:
+ case IS_BINARY:
xmlNodeSetContentLen(node, Z_STRVAL_P(value),
Z_STRLEN_P(value));
if (value == &value_copy) {
zval_dtor(value);
@@ -427,8 +429,10 @@
case IS_BOOL:
case IS_DOUBLE:
case IS_NULL:
+ case IS_UNICODE:
convert_to_string(value);
case IS_STRING:
+ case IS_BINARY:
newnode =
(xmlNodePtr)xmlNewProp(node, name, Z_STRVAL_P(value));
break;
default:
@@ -511,8 +515,10 @@
node = sxe_get_element_by_offset(sxe,
Z_LVAL_P(member), node);
}
else {
+ zval tmp_zv;
+
if (Z_TYPE_P(member) != IS_STRING) {
- zval tmp_zv = *member;
+ tmp_zv = *member;
zval_copy_ctor(&tmp_zv);
member = &tmp_zv;
convert_to_string(member);
@@ -526,7 +532,10 @@
}
node = nnext;
}
- }
+ if (member == &tmp_zv) {
+ zval_dtor(&tmp_zv);
+ }
+ }
if (node) {
exists = 1;
}
@@ -681,7 +690,7 @@
rv = sxe->properties;
} else {
ALLOC_HASHTABLE(rv);
- zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_u_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
sxe->properties = rv;
}
@@ -698,6 +707,9 @@
if (node->type == XML_TEXT_NODE) {
MAKE_STD_ZVAL(value);
ZVAL_STRING(value,
xmlNodeListGetString(node->doc, node, 1), 1);
+ if (UG(unicode)) {
+ convert_to_unicode(value);
+ }
zend_hash_next_index_insert(rv, &value,
sizeof(zval *), NULL);
goto next_iter;
}
@@ -999,6 +1011,12 @@
case IS_STRING:
convert_to_string(object);
break;
+ case IS_BINARY:
+ convert_to_binary(object);
+ break;
+ case IS_UNICODE:
+ convert_to_unicode(object);
+ break;
case IS_BOOL:
convert_to_boolean(object);
break;
@@ -1506,11 +1524,20 @@
curnode = (xmlNodePtr)((php_libxml_node_ptr
*)intern->node)->node;
}
- namelen = xmlStrlen(curnode->name);
- *str_key = estrndup(curnode->name, namelen);
- *str_key_len = namelen + 1;
- return HASH_KEY_IS_STRING;
-
+ if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t u_len;
+
+ namelen = xmlStrlen(curnode->name);
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
(UChar**)str_key, &u_len, (char*)curnode->name, namelen, &status);
+ *str_key_len = u_len + 1;
+ return HASH_KEY_IS_UNICODE;
+ } else {
+ namelen = xmlStrlen(curnode->name);
+ *str_key = estrndup(curnode->name, namelen);
+ *str_key_len = namelen + 1;
+ return HASH_KEY_IS_STRING;
+ }
}
ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC)
@@ -1736,7 +1763,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.155 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.156 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/008.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/simplexml/tests/008.phpt
diff -u php-src/ext/simplexml/tests/008.phpt:1.4
php-src/ext/simplexml/tests/008.phpt:1.5
--- php-src/ext/simplexml/tests/008.phpt:1.4 Mon Mar 29 14:58:01 2004
+++ php-src/ext/simplexml/tests/008.phpt Tue Aug 16 11:09:45 2005
@@ -37,3 +37,13 @@
}
}
bool(false)
+--UEXPECTF--
+array(1) {
+ [0]=>
+ object(SimpleXMLElement)#%d (1) {
+ [u"test"]=>
+ object(SimpleXMLElement)#%d (0) {
+ }
+ }
+}
+bool(false)
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/009.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/simplexml/tests/009.phpt
diff -u php-src/ext/simplexml/tests/009.phpt:1.5
php-src/ext/simplexml/tests/009.phpt:1.6
--- php-src/ext/simplexml/tests/009.phpt:1.5 Mon Aug 15 10:37:55 2005
+++ php-src/ext/simplexml/tests/009.phpt Tue Aug 16 11:09:45 2005
@@ -31,7 +31,7 @@
foreach($sxe->children() as $name=>$val) {
var_dump($name);
var_dump(get_class($val));
- var_dump(trim((string)$val));
+ var_dump(trim($val));
}
?>
===DONE===
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/015.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/simplexml/tests/015.phpt
diff -u php-src/ext/simplexml/tests/015.phpt:1.6
php-src/ext/simplexml/tests/015.phpt:1.7
--- php-src/ext/simplexml/tests/015.phpt:1.6 Mon Mar 29 14:58:01 2004
+++ php-src/ext/simplexml/tests/015.phpt Tue Aug 16 11:09:45 2005
@@ -54,3 +54,21 @@
string(3) "Boe"
}
===DONE===
+--UEXPECTF--
+object(SimpleXMLElement)#%d (1) {
+ [0]=>
+ unicode(3) "Joe"
+}
+object(SimpleXMLElement)#%d (1) {
+ [0]=>
+ unicode(3) "Joe"
+}
+object(SimpleXMLElement)#%d (1) {
+ [0]=>
+ unicode(3) "Joe"
+}
+object(SimpleXMLElement)#%d (1) {
+ [0]=>
+ unicode(3) "Boe"
+}
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/022.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/simplexml/tests/022.phpt
diff -u php-src/ext/simplexml/tests/022.phpt:1.1
php-src/ext/simplexml/tests/022.phpt:1.2
--- php-src/ext/simplexml/tests/022.phpt:1.1 Sun Feb 27 18:15:52 2005
+++ php-src/ext/simplexml/tests/022.phpt Tue Aug 16 11:09:45 2005
@@ -28,3 +28,11 @@
string(11) "slide_*.xml"
}
===DONE===
+--UEXPECTF--
+object(SimpleXMLElement)#%d (0) {
+}
+object(SimpleXMLElement)#%d (1) {
+ [0]=>
+ unicode(11) "slide_*.xml"
+}
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/spl/spl_sxe.c?r1=1.9&r2=1.10&ty=u
Index: php-src/ext/spl/spl_sxe.c
diff -u php-src/ext/spl/spl_sxe.c:1.9 php-src/ext/spl/spl_sxe.c:1.10
--- php-src/ext/spl/spl_sxe.c:1.9 Fri Aug 12 10:08:27 2005
+++ php-src/ext/spl/spl_sxe.c Tue Aug 16 11:09:46 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_sxe.c,v 1.9 2005/08/12 14:08:27 sebastian Exp $ */
+/* $Id: spl_sxe.c,v 1.10 2005/08/16 15:09:46 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -80,7 +80,16 @@
intern = (php_sxe_object *)zend_object_store_get_object(sxe->iter.data
TSRMLS_CC);
if (intern != NULL && intern->node != NULL) {
curnode = (xmlNodePtr)((php_libxml_node_ptr
*)intern->node)->node;
- RETURN_STRINGL((char*)curnode->name, xmlStrlen(curnode->name),
1);
+ if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, (char*)curnode->name, xmlStrlen(curnode->name), &status);
+ RETURN_UNICODEL(u_str, u_len, 0);
+ } else {
+ RETURN_STRINGL((char*)curnode->name,
xmlStrlen(curnode->name), 1);
+ }
}
RETURN_FALSE;
http://cvs.php.net/diff.php/php-src/ext/spl/tests/sxe_002.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/spl/tests/sxe_002.phpt
diff -u php-src/ext/spl/tests/sxe_002.phpt:1.2
php-src/ext/spl/tests/sxe_002.phpt:1.3
--- php-src/ext/spl/tests/sxe_002.phpt:1.2 Wed Jul 20 03:33:19 2005
+++ php-src/ext/spl/tests/sxe_002.phpt Tue Aug 16 11:09:46 2005
@@ -75,3 +75,26 @@
string(17) "SimpleXMLIterator"
string(10) "Bla bla 1."
===DONE===
+--UEXPECT--
+unicode(5) "elem1"
+unicode(17) "SimpleXMLIterator"
+unicode(10) "Bla bla 1."
+unicode(5) "elem2"
+unicode(17) "SimpleXMLIterator"
+unicode(28) "Here we have some text data."
+unicode(5) "elem3"
+unicode(17) "SimpleXMLIterator"
+unicode(19) "And here some more."
+unicode(5) "elem4"
+unicode(17) "SimpleXMLIterator"
+unicode(15) "Wow once again."
+unicode(6) "elem11"
+unicode(17) "SimpleXMLIterator"
+unicode(10) "Bla bla 2."
+unicode(7) "elem111"
+unicode(17) "SimpleXMLIterator"
+unicode(7) "Foo Bar"
+===DUMP===
+unicode(17) "SimpleXMLIterator"
+unicode(10) "Bla bla 1."
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/spl/tests/sxe_003.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/spl/tests/sxe_003.phpt
diff -u php-src/ext/spl/tests/sxe_003.phpt:1.3
php-src/ext/spl/tests/sxe_003.phpt:1.4
--- php-src/ext/spl/tests/sxe_003.phpt:1.3 Wed Jul 20 03:33:19 2005
+++ php-src/ext/spl/tests/sxe_003.phpt Tue Aug 16 11:09:46 2005
@@ -77,3 +77,20 @@
string(17) "SimpleXMLIterator"
string(7) "Foo Bar"
===DONE===
+--UEXPECTF--
+
+Warning: Invalid argument supplied for foreach() in %ssxe_003.php on line %d
+===RESET===
+bool(true)
+unicode(5) "elem1"
+unicode(10) "Bla bla 1."
+unicode(5) "elem2"
+unicode(17) "SimpleXMLIterator"
+unicode(28) "Here we have some text data."
+bool(true)
+unicode(6) "elem11"
+unicode(10) "Bla bla 2."
+unicode(7) "elem111"
+unicode(17) "SimpleXMLIterator"
+unicode(7) "Foo Bar"
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/spl/tests/sxe_004.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/spl/tests/sxe_004.phpt
diff -u php-src/ext/spl/tests/sxe_004.phpt:1.2
php-src/ext/spl/tests/sxe_004.phpt:1.3
--- php-src/ext/spl/tests/sxe_004.phpt:1.2 Wed Jul 20 03:33:19 2005
+++ php-src/ext/spl/tests/sxe_004.phpt Tue Aug 16 11:09:46 2005
@@ -145,3 +145,62 @@
SXETest::valid
SXETest::valid
===DONE===
+--UEXPECTF--
+SXETest::rewind
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(10) "Bla bla 1."
+SXETest::getChildren
+SXETest::rewind
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(28) "Here we have some text data."
+SXETest::getChildren
+SXETest::rewind
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(19) "And here some more."
+SXETest::getChildren
+SXETest::rewind
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(15) "Wow once again."
+SXETest::next
+SXETest::valid
+SXETest::next
+SXETest::valid
+SXETest::next
+SXETest::valid
+SXETest::next
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(10) "Bla bla 2."
+SXETest::getChildren
+SXETest::rewind
+SXETest::valid
+SXETest::hasChildren
+SXETest::valid
+SXETest::current
+unicode(7) "SXETest"
+unicode(7) "Foo Bar"
+SXETest::next
+SXETest::valid
+SXETest::next
+SXETest::valid
+SXETest::valid
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.168&r2=1.169&ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.168 php-src/ext/sqlite/sqlite.c:1.169
--- php-src/ext/sqlite/sqlite.c:1.168 Fri Aug 12 10:08:27 2005
+++ php-src/ext/sqlite/sqlite.c Tue Aug 16 11:09:47 2005
@@ -17,7 +17,7 @@
| Marcus Boerger <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.168 2005/08/12 14:08:27 sebastian Exp $
+ $Id: sqlite.c,v 1.169 2005/08/16 15:09:47 dmitry Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -876,12 +876,12 @@
static zend_class_entry *sqlite_get_ce_query(zval *object TSRMLS_DC)
{
- return sqlite_ce_query;
+ return U_CLASS_ENTRY(sqlite_ce_query);
}
static zend_class_entry *sqlite_get_ce_ub_query(zval *object TSRMLS_DC)
{
- return sqlite_ce_ub_query;
+ return U_CLASS_ENTRY(sqlite_ce_ub_query);
}
static zval * sqlite_instanciate(zend_class_entry *pce, zval *object TSRMLS_DC)
@@ -1125,7 +1125,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
- php_info_print_table_row(2, "PECL Module version",
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.168 2005/08/12 14:08:27 sebastian
Exp $");
+ php_info_print_table_row(2, "PECL Module version",
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.169 2005/08/16 15:09:47 dmitry
Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
@@ -1183,7 +1183,7 @@
if (object) {
/* if object is not an object then we're called from the
factory() function */
if (Z_TYPE_P(object) != IS_OBJECT) {
- sqlite_instanciate(sqlite_ce_db, object TSRMLS_CC);
+ sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_db), object
TSRMLS_CC);
}
/* and now register the object */
SQLITE_REGISTER_OBJECT(db, object, db)
@@ -1290,7 +1290,7 @@
zval *errmsg = NULL;
zval *object = getThis();
- php_set_error_handling(object ? EH_THROW : EH_NORMAL,
sqlite_ce_exception TSRMLS_CC);
+ php_set_error_handling(object ? EH_THROW : EH_NORMAL,
U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
&filename, &filename_len, &mode, &errmsg)) {
php_std_error_handling();
@@ -1345,7 +1345,7 @@
int filename_len;
zval *errmsg = NULL;
- php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC);
+ php_set_error_handling(EH_THROW, U_CLASS_ENTRY(sqlite_ce_exception)
TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
&filename, &filename_len, &mode, &errmsg)) {
php_std_error_handling();
@@ -1570,9 +1570,9 @@
if (object) {
sqlite_object *obj;
if (buffered) {
- sqlite_instanciate(sqlite_ce_query, return_value
TSRMLS_CC);
+ sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_query),
return_value TSRMLS_CC);
} else {
- sqlite_instanciate(sqlite_ce_ub_query, return_value
TSRMLS_CC);
+ sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_ub_query),
return_value TSRMLS_CC);
}
obj = (sqlite_object *)
zend_object_store_get_object(return_value TSRMLS_CC);
obj->type = is_result;
@@ -1685,11 +1685,27 @@
php_sqlite_strtolower(colname);
}
- if (result_type == PHPSQLITE_ASSOC) {
- add_assoc_string(return_value, colname, colnames[ncols
+ i] ? (char *)colnames[ncols + i] : "", 1);
- }
- if (result_type == PHPSQLITE_NUM) {
- add_index_string(return_value, i, colnames[ncols + i] ?
(char *)colnames[ncols + i] : "", 1);
+ if (UG(unicode)) {
+ char *tmp = colnames[ncols + i] ? (char
*)colnames[ncols + i] : "";
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, tmp, strlen(tmp), &status);
+ if (result_type == PHPSQLITE_ASSOC) {
+ add_assoc_unicode(return_value, colname, u_str,
1);
+ }
+ if (result_type == PHPSQLITE_NUM) {
+ add_index_unicode(return_value, i, u_str, 1);
+ }
+ efree(u_str);
+ } else {
+ if (result_type == PHPSQLITE_ASSOC) {
+ add_assoc_string(return_value, colname,
colnames[ncols + i] ? (char *)colnames[ncols + i] : "", 1);
+ }
+ if (result_type == PHPSQLITE_NUM) {
+ add_index_string(return_value, i,
colnames[ncols + i] ? (char *)colnames[ncols + i] : "", 1);
+ }
}
}
@@ -1811,13 +1827,25 @@
Z_STRVAL_P(decoded) = emalloc(strlen(rowdata[j]));
Z_STRLEN_P(decoded) =
php_sqlite_decode_binary(rowdata[j]+1, Z_STRVAL_P(decoded));
Z_STRVAL_P(decoded)[Z_STRLEN_P(decoded)] = '\0';
- Z_TYPE_P(decoded) = IS_STRING;
+ Z_TYPE_P(decoded) = UG(unicode)?IS_BINARY:IS_STRING;
if (!buffered) {
efree((char*)rowdata[j]);
rowdata[j] = NULL;
}
} else {
- ZVAL_STRING(decoded, (char*)rowdata[j], buffered);
+ if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
+ ZVAL_UNICODEL(decoded, u_str, u_len, 0);
+ if (!buffered) {
+ efree(rowdata[j]);
+ }
+ } else {
+ ZVAL_STRING(decoded, (char*)rowdata[j],
buffered);
+ }
if (!buffered) {
rowdata[j] = NULL;
}
@@ -1888,11 +1916,26 @@
char *decoded = emalloc(l);
l = php_sqlite_decode_binary(rowdata[j]+1, decoded);
decoded[l] = '\0';
- RETVAL_STRINGL(decoded, l, 0);
+ if (UG(unicode)) {
+ RETVAL_BINARYL(decoded, l, 0);
+ } else {
+ RETVAL_STRINGL(decoded, l, 0);
+ }
if (!res->buffered) {
efree((char*)rowdata[j]);
rowdata[j] = NULL;
}
+ } else if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
+ RETVAL_UNICODEL(u_str, u_len, 0);
+ if (!res->buffered) {
+ efree(rowdata[j]);
+ rowdata[j] = NULL;
+ }
} else {
RETVAL_STRING((char*)rowdata[j], res->buffered);
if (!res->buffered) {
@@ -1997,34 +2040,35 @@
zend_fcall_info_cache fcc;
zval *retval_ptr;
zval *ctor_params = NULL;
+ zend_uchar class_name_type;
- php_set_error_handling(object ? EH_THROW : EH_NORMAL,
sqlite_ce_exception TSRMLS_CC);
+ php_set_error_handling(object ? EH_THROW : EH_NORMAL,
U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC);
if (object) {
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"|szb", &class_name, &class_name_len, &ctor_params, &decode_binary)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"|tzb", &class_name, &class_name_len, &class_name_type, &ctor_params,
&decode_binary)) {
php_std_error_handling();
return;
}
RES_FROM_OBJECT(res, object);
if (!ZEND_NUM_ARGS()) {
- ce = zend_standard_class_def;
+ ce = U_CLASS_ENTRY(zend_standard_class_def);
} else {
- ce = zend_fetch_class(class_name, class_name_len,
ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
+ ce = zend_u_fetch_class(class_name_type, class_name,
class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
}
} else {
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"r|szb", &zres, &class_name, &class_name_len, &ctor_params, &decode_binary)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"r|tzb", &zres, &class_name, &class_name_len, &class_name_type, &ctor_params,
&decode_binary)) {
php_std_error_handling();
return;
}
ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1,
"sqlite result", le_sqlite_result);
if (ZEND_NUM_ARGS() < 2) {
- ce = zend_standard_class_def;
+ ce = U_CLASS_ENTRY(zend_standard_class_def);
} else {
- ce = zend_fetch_class(class_name, class_name_len,
ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
+ ce = zend_u_fetch_class(class_name_type, class_name,
class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
}
}
if (!ce) {
- zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC,
"Could not find class '%s'", class_name);
+ zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0
TSRMLS_CC, "Could not find class '%s'", class_name);
php_std_error_handling();
return;
}
@@ -2067,7 +2111,7 @@
* single value is an array. Also we'd have to
make that one
* argument passed by reference.
*/
- zend_throw_exception(sqlite_ce_exception,
"Parameter ctor_params must be an array", 0 TSRMLS_CC);
+
zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Parameter ctor_params
must be an array", 0 TSRMLS_CC);
return;
}
} else {
@@ -2082,7 +2126,7 @@
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(sqlite_ce_exception, 0
TSRMLS_CC, "Could not execute %s::%v()", class_name,
ce->constructor->common.function_name);
+
zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Could
not execute %s::%v()", class_name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@@ -2092,7 +2136,7 @@
efree(fci.params);
}
} else if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) {
- zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC,
"Class %s does not have a constructor, use NULL for parameter ctor_params or
omit it", class_name);
+ zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0
TSRMLS_CC, "Class %s does not have a constructor, use NULL for parameter
ctor_params or omit it", class_name);
}
}
/* }}} */
@@ -2164,6 +2208,7 @@
const char **rowdata;
char *decoded;
int decoded_len;
+ int free_decoded = 0;
/* check range of the row */
if (res->curr_row >= res->nrows) {
@@ -2184,13 +2229,19 @@
efree((char*)rowdata[0]);
rowdata[0] = NULL;
}
+ free_decoded = 1;
} else if (rowdata[0]) {
decoded_len = strlen((char*)rowdata[0]);
if (res->buffered) {
- decoded = estrndup((char*)rowdata[0], decoded_len);
+ if (UG(unicode)) {
+ decoded = (char*)rowdata[0];
+ } else {
+ decoded = estrndup((char*)rowdata[0],
decoded_len);
+ }
} else {
decoded = (char*)rowdata[0];
rowdata[0] = NULL;
+ free_decoded = 1;
}
} else {
decoded = NULL;
@@ -2206,6 +2257,16 @@
if (decoded == NULL) {
RETURN_NULL();
+ } else if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, decoded, decoded_len, &status);
+ if (free_decoded) {
+ efree(decoded);
+ }
+ RETURN_UNICODEL(u_str, u_len, 0);
} else {
RETURN_STRINGL(decoded, decoded_len, 0);
}
@@ -2382,7 +2443,13 @@
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
- RETURN_STRING((char*)sqlite_libversion(), 1);
+ if (UG(unicode)) {
+ char *temp = (char*)sqlite_libversion();
+ UChar *u_temp = zend_ascii_to_unicode(temp, strlen(temp)+1
ZEND_FILE_LINE_CC);
+ RETURN_UNICODE(u_temp, 0);
+ } else {
+ RETURN_STRING((char*)sqlite_libversion(), 1);
+ }
}
/* }}} */
@@ -2393,7 +2460,13 @@
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
- RETURN_STRING((char*)sqlite_libencoding(), 1);
+ if (UG(unicode)) {
+ char *temp = (char*)sqlite_libencoding();
+ UChar *u_temp = zend_ascii_to_unicode(temp, strlen(temp)+1
ZEND_FILE_LINE_CC);
+ RETURN_UNICODE(u_temp, 0);
+ } else {
+ RETURN_STRING((char*)sqlite_libencoding(), 1);
+ }
}
/* }}} */
@@ -2453,7 +2526,7 @@
* count = obj->u.res->nrows;
return SUCCESS;
} else {
- zend_throw_exception(sqlite_ce_exception, "Row count is not
available for unbuffered queries", 0 TSRMLS_CC);
+ zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Row
count is not available for unbuffered queries", 0 TSRMLS_CC);
return FAILURE;
}
} /* }}} */
@@ -2590,7 +2663,16 @@
RETURN_FALSE;
}
- RETURN_STRING(res->col_names[field], 1);
+ if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, res->col_names[field], strlen(res->col_names[field]), &status);
+ RETURN_UNICODEL(u_str, u_len, 0);
+ } else {
+ RETURN_STRING(res->col_names[field], 1);
+ }
}
/* }}} */
@@ -2831,7 +2913,16 @@
msg = sqlite_error_string(code);
if (msg) {
- RETURN_STRING((char*)msg, 1);
+ if (UG(unicode)) {
+ UErrorCode status = U_ZERO_ERROR;
+ UChar *u_str;
+ int32_t u_len;
+
+
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str,
&u_len, msg, strlen(msg), &status);
+ RETURN_UNICODEL(u_str, u_len, 0);
+ } else {
+ RETURN_STRING((char*)msg, 1);
+ }
} else {
RETURN_NULL();
}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_002.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_002.phpt
diff -u php-src/ext/sqlite/tests/sqlite_002.phpt:1.3
php-src/ext/sqlite/tests/sqlite_002.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_002.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_002.phpt Tue Aug 16 11:09:48 2005
@@ -30,3 +30,18 @@
["c3"]=>
NULL
}
+--UEXPECT--
+array(6) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+ [u"c3"]=>
+ NULL
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_003.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_003.phpt
diff -u php-src/ext/sqlite/tests/sqlite_003.phpt:1.3
php-src/ext/sqlite/tests/sqlite_003.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_003.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_003.phpt Tue Aug 16 11:09:48 2005
@@ -50,3 +50,34 @@
["c3"]=>
NULL
}
+--UEXPECT--
+array(6) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+ [u"c3"]=>
+ NULL
+}
+array(3) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+}
+array(3) {
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [u"c3"]=>
+ NULL
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_005.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_005.phpt
diff -u php-src/ext/sqlite/tests/sqlite_005.phpt:1.3
php-src/ext/sqlite/tests/sqlite_005.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_005.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_005.phpt Tue Aug 16 11:09:48 2005
@@ -48,3 +48,9 @@
string(11) "onetwothree"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(11) "onetwothree"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_006.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_006.phpt
diff -u php-src/ext/sqlite/tests/sqlite_006.phpt:1.3
php-src/ext/sqlite/tests/sqlite_006.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_006.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_006.phpt Tue Aug 16 11:09:49 2005
@@ -53,3 +53,17 @@
string(10) "three-tres"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(7) "one-uno"
+}
+array(1) {
+ [0]=>
+ unicode(7) "two-dos"
+}
+array(1) {
+ [0]=>
+ unicode(10) "three-tres"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_007.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_007.phpt
diff -u php-src/ext/sqlite/tests/sqlite_007.phpt:1.3
php-src/ext/sqlite/tests/sqlite_007.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_007.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_007.phpt Tue Aug 16 11:09:49 2005
@@ -50,3 +50,34 @@
["c3"]=>
NULL
}
+--UEXPECT--
+array(6) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+ [u"c3"]=>
+ NULL
+}
+array(3) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+}
+array(3) {
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [u"c3"]=>
+ NULL
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_008.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_008.phpt
diff -u php-src/ext/sqlite/tests/sqlite_008.phpt:1.4
php-src/ext/sqlite/tests/sqlite_008.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_008.phpt:1.4 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_008.phpt Tue Aug 16 11:09:49 2005
@@ -44,3 +44,17 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_009.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_009.phpt
diff -u php-src/ext/sqlite/tests/sqlite_009.phpt:1.3
php-src/ext/sqlite/tests/sqlite_009.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_009.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_009.phpt Tue Aug 16 11:09:49 2005
@@ -44,3 +44,17 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_010.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_010.phpt
diff -u php-src/ext/sqlite/tests/sqlite_010.phpt:1.5
php-src/ext/sqlite/tests/sqlite_010.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_010.phpt:1.5 Mon Mar 8 13:05:39 2004
+++ php-src/ext/sqlite/tests/sqlite_010.phpt Tue Aug 16 11:09:49 2005
@@ -79,3 +79,41 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_011.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_011.phpt
diff -u php-src/ext/sqlite/tests/sqlite_011.phpt:1.3
php-src/ext/sqlite/tests/sqlite_011.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_011.phpt:1.3 Sun Dec 14 13:45:37 2003
+++ php-src/ext/sqlite/tests/sqlite_011.phpt Tue Aug 16 11:09:49 2005
@@ -32,3 +32,18 @@
["bar.c3"]=>
string(1) "6"
}
+--UEXPECT--
+array(6) {
+ [u"foo.c1"]=>
+ unicode(1) "1"
+ [u"foo.c2"]=>
+ unicode(1) "2"
+ [u"foo.c3"]=>
+ unicode(1) "3"
+ [u"bar.c1"]=>
+ unicode(1) "4"
+ [u"bar.c2"]=>
+ unicode(1) "5"
+ [u"bar.c3"]=>
+ unicode(1) "6"
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_012.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/sqlite/tests/sqlite_012.phpt
diff -u php-src/ext/sqlite/tests/sqlite_012.phpt:1.2
php-src/ext/sqlite/tests/sqlite_012.phpt:1.3
--- php-src/ext/sqlite/tests/sqlite_012.phpt:1.2 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_012.phpt Tue Aug 16 11:09:50 2005
@@ -36,3 +36,13 @@
string(3) "bar"
string(3) "baz"
DONE!
+--UEXPECT--
+Buffered
+unicode(3) "foo"
+unicode(3) "bar"
+unicode(3) "baz"
+Unbuffered
+unicode(3) "foo"
+unicode(3) "bar"
+unicode(3) "baz"
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_013.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_013.phpt
diff -u php-src/ext/sqlite/tests/sqlite_013.phpt:1.4
php-src/ext/sqlite/tests/sqlite_013.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_013.phpt:1.4 Mon Mar 8 13:05:39 2004
+++ php-src/ext/sqlite/tests/sqlite_013.phpt Tue Aug 16 11:09:50 2005
@@ -76,3 +76,35 @@
NULL
NULL
DONE!
+--UEXPECT--
+====BUFFERED====
+array(2) {
+ [0]=>
+ unicode(3) "one"
+ [1]=>
+ unicode(3) "two"
+}
+unicode(3) "one"
+unicode(3) "two"
+unicode(3) "one"
+unicode(3) "two"
+array(2) {
+ [0]=>
+ unicode(5) "three"
+ [1]=>
+ unicode(4) "four"
+}
+unicode(5) "three"
+unicode(4) "four"
+unicode(5) "three"
+unicode(4) "four"
+====UNBUFFERED====
+unicode(3) "one"
+unicode(3) "two"
+NULL
+NULL
+unicode(5) "three"
+unicode(4) "four"
+NULL
+NULL
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_014.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_014.phpt
diff -u php-src/ext/sqlite/tests/sqlite_014.phpt:1.4
php-src/ext/sqlite/tests/sqlite_014.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_014.phpt:1.4 Sat Apr 3 09:40:36 2004
+++ php-src/ext/sqlite/tests/sqlite_014.phpt Tue Aug 16 11:09:50 2005
@@ -118,3 +118,80 @@
}
}
DONE!
+--UEXPECTF--
+unbuffered twice
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+
+Warning: sqlite_fetch_all(): One or more rowsets were already returned;
returning NULL this time in %ssqlite_014.php on line %d
+array(0) {
+}
+unbuffered with fetch_array
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+buffered
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+bool(false)
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_015.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_015.phpt
diff -u php-src/ext/sqlite/tests/sqlite_015.phpt:1.3
php-src/ext/sqlite/tests/sqlite_015.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_015.phpt:1.3 Fri Dec 5 08:42:03 2003
+++ php-src/ext/sqlite/tests/sqlite_015.phpt Tue Aug 16 11:09:50 2005
@@ -47,3 +47,22 @@
}
}
DONE!
+--UEXPECTF--
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_016.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_016.phpt
diff -u php-src/ext/sqlite/tests/sqlite_016.phpt:1.5
php-src/ext/sqlite/tests/sqlite_016.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_016.phpt:1.5 Mon Mar 8 13:05:39 2004
+++ php-src/ext/sqlite/tests/sqlite_016.phpt Tue Aug 16 11:09:50 2005
@@ -43,3 +43,11 @@
string(3) "one"
string(5) "three"
DONE!
+--UEXPECT--
+====BUFFERED====
+unicode(3) "one"
+unicode(5) "three"
+====UNBUFFERED====
+unicode(3) "one"
+unicode(5) "three"
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_019.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/sqlite/tests/sqlite_019.phpt
diff -u php-src/ext/sqlite/tests/sqlite_019.phpt:1.2
php-src/ext/sqlite/tests/sqlite_019.phpt:1.3
--- php-src/ext/sqlite/tests/sqlite_019.phpt:1.2 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_019.phpt Tue Aug 16 11:09:50 2005
@@ -45,3 +45,25 @@
[0]=>
string(1) "5"
}
+--UEXPECTF--
+unicode(1) "5"
+unicode(1) "4"
+unicode(5) "5data"
+array(4) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ [2]=>
+ unicode(1) "3"
+ [3]=>
+ unicode(1) "4"
+}
+
+Warning: sqlite_single_query(): no such table: test in %s on line %d
+bool(false)
+NULL
+array(1) {
+ [0]=>
+ unicode(1) "5"
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_022.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_022.phpt
diff -u php-src/ext/sqlite/tests/sqlite_022.phpt:1.3
php-src/ext/sqlite/tests/sqlite_022.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_022.phpt:1.3 Thu Dec 4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_022.phpt Tue Aug 16 11:09:50 2005
@@ -99,3 +99,64 @@
string(5) "three"
}
====DONE!====
+--UEXPECTF--
+====SEEK:-1====
+
+Warning: sqlite_seek(): row -1 out of range in %ssqlite_022.php on line %d
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:0====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:1====
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+====SEEK:2====
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:3====
+
+Warning: sqlite_seek(): row 3 out of range in %ssqlite_022.php on line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====AGAIN====
+====SEEK:-1====
+
+Warning: sqlite_seek(): row -1 out of range in %ssqlite_022.php on line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:0====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:1====
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+====SEEK:2====
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:3====
+
+Warning: sqlite_seek(): row 3 out of range in %ssqlite_022.php on line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====DONE!====
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_023.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_023.phpt
diff -u php-src/ext/sqlite/tests/sqlite_023.phpt:1.3
php-src/ext/sqlite/tests/sqlite_023.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_023.phpt:1.3 Mon Mar 8 13:05:39 2004
+++ php-src/ext/sqlite/tests/sqlite_023.phpt Tue Aug 16 11:09:50 2005
@@ -103,3 +103,53 @@
Warning: sqlite_has_prev(): you cannot use sqlite_has_prev on unbuffered
querys in %ssqlite_023.php on line %d
====DONE!====
+--UEXPECTF--
+====TRAVERSE====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====REVERSE====
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====UNBUFFERED====
+====TRAVERSE====
+
+Warning: sqlite_rewind(): Cannot rewind an unbuffered result set in
%ssqlite_023.php on line %d
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====REVERSE====
+
+Warning: sqlite_prev(): you cannot use sqlite_prev on unbuffered querys in
%ssqlite_023.php on line %d
+bool(false)
+
+Warning: sqlite_has_prev(): you cannot use sqlite_has_prev on unbuffered
querys in %ssqlite_023.php on line %d
+====DONE!====
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_024.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_024.phpt
diff -u php-src/ext/sqlite/tests/sqlite_024.phpt:1.5
php-src/ext/sqlite/tests/sqlite_024.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_024.phpt:1.5 Mon Mar 8 13:05:39 2004
+++ php-src/ext/sqlite/tests/sqlite_024.phpt Tue Aug 16 11:09:50 2005
@@ -74,3 +74,34 @@
string(5) "three"
}
====DONE!====
+--UEXPECTF--
+====class24====
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(3) "one"
+}
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(3) "two"
+}
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(5) "three"
+}
+====stdclass====
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(3) "one"
+}
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(3) "two"
+}
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(5) "three"
+}
+====DONE!====
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_025.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/sqlite/tests/sqlite_025.phpt
diff -u php-src/ext/sqlite/tests/sqlite_025.phpt:1.1
php-src/ext/sqlite/tests/sqlite_025.phpt:1.2
--- php-src/ext/sqlite/tests/sqlite_025.phpt:1.1 Tue Dec 9 20:02:20 2003
+++ php-src/ext/sqlite/tests/sqlite_025.phpt Tue Aug 16 11:09:50 2005
@@ -35,4 +35,17 @@
object(stdClass)#1 (1) {
["a"]=>
string(5) "three"
-}
\ No newline at end of file
+}
+--UEXPECTF--
+object(stdClass)#1 (1) {
+ [u"a"]=>
+ unicode(3) "one"
+}
+object(stdClass)#2 (1) {
+ [u"a"]=>
+ unicode(3) "two"
+}
+object(stdClass)#1 (1) {
+ [u"a"]=>
+ unicode(5) "three"
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_026.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/sqlite/tests/sqlite_026.phpt
diff -u php-src/ext/sqlite/tests/sqlite_026.phpt:1.1
php-src/ext/sqlite/tests/sqlite_026.phpt:1.2
--- php-src/ext/sqlite/tests/sqlite_026.phpt:1.1 Thu Dec 18 16:28:00 2003
+++ php-src/ext/sqlite/tests/sqlite_026.phpt Tue Aug 16 11:09:50 2005
@@ -25,3 +25,14 @@
["d"]=>
string(0) ""
}
+--UEXPECT--
+array(4) {
+ [u"a"]=>
+ unicode(0) ""
+ [u"b"]=>
+ unicode(7) "INTEGER"
+ [u"c"]=>
+ unicode(11) "VARCHAR(10)"
+ [u"d"]=>
+ unicode(0) ""
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_002.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_002.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.5 Mon Mar 29 14:49:17 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_002.phpt Tue Aug 16 11:09:50 2005
@@ -39,3 +39,26 @@
["c3"]=>
NULL
}
+--UEXPECTF--
+object(SQLiteDatabase)#%d (0) {
+}
+object(SQLiteResult)#%d (0) {
+}
+object(SQLiteResult)#%d (0) {
+}
+object(SQLiteResult)#%d (0) {
+}
+array(6) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+ [u"c3"]=>
+ NULL
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_003.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_003.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_003.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_003.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_003.phpt:1.5 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_003.phpt Tue Aug 16 11:09:50 2005
@@ -49,3 +49,34 @@
["c3"]=>
NULL
}
+--UEXPECT--
+array(6) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+ [u"c3"]=>
+ NULL
+}
+array(3) {
+ [0]=>
+ unicode(10) "2002-01-02"
+ [1]=>
+ unicode(8) "12:49:00"
+ [2]=>
+ NULL
+}
+array(3) {
+ [u"c1"]=>
+ unicode(10) "2002-01-02"
+ [u"c2"]=>
+ unicode(8) "12:49:00"
+ [u"c3"]=>
+ NULL
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_008.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_008.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_008.phpt:1.4
php-src/ext/sqlite/tests/sqlite_oo_008.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_oo_008.phpt:1.4 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_008.phpt Tue Aug 16 11:09:50 2005
@@ -41,3 +41,17 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_009.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_009.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_009.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_009.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_009.phpt:1.5 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_009.phpt Tue Aug 16 11:09:50 2005
@@ -41,3 +41,17 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_010.phpt?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_010.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_010.phpt:1.7
php-src/ext/sqlite/tests/sqlite_oo_010.phpt:1.8
--- php-src/ext/sqlite/tests/sqlite_oo_010.phpt:1.7 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_010.phpt Tue Aug 16 11:09:50 2005
@@ -42,3 +42,17 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_011.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_011.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.5 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_011.phpt Tue Aug 16 11:09:50 2005
@@ -31,3 +31,18 @@
["bar.c3"]=>
string(1) "6"
}
+--UEXPECT--
+array(6) {
+ [u"foo.c1"]=>
+ unicode(1) "1"
+ [u"foo.c2"]=>
+ unicode(1) "2"
+ [u"foo.c3"]=>
+ unicode(1) "3"
+ [u"bar.c1"]=>
+ unicode(1) "4"
+ [u"bar.c2"]=>
+ unicode(1) "5"
+ [u"bar.c3"]=>
+ unicode(1) "6"
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_012.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_012.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_012.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_012.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_012.phpt:1.5 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_012.phpt Tue Aug 16 11:09:50 2005
@@ -33,3 +33,13 @@
string(3) "bar"
string(3) "baz"
DONE!
+--UEXPECT--
+Buffered
+unicode(3) "foo"
+unicode(3) "bar"
+unicode(3) "baz"
+Unbuffered
+unicode(3) "foo"
+unicode(3) "bar"
+unicode(3) "baz"
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_013.phpt?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_013.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_013.phpt:1.7
php-src/ext/sqlite/tests/sqlite_oo_013.phpt:1.8
--- php-src/ext/sqlite/tests/sqlite_oo_013.phpt:1.7 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_013.phpt Tue Aug 16 11:09:51 2005
@@ -73,3 +73,35 @@
NULL
NULL
DONE!
+--UEXPECT--
+====BUFFERED====
+array(2) {
+ [0]=>
+ unicode(3) "one"
+ [1]=>
+ unicode(3) "two"
+}
+unicode(3) "one"
+unicode(3) "two"
+unicode(3) "one"
+unicode(3) "two"
+array(2) {
+ [0]=>
+ unicode(5) "three"
+ [1]=>
+ unicode(4) "four"
+}
+unicode(5) "three"
+unicode(4) "four"
+unicode(5) "three"
+unicode(4) "four"
+====UNBUFFERED====
+unicode(3) "one"
+unicode(3) "two"
+NULL
+NULL
+unicode(5) "three"
+unicode(4) "four"
+NULL
+NULL
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_014.phpt?r1=1.8&r2=1.9&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_014.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.8
php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.9
--- php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.8 Sat Apr 3 09:40:36 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_014.phpt Tue Aug 16 11:09:51 2005
@@ -116,3 +116,80 @@
}
}
DONE!
+--UEXPECTF--
+unbuffered twice
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+
+Warning: SQLiteUnbuffered::fetchAll(): One or more rowsets were already
returned; returning NULL this time in %ssqlite_oo_014.php on line %d
+array(0) {
+}
+unbuffered with fetch_array
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+buffered
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+bool(false)
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_015.phpt?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_015.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_015.phpt:1.5
php-src/ext/sqlite/tests/sqlite_oo_015.phpt:1.6
--- php-src/ext/sqlite/tests/sqlite_oo_015.phpt:1.5 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_015.phpt Tue Aug 16 11:09:51 2005
@@ -45,3 +45,22 @@
}
}
DONE!
+--UEXPECTF--
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "one"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(3) "two"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(5) "three"
+ }
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_016.phpt?r1=1.9&r2=1.10&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_016.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.9
php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.10
--- php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.9 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_016.phpt Tue Aug 16 11:09:51 2005
@@ -40,3 +40,11 @@
string(3) "one"
string(5) "three"
DONE!
+--UEXPECT--
+====BUFFERED====
+unicode(3) "one"
+unicode(5) "three"
+====UNBUFFERED====
+unicode(3) "one"
+unicode(5) "three"
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_020.phpt?r1=1.11&r2=1.12&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_020.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.11
php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.12
--- php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.11 Mon Mar 29 14:49:17 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_020.phpt Tue Aug 16 11:09:51 2005
@@ -64,3 +64,19 @@
string(4) "four"
}
DONE!
+--UEXPECTF--
+Message: sqlite_factory() expects at least 1 parameter, 0 given
+File: %ssqlite_oo_020.php
+array(2) {
+ [0]=>
+ unicode(3) "one"
+ [1]=>
+ unicode(3) "two"
+}
+array(2) {
+ [0]=>
+ unicode(5) "three"
+ [1]=>
+ unicode(4) "four"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_021.phpt?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_021.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.7
php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.8
--- php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.7 Mon Mar 29 14:49:17 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_021.phpt Tue Aug 16 11:09:51 2005
@@ -46,3 +46,26 @@
string(1) "5"
}
DONE!
+--UEXPECTF--
+unicode(1) "5"
+unicode(1) "4"
+unicode(5) "5data"
+array(4) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ [2]=>
+ unicode(1) "3"
+ [3]=>
+ unicode(1) "4"
+}
+
+Warning: SQLiteDatabase::singleQuery(): no such table: test in %s on line %d
+bool(false)
+NULL
+array(1) {
+ [0]=>
+ unicode(1) "5"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_022.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_022.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.3
php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.4
--- php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.3 Mon Mar 29 14:49:17 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_022.phpt Tue Aug 16 11:09:51 2005
@@ -96,3 +96,64 @@
string(5) "three"
}
====DONE!====
+--UEXPECTF--
+====SEEK:-1====
+
+Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on
line %d
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:0====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:1====
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+====SEEK:2====
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:3====
+
+Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on
line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====AGAIN====
+====SEEK:-1====
+
+Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on
line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:0====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+====SEEK:1====
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+====SEEK:2====
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====SEEK:3====
+
+Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on
line %d
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====DONE!====
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_024.phpt?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_024.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.7
php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.8
--- php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.7 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_024.phpt Tue Aug 16 11:09:51 2005
@@ -72,3 +72,34 @@
string(5) "three"
}
====DONE!====
+--UEXPECTF--
+====class24====
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(3) "one"
+}
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(3) "two"
+}
+class24::__construct
+object(class24)#%d (1) {
+ [u"a"]=>
+ unicode(5) "three"
+}
+====stdclass====
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(3) "one"
+}
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(3) "two"
+}
+object(stdClass)#%d (1) {
+ [u"a"]=>
+ unicode(5) "three"
+}
+====DONE!====
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_025.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_025.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_025.phpt:1.6
php-src/ext/sqlite/tests/sqlite_oo_025.phpt:1.7
--- php-src/ext/sqlite/tests/sqlite_oo_025.phpt:1.6 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_025.phpt Tue Aug 16 11:09:51 2005
@@ -101,3 +101,57 @@
string(5) "three"
}
DONE!
+--UEXPECT--
+====UNBUFFERED====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====NO-MORE====
+====DIRECT====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+====BUFFERED====
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+array(1) {
+ [0]=>
+ unicode(3) "one"
+}
+array(1) {
+ [0]=>
+ unicode(3) "two"
+}
+array(1) {
+ [0]=>
+ unicode(5) "three"
+}
+DONE!
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_026.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_026.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_026.phpt:1.6
php-src/ext/sqlite/tests/sqlite_oo_026.phpt:1.7
--- php-src/ext/sqlite/tests/sqlite_oo_026.phpt:1.6 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_026.phpt Tue Aug 16 11:09:51 2005
@@ -54,3 +54,19 @@
string(5) "three"
bool(true)
===DONE===
+--UEXPECT--
+====FOREACH====
+unicode(3) "one"
+unicode(3) "one"
+unicode(3) "two"
+unicode(3) "two"
+unicode(5) "three"
+unicode(5) "three"
+====FOR====
+unicode(3) "one"
+bool(true)
+unicode(3) "two"
+bool(true)
+unicode(5) "three"
+bool(true)
+===DONE===
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_028.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_028.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_028.phpt:1.4
php-src/ext/sqlite/tests/sqlite_oo_028.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_oo_028.phpt:1.4 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_028.phpt Tue Aug 16 11:09:51 2005
@@ -23,3 +23,14 @@
["d"]=>
string(0) ""
}
+--UEXPECT--
+array(4) {
+ [u"a"]=>
+ unicode(0) ""
+ [u"b"]=>
+ unicode(7) "INTEGER"
+ [u"c"]=>
+ unicode(11) "VARCHAR(10)"
+ [u"d"]=>
+ unicode(0) ""
+}
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_030.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_030.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_030.phpt:1.6
php-src/ext/sqlite/tests/sqlite_oo_030.phpt:1.7
--- php-src/ext/sqlite/tests/sqlite_oo_030.phpt:1.6 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_030.phpt Tue Aug 16 11:09:51 2005
@@ -40,3 +40,12 @@
string(3) "PHP"
Fatal error: Call to undefined method foo::bar("php")() in %ssqlite_oo_030.php
on line %d
+--UEXPECTF--
+NULL
+unicode(1) "1"
+unicode(3) "PHP"
+NULL
+unicode(1) "1"
+unicode(3) "PHP"
+
+Fatal error: Call to undefined method foo::bar("php")() in %ssqlite_oo_030.php
on line %d
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php