Skip to content

Commit c6b7558

Browse files
committed
fix(declare.rs): Clone name when buiding without the master feat.
1 parent 9ea3c19 commit c6b7558

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/declare.rs

+12
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,18 @@ fn declare_raw_fn<'gcc>(
182182
.collect();
183183
#[cfg(not(feature = "master"))]
184184
let name = mangle_name(name);
185+
186+
#[cfg(not(feature = "master"))]
187+
let func = cx.context.new_function(
188+
None,
189+
cx.linkage.get(),
190+
return_type,
191+
&params,
192+
name.clone(),
193+
variadic,
194+
);
195+
196+
#[cfg(feature = "master")]
185197
let func =
186198
cx.context.new_function(None, cx.linkage.get(), return_type, &params, name, variadic);
187199
cx.functions.borrow_mut().insert(name.to_string(), func);

0 commit comments

Comments
 (0)