From ef7bc2e6cc4856a0372086b3ceb7d470508aaa52 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 28 Jul 2022 18:08:22 +0530 Subject: perf(ext/ffi): use fast api calls for 64bit return types (#15313) --- test_ffi/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test_ffi/src') diff --git a/test_ffi/src/lib.rs b/test_ffi/src/lib.rs index bc89bd66c..b061ca8d5 100644 --- a/test_ffi/src/lib.rs +++ b/test_ffi/src/lib.rs @@ -404,3 +404,10 @@ pub struct Structure { #[no_mangle] pub static mut static_ptr: Structure = Structure { _data: 42 }; + +static STRING: &str = "Hello, world!\0"; + +#[no_mangle] +extern "C" fn ffi_string() -> *const u8 { + STRING.as_ptr() +} -- cgit v1.2.3