summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo')
-rw-r--r--ext/pdo/pdo.c6
-rw-r--r--ext/pdo/php_pdo_driver.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index b89c951755..77f731a666 100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -156,7 +156,7 @@ static PHP_GINIT_FUNCTION(pdo)
}
/* }}} */
-PDO_API int php_pdo_register_driver(pdo_driver_t *driver) /* {{{ */
+PDO_API int php_pdo_register_driver(const pdo_driver_t *driver) /* {{{ */
{
if (driver->api_version != PDO_DRIVER_API) {
zend_error(E_ERROR, "PDO: driver %s requires PDO API version " ZEND_ULONG_FMT "; this is PDO version %d",
@@ -168,11 +168,11 @@ PDO_API int php_pdo_register_driver(pdo_driver_t *driver) /* {{{ */
return FAILURE; /* NOTREACHED */
}
- return zend_hash_str_add_ptr(&pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len, driver) != NULL;
+ return zend_hash_str_add_ptr(&pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len, (void*)driver) != NULL;
}
/* }}} */
-PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver) /* {{{ */
+PDO_API void php_pdo_unregister_driver(const pdo_driver_t *driver) /* {{{ */
{
if (!zend_hash_str_exists(&module_registry, "pdo", sizeof("pdo") - 1)) {
return;
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index bcbe5b3672..578f3a3ac1 100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -435,7 +435,7 @@ enum pdo_placeholder_support {
struct _pdo_dbh_t {
/* driver specific methods */
- struct pdo_dbh_methods *methods;
+ const struct pdo_dbh_methods *methods;
/* driver specific data */
void *driver_data;
@@ -661,9 +661,9 @@ struct _pdo_row_t {
};
/* call this in MINIT to register your PDO driver */
-PDO_API int php_pdo_register_driver(pdo_driver_t *driver);
+PDO_API int php_pdo_register_driver(const pdo_driver_t *driver);
/* call this in MSHUTDOWN to unregister your PDO driver */
-PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver);
+PDO_API void php_pdo_unregister_driver(const pdo_driver_t *driver);
/* For the convenience of drivers, this function will parse a data source
* string, of the form "name=value; name2=value2" and populate variables