mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00:00
Include/enable assert.h/assert() when it is available
This commit is contained in:
1 parent
aba912e66f
commit
cbc1cd802c
3 files changed
+14
-1
No files matched your search
@@ -64,6 +64,9 @@ Exceptions:
|
||||
not recommended. Since most of PHP_* macros are ZEND_* macro alias, use of
|
||||
PHP_* macro makes browsing source with tag search harder.
|
||||
|
||||
[8] Use assert(). assert.h is included in php.h if it is available.
|
||||
Not only good assertion catch bugs, but also it makes easier to read code.
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
|
||||
@@ -363,6 +363,7 @@ ApplicationServices/ApplicationServices.h \
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser.h \
|
||||
assert.h \
|
||||
crypt.h \
|
||||
fcntl.h \
|
||||
grp.h \
|
||||
|
||||
+10
-1
@@ -63,7 +63,16 @@
|
||||
|
||||
#include "php_regex.h"
|
||||
|
||||
|
||||
#if HAVE_ASSERT_H
|
||||
#if PHP_DEBUG
|
||||
#undef NDEBUG
|
||||
#else
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#else /* HAVE_ASSERT_H */
|
||||
#define assert(expr) ((void) (0))
|
||||
#endif /* HAVE_ASSERT_H */
|
||||
|
||||
#define APACHE 0
|
||||
|
||||
|
||||
Reference in new issue
Block a user