[Python-checkins] python/nondist/sandbox/twister _random.c,1.15,1.16

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sun, 29 Dec 2002 00:31:45 -0800


Update of /cvsroot/python/python/nondist/sandbox/twister
In directory sc8-pr-cvs1:/tmp/cvs-serv4547

Modified Files:
	_random.c 
Log Message:
Call PyType_Ready() on the random-object type.


Index: _random.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/twister/_random.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** _random.c	29 Dec 2002 08:25:51 -0000	1.15
--- _random.c	29 Dec 2002 08:31:43 -0000	1.16
***************
*** 498,502 ****
  
  PyDoc_STRVAR(module_doc,
! "Module implements the Mersenne Twister random number generator .");
  
  PyMODINIT_FUNC
--- 498,502 ----
  
  PyDoc_STRVAR(module_doc,
! "Module implements the Mersenne Twister random number generator.");
  
  PyMODINIT_FUNC
***************
*** 505,509 ****
  	PyObject *m;
  
! 	Random_Type.ob_type = &PyType_Type;
  	m = Py_InitModule3("_random", NULL, module_doc);
  	Py_INCREF(&Random_Type);
--- 505,510 ----
  	PyObject *m;
  
! 	if (PyType_Ready(&Random_Type) < 0)
! 		return;
  	m = Py_InitModule3("_random", NULL, module_doc);
  	Py_INCREF(&Random_Type);