File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ use crate::string::AvmString;
9
9
/// It is expected that the AS signature is correct and you only operate on values defined from it.
10
10
/// These values will be `expect()`ed to exist, and any method here will panic if they're missing.
11
11
pub trait ParametersExt < ' gc > {
12
+ /// Gets the value at the given index.
13
+ fn get_value ( & self , index : usize ) -> Value < ' gc > ;
14
+
12
15
/// Gets the value at the given index and coerces it to an Object.
13
16
///
14
17
/// If the value is null or is undefined, a TypeError 2007 is raised.
@@ -86,6 +89,11 @@ pub trait ParametersExt<'gc> {
86
89
}
87
90
88
91
impl < ' gc > ParametersExt < ' gc > for & [ Value < ' gc > ] {
92
+ #[ inline]
93
+ fn get_value ( & self , index : usize ) -> Value < ' gc > {
94
+ self [ index]
95
+ }
96
+
89
97
fn get_object (
90
98
& self ,
91
99
activation : & mut Activation < ' _ , ' gc > ,
You can’t perform that action at this time.
0 commit comments