Fix tests.
This commit is contained in:
parent
67a7ab4069
commit
ec5ad320a1
@ -2197,16 +2197,10 @@ impl Module {
|
|||||||
})
|
})
|
||||||
.for_each(|f| {
|
.for_each(|f| {
|
||||||
let hash = module.set_script_fn(f.clone());
|
let hash = module.set_script_fn(f.clone());
|
||||||
|
let f = module.functions.as_mut().unwrap().get_mut(&hash).unwrap();
|
||||||
|
|
||||||
// Encapsulate AST environment
|
// Encapsulate AST environment
|
||||||
match module
|
match f.func {
|
||||||
.functions
|
|
||||||
.as_mut()
|
|
||||||
.unwrap()
|
|
||||||
.get_mut(&hash)
|
|
||||||
.unwrap()
|
|
||||||
.func
|
|
||||||
{
|
|
||||||
CallableFunction::Script(.., ref mut e) => *e = Some(environ.clone()),
|
CallableFunction::Script(.., ref mut e) => *e = Some(environ.clone()),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,9 @@ fn check_struct_sizes() {
|
|||||||
size_of::<Option<ast::Stmt>>(),
|
size_of::<Option<ast::Stmt>>(),
|
||||||
if IS_32_BIT { 12 } else { 16 }
|
if IS_32_BIT { 12 } else { 16 }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#[cfg(feature = "internals")]
|
||||||
|
{
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
size_of::<CallableFunction>(),
|
size_of::<CallableFunction>(),
|
||||||
if IS_32_BIT { 12 } else { 24 }
|
if IS_32_BIT { 12 } else { 24 }
|
||||||
@ -39,6 +42,7 @@ fn check_struct_sizes() {
|
|||||||
size_of::<module::FuncInfo>(),
|
size_of::<module::FuncInfo>(),
|
||||||
if IS_32_BIT { 16 } else { 32 }
|
if IS_32_BIT { 16 } else { 32 }
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user