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"
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
);
25 class DefaultDelete
<intl::ffi::FluentBundleRc
> {
27 void operator()(intl::ffi::FluentBundleRc
* aPtr
) const {
28 fluent_bundle_destroy(aPtr
);
32 } // namespace mozilla