From 2fbcb9763b401def7f0553c87c3a7c6b055d0b4c Mon Sep 17 00:00:00 2001 From: Stuart Langley Date: Tue, 7 Aug 2012 13:06:13 +1000 Subject: [PATCH] Strong types for the result codes SUCCESS & FAILURE. These are common symbol names and using #defines can cause conflicts. --- Zend/zend.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend.h b/Zend/zend.h index 4958c1492e40..8317698ec7d6 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -262,10 +262,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"