diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-06-13 20:33:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-06-13 20:33:02 (GMT) |
commit | 14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f (patch) | |
tree | 7b150133cdd51df851c6bdaf261cd9ea30c149af /Modules/pwdmodule.c | |
parent | 654c11ee3a2c9b72c040524c9cc4f95a1858f20b (diff) | |
download | cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.zip cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.gz cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.bz2 |
Patch #568124: Add doc string macros.
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r-- | Modules/pwdmodule.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 701ae03..b51b7f9 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -18,11 +18,11 @@ static PyStructSequence_Field struct_pwd_type_fields[] = { {0} }; -static char struct_passwd__doc__[] = +PyDoc_STRVAR(struct_passwd__doc__, "pwd.struct_passwd: Results from getpw*() routines.\n\n\ This object may be accessed either as a tuple of\n\ (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)\n\ -or via the object attributes as named in the above tuple.\n"; +or via the object attributes as named in the above tuple."); static PyStructSequence_Desc struct_pwd_type_desc = { "pwd.struct_passwd", @@ -31,15 +31,15 @@ static PyStructSequence_Desc struct_pwd_type_desc = { 7, }; -static char pwd__doc__ [] = "\ -This module provides access to the Unix password database.\n\ +PyDoc_STRVAR(pwd__doc__, +"This module provides access to the Unix password database.\n\ It is available on all Unix versions.\n\ \n\ Password database entries are reported as 7-tuples containing the following\n\ items from the password database (see `<pwd.h>'), in order:\n\ pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir, pw_shell.\n\ The uid and gid items are integers, all others are strings. An\n\ -exception is raised if the entry asked for cannot be found."; +exception is raised if the entry asked for cannot be found."); static PyTypeObject StructPwdType; @@ -74,10 +74,11 @@ mkpwent(struct passwd *p) return v; } -static char pwd_getpwuid__doc__[] = "\ -getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)\n\ +PyDoc_STRVAR(pwd_getpwuid__doc__, +"getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,\n\ + pw_gid,pw_gecos,pw_dir,pw_shell)\n\ Return the password database entry for the given numeric user ID.\n\ -See pwd.__doc__ for more on password database entries."; +See pwd.__doc__ for more on password database entries."); static PyObject * pwd_getpwuid(PyObject *self, PyObject *args) @@ -93,10 +94,11 @@ pwd_getpwuid(PyObject *self, PyObject *args) return mkpwent(p); } -static char pwd_getpwnam__doc__[] = "\ -getpwnam(name) -> (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)\n\ +PyDoc_STRVAR(pwd_getpwnam__doc__, +"getpwnam(name) -> (pw_name,pw_passwd,pw_uid,\n\ + pw_gid,pw_gecos,pw_dir,pw_shell)\n\ Return the password database entry for the given user name.\n\ -See pwd.__doc__ for more on password database entries."; +See pwd.__doc__ for more on password database entries."); static PyObject * pwd_getpwnam(PyObject *self, PyObject *args) @@ -113,11 +115,11 @@ pwd_getpwnam(PyObject *self, PyObject *args) } #ifdef HAVE_GETPWENT -static char pwd_getpwall__doc__[] = "\ -getpwall() -> list_of_entries\n\ +PyDoc_STRVAR(pwd_getpwall__doc__, +"getpwall() -> list_of_entries\n\ Return a list of all available password database entries, \ in arbitrary order.\n\ -See pwd.__doc__ for more on password database entries."; +See pwd.__doc__ for more on password database entries."); static PyObject * pwd_getpwall(PyObject *self) |