提交 af4e6fc7 编写于 作者: D Derek Murray 提交者: TensorFlower Gardener

Fix //tensorflow/python:server_lib_test in Python 3.

Adds a typemap for the `const char* target` argument to
`TF_SetTarget()` that accepts any object that may be converted to a
null-terminated string.
Change: 117241091
上级 460ef5f4
......@@ -61,6 +61,16 @@ tensorflow::ImportNumpy();
$2 = static_cast<size_t>(py_size);
}
// The target input to TF_SetTarget() is passed as a null-terminated
// const char*.
%typemap(in) (const char* target) {
$1 = PyBytes_AsString($input);
if (!$1) {
// Python has raised an error.
SWIG_fail;
}
}
////////////////////////////////////////////////////////////////////////////////
// BEGIN TYPEMAPS FOR tensorflow::TF_Run_wrapper()
////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册