--- parser3/src/classes/op.C 2002/06/10 14:37:35 1.96 +++ parser3/src/classes/op.C 2002/08/01 11:41:12 1.99 @@ -3,10 +3,10 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Id: op.C,v 1.96 2002/06/10 14:37:35 paf Exp $ */ +static const char* IDENT_OP_C="$Date: 2002/08/01 11:41:12 $"; + #include "classes.h" #include "pa_common.h" #include "pa_request.h" @@ -100,6 +100,7 @@ static void _taint(Request& r, const Str } static void _process(Request& r, const String& method_name, MethodParams *params) { + Pool& pool=r.pool(); // calculate pseudo file name of processed chars // would be something like "/some/file(4) process" char local_place[MAX_STRING]; @@ -133,6 +134,7 @@ static void _process(Request& r, const S // maybe-define new @main r.use_buf( source.cstr(String::UL_UNSPECIFIED, r.connection(0)), + *new(pool) String(pool, heap_place, place_size, true /*tainted*/), heap_place, &self_class); @@ -630,7 +632,7 @@ static void _throw_operator(Request& r, const char *type=params->as_string(0, "type must be string").cstr(); const String& source=params->as_string(1, "source must be string"); const char *comment=params->size()>2?params->as_string(2, "comment must be string").cstr():0; - throw Exception(type, &source, "%s", comment); + throw Exception(type, &source, "%s", comment?comment:""); } }