aboutsummaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-12-03 11:54:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-12-03 11:54:30 +0200
commit52a7a6bcdc93d9776a4f56ac79185b9bc284db88 (patch)
tree81ecb3a60484725064d410eaf952f3a47b86056d /odb/context.cxx
parent77d6727eddc64a95ccbdf87984e22270fce61b35 (diff)
Make --export-symbol and --extern-symbole values database-prefixable
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index 6ee8ad1..f5ff975 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -443,6 +443,7 @@ context (ostream& os_,
features (f),
db (options.database ()[0]),
exp (data_->exp_),
+ ext (data_->ext_),
keyword_set (data_->keyword_set_),
include_regex (data_->include_regex_),
accessor_regex (data_->accessor_regex_),
@@ -463,8 +464,10 @@ context (ostream& os_,
// Export control.
//
- if (!ops.export_symbol ().empty ())
- exp = ops.export_symbol () + " ";
+ if (!ops.export_symbol ()[db].empty ())
+ exp = ops.export_symbol ()[db] + " ";
+
+ ext = ops.extern_symbol ()[db];
for (size_t i (0); i < sizeof (keywords) / sizeof (char*); ++i)
data_->keyword_set_.insert (keywords[i]);
@@ -504,6 +507,7 @@ context ()
features (current ().features),
db (current ().db),
exp (current ().exp),
+ ext (current ().ext),
keyword_set (current ().keyword_set),
include_regex (current ().include_regex),
accessor_regex (current ().accessor_regex),
@@ -1882,8 +1886,6 @@ strlit (string const& str)
void context::
inst_header (bool decl)
{
- string const& ext (options.extern_symbol ());
-
if (decl && !ext.empty ())
os << ext << " ";
@@ -1900,7 +1902,7 @@ inst_header (bool decl)
if (!decl && !ext.empty ())
os << endl
<< "#ifndef " << ext << endl
- << options.export_symbol () << endl
+ << options.export_symbol ()[db] << endl
<< "#endif" << endl;
else
os << " " << exp;