--- parser3/src/classes/hash.C 2008/06/26 15:00:42 1.87 +++ parser3/src/classes/hash.C 2009/04/16 01:10:21 1.89 @@ -1,11 +1,11 @@ /** @file Parser: @b hash 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_HASH_C="$Date: 2008/06/26 15:00:42 $"; +static const char * const IDENT_HASH_C="$Date: 2009/04/16 01:10:21 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -292,7 +292,7 @@ static void _intersects(Request& r, Meth result=GET_SELF(r, VHash).hash().first_that(intersects, b)!=0; // return result - r.write_no_lang(*new VBool(result)); + r.write_no_lang(VBool::get(result)); } @@ -324,13 +324,8 @@ static void _sql(Request& r, MethodParam bind=vbind->get_hash(); } if(Value* vlimit=options->get(sql_limit_name)) { - if(vlimit->is_defined()){ - valid_options++; - limit=(ulong)r.process_to_value(*vlimit).as_double(); - } else - throw Exception(PARSER_RUNTIME, - 0, - "limit must be defined"); + valid_options++; + limit=(ulong)r.process_to_value(*vlimit).as_double(); } if(Value* voffset=options->get(sql_offset_name)) { valid_options++; @@ -416,9 +411,8 @@ static void _delete(Request& r, MethodPa } static void _contains(Request& r, MethodParams& params) { - - bool result = GET_SELF(r, VHash).hash().contains(params.as_string(0, "key must be string")); - r.write_no_lang(*new VBool(result)); + bool result=GET_SELF(r, VHash).hash().contains(params.as_string(0, "key must be string")); + r.write_no_lang(VBool::get(result)); } #ifndef DOXYGEN