[Python-3000-checkins] r56780 - python/branches/py3k-struni/Modules/atexitmodule.c
skip.montanaro
python-3000-checkins at python.org
Mon Aug 6 22:59:29 CEST 2007
Author: skip.montanaro
Date: Mon Aug 6 22:59:28 2007
New Revision: 56780
Modified:
python/branches/py3k-struni/Modules/atexitmodule.c
Log:
missing docstrings
Modified: python/branches/py3k-struni/Modules/atexitmodule.c
==============================================================================
--- python/branches/py3k-struni/Modules/atexitmodule.c (original)
+++ python/branches/py3k-struni/Modules/atexitmodule.c Mon Aug 6 22:59:28 2007
@@ -145,6 +145,11 @@
return func;
}
+PyDoc_STRVAR(atexit_run_exitfuncs__doc__,
+"_run_exitfuncs() -> None\n\
+\n\
+Run all registered exit functions.");
+
static PyObject *
atexit_run_exitfuncs(PyObject *self)
{
@@ -154,6 +159,11 @@
Py_RETURN_NONE;
}
+PyDoc_STRVAR(atexit_clear__doc__,
+"_clear() -> None\n\
+\n\
+Clear the list of previously registered exit functions.");
+
static PyObject *
atexit_clear(PyObject *self)
{
@@ -172,6 +182,14 @@
Py_RETURN_NONE;
}
+PyDoc_STRVAR(atexit_unregister__doc__,
+"unregister(func) -> None\n\
+\n\
+Unregister a exit function which was previously registered using\n\
+atexit.register\n\
+\n\
+ func - function to be unregistered");
+
static PyObject *
atexit_unregister(PyObject *self, PyObject *func)
{
@@ -197,11 +215,11 @@
{"register", (PyCFunction) atexit_register, METH_VARARGS|METH_KEYWORDS,
atexit_register__doc__},
{"_clear", (PyCFunction) atexit_clear, METH_NOARGS,
- NULL},
+ atexit_clear__doc__},
{"unregister", (PyCFunction) atexit_unregister, METH_O,
- NULL},
+ atexit_unregister__doc__},
{"_run_exitfuncs", (PyCFunction) atexit_run_exitfuncs, METH_NOARGS,
- NULL},
+ atexit_run_exitfuncs__doc__},
{NULL, NULL} /* sentinel */
};
@@ -209,10 +227,10 @@
/* Initialization function. */
PyDoc_STRVAR(atexit__doc__,
-"atexit.py - allow programmer to define multiple exit functions to be executed\
+"allow programmer to define multiple exit functions to be executed\
upon normal program termination.\n\
\n\
-One public function, register, is defined.\n\
+Two public functions, register and unregister, are defined.\n\
");
PyMODINIT_FUNC
More information about the Python-3000-checkins
mailing list