diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-04-02 14:46:13 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-02 14:48:43 -0700 |
commit | 8f543ed7e3e2775aedb5c953f7f5cbff2139663a (patch) | |
tree | 06040261b7965ed031a6588eb1a0a15d4ea0e299 /tensorflow/python/lib | |
parent | 817882c28fd6f0dbbbf35b6ac0764ccbd38430d0 (diff) |
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId: 191350894
Diffstat (limited to 'tensorflow/python/lib')
-rw-r--r-- | tensorflow/python/lib/core/py_seq_tensor.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/python/lib/core/py_seq_tensor.cc b/tensorflow/python/lib/core/py_seq_tensor.cc index 8247d354db..32ea737a99 100644 --- a/tensorflow/python/lib/core/py_seq_tensor.cc +++ b/tensorflow/python/lib/core/py_seq_tensor.cc @@ -20,6 +20,7 @@ limitations under the License. #include "tensorflow/core/framework/types.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/core/stringpiece.h" +#include "tensorflow/core/lib/strings/str_util.h" #include "tensorflow/core/platform/types.h" #include "tensorflow/python/lib/core/numpy.h" #include "tensorflow/python/lib/core/py_util.h" @@ -77,9 +78,9 @@ string PyRepr(PyObject* obj) { bool IsPyDimension(PyObject* obj) { const char* tp_name = obj->ob_type->tp_name; if (strcmp(tp_name, "Dimension") != 0) return false; - bool ret = - StringPiece(PyRepr(PyType(obj))) - .ends_with("tensorflow.python.framework.tensor_shape.Dimension'>"); + bool ret = str_util::EndsWith( + PyRepr(PyType(obj)), + "tensorflow.python.framework.tensor_shape.Dimension'>"); return ret; } |