From: Andrey Hristov Date: Tue, 17 Nov 2015 16:47:50 +0000 (+0100) Subject: Don't use the specific translated name but use the macro for this X-Git-Tag: php-7.1.0alpha1~726 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=057ad5626bdc4cb89d8a43c380d646b7923eeb09;p=php Don't use the specific translated name but use the macro for this --- diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 5f794664e7..c2585b1d00 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -88,7 +88,7 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const char #define mysqlnd_connect(conn, host, user, pass, pass_len, db, db_len, port, socket, mysql_flags, client_api_flags) \ mysqlnd_connection_connect((conn), (host), (user), (pass), (pass_len), (db), (db_len), (port), (socket), (mysql_flags), (client_api_flags)) -PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, struct st_mysqlnd_object_factory_methods * object_factory); +PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory); PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn, const char * const host, const char * const user, diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index d68d346f98..0520b76f12 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -2726,9 +2726,9 @@ PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle, /* {{{ mysqlnd_connection_init */ PHPAPI MYSQLND * -mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, struct st_mysqlnd_object_factory_methods * object_factory) +mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory) { - struct st_mysqlnd_object_factory_methods * factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); + MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND * ret; DBG_ENTER("mysqlnd_connection_init"); ret = factory->get_connection(factory, persistent); diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c index 5f93d765b3..fe7d3f1d85 100644 --- a/ext/mysqlnd/mysqlnd_driver.c +++ b/ext/mysqlnd/mysqlnd_driver.c @@ -96,7 +96,7 @@ PHPAPI void mysqlnd_library_init(void) /* {{{ mysqlnd_object_factory::get_connection */ static MYSQLND * -MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(struct st_mysqlnd_object_factory_methods * factory, const zend_bool persistent) +MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const zend_bool persistent) { size_t alloc_size_ret = sizeof(MYSQLND) + mysqlnd_plugin_count() * sizeof(void *); size_t alloc_size_ret_data = sizeof(MYSQLND_CONN_DATA) + mysqlnd_plugin_count() * sizeof(void *); diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index 6aced2c29e..0402339a5b 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -365,7 +365,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory); -typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(struct st_mysqlnd_object_factory_methods * factory, const zend_bool persistent); +typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const zend_bool persistent); typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn); typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn, const zend_bool persistent); typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); @@ -534,8 +534,6 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) func_mysqlnd_conn_data__get_reference get_reference; func_mysqlnd_conn_data__free_reference free_reference; -// func_mysqlnd_conn_data__send_command_handle_response send_command_handle_response; - func_mysqlnd_conn_data__restart_psession restart_psession; func_mysqlnd_conn_data__end_psession end_psession; func_mysqlnd_conn_data__send_close send_close;