Use shared AST module.
This commit is contained in:
parent
2fd30321a8
commit
038b058e63
@ -1312,11 +1312,13 @@ impl Module {
|
|||||||
|
|
||||||
#[cfg(not(feature = "no_function"))]
|
#[cfg(not(feature = "no_function"))]
|
||||||
if merge_namespaces {
|
if merge_namespaces {
|
||||||
|
let ast_lib: Shared<Module> = ast.lib().clone().into();
|
||||||
|
|
||||||
ast.iter_functions()
|
ast.iter_functions()
|
||||||
.filter(|(access, _, _)| access.is_public())
|
.filter(|(access, _, _)| access.is_public())
|
||||||
.for_each(|(_, name, num_args)| {
|
.for_each(|(_, name, num_args)| {
|
||||||
let fn_name = name.to_string();
|
let fn_name = name.to_string();
|
||||||
let ast_lib = ast.lib().clone();
|
let ast_lib = ast_lib.clone();
|
||||||
|
|
||||||
module.set_raw_fn_as_scripted(
|
module.set_raw_fn_as_scripted(
|
||||||
name,
|
name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user