aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/locale/locale.cpp
blob: 63fafc361053cac359eaf793c106031a56af70ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "locale.h"
#include <cassert>

namespace vespalib::locale {

Locale::Locale() : Locale(LC_ALL_MASK, "C") { }
Locale::Locale(int category, const char *locale)
    : _locale(newlocale(category, locale, nullptr))
{
    assert(_locale != nullptr);
}

Locale::~Locale() {
    freelocale(_locale);
}

}