--- parser3/src/main/pa_string.C 2015/10/06 22:20:50 1.249 +++ parser3/src/main/pa_string.C 2015/10/26 01:21:59 1.253 @@ -1,7 +1,7 @@ /** @file Parser: string class. @see untalength_t.C. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -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.253 2015/10/26 01:21:59 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;