rendered paste bodyNS_IMETHODIMP lizLayer::GetAllFeature(PRUint32 *count, lizIFeature ***allFeature) { if (!_OGRLayer) return NS_ERROR_NOT_INITIALIZED; nsresult rv; unsigned int fCount = _OGRLayer->GetFeatureCount(); unsigned int i = 0; *count = fCount; //FIXME: use malloc ??? *allFeature = (lizIFeature**)malloc(f Count * sizeof(lizIFeature*)); OGRFeature * ft; for (i = 0; i < fCount; i++) { PR_fprintf(PR_STDERR, "--- %i / %i\n", i, fCount); ft = _OGRLayer->GetNextFeature(); if (ft) { //FIXME: check rv nsCOMPtr<lizIFeature> alizFeature = do_CreateInstance("@3liz.org/geo/lizFeature;1", &rv); alizFeature->Init((void *)ft); NS_ADDREF((*allFeature)[i] = alizFeature); } } return NS_OK;}