--- parser3/src/classes/op.C 2003/11/20 15:35:29 1.138 +++ parser3/src/classes/op.C 2004/02/11 15:33:12 1.145 @@ -1,11 +1,11 @@ /** @file Parser: parser @b operators. - Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_OP_C="$Date: 2003/11/20 15:35:29 $"; +static const char * const IDENT_OP_C="$Date: 2004/02/11 15:33:12 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -18,6 +18,7 @@ static const char* IDENT_OP_C="$Date: 20 #include "pa_vdate.h" #include "pa_vmethod_frame.h" #include "pa_vclass.h" +#include "pa_charset.h" // limits @@ -83,7 +84,6 @@ static void _if(Request& r, MethodParams Value& condition_code=params.as_junction(0, "condition must be expression"); bool condition=r.process_to_value(condition_code, - /*0/*no name* /,*/ false/*don't intercept string*/).as_bool(); if(condition) r.write_pass_lang(r.process(params.as_junction(1, "'then' parameter must be code"))); @@ -210,7 +210,6 @@ static void _while(Request& r, MethodPar "endless loop detected"); bool condition=r.process_to_value(vcondition, - /*0/*no name* /,*/ false/*don't intercept string*/).as_bool(); if(!condition) // ...condition is true break; @@ -258,7 +257,6 @@ static void _eval(Request& r, MethodPara Value& expr=params.as_junction(0, "need expression"); // evaluate expresion Value& value_result=r.process_to_value(expr, - /*0/*no name YET* /,*/ true/*don't intercept string*/).as_expr_result(); if(params.count()>1) { Value& fmt=params.as_no_junction(1, "fmt must not be code"); @@ -286,8 +284,9 @@ struct timeval mt[2]; gettimeofday(&mt[0],NULL); #endif // connect - SQL_Connection* connection=SQL_driver_manager.get_connection(url.as_string(), - protocol2driver_and_client); + SQL_Connection* connection=SQL_driver_manager->get_connection(url.as_string(), + protocol2driver_and_client, + r.charsets.source().NAME().cstr()); #ifdef RESOURCES_DEBUG //measure:after connect @@ -526,7 +525,7 @@ const String* locked_process_and_cache_p Cache_scope& scope, const String& file_spec) { - Locked_process_and_cache_put_action_info info={&r, &scope, &body_code, catch_code}; + Locked_process_and_cache_put_action_info info={&r, &scope, &body_code, catch_code, 0}; const String* result=file_write_action_under_lock( file_spec, @@ -547,7 +546,7 @@ struct Cache_get_result { }; #endif static Cache_get_result cache_get(Request_charsets& charsets, const String& file_spec, time_t now) { - Cache_get_result result={0}; + Cache_get_result result={0, false}; File_read_result file=file_read(charsets, file_spec, false/*as_text*/, @@ -612,7 +611,7 @@ static void _cache(Request& r, MethodPar // file_spec, expires, body code const String& file_spec=r.absolute(params.as_string(0, "filespec must be string")); - Cache_scope scope={as_expires(r, params, 1, now)}; + Cache_scope scope={as_expires(r, params, 1, now), 0}; Temp_hash_value cache_scope_setter(r.classes_conf, cache_data_name, &scope);