+/**
+ * Get the value of a Python unicode string object, returned as a newly
+ * allocated char *.
+ *
+ * @param[in] py_str The unicode string object.
+ * @param[out] outstr ptr to char * storage to be filled in.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * The 'outstr' argument points to a g_malloc()ed string upon success.
+ *
+ * @private
+ */
+SRD_PRIV int py_str_as_str(PyObject *py_str, char **outstr)
+{
+ PyObject *py_bytes;
+ char *str;