1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Pass any string in python function

This commit is contained in:
James Booth 2013-07-25 01:13:41 +01:00
parent 5583dd29b3
commit 4f42bb570d

View File

@ -29,7 +29,11 @@
static PyObject*
api_cons_show(PyObject *self, PyObject *args)
{
cons_show("Printed to console!");
const char *message = NULL;
if (!PyArg_ParseTuple(args, "s", &message)) {
return NULL;
}
cons_show("%s", message);
return NULL;
}