--- parser3/src/classes/Attic/random.C 2001/04/06 08:55:18 1.5 +++ parser3/src/classes/Attic/random.C 2001/04/15 13:12:18 1.6 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: random.C,v 1.5 2001/04/06 08:55:18 paf Exp $ + $Id: random.C,v 1.6 2001/04/15 13:12:18 paf Exp $ */ #include @@ -24,13 +24,10 @@ VStateless_class *random_class; // methods /// @test noticed series in isapi, check how initialize_random_class is called! [must be called only once] -static void _generate(Request& r, const String& method_name, Array *params) { +static void _generate(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value& range=*static_cast(params->get(0)); - // (this body type) - r.fail_if_junction_(false, range, method_name, "range must be expression"); - + Value& range=params->get_junction(0, "range must be expression"); uint max=params->size()?(uint)r.process(range).as_double():0; if(max<=1) PTHROW(0, 0,