--- parser3/src/classes/regex.C 2009/04/22 04:36:17 1.1 +++ parser3/src/classes/regex.C 2009/07/15 12:59:19 1.4 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_REGEX_C="$Date: 2009/04/22 04:36:17 $"; +static const char * const IDENT_REGEX_C="$Date: 2009/07/15 12:59:19 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -17,8 +17,8 @@ static const char * const IDENT_REGEX_C= // class class MRegex: public Methoded { -public: // VStateless_class - Value* create_new_value(Pool&, HashStringValue&) { return new VRegex(); } +public: // VStateless_class + Value* create_new_value(Pool&, HashStringValue*) { return new VRegex(); } public: MRegex(); public: // Methoded @@ -32,13 +32,13 @@ DECLARE_CLASS_VAR(regex, new MRegex, 0); // methods static void _create(Request& r, MethodParams& params) { - Value& value=params.as_no_junction(0, "regexp must not be code"); + const String& pattern=params.as_string(0, "regexp must not be code"); VRegex& vregex=GET_SELF(r, VRegex); vregex.set(r.charsets.source(), - &value.as_string(), - params.count()>1?¶ms.as_no_junction(1, "options must not be code").as_string():0); + &pattern, + params.count()>1?¶ms.as_string(1, OPTIONS_MUST_NOT_BE_CODE):0); vregex.compile(); @@ -69,3 +69,4 @@ MRegex::MRegex(): Methoded("regex") { add_native_method("study_size", Method::CT_DYNAMIC, _study_size, 0, 0); } +