Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- This should improve performance on Windows

  • Loading branch information...
commit 90f43c78b0737a2aa35f3b81a0279170705b6ec1 1 parent 1186d51
@andigutmans andigutmans authored
Showing with 15 additions and 11 deletions.
  1. +12 −10 Zend/zend.h
  2. +3 −1 Zend/zend_hash.h
View
22 Zend/zend.h
@@ -54,6 +54,18 @@
# define ZEND_PATHS_SEPARATOR ':'
#endif
+
+#ifdef ZEND_WIN32
+/* Only use this macro if you know for sure that all of the switches values
+ are covered by its case statements */
+#define EMPTY_SWITCH_DEFAULT_CASE() \
+ default: \
+ __assume(0); \
+ break;
+#else
+#define EMPTY_SWITCH_DEFAULT_CASE()
+#endif
+
/* all HAVE_XXX test have to be after the include of zend_config above */
#ifdef HAVE_UNIX_H
@@ -541,16 +553,6 @@ ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval
#define ZEND_MAX_RESERVED_RESOURCES 4
-#ifdef ZEND_WIN32
-/* Only use this macro if you know for sure that all of the switches values
- are covered by its case statements */
-#define EMPTY_SWITCH_DEFAULT_CASE() \
- default: \
- __assume(0); \
- break;
-#else
-#define EMPTY_SWITCH_DEFAULT_CASE()
-#endif
#endif /* ZEND_H */
View
4 Zend/zend_hash.h
@@ -21,6 +21,7 @@
#define ZEND_HASH_H
#include <sys/types.h>
+#include "zend.h"
#define HASH_KEY_IS_STRING 1
#define HASH_KEY_IS_LONG 2
@@ -244,7 +245,8 @@ static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength)
case 3: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 2: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
case 1: hash = ((hash << 5) + hash) + *arKey++; break;
- default: /* case 0: */ break;
+ case 0: break;
+EMPTY_SWITCH_DEFAULT_CASE()
}
return hash;
}
Please sign in to comment.
Something went wrong with that request. Please try again.