comparison FloatHist.c @ 34:8166ea441cb5

changed headers and PR_int__malloc to PR__malloc
author Sean Halle <seanhalle@yahoo.com>
date Tue, 23 Jul 2013 07:32:47 -0700
parents 84601ecae690
children eb23eeae4198
comparison
equal deleted inserted replaced
9:e4985cc69713 10:47835a0bf96f
24 makeFloatHistogram( int32 numBins, float32 startOfRange, float32 binWidth ) 24 makeFloatHistogram( int32 numBins, float32 startOfRange, float32 binWidth )
25 { 25 {
26 FloatHist *hist; 26 FloatHist *hist;
27 int i; 27 int i;
28 28
29 hist = PR_int__malloc( sizeof(FloatHist) ); 29 hist = PR__malloc( sizeof(FloatHist) );
30 hist->bins = PR_int__malloc( numBins * sizeof(int) ); 30 hist->bins = PR__malloc( numBins * sizeof(int) );
31 31
32 hist->numBins = numBins; 32 hist->numBins = numBins;
33 hist->binWidth = binWidth; 33 hist->binWidth = binWidth;
34 hist->endOfRange = startOfRange + hist->binWidth * numBins; 34 hist->endOfRange = startOfRange + hist->binWidth * numBins;
35 hist->startOfRange = startOfRange; 35 hist->startOfRange = startOfRange;
98 98
99 99
100 void 100 void
101 freeFloatHist( FloatHist *hist ) 101 freeFloatHist( FloatHist *hist )
102 { 102 {
103 PR_int__free( hist->bins ); 103 PR__free( hist->bins );
104 PR_int__free( hist ); 104 PR__free( hist );
105 } 105 }