helly Mon Jan 24 13:46:51 2005 EDT
Modified files:
/php-src/ext/sqlite sqlite.c
Log:
- Synch with MYSQLi extension and use RuntimeException as base for
SQLiteException if SPL is present.
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.154&r2=1.155&ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.154 php-src/ext/sqlite/sqlite.c:1.155
--- php-src/ext/sqlite/sqlite.c:1.154 Mon Jan 10 02:19:08 2005
+++ php-src/ext/sqlite/sqlite.c Mon Jan 24 13:46:50 2005
@@ -17,7 +17,7 @@
| Marcus Boerger <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.154 2005/01/10 07:19:08 helly Exp $
+ $Id: sqlite.c,v 1.155 2005/01/24 18:46:50 helly Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -44,6 +44,10 @@
#include "zend_exceptions.h"
#include "zend_interfaces.h"
+#ifdef HAVE_SPL
+extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
+#endif
+
#ifndef safe_emalloc
# define safe_emalloc(a,b,c) emalloc((a)*(b)+(c))
#endif
@@ -998,7 +1002,11 @@
REGISTER_SQLITE_CLASS(Database, db, NULL);
REGISTER_SQLITE_CLASS(Result, query, NULL);
REGISTER_SQLITE_CLASS(Unbuffered, ub_query, NULL);
+#ifdef HAVE_SPL
+ REGISTER_SQLITE_CLASS(Exception, exception, spl_ce_RuntimeException);
+#else
REGISTER_SQLITE_CLASS(Exception, exception,
zend_exception_get_default());
+#endif
sqlite_object_handlers_query.get_class_entry = sqlite_get_ce_query;
sqlite_object_handlers_ub_query.get_class_entry =
sqlite_get_ce_ub_query;
@@ -1073,7 +1081,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.154 2005/01/10 07:19:08 helly Exp
$");
+ php_info_print_table_row(2, "PECL Module version",
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.155 2005/01/24 18:46:50 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();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php