Bug 1826760 - Make dom/media/platforms/wmf buildable outside of a unified build envir...
[gecko.git] / intl / l10n / FluentBindings.h
blob836929eef03344f996a1d89cf0286548956681f2
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_intl_l10n_FluentBindings_h
6 #define mozilla_intl_l10n_FluentBindings_h
8 #include "mozilla/intl/fluent_ffi_generated.h"
10 #include "mozilla/RefPtr.h"
12 namespace mozilla {
14 template <>
15 struct RefPtrTraits<intl::ffi::FluentResource> {
16 static void AddRef(const intl::ffi::FluentResource* aPtr) {
17 intl::ffi::fluent_resource_addref(aPtr);
19 static void Release(const intl::ffi::FluentResource* aPtr) {
20 intl::ffi::fluent_resource_release(aPtr);
24 template <>
25 class DefaultDelete<intl::ffi::FluentBundleRc> {
26 public:
27 void operator()(intl::ffi::FluentBundleRc* aPtr) const {
28 fluent_bundle_destroy(aPtr);
32 } // namespace mozilla
34 #endif