Commit c3bd7666 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix compilation issues with boost 1.54

parent e11f3535
......@@ -93,9 +93,9 @@ void community_network_eavg(GraphInterface& gi, GraphInterface& cgi,
for(int i = 0; i < boost::python::len(aeprops); ++i)
{
boost::any eprop = boost::python::extract<any>(aeprops[i][0]);
boost::any temp = boost::python::extract<any>(aeprops[i][1]);
boost::any ceprop = boost::python::extract<any>(aeprops[i][2]);
boost::any eprop = boost::python::extract<any>(aeprops[i][0])();
boost::any temp = boost::python::extract<any>(aeprops[i][1])();
boost::any ceprop = boost::python::extract<any>(aeprops[i][2])();
if (!no_weight)
{
......
......@@ -91,9 +91,9 @@ void community_network_vavg(GraphInterface& gi, GraphInterface& cgi,
for(int i = 0; i < boost::python::len(avprops); ++i)
{
boost::any vprop = boost::python::extract<any>(avprops[i][0]);
boost::any temp = boost::python::extract<any>(avprops[i][1]);
boost::any cvprop = boost::python::extract<any>(avprops[i][2]);
boost::any vprop = boost::python::extract<any>(avprops[i][0])();
boost::any temp = boost::python::extract<any>(avprops[i][1])();
boost::any cvprop = boost::python::extract<any>(avprops[i][2])();
if (!no_weight)
{
......
......@@ -1385,9 +1385,9 @@ void populate_attrs(boost::python::dict vattrs, attrs_t& attrs)
boost::python::list items = vattrs.items();
for (int i = 0; i < boost::python::len(items); ++i)
{
boost::any oattr = boost::python::extract<boost::any>(items[i][1]);
boost::any oattr = boost::python::extract<boost::any>(items[i][1])();
boost::any pmap;
int type = boost::python::extract<int>(items[i][0]);
int type = boost::python::extract<int>(items[i][0])();
boost::mpl::for_each<attr_types>(get_pmap<Descriptor,PropMaps>(oattr, pmap,
type));
attrs[type] = pmap;
......@@ -1419,7 +1419,7 @@ void populate_defaults(boost::python::dict odefaults, attrs_t& defaults)
{
boost::python::object odval = items[i][1];
boost::any dval;
int type = boost::python::extract<int>(items[i][0]);
int type = boost::python::extract<int>(items[i][0])();
boost::mpl::for_each<attr_types>(get_dval(odval, dval, type));
if (dval.empty())
throw ValueException("Invalid attribute type.");
......@@ -1697,10 +1697,10 @@ struct color_from_list
object o(x);
color_t c;
assert(len(o) >= 4);
get<0>(c) = extract<double>(o[0]);
get<1>(c) = extract<double>(o[1]);
get<2>(c) = extract<double>(o[2]);
get<3>(c) = extract<double>(o[3]);
get<0>(c) = extract<double>(o[0])();
get<1>(c) = extract<double>(o[1])();
get<2>(c) = extract<double>(o[2])();
get<3>(c) = extract<double>(o[3])();
void* storage =
( (boost::python::converter::rvalue_from_python_storage
<color_t >*) data)->storage.bytes;
......@@ -1738,10 +1738,10 @@ struct color_vector_from_list
for (int i = 0; i < len(o) / 4; ++i)
{
c.push_back(color_t());
get<0>(c[i]) = extract<double>(o[0 + 4 * i]);
get<1>(c[i]) = extract<double>(o[1 + 4 * i]);
get<2>(c[i]) = extract<double>(o[2 + 4 * i]);
get<3>(c[i]) = extract<double>(o[3 + 4 * i]);
get<0>(c[i]) = extract<double>(o[0 + 4 * i])();
get<1>(c[i]) = extract<double>(o[1 + 4 * i])();
get<2>(c[i]) = extract<double>(o[2 + 4 * i])();
get<3>(c[i]) = extract<double>(o[3 + 4 * i])();
}
void* storage =
......
......@@ -92,7 +92,7 @@ struct vector_from_list
vector<ValueType> value;
size_t N = len(o);
for (size_t i = 0; i < N; ++i)
value.push_back(extract<ValueType>(o[i]));
value.push_back(extract<ValueType>(o[i])());
void* storage =
( (boost::python::converter::rvalue_from_python_storage
<vector<ValueType> >*) data)->storage.bytes;
......@@ -213,8 +213,8 @@ struct pair_from_tuple
pair<T1,T2> value;
if (boost::python::len(o) < 2)
throw ValueException("Invalid conversion to pair... Sequence is too short.");
value.first = extract<T1>(o[0]);
value.second = extract<T2>(o[1]);
value.first = extract<T1>(o[0])();
value.second = extract<T2>(o[1])();
void* storage =
( (boost::python::converter::rvalue_from_python_storage
<pair<T1,T2> >*) data)->storage.bytes;
......@@ -248,7 +248,7 @@ struct variant_from_python
{
handle<> x(borrowed(obj_ptr));
object o(x);
ValueType value = extract<ValueType>(o);
ValueType value = extract<ValueType>(o)();
GraphInterface::deg_t deg = value;
void* storage =
( (boost::python::converter::rvalue_from_python_storage
......@@ -291,7 +291,7 @@ struct integer_from_convertible
{
handle<> x(borrowed(obj_ptr));
object o(x);
T value = extract<T>(o.attr("__int__")());
T value = extract<T>(o.attr("__int__")())();
void* storage =
( (boost::python::converter::rvalue_from_python_storage<T>*) data)->storage.bytes;
new (storage) T(value);
......@@ -320,7 +320,7 @@ struct float_from_convertible
{
handle<> x(borrowed(obj_ptr));
object o(x);
T value = extract<T>(o.attr("__float__")());
T value = extract<T>(o.attr("__float__")())();
void* storage =
( (boost::python::converter::rvalue_from_python_storage<T>*) data)->storage.bytes;
new (storage) T(value);
......
......@@ -336,7 +336,7 @@ GraphInterface::GraphInterface(const GraphInterface& gi, bool keep_ref,
std::ref(python::extract<boost::any&>(oeprops[i][1])())));
}
boost::any avorder = python::extract<boost::any>(vorder);
boost::any avorder = python::extract<boost::any>(vorder)();
run_action<>()
(const_cast<GraphInterface&>(gi),
std::bind(do_graph_copy(gi._mg->get_last_index()),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment