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

Fred L. Drake fdrake@users.sourceforge.net
Wed, 03 Apr 2002 13:39:29 -0800


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

Modified Files:
	unicodedata.c 
Log Message:
Remove direct manipulation of the module dict.

Index: unicodedata.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/unicodedata.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** unicodedata.c	3 Mar 2002 02:59:16 -0000	2.15
--- unicodedata.c	3 Apr 2002 21:39:26 -0000	2.16
***************
*** 464,468 ****
  initunicodedata(void)
  {
!     PyObject *m, *d, *v;
  
      m = Py_InitModule3(
--- 464,468 ----
  initunicodedata(void)
  {
!     PyObject *m, *v;
  
      m = Py_InitModule3(
***************
*** 471,483 ****
          return;
  
-     d = PyModule_GetDict(m);
-     if (!d)
-         return;
- 
      /* Export C API */
      v = PyCObject_FromVoidPtr((void *) &hashAPI, NULL);
!     if (v != NULL) {
!         PyDict_SetItemString(d, "ucnhash_CAPI", v);
!         Py_DECREF(v);
!     }
  }
--- 471,477 ----
          return;
  
      /* Export C API */
      v = PyCObject_FromVoidPtr((void *) &hashAPI, NULL);
!     if (v != NULL)
!         PyModule_AddObject(m, "ucnhash_CAPI", v);
  }