summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/php_mysqlnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqlnd/php_mysqlnd.c')
-rw-r--r--ext/mysqlnd/php_mysqlnd.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index a16018f6ba..92128d7715 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -56,7 +56,7 @@ mysqlnd_minfo_print_hash(zval *values)
/* {{{ mysqlnd_minfo_dump_plugin_stats */
static int
-mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument TSRMLS_DC)
+mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument)
{
struct st_mysqlnd_plugin_header * plugin_header = (struct st_mysqlnd_plugin_header *)Z_PTR_P(el);
if (plugin_header->plugin_stats.values) {
@@ -64,7 +64,7 @@ mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument TSRMLS_DC)
zval values;
snprintf(buf, sizeof(buf), "%s statistics", plugin_header->plugin_name);
- mysqlnd_fill_stats_hash(plugin_header->plugin_stats.values, plugin_header->plugin_stats.names, &values TSRMLS_CC ZEND_FILE_LINE_CC);
+ mysqlnd_fill_stats_hash(plugin_header->plugin_stats.values, plugin_header->plugin_stats.names, &values ZEND_FILE_LINE_CC);
php_info_print_table_start();
php_info_print_table_header(2, buf, "");
@@ -79,7 +79,7 @@ mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument TSRMLS_DC)
/* {{{ mysqlnd_minfo_dump_loaded_plugins */
static int
-mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf TSRMLS_DC)
+mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf)
{
smart_str * buffer = (smart_str *) buf;
struct st_mysqlnd_plugin_header * plugin_header = (struct st_mysqlnd_plugin_header *)Z_PTR_P(el);
@@ -96,9 +96,9 @@ mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf TSRMLS_DC)
/* {{{ mysqlnd_minfo_dump_api_plugins */
static void
-mysqlnd_minfo_dump_api_plugins(smart_str * buffer TSRMLS_DC)
+mysqlnd_minfo_dump_api_plugins(smart_str * buffer)
{
- HashTable *ht = mysqlnd_reverse_api_get_api_list(TSRMLS_C);
+ HashTable *ht = mysqlnd_reverse_api_get_api_list();
MYSQLND_REVERSE_API *ext;
ZEND_HASH_FOREACH_PTR(ht, ext) {
@@ -157,7 +157,7 @@ PHP_MINFO_FUNCTION(mysqlnd)
php_info_print_table_row(2, "Loaded plugins", tmp_str.s? tmp_str.s->val : "");
smart_str_free(&tmp_str);
- mysqlnd_minfo_dump_api_plugins(&tmp_str TSRMLS_CC);
+ mysqlnd_minfo_dump_api_plugins(&tmp_str);
smart_str_0(&tmp_str);
php_info_print_table_row(2, "API Extensions", tmp_str.s? tmp_str.s->val : "");
smart_str_free(&tmp_str);
@@ -179,6 +179,9 @@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(mysqlnd)
*/
static PHP_GINIT_FUNCTION(mysqlnd)
{
+#if defined(COMPILE_DL_MYSQLND) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE;
+#endif
mysqlnd_globals->collect_statistics = TRUE;
mysqlnd_globals->collect_memory_statistics = FALSE;
mysqlnd_globals->debug = NULL; /* The actual string */
@@ -252,7 +255,7 @@ static PHP_MINIT_FUNCTION(mysqlnd)
{
REGISTER_INI_ENTRIES();
- mysqlnd_library_init(TSRMLS_C);
+ mysqlnd_library_init();
return SUCCESS;
}
/* }}} */
@@ -262,7 +265,7 @@ static PHP_MINIT_FUNCTION(mysqlnd)
*/
static PHP_MSHUTDOWN_FUNCTION(mysqlnd)
{
- mysqlnd_library_end(TSRMLS_C);
+ mysqlnd_library_end();
UNREGISTER_INI_ENTRIES();
return SUCCESS;
@@ -279,8 +282,8 @@ static PHP_RINIT_FUNCTION(mysqlnd)
struct st_mysqlnd_plugin_trace_log * trace_log_plugin = mysqlnd_plugin_find("debug_trace");
MYSQLND_G(dbg) = NULL;
if (trace_log_plugin) {
- MYSQLND_DEBUG * dbg = trace_log_plugin->methods.trace_instance_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC);
- MYSQLND_DEBUG * trace_alloc = trace_log_plugin->methods.trace_instance_init(NULL TSRMLS_CC);
+ MYSQLND_DEBUG * dbg = trace_log_plugin->methods.trace_instance_init(mysqlnd_debug_std_no_trace_funcs);
+ MYSQLND_DEBUG * trace_alloc = trace_log_plugin->methods.trace_instance_init(NULL);
if (!dbg || !trace_alloc) {
return FAILURE;
}
@@ -357,6 +360,9 @@ zend_module_entry mysqlnd_module_entry = {
/* {{{ COMPILE_DL_MYSQLND */
#ifdef COMPILE_DL_MYSQLND
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
ZEND_GET_MODULE(mysqlnd)
#endif
/* }}} */