diff options
author | Fred Drake <fdrake@acm.org> | 2001-11-02 22:04:17 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-11-02 22:04:17 (GMT) |
commit | 8b14ac98986c585d301eb8d2782602c43a7e54dd (patch) | |
tree | 0433386a60830328f02e4be4b46ba38206de3959 /Modules/shamodule.c | |
parent | f792bba98f081b1d05b32ce3a9085ef135b75b96 (diff) | |
download | cpython-8b14ac98986c585d301eb8d2782602c43a7e54dd.zip cpython-8b14ac98986c585d301eb8d2782602c43a7e54dd.tar.gz cpython-8b14ac98986c585d301eb8d2782602c43a7e54dd.tar.bz2 |
Clean up a Tab inconsistency.
Simplfy the insint() macro to use PyModule_AddIntConstant().
Diffstat (limited to 'Modules/shamodule.c')
-rw-r--r-- | Modules/shamodule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/shamodule.c b/Modules/shamodule.c index 724f6d6..b3831b9 100644 --- a/Modules/shamodule.c +++ b/Modules/shamodule.c @@ -459,7 +459,7 @@ SHA_getattr(PyObject *self, char *name) if (strcmp(name, "blocksize")==0) return PyInt_FromLong(1); if (strcmp(name, "digest_size")==0 || strcmp(name, "digestsize")==0) - return PyInt_FromLong(20); + return PyInt_FromLong(20); return Py_FindMethod(SHA_methods, self, name); } @@ -524,9 +524,7 @@ static struct PyMethodDef SHA_functions[] = { /* Initialize this module. */ -#define insint(n,v) { PyObject *o=PyInt_FromLong(v); \ - if (o!=NULL) PyDict_SetItemString(d,n,o); \ - Py_XDECREF(o); } +#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } DL_EXPORT(void) initsha(void) |