summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/func_defs.py5
1 files 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)