mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-24 07:40:19 +00:00
Remove '_' segment from symbol of non-associated functions
This commit is contained in:
parent
4d46c03231
commit
9d8d80bd81
@ -2,9 +2,9 @@ use crate::syntax::namespace::Namespace;
|
||||
use crate::syntax::ExternFn;
|
||||
|
||||
pub fn extern_fn(namespace: &Namespace, efn: &ExternFn) -> String {
|
||||
let receiver_type = match &efn.receiver {
|
||||
Some(receiver) => receiver.ident.to_string(),
|
||||
None => "_".to_string(),
|
||||
let receiver = match &efn.receiver {
|
||||
Some(receiver) => receiver.ident.to_string() + "$",
|
||||
None => String::new(),
|
||||
};
|
||||
format!("{}cxxbridge02${}${}", namespace, receiver_type, efn.ident)
|
||||
format!("{}cxxbridge02${}{}", namespace, receiver, efn.ident)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user