Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ae6a7622
Commit
ae6a7622
authored
Aug 06, 2007
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missing docstrings
parent
7d97a705
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
Modules/atexitmodule.c
Modules/atexitmodule.c
+23
-5
No files found.
Modules/atexitmodule.c
View file @
ae6a7622
...
@@ -145,6 +145,11 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
...
@@ -145,6 +145,11 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
return
func
;
return
func
;
}
}
PyDoc_STRVAR
(
atexit_run_exitfuncs__doc__
,
"_run_exitfuncs() -> None
\n
\
\n
\
Run all registered exit functions."
);
static
PyObject
*
static
PyObject
*
atexit_run_exitfuncs
(
PyObject
*
self
)
atexit_run_exitfuncs
(
PyObject
*
self
)
{
{
...
@@ -154,6 +159,11 @@ atexit_run_exitfuncs(PyObject *self)
...
@@ -154,6 +159,11 @@ atexit_run_exitfuncs(PyObject *self)
Py_RETURN_NONE
;
Py_RETURN_NONE
;
}
}
PyDoc_STRVAR
(
atexit_clear__doc__
,
"_clear() -> None
\n
\
\n
\
Clear the list of previously registered exit functions."
);
static
PyObject
*
static
PyObject
*
atexit_clear
(
PyObject
*
self
)
atexit_clear
(
PyObject
*
self
)
{
{
...
@@ -172,6 +182,14 @@ atexit_clear(PyObject *self)
...
@@ -172,6 +182,14 @@ atexit_clear(PyObject *self)
Py_RETURN_NONE
;
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
*
static
PyObject
*
atexit_unregister
(
PyObject
*
self
,
PyObject
*
func
)
atexit_unregister
(
PyObject
*
self
,
PyObject
*
func
)
{
{
...
@@ -197,11 +215,11 @@ static PyMethodDef atexit_methods[] = {
...
@@ -197,11 +215,11 @@ static PyMethodDef atexit_methods[] = {
{
"register"
,
(
PyCFunction
)
atexit_register
,
METH_VARARGS
|
METH_KEYWORDS
,
{
"register"
,
(
PyCFunction
)
atexit_register
,
METH_VARARGS
|
METH_KEYWORDS
,
atexit_register__doc__
},
atexit_register__doc__
},
{
"_clear"
,
(
PyCFunction
)
atexit_clear
,
METH_NOARGS
,
{
"_clear"
,
(
PyCFunction
)
atexit_clear
,
METH_NOARGS
,
NULL
},
atexit_clear__doc__
},
{
"unregister"
,
(
PyCFunction
)
atexit_unregister
,
METH_O
,
{
"unregister"
,
(
PyCFunction
)
atexit_unregister
,
METH_O
,
NULL
},
atexit_unregister__doc__
},
{
"_run_exitfuncs"
,
(
PyCFunction
)
atexit_run_exitfuncs
,
METH_NOARGS
,
{
"_run_exitfuncs"
,
(
PyCFunction
)
atexit_run_exitfuncs
,
METH_NOARGS
,
NULL
},
atexit_run_exitfuncs__doc__
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
/* sentinel */
};
};
...
@@ -209,10 +227,10 @@ static PyMethodDef atexit_methods[] = {
...
@@ -209,10 +227,10 @@ static PyMethodDef atexit_methods[] = {
/* Initialization function. */
/* Initialization function. */
PyDoc_STRVAR
(
atexit__doc__
,
PyDoc_STRVAR
(
atexit__doc__
,
"a
texit.py - a
llow programmer to define multiple exit functions to be executed\
"allow programmer to define multiple exit functions to be executed\
upon normal program termination.
\n
\
upon normal program termination.
\n
\
\n
\
\n
\
One public function, register, is
defined.
\n
\
Two public functions, register and unregister, are
defined.
\n
\
"
);
"
);
PyMODINIT_FUNC
PyMODINIT_FUNC
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment