diff options
| author | Marcus Boerger <helly@php.net> | 2005-10-02 20:36:02 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-10-02 20:36:02 +0000 |
| commit | b18ffb406e66a76c8f1710262cab8ad7771462e2 (patch) | |
| tree | f95c073e94c5a0397679453f5745628f7842956d | |
| parent | 3e0c56aac26872198bd7098dda7ee7abbffae366 (diff) | |
| download | php-git-b18ffb406e66a76c8f1710262cab8ad7771462e2.tar.gz | |
- Simplify SPL checks for PDOException base
| -rwxr-xr-x | ext/pdo/pdo.c | 4 | ||||
| -rwxr-xr-x | ext/pdo/php_pdo.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index eb541dfdc4..2a77257dd8 100755 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -69,7 +69,7 @@ PDO_API char *php_pdo_str_tolower_dup(const char *src, int len) PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC) { -#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) +#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) if (!root) { return spl_ce_RuntimeException; } @@ -317,7 +317,7 @@ PHP_MINIT_FUNCTION(pdo) "PDO persistent database", module_number); INIT_CLASS_ENTRY(ce, "PDOException", NULL); -#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) +#if can_handle_soft_dependency_on_SPL && defined(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(TSRMLS_C), NULL TSRMLS_CC); diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index 7f9b85ceb2..63499575c6 100755 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -24,7 +24,7 @@ #include "zend.h" #if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1) -#define can_handle_soft_dependency_on_SPL +#define can_handle_soft_dependency_on_SPL 1 #endif extern zend_module_entry pdo_module_entry; |
