LocalizationBindings.h (724B)
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/. */ 4 5 #ifndef mozilla_intl_l10n_LocalizationBindings_h 6 #define mozilla_intl_l10n_LocalizationBindings_h 7 8 #include "mozilla/intl/localization_ffi_generated.h" 9 10 #include "mozilla/RefPtr.h" 11 12 namespace mozilla { 13 14 template <> 15 struct RefPtrTraits<intl::ffi::LocalizationRc> { 16 static void AddRef(const intl::ffi::LocalizationRc* aPtr) { 17 intl::ffi::localization_addref(aPtr); 18 } 19 static void Release(const intl::ffi::LocalizationRc* aPtr) { 20 intl::ffi::localization_release(aPtr); 21 } 22 }; 23 24 } // namespace mozilla 25 26 #endif