summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-23 18:08:11 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-23 18:08:11 (GMT)
commitf9e115abf5ee23f02dcdde9e1e9def3f4068d891 (patch)
tree3541fec73b855eaaa365c7d795441fd0f48fef32 /Modules
parent56dc955049d625acac3e46085de60d23365d6c62 (diff)
downloadcpython-f9e115abf5ee23f02dcdde9e1e9def3f4068d891.zip
cpython-f9e115abf5ee23f02dcdde9e1e9def3f4068d891.tar.gz
cpython-f9e115abf5ee23f02dcdde9e1e9def3f4068d891.tar.bz2
Use a newer API for creating the module so we don't have to create
the docstring manually. Saves code and a call to PyString_FromString. (There are still more calls to PyString_FromString.)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_localemodule.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index f45b85e..0ac7f36 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -645,7 +645,7 @@ init_locale(void)
int i;
#endif
- m = Py_InitModule("_locale", PyLocale_Methods);
+ m = Py_InitModule3("_locale", PyLocale_Methods, locale__doc__);
if (m == NULL)
return;
@@ -688,10 +688,6 @@ init_locale(void)
Error = PyErr_NewException("locale.Error", NULL, NULL);
PyDict_SetItemString(d, "Error", Error);
- x = PyString_FromString(locale__doc__);
- PyDict_SetItemString(d, "__doc__", x);
- Py_XDECREF(x);
-
#ifdef HAVE_LANGINFO_H
for (i = 0; langinfo_constants[i].name; i++) {
PyModule_AddIntConstant(m, langinfo_constants[i].name,