Index: trunk/ext/_syckmodule.c
===================================================================
--- trunk/ext/_syckmodule.c	(revision 20)
+++ trunk/ext/_syckmodule.c	(revision 25)
@@ -43,5 +43,5 @@
 PyDoc_STRVAR(PySyckNode_doc,
     "_syck.Node() -> TypeError\n\n"
-    "_syck.Node is an abstract type. It is a base type for _syck.Scalar,\n"
+    "_syck.Node is an abstract type. It is the base type for _syck.Scalar,\n"
     "_syck.Seq, and _syck.Map. You cannot create an instance of _syck.Node\n"
     "directly. You may use _syck.Node for type checking or subclassing.\n");
@@ -220,5 +220,5 @@
     "      -> a Scalar node\n\n"
     "_syck.Scalar represents a scalar node in Syck parser and emitter\n"
-    "graphs. A scalar node points to a single string value.\n");
+    "trees. A scalar node points to a single string value.\n");
 
 typedef struct {
@@ -549,5 +549,5 @@
     "Seq(value=[], tag=None, inline=False) -> a Seq node\n\n"
     "_syck.Seq represents a sequence node in Syck parser and emitter\n"
-    "graphs. A sequence node points to an ordered set of subnodes.\n");
+    "trees. A sequence node points to an ordered set of subnodes.\n");
 
 typedef struct {
@@ -718,7 +718,7 @@
 
 PyDoc_STRVAR(PySyckMap_doc,
-    "Map(value='', tag=None, inline=False) -> a Map node\n\n"
+    "Map(value={}, tag=None, inline=False) -> a Map node\n\n"
     "_syck.Map represents a mapping node in Syck parser and emitter\n"
-    "graphs. A mapping node points to an unordered collections of pairs.\n");
+    "trees. A mapping node points to an unordered collections of pairs.\n");
 
 typedef struct {
@@ -833,5 +833,5 @@
         PyDoc_STR("the node kind, always 'map', read-only"), &PySyck_MapKind},
     {"value", (getter)PySyckNode_getvalue, (setter)PySyckMap_setvalue,
-        PyDoc_STR("the node value, a mapping"), NULL},
+        PyDoc_STR("the node value, a list of pairs or a dictionary"), NULL},
     {"tag", (getter)PySyckNode_gettag, (setter)PySyckNode_settag,
         PyDoc_STR("the node tag, a string or None"), NULL},
@@ -893,5 +893,5 @@
     "      -> a Parser object\n\n"
     "_syck.Parser is a low-lever wrapper of the Syck parser. It parses\n"
-    "a YAML stream and produces a graph of Nodes.\n");
+    "a YAML stream and produces a tree of Nodes.\n");
 
 typedef struct {
@@ -1017,5 +1017,5 @@
 static PyGetSetDef PySyckParser_getsetters[] = {
     {"source", (getter)PySyckParser_getsource, NULL,
-        PyDoc_STR("IO source, a string or file-like object"), NULL},
+        PyDoc_STR("IO source, a string or a file-like object"), NULL},
     {"implicit_typing", (getter)PySyckParser_getimplicit_typing, NULL,
         PyDoc_STR("implicit typing of builtin YAML types"), NULL},
@@ -1253,5 +1253,6 @@
 
     if (self->parsing) {
-        PyErr_SetString(PyExc_RuntimeError, "do not call Parser.parse while it is already parsing");
+        PyErr_SetString(PyExc_RuntimeError,
+                "do not call Parser.parse while it is already running");
         return NULL;
     }
@@ -1292,6 +1293,7 @@
 PyDoc_STRVAR(PySyckParser_parse_doc,
     "parse() -> the root Node object\n\n"
-    "Parses the source and returns the next document. On EOF, returns None\n"
-    "and sets the 'eof' attribute on.\n");
+    "Parses the source and returns the root of the Node tree. Call it\n"
+    "several times to retrieve all documents from the source. On EOF,\n"
+    "returns None and sets the 'eof' attribute on.\n");
 
 static PyMethodDef PySyckParser_methods[] = {
@@ -1348,7 +1350,8 @@
 
 PyDoc_STRVAR(PySyckEmitter_doc,
-    "Emitter(output, headless=False, use_header=True, explicit_typing=True,"
-    "        style=None, best_width=80, indent=2) -> an Emitter object\n\n"
-    "_syck.Emitter is a low-lever wrapper of the Syck emitter. It emit\n"
+    "Emitter(output, headless=False, use_header=False, use_version=False,\n"
+    "        explicit_typing=True, style=None, best_width=80, indent=2)\n"
+    "                -> an Emitter object\n\n"
+    "_syck.Emitter is a low-lever wrapper of the Syck emitter. It emits\n"
     "a tree of Nodes into a YAML stream.\n");
 
@@ -1530,7 +1533,7 @@
         PyDoc_STR("headerless document flag"), NULL},
     {"use_header", (getter)PySyckEmitter_getuse_header, NULL,
-        PyDoc_STR("force header"), NULL},
+        PyDoc_STR("force header flag"), NULL},
     {"use_version", (getter)PySyckEmitter_getuse_version, NULL,
-        PyDoc_STR("force version"), NULL},
+        PyDoc_STR("force version flag"), NULL},
     {"explicit_typing", (getter)PySyckEmitter_getexplicit_typing, NULL,
         PyDoc_STR("explicit typing for all collections"), NULL},
@@ -1752,19 +1755,4 @@
     Py_INCREF(output);
     self->output = output;
-
-/*
-    self->emitter = syck_new_emitter();
-    self->emitter->bonus = self;
-    self->emitter->headless = self->headless;
-    self->emitter->use_header = use_header;
-    self->emitter->use_version = use_version;
-    self->emitter->explicit_typing = explicit_typing;
-    self->emitter->style = self->style;
-    self->emitter->best_width = self->best_width;
-    self->emitter->indent = self->indent;
-
-    syck_emitter_handler(self->emitter, PySyckEmitter_node_handler);
-    syck_output_handler(self->emitter, PySyckEmitter_write_handler);
-*/
 
     self->emitting = 0;
@@ -1974,5 +1962,5 @@
 PyDoc_STRVAR(PySyckEmitter_emit_doc,
     "emit(root_node) -> None\n\n"
-    "Emit the Node tree to the output.\n");
+    "Emits the Node tree to the output.\n");
 
 static PyMethodDef PySyckEmitter_methods[] = {
@@ -2033,5 +2021,43 @@
 
 PyDoc_STRVAR(PySyck_doc,
-    "low-level wrapper for the Syck YAML parser and emitter");
+    "_syck is a low-level wrapper for the Syck YAML parser and emitter.\n"
+    "Do not use it directly, use the module 'syck' instead.\n");
+
+static int
+add_slotnames(PyTypeObject *type)
+{
+    PyObject *slotnames;
+    PyObject *name;
+    PyGetSetDef *getsetter;
+
+    if (!type->tp_getset) return 0;
+    if (!type->tp_dict) return 0;
+
+    slotnames = PyList_New(0);
+    if (!slotnames) return -1;
+
+    for (getsetter = type->tp_getset; getsetter->name; getsetter++) {
+        if (!getsetter->set) continue;
+        name = PyString_FromString(getsetter->name);
+        if (!name) {
+           Py_DECREF(slotnames);
+           return -1;
+        }
+        if (PyList_Append(slotnames, name) < 0) {
+            Py_DECREF(name);
+            Py_DECREF(slotnames);
+            return -1;
+        }
+        Py_DECREF(name);
+    }
+
+    if (PyDict_SetItemString(type->tp_dict, "__slotnames__", slotnames) < 0) {
+        Py_DECREF(slotnames);
+        return -1;
+    }
+
+    Py_DECREF(slotnames);
+    return 0;
+}
 
 PyMODINIT_FUNC
@@ -2044,7 +2070,13 @@
     if (PyType_Ready(&PySyckScalar_Type) < 0)
         return;
+    if (add_slotnames(&PySyckScalar_Type) < 0)
+        return;
     if (PyType_Ready(&PySyckSeq_Type) < 0)
         return;
+    if (add_slotnames(&PySyckSeq_Type) < 0)
+        return;
     if (PyType_Ready(&PySyckMap_Type) < 0)
+        return;
+    if (add_slotnames(&PySyckMap_Type) < 0)
         return;
     if (PyType_Ready(&PySyckParser_Type) < 0)
