Fixes python memory crashing. http://bugs.debian.org/468994 test case: $ python -c "import Numeric ; import RNG ; a = RNG.NormalDistribution(0,1) ; del a" === modified file 'Packages/RNG/Src/RNGmodule.c' --- Packages/RNG/Src/RNGmodule.c 2008-11-09 21:08:36 +0000 +++ Packages/RNG/Src/RNGmodule.c 2008-11-09 21:08:39 +0000 @@ -79,7 +79,7 @@ { distributionobject *self; - self = PyObject_NEW(distributionobject, &distributiontype); + self = PyObject_New(distributionobject, &distributiontype); if (self == NULL) return NULL; self->density = NULL; @@ -92,7 +92,7 @@ dist_dealloc(distributionobject *self) { Py_XDECREF(self->parameters); - PyMem_DEL(self); + PyObject_Del(self); } @@ -494,7 +494,7 @@ { rngobject *self; - self = PyObject_NEW(rngobject, &rngtype); + self = PyObject_New(rngobject, &rngtype); if (self == NULL) return NULL; self->distribution = distribution; @@ -522,7 +522,7 @@ rng_dealloc(rngobject *self) { Py_DECREF(self->distribution); - PyMem_DEL(self); + PyObject_Del(self); }