1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix php_pcre_mutex_free()
This commit is contained in:
Nikita Popov
2019-11-07 14:31:55 +01:00

View File

@@ -83,8 +83,10 @@ ZEND_TLS zend_bool mdata_used = 0;
ZEND_TLS uint8_t pcre2_init_ok = 0;
#if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT)
static MUTEX_T pcre_mt = NULL;
#define php_pcre_mutex_alloc() if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc();
#define php_pcre_mutex_free() if (tsrm_is_main_thread() && pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL;
#define php_pcre_mutex_alloc() \
if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc();
#define php_pcre_mutex_free() \
if (tsrm_is_main_thread() && pcre_mt) { tsrm_mutex_free(pcre_mt); pcre_mt = NULL; }
#define php_pcre_mutex_lock() tsrm_mutex_lock(pcre_mt);
#define php_pcre_mutex_unlock() tsrm_mutex_unlock(pcre_mt);
#else