cvs: pecl /pdo pdo.c

From: Date: Sun, 13 Feb 2005 15:40:16 +0000
Subject: cvs: pecl /pdo pdo.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2552@lists.php.net to get a copy of this message
helly Sun Feb 13 10:40:16 2005 EDT Modified files: /pecl/pdo pdo.c Log: - Use runtimeException as base if present (synch with other dbs) http://cvs.php.net/diff.php/pecl/pdo/pdo.c?r1=1.29&r2=1.30&ty=u Index: pecl/pdo/pdo.c diff -u pecl/pdo/pdo.c:1.29 pecl/pdo/pdo.c:1.30 --- pecl/pdo/pdo.c:1.29 Sun Feb 13 01:56:16 2005 +++ pecl/pdo/pdo.c Sun Feb 13 10:40:15 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo.c,v 1.29 2005/02/13 06:56:16 wez Exp $ */ +/* $Id: pdo.c,v 1.30 2005/02/13 15:40:15 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,6 +33,10 @@ #include "php_pdo_int.h" #include "zend_exceptions.h" +#ifdef HAVE_SPL +extern PHPAPI zend_class_entry *spl_ce_RuntimeException; +#endif + ZEND_DECLARE_MODULE_GLOBALS(pdo) /* True global resources - no need for thread safety here */ @@ -282,7 +286,11 @@ #endif INIT_CLASS_ENTRY(ce, "PDOException", NULL); +#ifdef HAVE_SPL + pdo_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RuntimeException, NULL TSRMLS_CC); +#else pdo_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC); +#endif zend_declare_property_null(pdo_exception_ce, "errorInfo", sizeof("errorInfo")-1, ZEND_ACC_PUBLIC TSRMLS_CC); INIT_CLASS_ENTRY(ce, "PDO", pdo_dbh_functions);

« previous php.pecl.cvs (#2552) next »