fix(declare.rs): Clone name when buiding without the master feat.
This commit is contained in:
parent
9ea3c19055
commit
c6b75581d0
1 changed files with 12 additions and 0 deletions
|
|
@ -182,6 +182,18 @@ fn declare_raw_fn<'gcc>(
|
|||
.collect();
|
||||
#[cfg(not(feature = "master"))]
|
||||
let name = mangle_name(name);
|
||||
|
||||
#[cfg(not(feature = "master"))]
|
||||
let func = cx.context.new_function(
|
||||
None,
|
||||
cx.linkage.get(),
|
||||
return_type,
|
||||
¶ms,
|
||||
name.clone(),
|
||||
variadic,
|
||||
);
|
||||
|
||||
#[cfg(feature = "master")]
|
||||
let func =
|
||||
cx.context.new_function(None, cx.linkage.get(), return_type, ¶ms, name, variadic);
|
||||
cx.functions.borrow_mut().insert(name.to_string(), func);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue