| 898 | } |
| 899 | |
| 900 | const char* TFE_GetPythonString(PyObject* o) { |
| 901 | #if PY_MAJOR_VERSION >= 3 |
| 902 | if (PyBytes_Check(o)) { |
| 903 | return PyBytes_AsString(o); |
| 904 | } else { |
| 905 | return PyUnicode_AsUTF8(o); |
| 906 | } |
| 907 | #else |
| 908 | return PyBytes_AsString(o); |
| 909 | #endif |
| 910 | } |
| 911 | |
| 912 | int64_t get_uid() { |
| 913 | tensorflow::mutex_lock l(_uid_mutex); |
no outgoing calls
no test coverage detected