--- parser3/src/classes/table.C 2017/01/13 13:50:28 1.341 +++ parser3/src/classes/table.C 2017/12/03 23:36:23 1.345 @@ -1,7 +1,7 @@ /** @file Parser: @b table parser class. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -17,12 +17,12 @@ #include "pa_vbool.h" #include "pa_array.h" -#if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) +#if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4) && !defined(PA_DEBUG_DISABLE_GC)) #include #define USE_STRINGSTREAM #endif -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.341 2017/01/13 13:50:28 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.345 2017/12/03 23:36:23 moko Exp $"; // class @@ -1016,7 +1016,7 @@ static void _hash(Request& r, MethodPara } #ifndef DOXYGEN -struct Table_seq_item { +struct Table_seq_item : public PA_Allocated { ArrayString* row; union { const char *c_str; @@ -1048,7 +1048,7 @@ static void _sort(Request& r, MethodPara Table& old_table=GET_SELF(r, VTable).table(); Table& new_table=*new Table(old_table.columns()); - Table_seq_item* seq=new(PointerFreeGC) Table_seq_item[old_table.count()]; + Table_seq_item* seq=new Table_seq_item[old_table.count()]; int i; // calculate key values @@ -1299,7 +1299,7 @@ public: columns+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); return false; } catch(...) { - error=SQL_Error("exception occured in Table_sql_event_handlers::add_column"); + error=SQL_Error("exception occurred in Table_sql_event_handlers::add_column"); return true; } } @@ -1309,7 +1309,7 @@ public: columns_count=columns.count(); return false; } catch(...) { - error=SQL_Error("exception occured in Table_sql_event_handlers::before_rows"); + error=SQL_Error("exception occurred in Table_sql_event_handlers::before_rows"); return true; } } @@ -1318,7 +1318,7 @@ public: *table+=row=new ArrayString(columns_count); return false; } catch(...) { - error=SQL_Error("exception occured in Table_sql_event_handlers::add_row"); + error=SQL_Error("exception occurred in Table_sql_event_handlers::add_row"); return true; } } @@ -1327,7 +1327,7 @@ public: *row+=str?new String(str, String::L_TAINTED /* no length as 0x00 can be inside */):&String::Empty; return false; } catch(...) { - error=SQL_Error("exception occured in Table_sql_event_handlers::add_row_cell"); + error=SQL_Error("exception occurred in Table_sql_event_handlers::add_row_cell"); return true; } } @@ -1351,7 +1351,7 @@ static void marshal_bind( // not static, used elsewhere int marshal_binds(HashStringValue& hash, SQL_Driver::Placeholder*& placeholders) { int hash_count=hash.count(); - placeholders=new SQL_Driver::Placeholder[hash_count]; + placeholders=new(PointerGC) SQL_Driver::Placeholder[hash_count]; SQL_Driver::Placeholder* ptr=placeholders; hash.for_each(marshal_bind, &ptr); return hash_count;