Diff for /embedaddon/php/Zend/zend_hash.h between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:47:52 version 1.1.1.2, 2012/05/29 12:34:35
Line 60  typedef struct bucket { Line 60  typedef struct bucket {
         struct bucket *pListLast;          struct bucket *pListLast;
         struct bucket *pNext;          struct bucket *pNext;
         struct bucket *pLast;          struct bucket *pLast;
        char arKey[1]; /* Must be last element */        const char *arKey;
 } Bucket;  } Bucket;
   
 typedef struct _hashtable {  typedef struct _hashtable {
Line 83  typedef struct _hashtable { Line 83  typedef struct _hashtable {
   
   
 typedef struct _zend_hash_key {  typedef struct _zend_hash_key {
        char *arKey;        const char *arKey;
         uint nKeyLength;          uint nKeyLength;
         ulong h;          ulong h;
 } zend_hash_key;  } zend_hash_key;
Line 304  END_EXTERN_C() Line 304  END_EXTERN_C()
 #define ZEND_INIT_SYMTABLE_EX(ht, n, persistent)                        \  #define ZEND_INIT_SYMTABLE_EX(ht, n, persistent)                        \
         zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)          zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
   
#define ZEND_HANDLE_NUMERIC(key, length, func) do {                                                    \#define ZEND_HANDLE_NUMERIC_EX(key, length, idx, func) do {                                    \
         register const char *tmp = key;                                                                                 \          register const char *tmp = key;                                                                                 \
                                                                                                                                                         \                                                                                                                                                          \
         if (*tmp == '-') {                                                                                                              \          if (*tmp == '-') {                                                                                                              \
Line 312  END_EXTERN_C() Line 312  END_EXTERN_C()
         }                                                                                                                                               \          }                                                                                                                                               \
         if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */                \          if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */                \
                 const char *end = key + length - 1;                                                                     \                  const char *end = key + length - 1;                                                                     \
                 ulong idx;                                                                                                                      \  
                                                                                                                                                         \                                                                                                                                                          \
                 if ((*end != '\0') /* not a null terminated string */                           \                  if ((*end != '\0') /* not a null terminated string */                           \
                  || (*tmp == '0' && length > 2) /* numbers with leading zeros */        \                   || (*tmp == '0' && length > 2) /* numbers with leading zeros */        \
Line 335  END_EXTERN_C() Line 334  END_EXTERN_C()
                         } else if (idx > LONG_MAX) { /* overflow */                                             \                          } else if (idx > LONG_MAX) { /* overflow */                                             \
                                 break;                                                                                                          \                                  break;                                                                                                          \
                         }                                                                                                                               \                          }                                                                                                                               \
                        return func;                                                                                                  \                        func;                                                                                                                   \
                 }                                                                                                                                       \                  }                                                                                                                                       \
         }                                                                                                                                               \          }                                                                                                                                               \
   } while (0)
   
   #define ZEND_HANDLE_NUMERIC(key, length, func) do {                                                     \
           ulong idx;                                                                                                                              \
                                                                                                                                                           \
           ZEND_HANDLE_NUMERIC_EX(key, length, idx, return func);                                  \
 } while (0)  } while (0)
   
 static inline int zend_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)                                    \  static inline int zend_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)                                    \

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>