com php-src: Strong types for the result codes SUCCESS & FAILURE. These are common symbol names and using #defines can cause conflicts.: Zend/zend.h
| From: | Lars Strojny | Date: | Sun, 26 Aug 2012 15:15:27 +0000 |
| Subject: | com php-src: Strong types for the result codes SUCCESS & FAILURE. These are common symbol names and using #defines can cause conflicts.: Zend/zend.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-69969@lists.php.net to get a copy of this message | ||
Commit: e3ef84c59bf669a7dfc717af26ed1872bab397c9
Author: Stuart Langley <slangley@google.com> Tue, 7 Aug 2012 13:06:13 +1000
Committer: Lars Strojny <lstrojny@php.net> Sun, 26 Aug 2012 17:15:27 +0200
Parents: e7a714b35ecaf5760b1af7bd97eb2f0c613aa9f3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3ef84c59bf669a7dfc717af26ed1872bab397c9
Log:
Strong types for the result codes SUCCESS & FAILURE. These are common
symbol names and using #defines can cause conflicts.
Changed paths:
M Zend/zend.h
Diff:
diff --git a/Zend/zend.h b/Zend/zend.h
index de2a2e5..2c86f05 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -276,10 +276,10 @@ static const char long_min_digits[] = "9223372036854775808";
#define MAX_LENGTH_OF_DOUBLE 32
-#undef SUCCESS
-#undef FAILURE
-#define SUCCESS 0
-#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
+typedef enum {
+ SUCCESS = 0,
+ FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
+} RESULT_CODE;
#include "zend_hash.h"
#include "zend_ts_hash.h"