From 861555876837449fd8fc480845f642dab4a68b1e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 12 Nov 2019 15:59:58 +0300 Subject: Use path_name in cc::lexer class --- libbuild2/cc/parser.test.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libbuild2/cc/parser.test.cxx') diff --git a/libbuild2/cc/parser.test.cxx b/libbuild2/cc/parser.test.cxx index 82c68d1..9d90653 100644 --- a/libbuild2/cc/parser.test.cxx +++ b/libbuild2/cc/parser.test.cxx @@ -24,22 +24,26 @@ namespace build2 { try { - const char* file; + path file; + path_name in; ifdstream is; + if (argc > 1) { - file = argv[1]; + file = path (argv[1]); + + in = path_name (file); is.open (file); } else { - file = "stdin"; + in = path_name (""); is.open (fddup (stdin_fd ())); } parser p; - unit u (p.parse (is, path (file))); + unit u (p.parse (is, in)); unit_type ut (u.type); for (const module_import& m: u.module_info.imports) -- cgit v1.1