mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Make sure to drop suffix from symbols exposed to the host
This commit is contained in:
parent
be0afbce25
commit
e3c6b756d3
4 changed files with 22 additions and 15 deletions
|
@ -4324,7 +4324,7 @@ fn expose_function_to_host<'a, 'ctx>(
|
|||
return_layout: InLayout<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
) {
|
||||
let ident_string = symbol.as_str(&env.interns);
|
||||
let ident_string = symbol.as_unsuffixed_str(&env.interns);
|
||||
|
||||
let proc_layout = ProcLayout {
|
||||
arguments,
|
||||
|
@ -5564,7 +5564,7 @@ pub fn build_procedures<'a>(
|
|||
let getter_fn = function_value_by_func_spec(env, FuncBorrowSpec::Some(*func_spec), symbol);
|
||||
|
||||
let name = getter_fn.get_name().to_str().unwrap();
|
||||
let getter_name = symbol.as_str(&env.interns);
|
||||
let getter_name = symbol.as_unsuffixed_str(&env.interns);
|
||||
|
||||
// Add the getter function to the module.
|
||||
let _ = expose_function_to_host_help_c_abi(
|
||||
|
@ -5830,7 +5830,7 @@ fn build_procedures_help<'a>(
|
|||
GenTest | WasmGenTest | CliTest => { /* no host, or exposing types is not supported */ }
|
||||
Binary | BinaryDev | BinaryGlue => {
|
||||
for (proc_name, alias_name, hels) in host_exposed_lambda_sets.iter() {
|
||||
let ident_string = proc_name.name().as_str(&env.interns);
|
||||
let ident_string = proc_name.name().as_unsuffixed_str(&env.interns);
|
||||
let fn_name: String = format!("{}_{}", ident_string, hels.id.0);
|
||||
|
||||
expose_alias_to_host(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue