rv = GetChildList(parent, &theCount, &childArray); if (NS_SUCCEEDED(rv)) {  for (i = 0; i < theCount; i++) { prefName = (char *)childArray[i]; (*callback)((char*)prefName, arg);
EnumerateData ed; ed.parent = parent; ed.pref_list = &prefArray; PL_HashTableEnumerateEntries(gHashTable, pref_enumChild, &ed);    PRInt32 numPrefs = prefArray.Count(); PRInt32 i; for (i=0; i < numPrefs; i++) { char *prefName = (char *)prefArray.ElementAt(i); (*callback)((char*)prefName, arg);
NS_IMETHODIMP nsPref::EnumerateChildren(const char *parent, PrefEnumerationFunc callback, void *arg) {  PRUint32 theCount;  PRUint32 i;  nsresult rv;  char     **childArray;  char     *prefName;  rv = GetChildList(parent, &theCount, &childArray);  if (NS_SUCCEEDED(rv)) {    // now that we've built up the list, run the callback on all the matching elements    for (i = 0; i < theCount; i++) {      prefName = (char *)childArray[i];      (*callback)((char*)prefName, arg);    }    // now release all the memory    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(theCount, childArray);  }  return NS_OK;}