--- parser3/src/classes/int.C 2007/02/03 18:08:38 1.56 +++ parser3/src/classes/int.C 2010/10/21 15:06:28 1.59 @@ -1,11 +1,11 @@ /** @file Parser: @b int parser class. - Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_INT_C="$Date: 2007/02/03 18:08:38 $"; +static const char * const IDENT_INT_C="$Date: 2010/10/21 15:06:28 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -24,8 +24,6 @@ void _string_format(Request& r, MethodPa class MInt: public Methoded { public: MInt(); -public: // Methoded - bool used_directly() { return true; } }; // global variable @@ -58,7 +56,7 @@ static void _bool(Request& r, MethodPara params.as_bool(0, "default must be bool", r); VInt& vint=GET_SELF(r, VInt); - r.write_no_lang(*new VBool(vint.as_bool())); + r.write_no_lang(VBool::get(vint.as_bool())); } typedef void (*vint_op_func_ptr)(VInt& vint, double param); @@ -96,7 +94,7 @@ static void _sql(Request& r, MethodParam if(default_code) val=r.process_to_value(*default_code).as_int(); else { - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, 0, "produced no result, but no default option specified"); }