tf2_py/src/tf2_py.cpp
inline std::string stringFromPython(PyObject * input)
{
  Py_ssize_t size;
  const char * data;
  data = PyUnicode_AsUTF8AndSize(input, &size);
  return std::string(data, size);
}
/// \brief Converts a Python string into a C++ string.
/// \note The input PyObject is borrowed, and will not be decref'd.
/// \note It's possible for this function to set an exception.
///   If the returned string is empty, callers should check if an exception was
///   set using PyErr_Ocurred().
/// \return a new std::string instance
\brief Converts a Python string into a C++ string.
\note The input PyObject is borrowed, and will not be decref'd.
\note It's possible for this function to set an exception.
If the returned string is empty, callers should check if an exception was
set using PyErr_Ocurred().
\return a new std::string instance
\ brief Converts a Python string into a C ++ string . \ note The input PyObject is borrowed and will not be decref ' d . \ note It ' s possible for this function to set an exception . If the returned string is empty callers should check if an exception was set using PyErr_Ocurred () . \ return a new std :: string instance
inline std::string stringFromPython(PyObject * input)
{
  Py_ssize_t size;
  const char * data;
  data = PyUnicode_AsUTF8AndSize(input, &size);
  return std::string(data, size);
}
inline std :: string stringFromPython ( PyObject * input ) { Py_ssize_t size ; const char * data ; data = PyUnicode_AsUTF8AndSize ( input , & size ) ; return std :: string ( data , size ) ; }
\brief Converts a Python string into a C++ string.
\ brief Converts a Python string into a C ++ string .