PRUint16 *ccmap = (PRUint16*)PR_Malloc(CCMAP_EXTRA + (ccmapObj.GetSize()) * sizeof(PRUint16)); NS_ASSERTION(ccmap, "failed to alloc new CCMap");  if (!ccmap) return nsnull;  ccmap += CCMAP_EXTRA; CCMAP_SIZE(ccmap) = ccmapObj.GetSize(); CCMAP_FLAG(ccmap) = CCMAP_NONE_FLAG;  ccmapObj.FillCCMap(ccmap);
PRUint16* ccmap = ccmapObj.NewCCMap();
MapToCCMap(PRUint32* aMap){  // put the data into a temp map  nsCompressedCharMap ccmapObj;  ccmapObj.SetChars(aMap);  PRUint16 *ccmap = (PRUint16*)PR_Malloc(CCMAP_EXTRA + (ccmapObj.GetSize()) * sizeof(PRUint16));  NS_ASSERTION(ccmap, "failed to alloc new CCMap");  if (!ccmap)    return nsnull;  ccmap += CCMAP_EXTRA;  CCMAP_SIZE(ccmap) = ccmapObj.GetSize();  CCMAP_FLAG(ccmap) = CCMAP_NONE_FLAG;  ccmapObj.FillCCMap(ccmap);#ifdef DEBUG  for (int i=0; i<NUM_UNICODE_CHARS; i++) {    PRBool oldb = IS_REPRESENTABLE(aMap, i);    PRBool newb = CCMAP_HAS_CHAR(ccmap, i);    if ((oldb) != (newb)) {      NS_ASSERTION(oldb==newb,"failed to generate map correctly");    }  }#endif  return ccmap;}