static PyObject* python_api_get_room_nick(PyObject *self, PyObject *args) { PyObject *barejid = NULL; if (!PyArg_ParseTuple(args, "O", &barejid)) { Py_RETURN_NONE; } char *barejid_str = python_str_or_unicode_to_string(barejid); allow_python_threads(); char *nick = api_get_room_nick(barejid_str); free(barejid_str); disable_python_threads(); if (nick) { return Py_BuildValue("s", nick); } else { Py_RETURN_NONE; } }
static char* c_api_get_room_nick(const char *barejid) { return api_get_room_nick(barejid); }