From 904cecd150c2c5c768944d199169957cdb8433f9 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sat, 12 Dec 2015 14:47:21 -0800 Subject: Add fake libc path to func_defs.py --- examples/func_defs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/func_defs.py b/examples/func_defs.py index eacca41..552f860 100644 --- a/examples/func_defs.py +++ b/examples/func_defs.py @@ -5,7 +5,7 @@ # C file. # # This is a simple example of traversing the AST generated by -# pycparser. +# pycparser. Call it from the root directory of pycparser. # # Copyright (C) 2008-2015, Eli Bendersky # License: BSD @@ -30,7 +30,8 @@ class FuncDefVisitor(c_ast.NodeVisitor): def show_func_defs(filename): # Note that cpp is used. Provide a path to your own cpp or # make sure one exists in PATH. - ast = parse_file(filename, use_cpp=True) + ast = parse_file(filename, use_cpp=True, + cpp_args=r'-Iutils/fake_libc_include') v = FuncDefVisitor() v.visit(ast) -- cgit v1.2.1