--- parser3/src/main/pa_string.C 2002/09/17 14:22:29 1.170 +++ parser3/src/main/pa_string.C 2003/03/17 14:48:06 1.172.4.1 @@ -1,11 +1,11 @@ /** @file Parser: string class. @see untasize_t.C. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2002/09/17 14:22:29 $"; +static const char* IDENT_STRING_C="$Date: 2003/03/17 14:48:06 $"; #include "pcre.h" @@ -32,7 +32,7 @@ String& String::OnPool(Pool& apool, cons if(src_size==0) src_size=strlen(local_src); - char *pooled_src=(char *)apool.malloc(src_size); + char *pooled_src=(char *)apool.malloc_atomic(src_size); memcpy(pooled_src, local_src, src_size); return *new(apool) String(apool, pooled_src, src_size, tainted); } else @@ -459,7 +459,7 @@ static void regex_options(const String * {"'", 0, 0, 0, 0, &need_pre_post_match}, {0} }; - result[0]=PCRE_EXTRA | PCRE_DOTALL; + result[0]=PCRE_EXTRA | PCRE_DOTALL | PCRE_DOLLAR_ENDONLY; result[1]=0; if(options) @@ -599,7 +599,7 @@ String& String::change_case(Pool& pool, } STRING_FOREACH_ROW( - char *new_cstr=(char *)pool.malloc(row->item.size, 12); + char *new_cstr=(char *)pool.malloc_atomic(row->item.size, 12); char *dest=new_cstr; const char *src=row->item.ptr; for(int size=row->item.size; size--; src++) { @@ -645,7 +645,7 @@ IFNDEF_NO_STRING_ORIGIN( // & one step back, see STRING_FOREACH_ROW --row; ++countdown; - char *new_cstr=(char *)pool.malloc((size_t)ceil(joined_size*dict.max_ratio()), 14); + char *new_cstr=(char *)pool.malloc_atomic((size_t)ceil(joined_size*dict.max_ratio()), 14); char *dest=new_cstr; while(joined_size) { // there is a row where first column starts 'joined_ptr' @@ -791,7 +791,7 @@ void String::serialize(size_t prolog_siz prolog_size +used_rows()*(sizeof(uchar)+sizeof(ushort)) +size(); - buf=malloc(buf_size,15); + buf=malloc_atomic(buf_size,15); char *cur=(char *)buf+prolog_size; STRING_FOREACH_ROW(