summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Crews <tim@code-affinity.com>2013-06-16 12:39:30 -0700
committerTim Crews <tim@code-affinity.com>2013-06-16 12:39:30 -0700
commit4bcaa45f1663ca4ce3399ae412642624050c5060 (patch)
tree9bec008355d592494bd9bf4274e56b48f76cc68a
parent0c071d6e1c52006e1a582ccb1ba5b2c31e6bc1d8 (diff)
downloadfork-ledger-4bcaa45f1663ca4ce3399ae412642624050c5060.tar.gz
fork-ledger-4bcaa45f1663ca4ce3399ae412642624050c5060.tar.bz2
fork-ledger-4bcaa45f1663ca4ce3399ae412642624050c5060.zip
Additional changes required for MSVC to compile ledger.
These changes only matter if ledger is compiled with USE_PYTHON.
-rw-r--r--src/history.h4
-rw-r--r--src/py_commodity.cc12
-rw-r--r--src/pyinterp.cc2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/history.h b/src/history.h
index baefb333..fa69d8da 100644
--- a/src/history.h
+++ b/src/history.h
@@ -76,12 +76,12 @@ public:
const datetime_t& _oldest = datetime_t(),
bool bidirectionally = false);
- optional<price_point_t>
+ boost::optional<price_point_t>
find_price(const commodity_t& source,
const datetime_t& moment,
const datetime_t& oldest = datetime_t());
- optional<price_point_t>
+ boost::optional<price_point_t>
find_price(const commodity_t& source,
const commodity_t& target,
const datetime_t& moment,
diff --git a/src/py_commodity.cc b/src/py_commodity.cc
index 44a45e33..fd932fc7 100644
--- a/src/py_commodity.cc
+++ b/src/py_commodity.cc
@@ -151,13 +151,13 @@ namespace {
py_pool_commodities_keys_begin(commodity_pool_t& pool) {
return make_transform_iterator
(pool.commodities.begin(),
- bind(&commodity_pool_t::commodities_map::value_type::first, _1));
+ boost::bind(&commodity_pool_t::commodities_map::value_type::first, _1));
}
commodities_map_firsts_iterator
py_pool_commodities_keys_end(commodity_pool_t& pool) {
return make_transform_iterator
(pool.commodities.end(),
- bind(&commodity_pool_t::commodities_map::value_type::first, _1));
+ boost::bind(&commodity_pool_t::commodities_map::value_type::first, _1));
}
typedef transform_iterator
@@ -169,15 +169,15 @@ namespace {
py_pool_commodities_values_begin(commodity_pool_t& pool) {
return make_transform_iterator
(pool.commodities.begin(),
- bind(&shared_ptr<commodity_t>::get,
- bind(&commodity_pool_t::commodities_map::value_type::second, _1)));
+ boost::bind(&shared_ptr<commodity_t>::get,
+ boost::bind(&commodity_pool_t::commodities_map::value_type::second, _1)));
}
commodities_map_seconds_iterator
py_pool_commodities_values_end(commodity_pool_t& pool) {
return make_transform_iterator
(pool.commodities.end(),
- bind(&shared_ptr<commodity_t>::get,
- bind(&commodity_pool_t::commodities_map::value_type::second, _1)));
+ boost::bind(&shared_ptr<commodity_t>::get,
+ boost::bind(&commodity_pool_t::commodities_map::value_type::second, _1)));
}
void py_add_price_2(commodity_t& commodity,
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index 3354d3e9..e15ff503 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -320,7 +320,7 @@ value_t python_interpreter_t::python_command(call_scope_t& args)
if (! is_initialized)
initialize();
- char ** argv(new char *[args.size() + 1]);
+ char ** argv = new char *[args.size() + 1];
argv[0] = new char[std::strlen(argv0) + 1];
std::strcpy(argv[0], argv0);