Commit:    e3ef84c59bf669a7dfc717af26ed1872bab397c9
Author:    Stuart Langley <slang...@google.com>         Tue, 7 Aug 2012 
13:06:13 +1000
Committer: Lars Strojny <lstro...@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"


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to