test cases/rust/20 rust and cpp/lib.cpp
raw| 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright © 2023 Intel Corporation |
| 3 | |
| 4 | #include "lib.hpp" |
| 5 | |
| 6 | #include <string> |
| 7 | |
| 8 | namespace { |
| 9 | |
| 10 | uint64_t priv_length(const std::string & str) { |
| 11 | return str.length(); |
| 12 | } |
| 13 | |
| 14 | } |
| 15 | |
| 16 | extern "C" uint64_t lib_length(const char * str) { |
| 17 | return priv_length(str); |
| 18 | } |