Branch: Tag:

2003-03-02

2003-03-02 14:28:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Made hash() byte-order independant.
Added hash_7_4() and 7.4::hash() for backward compatibility.
Added simple_hashmem{1,2}() to implement the new hash().

Rev: lib/7.4/modules/__default.pmod:1.3
Rev: src/builtin_functions.c:1.478
Rev: src/pike_memory.c:1.139
Rev: src/pike_memory.h:1.43

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_memory.h,v 1.42 2003/02/16 04:23:19 mast Exp $ + || $Id: pike_memory.h,v 1.43 2003/03/02 14:28:42 grubba Exp $   */      #ifndef MEMORY_H
134:   PMOD_EXPORT size_t hashmem(const unsigned char *a, size_t len, size_t mlen);   PMOD_EXPORT size_t hashstr(const unsigned char *str, ptrdiff_t maxn);   PMOD_EXPORT size_t simple_hashmem(const unsigned char *str, ptrdiff_t len, ptrdiff_t maxn); + PMOD_EXPORT size_t simple_hashmem1(const p_wchar1 *str, ptrdiff_t len, ptrdiff_t maxn); + PMOD_EXPORT size_t simple_hashmem2(const p_wchar2 *str, ptrdiff_t len, ptrdiff_t maxn);   PMOD_EXPORT void init_memsearch(struct mem_searcher *s,    char *needle,    size_t needlelen,