--- parser3/src/main/pa_request.C 2024/11/10 12:57:17 1.431 +++ parser3/src/main/pa_request.C 2025/05/26 01:56:54 1.435 @@ -35,7 +35,7 @@ #include "pa_vdate.h" #include "pa_varray.h" -volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.431 2024/11/10 12:57:17 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; +volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.435 2025/05/26 01:56:54 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; // consts @@ -70,10 +70,10 @@ const String auto_method_name(AUTO_METHO static const String use_method_name(USE_METHOD_NAME); static const String autouse_method_name(AUTOUSE_METHOD_NAME); -const String exception_type_part_name(EXCEPTION_TYPE_PART_NAME); -const String exception_source_part_name(EXCEPTION_SOURCE_PART_NAME); -const String exception_comment_part_name(EXCEPTION_COMMENT_PART_NAME); -const String exception_handled_part_name(EXCEPTION_HANDLED_PART_NAME); +const String::Body exception_type_part_name(EXCEPTION_TYPE_PART_NAME); +const String::Body exception_source_part_name(EXCEPTION_SOURCE_PART_NAME); +const String::Body exception_comment_part_name(EXCEPTION_COMMENT_PART_NAME); +const String::Body exception_handled_part_name(EXCEPTION_HANDLED_PART_NAME); static const String origin_key(ORIGIN_KEY); @@ -175,8 +175,8 @@ Request::Request(SAPI_Info& asapi_info, pa_register_thread_request(*this); // file_no=0 => unknown - file_list+="UNKNOWN"; - file_list+="-body of process-"; // pseudo_file_no__process + file_list+=String::Body("UNKNOWN"); + file_list+=String::Body("-body of process-"); // pseudo_file_no__process // maybe expire old caches cache_managers->maybe_expire(); @@ -251,7 +251,7 @@ VStateless_class& Request::get_class_ref bool Request::add_class(const char* atype, VStateless_class *aclass){ if(!allow_class_replace){ - if(!classes().put_dont_replace(atype, aclass)) + if(!classes().put_dont_replace(String::Body(atype), aclass)) return true; if(strcmp(atype, VARRAY_TYPE)) return false; @@ -699,7 +699,7 @@ void Request::use_buf(VStateless_class& ArrayClass& cclasses=compile(&aclass, source, main_alias, file_no, line_no_offset); VString* vfilespec= - new VString(*new String(file_list[file_no], String::L_TAINTED)); + new VString(file_list[file_no]); for(size_t i=0; isapi_info); pa_lseek(f, info.offset, SEEK_SET); - const size_t BUFSIZE = 128*0x400; - char buf[BUFSIZE]; + char buf[FILE_BUFFER_SIZE]; do{ - size_t to_read = info.part_length < BUFSIZE ? (size_t)info.part_length : BUFSIZE; + size_t to_read = info.part_length < FILE_BUFFER_SIZE ? (size_t)info.part_length : FILE_BUFFER_SIZE; size_t to_write = file_block_read(f, buf, to_read); if(to_write == 0) @@ -1055,18 +1054,18 @@ Request::Exception_details Request::get_ // $.source if(problem_source) - hash.put(exception_source_part_name, new VString(*new String(*problem_source, String::L_TAINTED))); + hash.put(exception_source_part_name, new VString(*problem_source)); // $.file $.lineno $.colno if(origin.file_no){ - hash.put("file", new VString(*new String(file_list[origin.file_no], String::L_TAINTED))); - hash.put("lineno", new VInt(1+origin.line)); - hash.put("colno", new VInt(1+origin.col)); + HASH_PUT_CSTR(hash, "file", new VString(file_list[origin.file_no])); + HASH_PUT_CSTR(hash, "lineno", new VInt(1+origin.line)); + HASH_PUT_CSTR(hash, "colno", new VInt(1+origin.col)); } // $.comment if(const char* comment=e.comment(true)) - hash.put(exception_comment_part_name, new VString(*new String(comment, String::L_TAINTED))); + hash.put(exception_comment_part_name, new VString(comment)); // $.handled(0) hash.put(exception_handled_part_name, &VBool::get(false));