@@ -7,8 +7,8 @@ macro_rules! lock {
77 ( $cx: ident, $( $path: expr ) ,+ ) => {
88 $(
99 let path_buf: PathBuf = ( & $path) . into( ) ;
10- let mut fl = $crate:: file_util:: FileLock :: new( path_buf) . map_err( |e| crate :: helpers:: convert_err( & mut $cx, e) ) ?;
11- let _lock = fl. lock( ) . map_err( |e| crate :: helpers:: convert_err( & mut $cx, e) ) ?;
10+ let mut fl = $crate:: file_util:: FileLock :: new( path_buf) . map_err( |e| $ crate:: helpers:: convert_err( & mut $cx, e) ) ?;
11+ let _lock = fl. lock( ) . map_err( |e| $ crate:: helpers:: convert_err( & mut $cx, e) ) ?;
1212 ) *
1313 } ;
1414}
@@ -17,7 +17,7 @@ macro_rules! lock {
1717macro_rules! parse_arg {
1818 ( $cx: ident, $ty: path, $i: expr) => { {
1919 let arg = $cx. argument:: <JsValue >( $i) ?;
20- crate :: de:: from_value:: <_, $ty>( & mut $cx, arg) . expect( "failed to parse argument" )
20+ $ crate:: de:: from_value:: <_, $ty>( & mut $cx, arg) . expect( "failed to parse argument" )
2121 } } ;
2222}
2323
@@ -86,6 +86,19 @@ macro_rules! parse_args {
8686 parse_arg!( $cx, $ty7, 7 ) ,
8787 ) ;
8888 } ;
89+ ( $cx: ident, $id0: ident : $ty0: path, $id1: ident : $ty1: path, $id2: ident : $ty2: path, $id3: ident : $ty3: path, $id4: ident : $ty4: path, $id5: ident : $ty5: path, $id6: ident : $ty6: path, $id7: ident : $ty7: path, $id8: ident : $ty8: path) => {
90+ let ( $id0, $id1, $id2, $id3, $id4, $id5, $id6, $id7, $id8) = (
91+ parse_arg!( $cx, $ty0, 0 ) ,
92+ parse_arg!( $cx, $ty1, 1 ) ,
93+ parse_arg!( $cx, $ty2, 2 ) ,
94+ parse_arg!( $cx, $ty3, 3 ) ,
95+ parse_arg!( $cx, $ty4, 4 ) ,
96+ parse_arg!( $cx, $ty5, 5 ) ,
97+ parse_arg!( $cx, $ty6, 6 ) ,
98+ parse_arg!( $cx, $ty7, 7 ) ,
99+ parse_arg!( $cx, $ty8, 8 ) ,
100+ ) ;
101+ } ;
89102}
90103
91104pub fn convert_err < E : Error > ( cx : & mut FunctionContext , e : E ) -> Throw {
0 commit comments