summaryrefslogtreecommitdiffstats
path: root/objects/rawlog-object.c
diff options
context:
space:
mode:
authorChristopher Davis <loafier@gmail.com>2006-08-10 02:10:22 +0000
committerChristopher Davis <loafier@gmail.com>2006-08-10 02:10:22 +0000
commitb1b54c58af7cd9419631d7b82b860a7b19097836 (patch)
treebd0a8c8cd93ad473a3d835de14b2481d3c5a5c83 /objects/rawlog-object.c
parentc0ac6d60c5319a08148d743fd03ba3f66b22dfe0 (diff)
downloadirssi-python-b1b54c58af7cd9419631d7b82b860a7b19097836.tar.gz
irssi-python-b1b54c58af7cd9419631d7b82b860a7b19097836.tar.xz
irssi-python-b1b54c58af7cd9419631d7b82b860a7b19097836.zip
added function headers to documentation of module and all objects.
added MainWindow object git-svn-id: http://svn.irssi.org/repos/irssi-python@4310 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'objects/rawlog-object.c')
-rw-r--r--objects/rawlog-object.c45
1 files changed, 31 insertions, 14 deletions
diff --git a/objects/rawlog-object.c b/objects/rawlog-object.c
index eed5996..340d60a 100644
--- a/objects/rawlog-object.c
+++ b/objects/rawlog-object.c
@@ -58,7 +58,9 @@ static PyGetSetDef PyRawlog_getseters[] = {
/* Methods */
PyDoc_STRVAR(PyRawlog_get_lines_doc,
- "Return a list of lines for rawlog."
+ "get_lines() -> list of str\n"
+ "\n"
+ "Return a list of lines for rawlog.\n"
);
static PyObject *PyRawlog_get_lines(PyRawlog *self, PyObject *args)
{
@@ -77,23 +79,27 @@ static PyObject *PyRawlog_get_lines(PyRawlog *self, PyObject *args)
PyObject *line = PyString_FromString(node->data);
if (!line)
- goto error;
+ {
+ Py_XDECREF(lines);
+ return NULL;
+ }
ret = PyList_Append(lines, line);
Py_DECREF(line);
if (ret != 0)
- goto error;
+ {
+ Py_XDECREF(lines);
+ return NULL;
+ }
}
return lines;
-
-error:
- Py_XDECREF(lines);
- return NULL;
}
PyDoc_STRVAR(PyRawlog_destroy_doc,
- "Destroy rawlog"
+ "destroy() -> None\n"
+ "\n"
+ "Destroy rawlog\n"
);
static PyObject *PyRawlog_destroy(PyRawlog *self, PyObject *args)
{
@@ -108,7 +114,9 @@ static PyObject *PyRawlog_destroy(PyRawlog *self, PyObject *args)
}
PyDoc_STRVAR(PyRawlog_input_doc,
- "Send str to rawlog as input text."
+ "input(str) -> None\n"
+ "\n"
+ "Send str to rawlog as input text.\n"
);
static PyObject *PyRawlog_input(PyRawlog *self, PyObject *args, PyObject *kwds)
{
@@ -127,7 +135,9 @@ static PyObject *PyRawlog_input(PyRawlog *self, PyObject *args, PyObject *kwds)
}
PyDoc_STRVAR(PyRawlog_output_doc,
- "Send str to rawlog as output text."
+ "output(str) -> None\n"
+ "\n"
+ "Send str to rawlog as output text.\n"
);
static PyObject *PyRawlog_output(PyRawlog *self, PyObject *args, PyObject *kwds)
{
@@ -146,6 +156,8 @@ static PyObject *PyRawlog_output(PyRawlog *self, PyObject *args, PyObject *kwds)
}
PyDoc_STRVAR(PyRawlog_redirect_doc,
+ "redirect(str) -> None\n"
+ "\n"
"Send str to rawlog as redirection text."
);
static PyObject *PyRawlog_redirect(PyRawlog *self, PyObject *args, PyObject *kwds)
@@ -165,7 +177,9 @@ static PyObject *PyRawlog_redirect(PyRawlog *self, PyObject *args, PyObject *kwd
}
PyDoc_STRVAR(PyRawlog_open_doc,
- "Start logging new messages in rawlog to specified file."
+ "open(fname) -> None\n"
+ "\n"
+ "Start logging new messages in rawlog to specified file.\n"
);
static PyObject *PyRawlog_open(PyRawlog *self, PyObject *args, PyObject *kwds)
{
@@ -184,7 +198,9 @@ static PyObject *PyRawlog_open(PyRawlog *self, PyObject *args, PyObject *kwds)
}
PyDoc_STRVAR(PyRawlog_close_doc,
- "Stop logging to file"
+ "close() -> None\n"
+ "\n"
+ "Stop logging to file\n"
);
static PyObject *PyRawlog_close(PyRawlog *self, PyObject *args)
{
@@ -196,7 +212,9 @@ static PyObject *PyRawlog_close(PyRawlog *self, PyObject *args)
}
PyDoc_STRVAR(PyRawlog_save_doc,
- "Save the current rawlog history to specified file."
+ "save(fname) -> None\n"
+ "\n"
+ "Save the current rawlog history to specified file.\n"
);
static PyObject *PyRawlog_save(PyRawlog *self, PyObject *args, PyObject *kwds)
{
@@ -213,7 +231,6 @@ static PyObject *PyRawlog_save(PyRawlog *self, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
}
-
/* Methods for object */
static PyMethodDef PyRawlog_methods[] = {
{"get_lines", (PyCFunction)PyRawlog_get_lines, METH_NOARGS,