summaryrefslogtreecommitdiffstats
path: root/Modules/pwdmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r--Modules/pwdmodule.c30
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)