Closed yangchengjian closed 6 years ago
To achieve the equivalent of
ArSession **ar_session = NULL;
you can write
let ar_session: *mut *mut () = ::std::ptr::null_mut();
To achieve the equivalent of:
ArSession *ar_session = NULL;
ArSession_create(env, application_context, &ar_session)
write
let mut ar_session: *mut ArSession = ::std::ptr::null_mut();
ArSession_create(env, application_context, &mut ar_session);
All that being said, Rustc issue tracker is not a help forum. Next time, you can request for help on the users forum, reddit, StackOverflow or IRC (#rust @ irc.mozilla.org).
There are a rust function generated by bindgen with a header c_api.h
and I want to call from another rust module
How should I translate rust struct to nested pointer?