--- parser3/src/include/pa_string.h 2002/08/08 08:43:38 1.142 +++ parser3/src/include/pa_string.h 2003/03/17 14:48:05 1.144.4.1 @@ -1,14 +1,14 @@ /** @file Parser: string class decl. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_STRING_H #define PA_STRING_H -static const char* IDENT_STRING_H="$Date: 2002/08/08 08:43:38 $"; +static const char* IDENT_STRING_H="$Date: 2003/03/17 14:48:05 $"; #include "pa_pool.h" #include "pa_types.h" @@ -67,7 +67,6 @@ class Dictionary; - whether they are tainted or not, and the language which should be used to detaint them */ -#include "pa_pragma_pack_begin.h" class String : public Pooled { public: @@ -116,7 +115,7 @@ public: SQL_Connection *connection=0, Charset *cstr_charset=0, const char *cstr_charset_name=0) const { - char *result=(char *)malloc(cstr_bufsize(lang, connection, cstr_charset)); + char *result=(char *)malloc_atomic(cstr_bufsize(lang, connection, cstr_charset)); char *eol=store_to(result, lang, connection, cstr_charset, cstr_charset_name); *eol=0; return result; @@ -180,7 +179,7 @@ public: /// extracts first char of a string, if any char first_char() const { - return is_empty()?*head.chunk.rows[0].item.ptr:0; + return is_empty()?0:*head.chunk.rows[0].item.ptr; } /// extracts [start, finish) piece of string @@ -306,7 +305,6 @@ private: //disabled String& operator = (const String&) { return *this; } }; -#include "pa_pragma_pack_end.h" #define STRING_PREPARED_FOREACH_ROW(self, body) \ while(row!=(self).append_here) { \