extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr, nsIFile* location, nsIModule** return_cobj) { nsresult rv = NS_OK;  NS_ENSURE_ARG_POINTER(return_cobj); NS_ENSURE_FALSE(gModule, NS_ERROR_FAILURE);   nsConverterModule * m = new nsConverterModule(); if (!m) { return NS_ERROR_OUT_OF_MEMORY; }   rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj); if (NS_FAILED(rv)) { delete m; m = nsnull; } gModule = m; return rv; }
NS_IMPL_NSGETMODULE("nsUCvLatinModule", components);
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,                                          nsIFile* location,                                          nsIModule** return_cobj){  nsresult rv = NS_OK;  NS_ENSURE_ARG_POINTER(return_cobj);  NS_ENSURE_FALSE(gModule, NS_ERROR_FAILURE);  // Create an initialize the module instance  nsConverterModule * m = new nsConverterModule();  if (!m) {    return NS_ERROR_OUT_OF_MEMORY;  }  // Increase refcnt and store away nsIModule interface to m in return_cobj  rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);  if (NS_FAILED(rv)) {    delete m;    m = nsnull;  }  gModule = m;                  // WARNING: Weak Reference  return rv;}