[Python-checkins] CVS: python/dist/src/Modules shamodule.c,2.15,2.16

Fred L. Drake fdrake@users.sourceforge.net
Fri, 02 Nov 2001 14:04:19 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv21398

Modified Files:
	shamodule.c 
Log Message:
Clean up a Tab inconsistency.
Simplfy the insint() macro to use PyModule_AddIntConstant().


Index: shamodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** shamodule.c	2001/11/02 21:41:00	2.15
--- shamodule.c	2001/11/02 22:04:17	2.16
***************
*** 460,464 ****
          return PyInt_FromLong(1);
      if (strcmp(name, "digest_size")==0 || strcmp(name, "digestsize")==0)
!     	return PyInt_FromLong(20);
  
      return Py_FindMethod(SHA_methods, self, name);
--- 460,464 ----
          return PyInt_FromLong(1);
      if (strcmp(name, "digest_size")==0 || strcmp(name, "digestsize")==0)
!         return PyInt_FromLong(20);
  
      return Py_FindMethod(SHA_methods, self, name);
***************
*** 525,531 ****
  /* Initialize this module. */
  
! #define insint(n,v) { PyObject *o=PyInt_FromLong(v); \
! 	if (o!=NULL) PyDict_SetItemString(d,n,o); \
! 	Py_XDECREF(o); }
  
  DL_EXPORT(void)
--- 525,529 ----
  /* Initialize this module. */
  
! #define insint(n,v) { PyModule_AddIntConstant(m,n,v); }
  
  DL_EXPORT(void)