diff options
author | Wez Furlong <wez@php.net> | 2005-10-01 02:48:11 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-10-01 02:48:11 +0000 |
commit | 932346c00f897ba0a82b611325370af322396757 (patch) | |
tree | 03c6a6325dea1574661a489c2e65f42fc6bd6232 /ext/pdo/php_pdo.h | |
parent | 56f006a99883197b5433c3bbbd1c229a92211f19 (diff) | |
download | php-git-932346c00f897ba0a82b611325370af322396757.tar.gz |
Allow compilation with PHP 5.0.x
Closes PECL #5514
Diffstat (limited to 'ext/pdo/php_pdo.h')
-rwxr-xr-x | ext/pdo/php_pdo.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index c4b9c94c68..7754dba2b3 100755 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -58,17 +58,14 @@ ZEND_END_MODULE_GLOBALS(pdo) # define PDOG(v) (pdo_globals.v) #endif -#define REGISTER_PDO_CLASS_CONST_LONG(const_name, value) \ - zend_declare_class_constant_long(pdo_dbh_ce, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); +PDO_API void php_pdo_declare_long_constant(const char *const_name, size_t name_len, long value TSRMLS_DC); +PDO_API void php_pdo_declare_stringl_constant(const char *const_name, size_t name_len, const char *value, size_t value_len TSRMLS_DC); -#define REGISTER_PDO_CONST_LONG(const_name, value) { \ - zend_class_entry **pce; \ - if (zend_hash_find(CG(class_table), "pdo", sizeof("pdo"), (void **) &pce) != FAILURE) \ - zend_declare_class_constant_long(*pce, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \ -} \ +#define REGISTER_PDO_CLASS_CONST_LONG(const_name, value) \ + php_pdo_declare_long_constant(const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); #define REGISTER_PDO_CLASS_CONST_STRING(const_name, value) \ - zend_declare_class_constant_stringl(pdo_dbh_ce, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); + php_pdo_declare_stringl_constant(const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); #define PDO_CONSTRUCT_CHECK \ if (!dbh->driver) { \ |