diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-23 17:55:33 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-23 17:55:33 (GMT) |
commit | 56dc955049d625acac3e46085de60d23365d6c62 (patch) | |
tree | d80d1725f28e67dc0dba6aa7bffdabb3563e52da /Modules/binascii.c | |
parent | 361ed15383845bffc017b6a14acfb9da8f63ef73 (diff) | |
download | cpython-56dc955049d625acac3e46085de60d23365d6c62.zip cpython-56dc955049d625acac3e46085de60d23365d6c62.tar.gz cpython-56dc955049d625acac3e46085de60d23365d6c62.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.
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r-- | Modules/binascii.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index fc7f111..8638035 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -1358,14 +1358,11 @@ initbinascii(void) PyObject *m, *d, *x; /* Create the module and add the functions */ - m = Py_InitModule("binascii", binascii_module_methods); + m = Py_InitModule3("binascii", binascii_module_methods, doc_binascii); if (m == NULL) return; d = PyModule_GetDict(m); - x = PyString_FromString(doc_binascii); - PyDict_SetItemString(d, "__doc__", x); - Py_XDECREF(x); Error = PyErr_NewException("binascii.Error", PyExc_ValueError, NULL); PyDict_SetItemString(d, "Error", Error); |