diff --git a/traffic/pytraffic/bindings.cpp b/traffic/pytraffic/bindings.cpp index bc5b55e2c6..6e8cbb037e 100644 --- a/traffic/pytraffic/bindings.cpp +++ b/traffic/pytraffic/bindings.cpp @@ -103,7 +103,8 @@ boost::python::list GenerateTrafficKeys(string const & mwmPath) } vector GenerateTrafficValues(vector const & keys, - boost::python::dict const & segmentMappingDict) + boost::python::dict const & segmentMappingDict, + uint8_t useTempBlock) { SegmentMapping segmentMapping; boost::python::list mappingKeys = segmentMappingDict.keys(); @@ -125,6 +126,9 @@ vector GenerateTrafficValues(vector GenerateTrafficValuesFromList(boost::python::list const & keys, vector keysVec = python_list_to_std_vector(keys); - return GenerateTrafficValues(keysVec, segmentMappingDict); + return GenerateTrafficValues(keysVec, segmentMappingDict, true /* useTempBlock */); +} + +vector GenerateTrafficValuesFromBinaryV2(vector const & keysBlob, + boost::python::dict const & segmentMappingDict, + uint8_t useTempBlock) +{ + vector keys; + traffic::TrafficInfo::DeserializeTrafficKeys(keysBlob, keys); + + return GenerateTrafficValues(keys, segmentMappingDict, useTempBlock); } vector GenerateTrafficValuesFromBinary(vector const & keysBlob, boost::python::dict const & segmentMappingDict) { - vector keys; - traffic::TrafficInfo::DeserializeTrafficKeys(keysBlob, keys); - - return GenerateTrafficValues(keys, segmentMappingDict); + return GenerateTrafficValuesFromBinaryV2(keysBlob, segmentMappingDict, true /* useTempBlock */); } void LoadClassificator(string const & classifPath) @@ -201,4 +212,5 @@ BOOST_PYTHON_MODULE(pytraffic) def("generate_traffic_keys", GenerateTrafficKeys); def("generate_traffic_values_from_list", GenerateTrafficValuesFromList); def("generate_traffic_values_from_binary", GenerateTrafficValuesFromBinary); + def("generate_traffic_values_from_binary_v2", GenerateTrafficValuesFromBinaryV2); }