File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -571,9 +571,9 @@ pub fn get_raw_line() string {
571571 }
572572 } $else {
573573 max := usize (0 )
574- buf := & char (0 )
574+ buf := unsafe { & u8 (0 ) }
575575 nr_chars := unsafe { C.getline (voidptr (& buf), & max, C.stdin) }
576- str := unsafe { tos (& u8 ( buf) , if nr_chars < 0 { 0 } else { nr_chars }) }
576+ str := unsafe { tos (buf, if nr_chars < 0 { 0 } else { nr_chars }) }
577577 ret := str.clone ()
578578 $if ! autofree {
579579 unsafe {
@@ -616,7 +616,7 @@ pub fn get_raw_stdin() []u8 {
616616 }
617617 } $else {
618618 max := usize (0 )
619- buf := & char (0 )
619+ buf := unsafe { & u8 (0 ) }
620620 nr_chars := unsafe { C.getline (voidptr (& buf), & max, C.stdin) }
621621 return array{
622622 element_size: 1
Original file line number Diff line number Diff line change @@ -1034,14 +1034,14 @@ pub fn (mut t Transformer) if_expr(mut node ast.IfExpr) ast.Expr {
10341034 match expr {
10351035 ast.IfExpr {
10361036 if expr.branches.len == 1 {
1037- branch.stmts.pop ( )
1037+ branch.stmts.delete (branch.stmts.len - 1 )
10381038 branch.stmts << expr.branches[0 ].stmts
10391039 break
10401040 }
10411041 }
10421042 ast.MatchExpr {
10431043 if expr.branches.len == 1 {
1044- branch.stmts.pop ( )
1044+ branch.stmts.delete (branch.stmts.len - 1 )
10451045 branch.stmts << expr.branches[0 ].stmts
10461046 break
10471047 }
@@ -1075,14 +1075,14 @@ pub fn (mut t Transformer) match_expr(mut node ast.MatchExpr) ast.Expr {
10751075 match expr {
10761076 ast.IfExpr {
10771077 if expr.branches.len == 1 {
1078- branch.stmts.pop ( )
1078+ branch.stmts.delete (branch.stmts.len - 1 )
10791079 branch.stmts << expr.branches[0 ].stmts
10801080 break
10811081 }
10821082 }
10831083 ast.MatchExpr {
10841084 if expr.branches.len == 1 {
1085- branch.stmts.pop ( )
1085+ branch.stmts.delete (branch.stmts.len - 1 )
10861086 branch.stmts << expr.branches[0 ].stmts
10871087 break
10881088 }
You can’t perform that action at this time.
0 commit comments