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

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


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

Modified Files:
	_random.c 
Log Message:
Now that PyType_Ready() is getting called, this doesn't need its own
custom destructor (there are no Python objects in the state).


Index: _random.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/twister/_random.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** _random.c	29 Dec 2002 08:31:43 -0000	1.16
--- _random.c	29 Dec 2002 08:34:29 -0000	1.17
***************
*** 428,437 ****
  }
  
- static void
- random_dealloc(RandomObject *self)
- {
- 	self->ob_type->tp_free(self);
- }
- 
  static PyMethodDef random_methods[] = {
  	{"random",	(PyCFunction)random_random,  METH_NOARGS,
--- 428,431 ----
***************
*** 459,463 ****
  	0,				/*tp_itemsize*/
  	/* methods */
! 	(destructor)random_dealloc,	/*tp_dealloc*/
  	0,				/*tp_print*/
  	0,				/*tp_getattr*/
--- 453,457 ----
  	0,				/*tp_itemsize*/
  	/* methods */
! 	0,				/*tp_dealloc*/
  	0,				/*tp_print*/
  	0,				/*tp_getattr*/
***************
*** 493,497 ****
  	PyType_GenericAlloc,		/*tp_alloc*/
  	random_new,			/*tp_new*/
! 	0,				/*tp_free*/
  	0,				/*tp_is_gc*/
  };
--- 487,491 ----
  	PyType_GenericAlloc,		/*tp_alloc*/
  	random_new,			/*tp_new*/
! 	_PyObject_Del,			/*tp_free*/
  	0,				/*tp_is_gc*/
  };