cvs: ZendEngine2 / zend.h zend_hash.h
| From: | Andi Gutmans | Date: | Sat, 08 Jun 2002 13:01:05 +0000 |
| Subject: | cvs: ZendEngine2 / zend.h zend_hash.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-157@lists.php.net to get a copy of this message | ||
andi Sat Jun 8 09:01:05 2002 EDT
Modified files:
/ZendEngine2 zend.h zend_hash.h
Log:
- This should improve performance on Windows
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.171 ZendEngine2/zend.h:1.172
--- ZendEngine2/zend.h:1.171 Thu May 30 04:52:21 2002
+++ ZendEngine2/zend.h Sat Jun 8 09:01:03 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.171 2002/05/30 08:52:21 rvenkat Exp $ */
+/* $Id: zend.h,v 1.172 2002/06/08 13:01:03 andi Exp $ */
#ifndef ZEND_H
#define 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 @@
#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 */
Index: ZendEngine2/zend_hash.h
diff -u ZendEngine2/zend_hash.h:1.58 ZendEngine2/zend_hash.h:1.59
--- ZendEngine2/zend_hash.h:1.58 Sat Jun 8 08:44:39 2002
+++ ZendEngine2/zend_hash.h Sat Jun 8 09:01:05 2002
@@ -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 @@
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;
}