Permalink
Browse files

Firebird backend compilation fix: don't use x_cstring.

This string type has been removed from SOCI a long time ago, simply remove its
occurrences from the Firebird backend code.

Signed-off-by: Vadim Zeitlin <vz-soci@zeitlins.org>
  • Loading branch information...
vadz committed May 23, 2012
1 parent cbeda1d commit 29873bc76405fc76b19e6674582580bb3cc3bbdb
Showing with 0 additions and 30 deletions.
  1. +0 −15 src/backends/firebird/standard-into-type.cpp
  2. +0 −15 src/backends/firebird/standard-use-type.cpp
@@ -98,21 +98,6 @@ void firebird_standard_into_type_backend::exchangeData()
break;
// cases that require adjustments and buffer management
case x_cstring:
{
details::cstring_descriptor *tmp =
static_cast<details::cstring_descriptor*>(data_);
std::string stmp = getTextParam(var);
std::strncpy(tmp->str_, stmp.c_str(), tmp->bufSize_ - 1);
tmp->str_[tmp->bufSize_ - 1] = '\0';
if (stmp.size() >= tmp->bufSize_)
{
statement_.inds_[position_][0] = i_truncated;
}
}
break;
case x_stdstring:
*(reinterpret_cast<std::string*>(data_)) = getTextParam(var);
break;
@@ -118,21 +118,6 @@ void firebird_standard_use_type_backend::exchangeData()
to_isc<double>(data_, var);
break;
// cases that require adjustments and buffer management
case x_cstring:
{
details::cstring_descriptor *tmp
= static_cast<cstring_descriptor*>(data_);
// remove trailing nulls
while (tmp->str_[tmp->bufSize_-1] == '\0')
{
--tmp->bufSize_;
}
setTextParam(tmp->str_, tmp->bufSize_, buf_, var);
}
break;
case x_stdstring:
{
std::string *tmp = static_cast<std::string*>(data_);

0 comments on commit 29873bc

Please sign in to comment.