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
549cb6ea
Commit
549cb6ea
authored
Aug 11, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a module docstring (that's all this module needs).
parent
0618f5e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
Modules/errnomodule.c
Modules/errnomodule.c
+15
-1
No files found.
Modules/errnomodule.c
View file @
549cb6ea
...
...
@@ -80,11 +80,25 @@ _inscode(d, de, name, code)
Py_XDECREF
(
v
);
}
static
char
errno__doc__
[]
=
"This module makes available standard errno system symbols.
\n
\
\n
\
The value of each symbol is the corresponding integer value,
\n
\
e.g., on most systems, errno.ENOENT equals the integer 2.
\n
\
\n
\
The dictionary errno.errorcode maps numeric codes to symbol names,
\n
\
e.g., errno.errorcode[2] could be the string 'ENOENT'.
\n
\
\n
\
Symbols that are not relevant to the underlying system are not defined.
\n
\
\n
\
To map error codes to error messages, use the function os.strerror(),
\n
\
e.g. os.strerror(2) could return 'No such file or directory'."
;
void
initerrno
()
{
PyObject
*
m
,
*
d
,
*
de
;
m
=
Py_InitModule
(
"errno"
,
errno_methods
);
m
=
Py_InitModule
3
(
"errno"
,
errno_methods
,
errno__doc__
);
d
=
PyModule_GetDict
(
m
);
de
=
PyDict_New
();
if
(
de
==
NULL
||
PyDict_SetItemString
(
d
,
"errorcode"
,
de
))
...
...
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