Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsUTF8ToUnicode.cpp File Reference
#include "nsUCSupport.h"
#include "nsUTF8ToUnicode.h"

Go to the source code of this file.

Defines

#define UNICODE_BYTE_ORDER_MARK   0xFEFF

Functions

NS_IMETHODIMP NS_NewUTF8ToUnicode (nsISupports *aOuter, const nsIID &aIID, void **aResult)

Define Documentation

Definition at line 41 of file nsUTF8ToUnicode.cpp.


Function Documentation

NS_IMETHODIMP NS_NewUTF8ToUnicode ( nsISupports *  aOuter,
const nsIID aIID,
void **  aResult 
)

Definition at line 43 of file nsUTF8ToUnicode.cpp.

{
  if (!aResult) {
    return NS_ERROR_NULL_POINTER;
  }
  if (aOuter) {
    *aResult = nsnull;
    return NS_ERROR_NO_AGGREGATION;
  }
  nsUTF8ToUnicode * inst = new nsUTF8ToUnicode();
  if (!inst) {
    *aResult = nsnull;
    return NS_ERROR_OUT_OF_MEMORY;
  }
  nsresult res = inst->QueryInterface(aIID, aResult);
  if (NS_FAILED(res)) {
    *aResult = nsnull;
    delete inst;
  }
  return res;
}