From ed37512ea9e0c4970171a6b5c9ade6fb138a4300 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 5 Apr 2021 07:55:28 +0300 Subject: [PATCH] ci: run wkhtmltopdf only on linux again --- cmd/tools/modules/testing/common.v | 2 +- examples/c_interop_wkhtmltopdf.v | 2 +- vlib/v/ast/ast.v | 2 +- vlib/v/parser/pratt.v | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index 0d8c0ece79..aed98ff061 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -143,7 +143,7 @@ pub fn new_test_session(_vargs string) TestSession { skip_files << 'examples/sokol/06_obj_viewer/obj/util.v' } if testing.github_job != 'ubuntu-tcc' { - skip_files << 'examples/wkhtmltopdf.v' // needs installation of wkhtmltopdf from https://github.com/wkhtmltopdf/packaging/releases + skip_files << 'examples/c_interop_wkhtmltopdf.v' // needs installation of wkhtmltopdf from https://github.com/wkhtmltopdf/packaging/releases // the ttf_test.v is not interactive, but needs X11 headers to be installed, which is done only on ubuntu-tcc for now skip_files << 'vlib/x/ttf/ttf_test.v' } diff --git a/examples/c_interop_wkhtmltopdf.v b/examples/c_interop_wkhtmltopdf.v index 98f371b382..e969f0d01e 100644 --- a/examples/c_interop_wkhtmltopdf.v +++ b/examples/c_interop_wkhtmltopdf.v @@ -71,7 +71,7 @@ fn main() { error_code := C.wkhtmltopdf_http_error_code(converter) println('wkhtmltopdf_http_error_code: $error_code') if result { - data := &&char(0) + data := &charptr(0) size := C.wkhtmltopdf_get_output(converter, data) println('wkhtmltopdf_get_output: $size bytes') mut file := os.open_file('./google.pdf', 'w+', 0o666) or { diff --git a/vlib/v/ast/ast.v b/vlib/v/ast/ast.v index 718b1df336..562a157cce 100644 --- a/vlib/v/ast/ast.v +++ b/vlib/v/ast/ast.v @@ -1067,7 +1067,7 @@ pub mut: typname string // TypeSymbol.name expr_type Type // `byteptr` has_arg bool - in_prexpr bool // is the parent node an PrefixExpr + in_prexpr bool // is the parent node a PrefixExpr } pub struct AsmStmt { diff --git a/vlib/v/parser/pratt.v b/vlib/v/parser/pratt.v index ae1b1d0abf..0a7ec07de8 100644 --- a/vlib/v/parser/pratt.v +++ b/vlib/v/parser/pratt.v @@ -489,6 +489,10 @@ fn (mut p Parser) infix_expr(left ast.Expr) ast.Expr { } } +fn (p &Parser) fileis(s string) bool { + return p.file_name.contains(s) +} + fn (mut p Parser) prefix_expr() ast.PrefixExpr { mut pos := p.tok.position() op := p.tok.kind