--- parser3/src/classes/string.C 2003/02/20 14:53:34 1.125.2.10 +++ parser3/src/classes/string.C 2003/03/05 11:57:36 1.125.2.13 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/02/20 14:53:34 $"; +static const char* IDENT_STRING_C="$Date: 2003/03/05 11:57:36 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -31,7 +31,7 @@ public: // Methoded // global variable -MethodedPtr string_class(new MString); +DECLARE_CLASS_VAR(string, new MString, 0); // defines for statics @@ -322,7 +322,7 @@ static void _match(Request& r, StringPtr ValuePtr result; // matched // not (just matched[3=pre/match/post], no substrings) or Global search - if(table->columns()->count()>3 || was_global) + if(was_global || (table && table->columns()->count()>3)) result=ValuePtr(new VTable(table/*TODO: clone this when table would be stacked!*/)); // table of pre/match/post+substrings else result=ValuePtr(new VBool(table)); @@ -458,7 +458,7 @@ StringPtr sql_result_string(Request& r, statement_string); if(!handlers.got_cell) - return 0; // no lines, caller should return second param[default value] + return StringPtr(0); // no lines, caller should return second param[default value] return handlers.result; } @@ -493,7 +493,8 @@ static void _replace(Request& r, StringP method_name, "parameter must be table"); - Dictionary dict2(TablePtr(table), 1/*am not sure why using the =default parameter causes compile errors in replace*/ ); + TablePtr tp(table); + Dictionary dict2(tp, 1/*am not sure why using the =default parameter causes compile errors in replace*/ ); r.write_assign_lang(*src->replace(pool, dict2)); }