Commit 0d4d6572 authored by Fred Drake's avatar Fred Drake

Clean up a Tab inconsistency.

Simplfy the insint() macro to use PyModule_AddIntConstant().
parent 23b5a356
...@@ -459,7 +459,7 @@ SHA_getattr(PyObject *self, char *name) ...@@ -459,7 +459,7 @@ SHA_getattr(PyObject *self, char *name)
if (strcmp(name, "blocksize")==0) if (strcmp(name, "blocksize")==0)
return PyInt_FromLong(1); return PyInt_FromLong(1);
if (strcmp(name, "digest_size")==0 || strcmp(name, "digestsize")==0) 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); return Py_FindMethod(SHA_methods, self, name);
} }
...@@ -524,9 +524,7 @@ static struct PyMethodDef SHA_functions[] = { ...@@ -524,9 +524,7 @@ static struct PyMethodDef SHA_functions[] = {
/* Initialize this module. */ /* Initialize this module. */
#define insint(n,v) { PyObject *o=PyInt_FromLong(v); \ #define insint(n,v) { PyModule_AddIntConstant(m,n,v); }
if (o!=NULL) PyDict_SetItemString(d,n,o); \
Py_XDECREF(o); }
DL_EXPORT(void) DL_EXPORT(void)
initsha(void) initsha(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment