helly Mon Mar 29 14:49:17 2004 EDT
Modified files:
/php-src/ext/sqlite sqlite.c
/php-src/ext/sqlite/tests blankdb_oo.inc sqlite_oo_001.phpt
sqlite_oo_002.phpt sqlite_oo_014.phpt
sqlite_oo_020.phpt sqlite_oo_021.phpt
sqlite_oo_022.phpt
Log:
Fix class names
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.137&r2=1.138&ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.137 php-src/ext/sqlite/sqlite.c:1.138
--- php-src/ext/sqlite/sqlite.c:1.137 Sun Mar 28 15:27:18 2004
+++ php-src/ext/sqlite/sqlite.c Mon Mar 29 14:49:16 2004
@@ -17,7 +17,7 @@
| Marcus Boerger <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.137 2004/03/28 20:27:18 helly Exp $
+ $Id: sqlite.c,v 1.138 2004/03/29 19:49:16 helly Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -719,15 +719,15 @@
/* }}} */
/* {{{ OO init/structure stuff */
-#define REGISTER_SQLITE_CLASS(name, parent) \
+#define REGISTER_SQLITE_CLASS(name, c_name, parent) \
{ \
zend_class_entry ce; \
- INIT_CLASS_ENTRY(ce, "sqlite_" # name, sqlite_funcs_ ## name); \
- ce.create_object = sqlite_object_new_ ## name; \
- sqlite_ce_ ## name = zend_register_internal_class_ex(&ce, parent, NULL
TSRMLS_CC); \
- memcpy(&sqlite_object_handlers_ ## name,
zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \
- sqlite_object_handlers_ ## name.clone_obj = NULL; \
- sqlite_ce_ ## name->ce_flags |= ZEND_ACC_FINAL_CLASS; \
+ INIT_CLASS_ENTRY(ce, "SQLite" # name, sqlite_funcs_ ## c_name); \
+ ce.create_object = sqlite_object_new_ ## c_name; \
+ sqlite_ce_ ## c_name = zend_register_internal_class_ex(&ce, parent,
NULL TSRMLS_CC); \
+ memcpy(&sqlite_object_handlers_ ## c_name,
zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \
+ sqlite_object_handlers_ ## c_name.clone_obj = NULL; \
+ sqlite_ce_ ## c_name->ce_flags |= ZEND_ACC_FINAL_CLASS; \
}
zend_class_entry *sqlite_ce_db, *sqlite_ce_exception;
@@ -984,10 +984,10 @@
PHP_MINIT_FUNCTION(sqlite)
{
- REGISTER_SQLITE_CLASS(db, NULL);
- REGISTER_SQLITE_CLASS(query, NULL);
- REGISTER_SQLITE_CLASS(ub_query, NULL);
- REGISTER_SQLITE_CLASS(exception, zend_exception_get_default());
+ REGISTER_SQLITE_CLASS(Database, db, NULL);
+ REGISTER_SQLITE_CLASS(Result, query, NULL);
+ REGISTER_SQLITE_CLASS(Unbuffered, ub_query, NULL);
+ REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default());
sqlite_object_handlers_query.get_class_entry = sqlite_get_ce_query;
sqlite_object_handlers_ub_query.get_class_entry = sqlite_get_ce_ub_query;
@@ -1055,7 +1055,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.137 2004/03/28 20:27:18 helly Exp $");
+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION "
$Id: sqlite.c,v 1.138 2004/03/29 19:49:16 helly 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();
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/blankdb_oo.inc?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/sqlite/tests/blankdb_oo.inc
diff -u php-src/ext/sqlite/tests/blankdb_oo.inc:1.3
php-src/ext/sqlite/tests/blankdb_oo.inc:1.4
--- php-src/ext/sqlite/tests/blankdb_oo.inc:1.3 Fri Dec 5 08:42:03 2003
+++ php-src/ext/sqlite/tests/blankdb_oo.inc Mon Mar 29 14:49:17 2004
@@ -7,5 +7,5 @@
@unlink($dbname);
}
register_shutdown_function("cleanup");
-$db = new sqlite_db($dbname);
+$db = new SQLiteDatabase($dbname);
?>
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_001.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_001.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_001.phpt:1.1
php-src/ext/sqlite/tests/sqlite_oo_001.phpt:1.2
--- php-src/ext/sqlite/tests/sqlite_oo_001.phpt:1.1 Sun Jun 22 13:19:46 2003
+++ php-src/ext/sqlite/tests/sqlite_oo_001.phpt Mon Mar 29 14:49:17 2004
@@ -12,6 +12,6 @@
echo "Done\n";
?>
--EXPECTF--
-object(sqlite_db)#%d (0) {
+object(SQLiteDatabase)#%d (0) {
}
Done
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_002.phpt?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_002.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.4
php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.5
--- php-src/ext/sqlite/tests/sqlite_oo_002.phpt:1.4 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_002.phpt Mon Mar 29 14:49:17 2004
@@ -17,13 +17,13 @@
var_dump($r->fetch());
?>
--EXPECTF--
-object(sqlite_db)#%d (0) {
+object(SQLiteDatabase)#%d (0) {
}
-object(sqlite_query)#%d (0) {
+object(SQLiteResult)#%d (0) {
}
-object(sqlite_query)#%d (0) {
+object(SQLiteResult)#%d (0) {
}
-object(sqlite_query)#%d (0) {
+object(SQLiteResult)#%d (0) {
}
array(6) {
[0]=>
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_014.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_014.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.6
php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.7
--- php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.6 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_014.phpt Mon Mar 29 14:49:17 2004
@@ -59,7 +59,7 @@
}
}
-Notice: sqlite_ub_query::fetchAll(): One or more rowsets were already returned in
%ssqlite_oo_014.php on line %d
+Notice: SQLiteUnbuffered::fetchAll(): One or more rowsets were already returned in
%ssqlite_oo_014.php on line %d
array(0) {
}
unbuffered with fetch_array
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_020.phpt?r1=1.10&r2=1.11&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_020.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.10
php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.11
--- php-src/ext/sqlite/tests/sqlite_oo_020.phpt:1.10 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_020.phpt Mon Mar 29 14:49:17 2004
@@ -18,7 +18,7 @@
try {
$db = sqlite_factory();
-} catch(sqlite_exception $err) {
+} catch(SQLiteException $err) {
echo "Message: ".$err->getMessage()."\n";
echo "File: ".$err->getFile()."\n";
//echo "Line: ".$err->getLine()."\n";
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_021.phpt?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_021.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.6
php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.7
--- php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.6 Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/tests/sqlite_oo_021.phpt Mon Mar 29 14:49:17 2004
@@ -38,7 +38,7 @@
string(1) "4"
}
-Warning: sqlite_db::singleQuery(): no such table: test in %s on line %d
+Warning: SQLiteDatabase::singleQuery(): no such table: test in %s on line %d
bool(false)
NULL
array(1) {
http://cvs.php.net/diff.php/php-src/ext/sqlite/tests/sqlite_oo_022.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/sqlite/tests/sqlite_oo_022.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.2
php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.3
--- php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.2 Thu Aug 28 19:18:38 2003
+++ php-src/ext/sqlite/tests/sqlite_oo_022.phpt Mon Mar 29 14:49:17 2004
@@ -38,7 +38,7 @@
--EXPECTF--
====SEEK:-1====
-Warning: sqlite_query::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
+Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
array(1) {
[0]=>
string(3) "one"
@@ -60,7 +60,7 @@
}
====SEEK:3====
-Warning: sqlite_query::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
+Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
array(1) {
[0]=>
string(5) "three"
@@ -68,7 +68,7 @@
====AGAIN====
====SEEK:-1====
-Warning: sqlite_query::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
+Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
array(1) {
[0]=>
string(5) "three"
@@ -90,7 +90,7 @@
}
====SEEK:3====
-Warning: sqlite_query::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
+Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
array(1) {
[0]=>
string(5) "three"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php