--- parser3/src/classes/void.C 2008/07/18 08:24:35 1.40 +++ parser3/src/classes/void.C 2009/04/16 01:10:22 1.42 @@ -1,11 +1,11 @@ /** @file Parser: @b VOID 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_VOID_C="$Date: 2008/07/18 08:24:35 $"; +static const char * const IDENT_VOID_C="$Date: 2009/04/16 01:10:22 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -69,8 +69,7 @@ static void _double(Request& r, MethodPa static void _bool(Request& r, MethodParams& params) { VVoid& vvoid=GET_SELF(r, VVoid); - r.write_no_lang(*new VBool( - params.count()==0?vvoid.as_bool():params.as_bool(0, "default must be bool", r))); + r.write_no_lang(VBool::get(params.count()==0?vvoid.as_bool():params.as_bool(0, "default must be bool", r))); } #ifndef DOXYGEN @@ -174,6 +173,7 @@ MVoid::MVoid(): Methoded("void") { add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0); // ^void.pos[substr] + // ^void.pos[substr](n) add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 2); // ^void.int[] @@ -188,7 +188,7 @@ MVoid::MVoid(): Methoded("void") { // ^void.bool(default) add_native_method("bool", Method::CT_DYNAMIC, _bool, 0, 1); - // ^sql[query] + // ^void:sql{query} add_native_method("sql", Method::CT_STATIC, _sql, 1, 2); // ^void.left() ^void.right()