pike.git / src / pike_memory.h

version» Context lines:

pike.git/src/pike_memory.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: pike_memory.h,v 1.26 2000/12/01 20:11:19 grubba Exp $ +  * $Id: pike_memory.h,v 1.27 2000/12/01 20:34:46 grubba Exp $    */   #ifndef MEMORY_H   #define MEMORY_H      #include "global.h"   #include "stralloc.h"            #define MEMSEARCH_LINKS 512
pike.git/src/pike_memory.h:121:   #if SIZEOF_CHAR_P == 4   #define DIVIDE_BY_2_CHAR_P(X) (X >>= 3)   #else /* sizeof(char *) != 4 */   #if SIZEOF_CHAR_P == 8   #define DIVIDE_BY_2_CHAR_P(X) (X >>= 4)   #else /* sizeof(char *) != 8 */   #define DIVIDE_BY_2_CHAR_P(X) (X /= 2*sizeof(size_t))   #endif /* sizeof(char *) == 8 */   #endif /* sizeof(char *) == 4 */    - #define DO_HASHMEM(A, LEN, MLEN) \ + /* NB: RET should be an lvalue of type size_t. */ + #define DO_HASHMEM(RET, A, LEN, MLEN) \    do { \    const unsigned char *a = A; \    size_t len = LEN; \    size_t mlen = MLEN; \    size_t ret; \    \    ret = 9248339*len; \    if(len<mlen) \    mlen=len; \    else \
pike.git/src/pike_memory.h:185:    t2=(t2<<4) + a[3]; \    t1=(t1<<7) + a[4]; \    t2=(t2<<5) + a[5]; \    t1=(t1<<3) + a[6]; \    t2=(t2<<4) + a[7]; \    a += 8; \    ret^=(ret<<7) + (ret>>6) + t1 + (t2<<6); \    } \    ) \    \ -  return ret; \ +  RET = ret; \    } while(0)      #endif