--- parser3/src/main/pa_string.C 2015/10/06 22:20:50 1.249 +++ parser3/src/main/pa_string.C 2015/10/09 16:03:28 1.252 @@ -12,7 +12,11 @@ #include "pa_charset.h" #include "pa_vregex.h" -volatile const char * IDENT_PA_STRING_C="$Id: pa_string.C,v 1.249 2015/10/06 22:20:50 moko Exp $" IDENT_PA_STRING_H; +#ifndef ULLONG_MAX +#define ULLONG_MAX 18446744073709551615ULL +#endif + +volatile const char * IDENT_PA_STRING_C="$Id: pa_string.C,v 1.252 2015/10/09 16:03:28 moko Exp $" IDENT_PA_STRING_H; const String String::Empty; @@ -367,7 +371,7 @@ uint String::Body::get_hash_code() const uint hash_code=0; #endif if (body && CORD_IS_STRING(body)){ - generic_hash_code(hash_code, body); + generic_hash_code(hash_code, (const char *)body); } else { CORD_iter5(body, 0, CORD_batched_iter_fn_generic_hash_code, @@ -910,10 +914,7 @@ bool String::deserialize(size_t prolog_s if(cur[body_length] != 0) // in place? return false; // 3: letters - body=String::Body(*cur?cur:0); -#ifdef STRING_LENGTH_CACHING - body.set_length(body_length); -#endif + body=String::Body(String::C(cur, body_length)); cur+=body_length+1; in_buf-=body_length+1;