diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-30 17:56:44 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-30 17:57:29 -0400 |
commit | 7ca80112fc817687481a40b65e4faa56a92c3ebe (patch) | |
tree | c371d1cb802795500dc9c174014b37c1058594ec /src/py_value.cc | |
parent | 5f2c766e0dc5405c9fa86c39a521bd48079d4b30 (diff) | |
download | fork-ledger-7ca80112fc817687481a40b65e4faa56a92c3ebe.tar.gz fork-ledger-7ca80112fc817687481a40b65e4faa56a92c3ebe.tar.bz2 fork-ledger-7ca80112fc817687481a40b65e4faa56a92c3ebe.zip |
Change the value_t::POINTER type to value_t::SCOPE
scope_t pointers are the only kind that are ever stored in value
objects, so there was no need to make it generic and use boost::any.
Diffstat (limited to 'src/py_value.cc')
-rw-r--r-- | src/py_value.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/py_value.cc b/src/py_value.cc index 8e579104..9aa4984e 100644 --- a/src/py_value.cc +++ b/src/py_value.cc @@ -45,8 +45,8 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(value_overloads, value, 0, 2) namespace { expr_t py_value_getattr(const value_t& value, const string& name) { - if (value.is_pointer()) { - if (scope_t * scope = value.as_pointer<scope_t>()) + if (value.is_scope()) { + if (scope_t * scope = value.as_scope()) return expr_t(scope->lookup(name), scope); } throw_(value_error, _("Cannot lookup attributes in %1") << value.label()); @@ -283,7 +283,7 @@ void export_value() .value("BALANCE", value_t::BALANCE) .value("STRING", value_t::STRING) .value("SEQUENCE", value_t::SEQUENCE) - .value("POINTER", value_t::POINTER) + .value("SCOPE", value_t::SCOPE) ; scope().attr("NULL_VALUE") = NULL_VALUE; |