From f78d7591d27a1c5712a4a6e116e6de8d52e62a0d Mon Sep 17 00:00:00 2001
From: fengjiayi <fengjiayi@baidu.com>
Date: Wed, 27 Sep 2017 20:15:59 -0700
Subject: [PATCH] Fix compile bug

---
 paddle/framework/var_desc.cc | 4 ++--
 paddle/framework/var_desc.h  | 2 +-
 paddle/pybind/protobuf.cc    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/paddle/framework/var_desc.cc b/paddle/framework/var_desc.cc
index 1ccb81879ad..13b9c5f3cdf 100644
--- a/paddle/framework/var_desc.cc
+++ b/paddle/framework/var_desc.cc
@@ -21,7 +21,7 @@ void VarDescBind::SetShape(const std::vector<int64_t> &dims) {
   VectorToRepeated(dims, desc_.mutable_lod_tensor()->mutable_dims());
 }
 
-void VarDescBind::SetDataType(enum DataType data_type) {
+void VarDescBind::SetDataType(DataType data_type) {
   desc_.mutable_lod_tensor()->set_data_type(data_type);
 }
 
@@ -29,7 +29,7 @@ std::vector<int64_t> VarDescBind::Shape() const {
   return RepeatedToVector(desc_.lod_tensor().dims());
 }
 
-DataType VarDescBind::DataType() const {
+DataType VarDescBind::GetDataType() const {
   return desc_.lod_tensor().data_type();
 }
 }  // namespace framework
diff --git a/paddle/framework/var_desc.h b/paddle/framework/var_desc.h
index 6384da90967..4763bf09d00 100644
--- a/paddle/framework/var_desc.h
+++ b/paddle/framework/var_desc.h
@@ -64,7 +64,7 @@ class VarDescBind {
 
   std::vector<int64_t> Shape() const;
 
-  DataType DataType() const;
+  DataType GetDataType() const;
 
  private:
   VarDesc desc_;
diff --git a/paddle/pybind/protobuf.cc b/paddle/pybind/protobuf.cc
index 19ea26897f5..218821b35bb 100644
--- a/paddle/pybind/protobuf.cc
+++ b/paddle/pybind/protobuf.cc
@@ -167,7 +167,7 @@ void BindVarDsec(py::module &m) {
       .def("set_shape", &VarDescBind::SetShape)
       .def("set_data_type", &VarDescBind::SetDataType)
       .def("shape", &VarDescBind::Shape, py::return_value_policy::reference)
-      .def("data_type", &VarDescBind::DataType);
+      .def("data_type", &VarDescBind::GetDataType);
 }
 
 void BindOpDesc(py::module &m) {
-- 
GitLab