Commit 836a162
Don't fiddle with NDEBUG in C code (phpGH-16511)
* Don't fiddle with NDEBUG in C code
It is way to late to do this in php.h, since assert.h has already been
included. Even pushing that down to zend_portability.h may not have
the desired effect. Instead we define or undefine NDEBUG as CFLAG, so
that it works in all circumstances.
As a last resort we fail at build time, if `NDEBUG` is defined when
`ZEND_DEBUG` is enabled.
We also remove the useless workaround in zend_test to include assert.h
again, since that usually won't have any effect anyway.
Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>1 parent 361fb40 commit 836a162
File tree
5 files changed
+10
-14
lines changed- Zend
- ext/zend_test
- main
- win32/build
5 files changed
+10
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| 802 | + | |
| 803 | + | |
802 | 804 | | |
803 | 805 | | |
804 | 806 | | |
| |||
817 | 819 | | |
818 | 820 | | |
819 | 821 | | |
| 822 | + | |
| 823 | + | |
820 | 824 | | |
821 | 825 | | |
822 | 826 | | |
| |||
829 | 833 | | |
830 | 834 | | |
831 | 835 | | |
| 836 | + | |
| 837 | + | |
832 | 838 | | |
833 | 839 | | |
834 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 112 | | |
120 | 113 | | |
121 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3429 | 3429 | | |
3430 | 3430 | | |
3431 | 3431 | | |
3432 | | - | |
| 3432 | + | |
3433 | 3433 | | |
3434 | 3434 | | |
3435 | 3435 | | |
| |||
0 commit comments