| // Copyright 2026 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #include <lib/fxt/interned_string.h> | |
| #include <cstdint> | |
| extern "C" { | |
| // Returns a non-null, aligned pointer to the immutable `'static` `fxt::InternedString` for | |
| // `"cpp.only.interned"` in `__fxt_interned_string_table` (backed by a `'static` NUL-terminated | |
| // literal of length `<= fxt::InternedString::kMaxStringLength`). | |
| const fxt::InternedString* get_cpp_only_ptr() noexcept { | |
| using fxt::operator""_intern; | |
| return &"cpp.only.interned"_intern; | |
| } | |
| uint16_t get_cpp_only_id() noexcept { | |
| using fxt::operator""_intern; | |
| return ("cpp.only.interned"_intern).id(); | |
| } | |
| } // extern "C" |