intl/locale/nsPosixLocale.h
author Boris Zbarsky <bzbarsky@mit.edu>
Thu, 16 Oct 2014 23:18:42 -0400
changeset 210843 01d25edea2bc80f6d27d74704f9f9364c2eab63a
parent 196037 0732215ac8e87d4f4837a16373ce850766632469
child 489668 cbb8fdf1daf98a15f7d57f6b08d273bdf96aa1a0
permissions -rw-r--r--
Bug 1083232. Don't refcount the principals in FrameState, since it has stack lifetime and the principals will be kept alive by the JS stack while he FrameState is alive. r=fitzgen

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsIPosixLocale_h__
#define nsIPosixLocale_h__


#include "nscore.h"
#include "nsString.h"

#define MAX_LANGUAGE_CODE_LEN 3
#define MAX_COUNTRY_CODE_LEN  3
#define MAX_LOCALE_LEN        128
#define MAX_EXTRA_LEN         65

class nsPosixLocale {

public:
  static nsresult GetPlatformLocale(const nsAString& locale, nsACString& posixLocale);
  static nsresult GetXPLocale(const char* posixLocale, nsAString& locale);
};

#endif