Skip to content

Commit 71f8e9c

Browse files
committed
Drop TSRM_ASSERT macro
It is only used once, and because ZEND_DEBUG is always defined we were asserting even in non debug builds
1 parent 7d66e4f commit 71f8e9c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

TSRM/TSRM.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616

1717
#include <stdio.h>
1818
#include <stdarg.h>
19-
20-
#ifdef ZEND_DEBUG
21-
# include <assert.h>
22-
# define TSRM_ASSERT assert
23-
#else
24-
# define TSRM_ASSERT
25-
#endif
19+
#include "Zend/zend_portability.h"
2620

2721
typedef struct _tsrm_tls_entry tsrm_tls_entry;
2822

@@ -479,7 +473,7 @@ void ts_free_thread(void)
479473
int hash_value;
480474
tsrm_tls_entry *last=NULL;
481475

482-
TSRM_ASSERT(!in_main_thread);
476+
ZEND_ASSERT(!in_main_thread);
483477

484478
tsrm_mutex_lock(tsmm_mutex);
485479
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);

0 commit comments

Comments
 (0)